Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp478678iol; Sat, 11 Jun 2022 08:55:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAtpjTKv5Wn83BZDoRhKP/5H3R3xJq99G0y/JhCqbdyXNnuzPnr81A5j8LwGjGdA2m1Wig X-Received: by 2002:a05:6402:1bdc:b0:433:4a09:4dc0 with SMTP id ch28-20020a0564021bdc00b004334a094dc0mr11820832edb.155.1654962948643; Sat, 11 Jun 2022 08:55:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654962948; cv=none; d=google.com; s=arc-20160816; b=iOSf3OPgcjAy6s6pczK5l/BO14CmlJzVbn5NYRUjqP9vRGHB04fcXwR0ciUJ+eUP4A TifBaqnZW7fteYEkiG1dEZDyNZHvjYTRyLErcQmKe95SoGaLlgXAzXYXWucS7yOoFegT +nJwA0JgARodrYtB88xdW0bdrxxqypEAgGtlK+gJS/CLssxoLynzqLYhZ7M4w2qKkapH FNnp0RZeckSwyK9lfhY7UCYfI1l9Bqi1YN4FlK72YMc8G6O08xETWkBPk7KhedOsIj7F 3RxZO1XJQc+96LBH8eeWok6R8ISGK8ynoABM2UDPDvkt6KudDnfoYtjVVGFCWcVul/8b eo7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=mEy9iG4jT9HGYdVztJ/BjvbpppZ9YlipZr9QnZhAZ60=; b=fcVs8MpT+RkwNdjBkY8umrn+DbmXDjwBHm3kfjMpNqty4MWKRffTmI+onJzr1sixlK kzY+VmvM0+xSX6bd9TvGLuCKBOJ8wZpKVUj0I/5XLDA0VgMmqYnM3jU0XEaCWqHQi6fJ OyeAPDtKkLBj+PuNEDl0NB4CM2HJt6OlnaJaNbvQrZTUzkb5yy16m1Ph8xfovMQKdEOA xYY5poi6ndD8w2E3/MB9MTK1Lj66UZj1BdiqlGfD5a8U8NTg/4YFoE2AMncxRU+95Ut0 ROk+7ErByZyyMiy32/vsZtJ0+DA9m1tAqIJF7jo97lV//0xgvIW2gTQ/MWOhI2Bd6XoV tBFA== 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 gn12-20020a1709070d0c00b006ff248cd220si2195996ejc.791.2022.06.11.08.55.24; Sat, 11 Jun 2022 08:55:48 -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 S235457AbiFKPSL (ORCPT + 99 others); Sat, 11 Jun 2022 11:18:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233539AbiFKPSJ (ORCPT ); Sat, 11 Jun 2022 11:18:09 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 382654EA22 for ; Sat, 11 Jun 2022 08:18:08 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=bjornoya.blackshift.org) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o02s9-00086f-QT; Sat, 11 Jun 2022 17:17:57 +0200 Received: from pengutronix.de (unknown [IPv6:2a01:4f8:1c1c:29e9:22:41ff:fe00:1400]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: mkl-all@blackshift.org) by smtp.blackshift.org (Postfix) with ESMTPSA id 1593092EAD; Sat, 11 Jun 2022 15:17:55 +0000 (UTC) Date: Sat, 11 Jun 2022 17:17:54 +0200 From: Marc Kleine-Budde To: Vincent Mailhol Cc: linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, Max Staudt , Oliver Hartkopp , netdev@vger.kernel.org, Geert Uytterhoeven , Jakub Kicinski Subject: Re: [PATCH v6 0/7] can: refactoring of can-dev module and of Kbuild Message-ID: <20220611151754.2agcczimjcgr25xl@pengutronix.de> References: <20220610143009.323579-1-mailhol.vincent@wanadoo.fr> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="kg5j2blhufuqdrtx" Content-Disposition: inline In-Reply-To: <20220610143009.323579-1-mailhol.vincent@wanadoo.fr> X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: mkl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,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 --kg5j2blhufuqdrtx Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 10.06.2022 23:30:02, Vincent Mailhol wrote: > Aside of calc_bittiming.o which can be configured with > CAN_CALC_BITTIMING, all objects from drivers/net/can/dev/ get linked > unconditionally to can-dev.o even if not needed by the user. >=20 > This series first goal it to split the can-dev modules so that the > only the needed features get built in during compilation. > Additionally, the CAN Device Drivers menu is moved from the > "Networking support" category to the "Device Drivers" category (where > all drivers are supposed to be). >=20 >=20 > * menu before this series * >=20 > CAN bus subsystem support > symbol: CONFIG_CAN > | > +-> CAN Device Drivers > (no symbol) > | > +-> software/virtual CAN device drivers > | (at time of writing: slcan, vcan, vxcan) > | > +-> Platform CAN drivers with Netlink support > symbol: CONFIG_CAN_DEV > | > +-> CAN bit-timing calculation (optional for hardware drivers) > | symbol: CONFIG_CAN_CALC_BITTIMING > | > +-> All other CAN devices drivers >=20 > * menu after this series * >=20 > Network device support > symbol: CONFIG_NETDEVICES > | > +-> CAN Device Drivers > symbol: CONFIG_CAN_DEV > | > +-> software/virtual CAN device drivers > | (at time of writing: slcan, vcan, vxcan) > | > +-> 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_CALC_BITTIMING > | > +-> All other CAN devices drivers > (some may select CONFIG_CAN_RX_OFFLOAD) > | > +-> CAN rx offload (automatically selected by some drivers) > (hidden symbol: CONFIG_CAN_RX_OFFLOAD) >=20 > Patches 1 to 5 of this series do above modification. >=20 > The last two patches add a check toward CAN_CTRLMODE_LISTENONLY in > can_dropped_invalid_skb() to discard tx skb (such skb can potentially > reach the driver if injected via the packet socket). In more details, > patch 6 moves can_dropped_invalid_skb() from skb.h to skb.o and patch > 7 is the actual change. >=20 > Those last two patches are actually connected to the first five ones: > because slcan and v(x)can requires can_dropped_invalid_skb(), it was > necessary to add those three devices to the scope of can-dev before > moving the function to skb.o. >=20 > This design results from the lengthy discussion in [1]. >=20 > [1] https://lore.kernel.org/linux-can/20220514141650.1109542-1-mailhol.vi= ncent@wanadoo.fr/ >=20 >=20 > ** Changelog ** >=20 > v5 -> v6: >=20 > * fix typo in patch #1's title: Kbuild -> Kconfig. >=20 > * make CONFIG_RX_CAN an hidden config symbol and modify the diagram > in the cover letter accordingly. >=20 > @Oliver, with CONFIG_CAN_RX_OFFLOAD now being an hidden config, > that option fully depends on the drivers. So contrary to your > suggestion, I put CONFIG_CAN_RX_OFFLOAD below the device drivers > in the diagram. >=20 > * fix typo in cover letter: CONFIG_CAN_BITTIMING -> CONFIG_CAN_CALC_BIT= TIMING. >=20 > v4 -> v5: >=20 > * m_can is also requires RX offload. Add the "select CAN_RX_OFFLOAD" > to its Makefile. >=20 > * Reorder the lines of drivers/net/can/dev/Makefile. >=20 > * Remove duplicated rx-offload.o target in drivers/net/can/dev/Makefile >=20 > * Remove the Nota Bene in the cover letter. >=20 >=20 > v3 -> v4: >=20 > * Five additional patches added to split can-dev module and refactor > Kbuild. c.f. below (lengthy) thread: > https://lore.kernel.org/linux-can/20220514141650.1109542-1-mailhol.vi= ncent@wanadoo.fr/ >=20 >=20 > v2 -> v3: >=20 > * Apply can_dropped_invalid_skb() to slcan. >=20 > * Make vcan, vxcan and slcan dependent of CONFIG_CAN_DEV by > modifying Kbuild. >=20 > * fix small typos. >=20 > v1 -> v2: >=20 > * move can_dropped_invalid_skb() to skb.c instead of dev.h >=20 > * also move can_skb_headroom_valid() to skb.c Applied to can-next/master....as a merge with the above message! Congrats on this series and the first ever merge to the linux-can branch! regards, Marc --=20 Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | --kg5j2blhufuqdrtx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEBsvAIBsPu6mG7thcrX5LkNig010FAmKksh8ACgkQrX5LkNig 011r/Qf/WO5jEO9TYcsuTPqF7I3rFy71Sm5lwROlTfTJZ4cbRYwGfZUgVD3eKHXj Xd89LAKzaKlcf85PugUxstqG80Tpnw7OcZYLZTDqzcxWKhkppmqX+aFUGazg2Wfa P5oXNltWWSpIXCSdry/hEC1COpjYOJvKmTS8TR9JDaOVE6s5BK/5UlAMePQ/hlYV GTgst4wTxf9UPSyH+NTOXZ+Kb9aQPMurJDP72bhFCDD6ND784zJOOHYMshJ0nexs nmSPhxYLqBCqEbsoxX90fGkSV6f8AxOLxSU3KPKb2/DDeMo0/aV8D2jonaXShR+X wB+0t4DI9BV4Ut5lpo9QuQQ4/6KslQ== =lzWg -----END PGP SIGNATURE----- --kg5j2blhufuqdrtx--