Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2212159iof; Tue, 7 Jun 2022 23:21:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/4ZCMnRVDU1U6TawNzlCpWp9vEV8iZYKuERIckBAVqsG6qB7hg3i/SGLUKx8HGZK5JA59 X-Received: by 2002:a17:90a:d3d2:b0:1dd:30bb:6a45 with SMTP id d18-20020a17090ad3d200b001dd30bb6a45mr71975483pjw.206.1654669300263; Tue, 07 Jun 2022 23:21:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654669300; cv=none; d=google.com; s=arc-20160816; b=hFgDUDI5098YRHH0HiegaYz+h+C8oVpvAeH9/6Lwgs/JNPlUf7WWNGG4weiP+AK8Ev 9f1aYRvJWtlONuwa5dGkgE2fIUqX1Rx9Eowz8B8qX/St7/C8MFfd7PWy3L8M8FKeSffM HsS/Rv1WdJtsADQ3QLbFTiydVYLcsPy0h70V4sdWfZUbIj3ti2Dx0WuHhhNnBFkMP81d Lxe65y9Docb4ZX6sImKXmO6rVlXlY2m/kH9jAE4GuDHKg5Xw+DgKl/TbLH60fQRQR2Ez P+QMVPZGUa9Y54lJAEJL8HdtGIxcUImc/yt0z+5J3azuTsWyfNuITG8cYA6t9wjIlTue 6SMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=Gst6T9vPJJaniT6EGkMvyNGdNEUusbhezNnjdPnMqmg=; b=rXxFGH8czI5j7dW9IY1/hset6x8YUFdyklEtlA2mEXe8bSiBA4DS/kgJQBdyp5l3A3 UtgYpNMVEdP/NQvEuZ3ap1QiCQRw5eFFxC/pcj39owSU/f/d5IFJygorwibfyFJdWmEL GushVZWG8dFfPOzxAZ6qLLdPOIiBO1cb2iADWfCmFqDILJsVn+Nt5J9V6ULyA345GxQU OTeEjbO5CN5V5Xsq86XSFLiHV+ntqmxSyg2Y9KQkpjQTKUnhTRCPA1mShaW4cfuUhZDs YiWX0ZlALHU41r3i+A7LwGof2pfvWzkLrGF+69IJPIgsai+aOMmHUXRU8sEx7t29Qo1z EX+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@hartkopp.net header.s=strato-dkim-0002 header.b=g1VjUKQA; 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 d10-20020a630e0a000000b003fbd72952dfsi2275813pgl.311.2022.06.07.23.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 23:21:40 -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; dkim=pass header.i=@hartkopp.net header.s=strato-dkim-0002 header.b=g1VjUKQA; 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 B4FE1390242; Tue, 7 Jun 2022 22:42:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1443491AbiFHCCg (ORCPT + 99 others); Tue, 7 Jun 2022 22:02:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1842144AbiFHAIt (ORCPT ); Tue, 7 Jun 2022 20:08:49 -0400 Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6909FA3383; Tue, 7 Jun 2022 13:13:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1654632773; s=strato-dkim-0002; d=hartkopp.net; h=In-Reply-To:Date:Message-ID:From:References:Cc:To:Subject:Cc:Date: From:Subject:Sender; bh=Gst6T9vPJJaniT6EGkMvyNGdNEUusbhezNnjdPnMqmg=; b=g1VjUKQATbB0IZd8VWSCRFshb/yOD6xJfQE3NXB3Kvi9R5u8sXOCG7AdarC/E98UbS DyZnu8VuR99GNxcC41Vj0cOXlAY5TBGuf2ku4hohnvaBEisgrl9MWu9X5apaRMTJE44o O1XxKUWDosL4oaUljokmeqTrUzGv3uknTdGPiM5Gfr/Yty1MJpmrL2bYyVj2xD6vRZA/ n9833TLOjV7jJBAEer8V08fv0kRqZxuBhyCXtEGmsllyPR/rhXbDbKMi2zIQpucu+Mg5 WHl0DydCzu6DUXkISNhP/8R1rMNhf+3YTdmHG2L8HwX1HywbhecMalmBW9y7GVXI1sZW BlHw== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":P2MHfkW8eP4Mre39l357AZT/I7AY/7nT2yrDxb8mjG14FZxedJy6qgO1q3DbdV+Ofo7wY7W6Qxgy" X-RZG-CLASS-ID: mo00 Received: from [172.20.10.8] by smtp.strato.de (RZmta 47.45.0 DYNA|AUTH) with ESMTPSA id R0691fy57KCq8b5 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 7 Jun 2022 22:12:52 +0200 (CEST) Subject: Re: [PATCH v5 0/7] can: refactoring of can-dev module and of Kbuild To: Vincent MAILHOL Cc: Marc Kleine-Budde , linux-can , open list , Max Staudt , netdev References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220604163000.211077-1-mailhol.vincent@wanadoo.fr> <2e8666f3-1bd9-8610-6b72-e56e669d3484@hartkopp.net> From: Oliver Hartkopp Message-ID: Date: Tue, 7 Jun 2022 22:12:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Vincent, On 07.06.22 04:49, Vincent MAILHOL wrote: > On Tue. 7 Jun. 2022 at 04:43, Oliver Hartkopp wrote: >> >>> | >>> +-> All other CAN devices not relying on RX offload >>> | >>> +-> CAN rx offload >>> symbol: CONFIG_CAN_RX_OFFLOAD >> >> Is this still true in patch series 5? >> >> If I understood it correctly CONFIG_CAN_BITTIMING and >> CONFIG_CAN_RX_OFFLOAD can be enabled by the user and >> (alternatively/additionally) the selection of "flexcan, m_can, mcp251xfd >> and ti_hecc" enables CONFIG_CAN_RX_OFFLOAD too. >> >> Right? > > Yes, this is correct. Maybe what troubles you is the meaning of the > "x --> y" arrow in the graph. I said it denotes that "y depends on x". > Here "depends on" has a loose meaning. It translates to either: > * Feature Y is encapsulated in Kbuild by some "if X/endif" and won't > show up unless X is selected. > * Feature Y has a "selects X" tag and will forcibly enable X if selected. > > CONFIG_CAN_*CALC*_BITTIMING is on the left side of an arrow starting > from CONFIG_CAN_NETLINK so it "depends" on CONFIG_CAN_NETLINK. On the > other hand, CONFIG_CAN_*CALC*_BITTIMING does not have any arrow > starting from it so indeed, it can be enabled by the user > independently of the other features as long as CONFIG_CAN_NETLINK is > selected. Ok. > CONFIG_CAN_RX_OFFLOAD is also on the left side of an arrow starting > from CONFIG_CAN_NETLINK. Furthermore, there is an arrow starting from > CONFIG_CAN_RX_OFFLOAD going to the "rx offload drivers". So those > drivers need CONFIG_CAN_RX_OFFLOAD (which is implemented using the > "selects CONFIG_CAN_RX_OFFLOAD"). However, CONFIG_CAN_RX_OFFLOAD can > be selected independently of the "rx offload drivers" as long as its > CONFIG_CAN_NETLINK dependency is met. > > So I think that the diagram is correct. Maybe rephrasing the cover > letter as below would address your concerns? I applied your series and played with the options and it works like charm - and as expected. But the point remains that from your figure I would still assume that the M_CAN driver would only show up when CONFIG_CAN_RX_OFFLOAD was selected by the user. But the current (good) implementation shows *all* drivers and selects CONFIG_CAN_RX_OFFLOAD when e.g. M_CAN is selected. So what about: symbol: CONFIG_NETDEVICES | +-> CAN Device Drivers symbol: CONFIG_CAN_DEV | +-> software/virtual CAN device drivers | (at time of writing: slcan, vcan, vxcan) | +-> hardware CAN device drivers with Netlink support symbol: CONFIG_CAN_NETLINK (matches previous CONFIG_CAN_DEV) | +-> CAN bit-timing calculation (optional for all drivers) | symbol: CONFIG_CAN_BITTIMING | +-> CAN rx offload (optional but selected by some drivers) | symbol: CONFIG_CAN_RX_OFFLOAD | +-> CAN devices drivers (some may select CONFIG_CAN_RX_OFFLOAD) (I also added 'hardware' to CAN device drivers with Netlink support) to have a distinction to 'software/virtual' CAN device drivers) At least this would help me to understand the new configuration setup. Best regards, Oliver