Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp103433iob; Tue, 17 May 2022 20:15:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPCD5QdIxPE5zXebCrFqGLOR2uuufWc67dcKFng35jM1+kwZQXFAFdH3LO0Vula+tBmur+ X-Received: by 2002:a17:902:d482:b0:15e:a06a:db0a with SMTP id c2-20020a170902d48200b0015ea06adb0amr25843851plg.38.1652843735052; Tue, 17 May 2022 20:15:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652843735; cv=none; d=google.com; s=arc-20160816; b=bBFCf97Dmdi+JZLrsDJNO7JvFTnsVsxIti5ty1+4CXmecqcVwBWXVP5SiFm9v5so5G pulqt5kZkg11viPdZMDw2sotRXUl7yGVCkhN75VvdanCtVBY1PqyUivg53u2aY8PhFEB mwsVkhTrUw7hIr2Tv6m6k3zWDP47cag/OoOA8XyBDX/TSbH68NUVj/WIg6aGMgmtbuoe Z2RJaF81e9cJnbnV/G2eAWzVvoy06ygspukPYK46YnCvYvwsAeB+qbF53L2pO10acAqU KURYFs1dPuxOOJ9Niv8pCj/+m/AHmSqqXJC1Jq0glmkvtJb8Lcp08K0QSM3PaOHsA3SC /oGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=G3Z+85KktuxWuC0jLaF0YjwTvaNOStRUiRwJSRg6LZA=; b=Kidlupt3x4txfLtC/NYKki9Ejr5ihGG/JxhLVo3do1N4NfvU2lqs4/0qr+DaBNoN6J USw//RrWXJ6JPGb1UlYE5kF2DTCRJUCTjhX1VZ8+9GwBY6MKfenf7n1+iRTegO0glYbm HYfASWjHiC0AkxDL7VvgurZwnWM78ejXY1iNn1Hc7B+SU6jAJ7INB6CyufpYKCtGecDc whOqozt7bw9uZe60MDntB9twdRbHpJ+sGfdTelO0fVzhX3UKEEMYYQB0OnrWZuq7TK5z lrK+n7fHPdnQkegs0SC3lYhTyD/A+AyN4n8h++kd6YL/0P0SUYkj774TP8cJGl6OvqK7 aUwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id bh9-20020a056a02020900b003aba3e87b3csi981369pgb.43.2022.05.17.20.15.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 20:15:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2636F5AA47; Tue, 17 May 2022 20:14:37 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241909AbiEQMjm (ORCPT + 99 others); Tue, 17 May 2022 08:39:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346190AbiEQMj0 (ORCPT ); Tue, 17 May 2022 08:39:26 -0400 X-Greylist: delayed 30417 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 17 May 2022 05:39:25 PDT Received: from mail.enpas.org (zhong.enpas.org [IPv6:2a03:4000:2:537::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 14E8E4C7BB; Tue, 17 May 2022 05:39:25 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail.enpas.org (Postfix) with ESMTPSA id ED400FF9D7; Tue, 17 May 2022 12:39:23 +0000 (UTC) Date: Tue, 17 May 2022 14:39:21 +0200 From: Max Staudt To: Marc Kleine-Budde Cc: Oliver Hartkopp , Vincent MAILHOL , linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH v3 3/4] can: skb:: move can_dropped_invalid_skb and can_skb_headroom_valid to skb.c Message-ID: <20220517143921.08458f2c.max@enpas.org> In-Reply-To: <20220517122153.4r6n6kkbdslsa2hv@pengutronix.de> References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220514141650.1109542-1-mailhol.vincent@wanadoo.fr> <20220514141650.1109542-4-mailhol.vincent@wanadoo.fr> <7b1644ad-c117-881e-a64f-35b8d8b40ef7@hartkopp.net> <20220517060821.akuqbqxro34tj7x6@pengutronix.de> <20220517104545.eslountqjppvcnz2@pengutronix.de> <20220517141404.578d188a.max@enpas.org> <20220517122153.4r6n6kkbdslsa2hv@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 May 2022 14:21:53 +0200 Marc Kleine-Budde wrote: > On 17.05.2022 14:14:04, Max Staudt wrote: > > > After looking through drivers/net/can/Kconfig I would probably > > > phrase it like this: > > > > > > Select CAN devices (hw/sw) -> we compile a can_dev module. E.g. > > > to handle the skb stuff for vcan's. > > > > > > Select hardware CAN devices -> we compile the netlink stuff into > > > can_dev and offer CAN_CALC_BITTIMING and CAN_LEDS to be compiled > > > into can_dev too. > > > > > > In the latter case: The selection of flexcan, ti_hecc and > > > mcp251xfd automatically selects CAN_RX_OFFLOAD which is then also > > > compiled into can_dev. > > > > > > Would that fit in terms of complexity? > > > > IMHO these should always be compiled into can-dev. Out of tree > > drivers are fairly common here, and having to determine which kind > > of can-dev (stripped or not) the user has on their system is a > > nightmare waiting to happen. > > I personally don't care about out-of-tree drivers. I know that this is the official stance in the kernel. But out-of-tree drivers do happen on a regular basis, even when developing with the aim of upstreaming. And if a developer builds a minimal kernel to host a CAN driver, without building in-tree hardware CAN drivers, then can-dev will be there but behave differently from can-dev in a full distro. Leading to heisenbugs and wasting time. The source of heisenbugs really are the suggested *hidden* Kconfigs. On another note, is the module accounting overhead in the kernel for two new modules with relatively little code in each, code that almost always is loaded when CAN is used, really worth it? Okay, I think I'm out of 2 cent pieces now :) Max