Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2116261iof; Tue, 7 Jun 2022 20:16:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRfuECSIHi4Li+EtZSLZ0TS+Zp2zglOM/kJOjQDakvNg3Oh8lZIfyqYvOL1olGajaeG1eh X-Received: by 2002:a17:90a:c303:b0:1df:1ab6:68fb with SMTP id g3-20020a17090ac30300b001df1ab668fbmr35167403pjt.181.1654658192794; Tue, 07 Jun 2022 20:16:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654658192; cv=none; d=google.com; s=arc-20160816; b=s+NtR/gMuPLCZuIo6j5setHb/wAD3hi+M9Wk6wlGDJCP9EgcMdLEQAqFb4ZNZbGgKj YgYkNX9biO7AXURo5NuGP1Xw/HCI/ZLVoVzm3hwc3qrbK4AU2fDInEz3GhEgKW2RWGl1 CF/NIH8ablf+eGkHBnItdlZYV1QYW0igdbDA3oq1FphN1GRgsC4Fkna3irG38soTxaXd /0/9PzxAd2jpUv9Y3CzJ1kIYOj7wd4RBGG5tF2KSkJeEH4Q41RoS72y/DvbnZJWh8srS oe3IzAINgkn0uytT8htty+iqzpHjWrxm42VrE+D7H9Enxobdk7wuvGPi9o3XcRBWLvnK PGNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=mWYG/OGx6qetK0o2X6cVpouqKkNTEyLC/VGAA/7a2xw=; b=zOFBRqiLPp+WQQtVDGs1S0/fuge8GbVTr1vXSzZP5gPUI+bL3A7uswk/kEfSDWoUT1 51YhCCk0FUGPcP1R+Zm1h9XhddhzhRNIVD5MzbqXTvrvWEsvHZAr620WHinS/438igjL +ApzZw6H/QpZYhiemf8msWfFr6Nonc72GTTnl2fIrO5yi04Fnj+xKKtkZ9R5DETtmMd9 YYLusyQguQv5LwCuvWTbEIIAmv6XHwpuj5rFA1gEKx64VtbTyDxWwPHu0V0YuIpkFZ0j N/xYnGgM0F86PGzDi7SiDrxDWxtX9r106CN31imsrxP7r/MdT9Iyvjp8zahm1+3KaJYi WX5A== 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 p9-20020a056a000a0900b0051078cc4fd5si30976861pfh.354.2022.06.07.20.16.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 20:16:32 -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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 7B1D03BE13F; Tue, 7 Jun 2022 19:19:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239575AbiFGJ2S (ORCPT + 99 others); Tue, 7 Jun 2022 05:28:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40996 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238703AbiFGJ2I (ORCPT ); Tue, 7 Jun 2022 05:28:08 -0400 Received: from mail-yb1-f175.google.com (mail-yb1-f175.google.com [209.85.219.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 244D232ED8; Tue, 7 Jun 2022 02:28:07 -0700 (PDT) Received: by mail-yb1-f175.google.com with SMTP id f34so30149476ybj.6; Tue, 07 Jun 2022 02:28:07 -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; bh=mWYG/OGx6qetK0o2X6cVpouqKkNTEyLC/VGAA/7a2xw=; b=qSq0kChIebsX8LymnhlHYmTq+zhSO7BlOcpm3cQ9yQomxGkCwkg8QYbWyuO93hFkEr Y9tBBlBQVshiRA7Xa9ik+I+I1LCB9+gbegjTRXuZQGlKHpdDZz8BG51yrzMzMWDqe3Xo rRpLdFYxwB8SocfSbB3+6HAqyKexwgmJTAuK7vaX/rHNJOptEXvdCRfid9Y9JONVeP+S W95mZ16bIh9OC1yBzFvpROfzPVmeK3xD7VP2E8PCDJsdVMSenbA29BdUTVef3Htk7FNK DS2EQWp0z4tzG/Zvz8djHX9EnAZ8HYp00cM4zrYkcl1CVAKvz4sum95Jg5UmzOosRQk2 1gNg== X-Gm-Message-State: AOAM531OKTj/iU1hiVZLE/NrR65QlpSI88kva/xjWAfKBWmiRcYwmIKL 5K0AABcYuwgzJ02uZtEXW+mhsVmsm1tqKB/ZAhs= X-Received: by 2002:a25:ad58:0:b0:65c:e3e5:e813 with SMTP id l24-20020a25ad58000000b0065ce3e5e813mr28546395ybe.151.1654594086359; Tue, 07 Jun 2022 02:28:06 -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> In-Reply-To: From: Vincent MAILHOL Date: Tue, 7 Jun 2022 18:27:55 +0900 Message-ID: Subject: Re: [PATCH v5 4/7] can: Kconfig: add CONFIG_CAN_RX_OFFLOAD To: Geert Uytterhoeven Cc: Marc Kleine-Budde , linux-can@vger.kernel.org, Linux Kernel Mailing List , Max Staudt , Oliver Hartkopp , netdev Content-Type: text/plain; charset="UTF-8" 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 Hi Geert, On Tue. 7 Jun 2022 at 17:43, Geert Uytterhoeven wrote: > Hi Vincent, > > On Sun, Jun 5, 2022 at 12:25 AM Vincent Mailhol > wrote: > > Only a few drivers rely on the CAN rx offload framework (as of the > > writing of this patch, only four: flexcan, m_can, mcp251xfd and > > ti_hecc). Give the option to the user to deselect this features during > > compilation. > > Thanks for your patch! Thank you too, happy to see the warm feedback from all of you. > > The drivers relying on CAN rx offload are in different sub > > folders. All of these drivers get tagged with "select CAN_RX_OFFLOAD" > > so that the option is automatically enabled whenever one of those > > driver is chosen. The "select CAN_RX_OFFLOAD" is to make it dummy proof for the user who will deselect CAN_RX_OFFLOAD can still see the menu entries for all drivers. I think it is better than a "depends on" which would hide the rx offload devices. > Great! But... > > > > > Signed-off-by: Vincent Mailhol > > > --- a/drivers/net/can/Kconfig > > +++ b/drivers/net/can/Kconfig > > @@ -102,6 +102,20 @@ config CAN_CALC_BITTIMING > > > > If unsure, say Y. > > > > +config CAN_RX_OFFLOAD > > + bool "CAN RX offload" > > + default y > > ... then why does this default to "y"? > > > + help > > + Framework to offload the controller's RX FIFO during one > > + interrupt. The CAN frames of the FIFO are read and put into a skb > > + queue during that interrupt and transmitted afterwards in a NAPI > > + context. > > + > > + The additional features selected by this option will be added to the > > + can-dev module. > > + > > + If unsure, say Y. > > ... and do you suggest to enable this? Several reasons. First, *before* this series, the help menu for "Platform CAN drivers with Netlink support" (old CAN_DEV) had the "default y" and said: "if unsure, say Y." CAN_RX_OFFLOAD was part of it so, I am just maintaining the status quo. Second, and regardless of the above, I really think that it makes sense to have everything built in can-dev.ko by default. If someone does a binary release of can-dev.ko in which the rx offload is deactivated, end users would get really confused. Having a can-dev module stripped down is an expert setting. The average user which does not need CAN can deselect CONFIG_CAN and be happy. The average hobbyist who wants to do some CAN hacking will activate CONFIG_CAN and will automatically have the prerequisites in can-dev for any type of device drivers (after that just need to select the actual device drivers). The advanced user who actually read all the help menus will know that he should rather keep those to "yes" throughout the "if unsure, say Y" comment. Finally, the experts can fine tune their configuration by deselecting the pieces they did not wish for. Honestly, I am totally happy to have the "default y" tag, the "if unsure, say Y" comment and the "select CAN_RX_OFFLOAD" all together. Unless I am violating some kind of best practices, I prefer to keep it as-is. Hope this makes sense. Yours sincerely, Vincent Mailhol