Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2238643iof; Wed, 8 Jun 2022 00:08:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzhyIKqfAB7/tSnQOXsFJmz38vgA+nccceaOwoc2hpZmNx6DDh6hXiZ55naq+0SeQG9cBfH X-Received: by 2002:a65:64d9:0:b0:3fc:5285:5d63 with SMTP id t25-20020a6564d9000000b003fc52855d63mr28698477pgv.456.1654672118748; Wed, 08 Jun 2022 00:08:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654672118; cv=none; d=google.com; s=arc-20160816; b=HKUAiYbxnT2qETBF4HlMnIMQqVno7j/RkX3wPXet1ijmxXrly9pkv6vKsR2jCrJivo J4CfKm+dNqqPzz7RvbAb+pY6qSXubjjhdWg3Wnhm7mDtpfg3pEYq5g480XFK0vhK9FAE Gz4FPnn/eA+nfxmxgODNU5002jGAR55S9ZvpR4BZrfmTBEzSphlrPQUey0iYHOzejCgS J91u9+klE0WwffQH0Afe4hErIRB4e27qpahOaURX7iZOBVeM++rdS8UJ3euceTbt932p +yvvoNq+HAwEql90hFdCUHru9Hc9q6plTKlZ8JQp5pHvZ+at4y1GObU1dXnWL5zYmrqr a2cQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=ISI9akgFE417SkjCbExyJZMbtvV2WMVb6vhq8a3pV6U=; b=yfwTRwbGMRpP4HCPt8vsl3HVxummL9rIYD1Bx3BT10VjfN2myKQBnPBe4q4LjCkY9b itHc7OEhMCOoP57TtoFhRmE2MFfMrweZYYFgQKFnngc1r4+xAZq6X/1Ovx0k/E324h+K C30lE3ZQORvamJI2hAsGPpeLFh5lQMilLd8GTpyIwV8DBb456t7Zg7qr5ai/sl3k5fr/ 4MmLi+tjQc0zFZ8kywX6n7N0EtctaTPSAX2rU7StF02qF6vPb0fR9j++Li4VjsmXv+wY iqFqaM8xDhq6Jt5z6AdeOc9xMD7ebGWAnhfYLu+EA5/UEe6nDRM7/MW04CdCiZygixdW +wEg== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020a63f241000000b003db238f2a93si28104238pgk.815.2022.06.08.00.08.26; Wed, 08 Jun 2022 00:08:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233044AbiFHFBz convert rfc822-to-8bit (ORCPT + 99 others); Wed, 8 Jun 2022 01:01:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233094AbiFHFBl (ORCPT ); Wed, 8 Jun 2022 01:01:41 -0400 Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C8823104C6; Tue, 7 Jun 2022 18:43:48 -0700 (PDT) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-2ef5380669cso194218037b3.9; Tue, 07 Jun 2022 18:43:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=yFX0ScDTbzbhgTtVTbyM2Jww+3EPJG7CHlISZZneC/A=; b=59JWVnM5HhUO/XryciH+kETEnIMZKp6yYAI6JqVjVOPNHOdDIuMqg1oGzU1YaWrdAn SVTlNO4DMVuQOOeW7p5maH9JOzxVefRCnqJ7/e5nlSaoKrohtFHZ5Tb2t+sBMaG9M/U6 va9m9npND9TKtvJaw0TSODomwle4QdZeCA6gy5ZzBm1I5S5qOAqbO4Tphj9jQscd9mtw O4cWHQDysNF/Z/3fSoH2V8ug+iI2dZk9fzyxla2EXCynqW9qPnwAfLO311wMswIlh9TR 1Hf8tDXVyNUd62ftgWohvCOaWBTDd0Q8J7WYq72RlFruDlv/lXHZndbs4dhQuVwvNIrs /l6Q== X-Gm-Message-State: AOAM530kaMI0kf9BlQ3Q/fUFE5UKVmK622sO7ZjOvrMblEsANv7KDmD+ debHyCItfLAv/p7b4T6RwVFIvB+xiMPWdKsefBU= X-Received: by 2002:a81:5ad6:0:b0:300:3244:341 with SMTP id o205-20020a815ad6000000b0030032440341mr35299576ywb.191.1654652305684; Tue, 07 Jun 2022 18:38:25 -0700 (PDT) MIME-Version: 1.0 References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220604163000.211077-1-mailhol.vincent@wanadoo.fr> <20220604163000.211077-5-mailhol.vincent@wanadoo.fr> <20220607182216.5fb1084e.max@enpas.org> <20220607150614.6248c504@kernel.org> <20220608014248.6e0045ae.max@enpas.org> <20220607171455.0a75020c@kernel.org> In-Reply-To: <20220607171455.0a75020c@kernel.org> From: Vincent MAILHOL Date: Wed, 8 Jun 2022 10:38:15 +0900 Message-ID: Subject: Re: [PATCH v5 4/7] can: Kconfig: add CONFIG_CAN_RX_OFFLOAD To: Jakub Kicinski Cc: Max Staudt , Geert Uytterhoeven , Marc Kleine-Budde , linux-can@vger.kernel.org, Linux Kernel Mailing List , Oliver Hartkopp , netdev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 Wed. 8 juin 2022 at 09:14, Jakub Kicinski wrote: > On Wed, 8 Jun 2022 01:43:54 +0200 Max Staudt wrote: > > It seems strange to me to magically build some extra features into > > can_dev.ko, depending on whether some other .ko files are built in that > > very same moment, or not. By "magically", I mean an invisible Kconfig > > option. This is why I think Vincent's approach is best here, by making > > the drivers a clearly visible subset of the RX_OFFLOAD option in > > Kconfig, and RX_OFFLOAD user-selectable. > > Sorry for a chunked response, vger becoming unresponsive the week after > the merge window seems to become a tradition :/ > > We have a ton of "magical" / hidden Kconfigs in networking, take a look > at net/Kconfig. Quick grep, likely not very accurate but FWIW: > > # not-hidden > $ git grep -c -E '(bool|tristate)..' net/Kconfig > net/Kconfig:23 > > # hidden > $ git grep -c -E '(bool|tristate)$' net/Kconfig > net/Kconfig:20 OK. So we have a proposal to make CAN_RX_OFFLOAD an hidden configuration. I did not consider this approach before because the CAN subsystem *never* relies on this and I did not really explore other Kbuild files. | $ git grep -c -E '(bool|tristate)$' net/can/Kconfig | Before pushing my driver upstream, it was also an out of tree module for about one year and I relate a lot to what Max said. But Jakub explanations are consistent and reflect the best practices of the kernel development. Also, mainstream distribution would do an allyesconfig and ship the can-dev.ko with everything built in. So the lambda user would still have everything built-in. I will let people continue to comment for a couple of days before making the final choice and sending the next version. But so far, I am leading toward Jakub’s idea to make it a hidden feature. > > How about making RX_OFFLOAD a separate .ko file, so we don't have > > various possible versions of can_dev.ko? > > > > @Vincent, I think you suggested that some time ago, IIRC? > > > > (I know, I was against a ton of little modules, but I'm changing my > > ways here now since it seems to help...) > > A separate module wouldn't help with my objections, I don't think.