From: Lukasz Majewski <lukma@denx.de>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Richard Cochran <richardcochran@gmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, imx@lists.linux.dev,
linux-arm-kernel@lists.infradead.org,
Stefan Wahren <wahrenst@gmx.net>, Simon Horman <horms@kernel.org>
Subject: Re: [net-next v14 00/12] net: mtip: Add support for MTIP imx287 L2 switch driver
Date: Tue, 8 Jul 2025 08:30:20 +0200 [thread overview]
Message-ID: <20250708083020.0d2a73cd@wsk> (raw)
In-Reply-To: <20250701114957.2492486-1-lukma@denx.de>
[-- Attachment #1: Type: text/plain, Size: 6093 bytes --]
Dear Community,
> This patch series adds support for More Than IP's L2 switch driver
> embedded in some NXP's SoCs. This one has been tested on imx287, but
> is also available in the vf610.
>
> In the past there has been performed some attempts to upstream this
> driver:
>
> 1. The 4.19-cip based one [1]
> 2. DSA based one for 5.12 [2] - i.e. the switch itself was treat as a
> DSA switch with NO tag appended.
> 3. The extension for FEC driver for 5.12 [3] - the trick here was to
> fully reuse FEC when the in-HW switching is disabled. When bridge
> offloading is enabled, the driver uses already configured MAC and PHY
> to also configure PHY.
>
> All three approaches were not accepted as eligible for upstreaming.
>
> The driver from this series has floowing features:
>
> 1. It is fully separated from fec_main - i.e. can be used
> interchangeable with it. To be more specific - one can build them as
> modules and if required switch between them when e.g. bridge
> offloading is required.
>
> To be more specific:
> - Use FEC_MAIN: When one needs support for two ETH ports with
> separate uDMAs used for both and bridging can be realized in SW.
>
> - Use MTIPL2SW: When it is enough to support two ports with
> only uDMA0 attached to switch and bridging shall be offloaded to HW.
>
> 2. This driver uses MTIP's L2 switch internal VLAN feature to provide
> port separation at boot time. Port separation is disabled when
> bridging is required.
>
> 3. Example usage:
> Configuration:
> ip link set lan0 up; sleep 1;
> ip link set lan1 up; sleep 1;
> ip link add name br0 type bridge;
> ip link set br0 up; sleep 1;
> ip link set lan0 master br0;
> ip link set lan1 master br0;
> bridge link;
> ip addr add 192.168.2.17/24 dev br0;
> ping -c 5 192.168.2.222
>
> Removal:
> ip link set br0 down;
> ip link delete br0 type bridge;
> ip link set dev lan1 down
> ip link set dev lan0 down
>
> 4. Limitations:
> - Driver enables and disables switch operation with learning
> and ageing.
> - Missing is the advanced configuration (e.g. adding entries
> to FBD). This is on purpose, as up till now we didn't had consensus
> about how the driver shall be added to Linux.
>
> 5. Clang build:
> make LLVM_SUFFIX=-19 LLVM=1 mrproper
> cp ./arch/arm/configs/mxs_defconfig .config
> make ARCH=arm LLVM_SUFFIX=-19 LLVM=1 W=1 menuconfig
> make ARCH=arm LLVM_SUFFIX=-19 LLVM=1 W=1 -j8
> LOADADDR=0x40008000 uImage dtbs
>
> make LLVM_SUFFIX=-19 LLVM=1 mrproper
> make LLVM_SUFFIX=-19 LLVM=1 allmodconfig
> make LLVM_SUFFIX=-19 LLVM=1 W=1
> drivers/net/ethernet/freescale/mtipsw/ | tee llvm_build.log make
> LLVM_SUFFIX=-19 LLVM=1 W=1 -j8 | tee llvm_build.log
>
> 6. Kernel compliance checks:
> make coccicheck MODE=report J=4
> M=drivers/net/ethernet/freescale/mtipsw/
> ~/work/src/smatch/smatch_scripts/kchecker
> drivers/net/ethernet/freescale/mtipsw/
>
> 7. GCC
> make mrproper
> make allmodconfig
> make W=1 drivers/net/ethernet/freescale/mtipsw/
>
Gentle ping on this driver's patch set ...
> Links:
> [1] - https://github.com/lmajewski/linux-imx28-l2switch/commits/master
> [2] -
> https://github.com/lmajewski/linux-imx28-l2switch/tree/imx28-v5.12-L2-upstream-RFC_v1
> [3] -
> https://source.denx.de/linux/linux-imx28-l2switch/-/tree/imx28-v5.12-L2-upstream-switchdev-RFC_v1?ref_type=heads
>
>
> Lukasz Majewski (12):
> dt-bindings: net: Add MTIP L2 switch description
> ARM: dts: nxp: mxs: Adjust the imx28.dtsi L2 switch description
> ARM: dts: nxp: mxs: Adjust XEA board's DTS to support L2 switch
> net: mtip: The L2 switch driver for imx287
> net: mtip: Add buffers management functions to the L2 switch driver
> net: mtip: Add net_device_ops functions to the L2 switch driver
> net: mtip: Add mtip_switch_{rx|tx} functions to the L2 switch driver
> net: mtip: Extend the L2 switch driver with management operations
> net: mtip: Extend the L2 switch driver for imx287 with bridge
> operations
> ARM: mxs_defconfig: Enable CONFIG_NFS_FSCACHE
> ARM: mxs_defconfig: Update mxs_defconfig to 6.16-rc1
> ARM: mxs_defconfig: Enable CONFIG_FEC_MTIP_L2SW to support MTIP L2
> switch
>
> .../bindings/net/nxp,imx28-mtip-switch.yaml | 150 ++
> MAINTAINERS | 7 +
> arch/arm/boot/dts/nxp/mxs/imx28-xea.dts | 56 +
> arch/arm/boot/dts/nxp/mxs/imx28.dtsi | 9 +-
> arch/arm/configs/mxs_defconfig | 13 +-
> drivers/net/ethernet/freescale/Kconfig | 1 +
> drivers/net/ethernet/freescale/Makefile | 1 +
> drivers/net/ethernet/freescale/mtipsw/Kconfig | 13 +
> .../net/ethernet/freescale/mtipsw/Makefile | 4 +
> .../net/ethernet/freescale/mtipsw/mtipl2sw.c | 1958
> +++++++++++++++++ .../net/ethernet/freescale/mtipsw/mtipl2sw.h |
> 654 ++++++ .../ethernet/freescale/mtipsw/mtipl2sw_br.c | 120 +
> .../ethernet/freescale/mtipsw/mtipl2sw_mgnt.c | 443 ++++
> 13 files changed, 3418 insertions(+), 11 deletions(-)
> create mode 100644
> Documentation/devicetree/bindings/net/nxp,imx28-mtip-switch.yaml
> create mode 100644 drivers/net/ethernet/freescale/mtipsw/Kconfig
> create mode 100644 drivers/net/ethernet/freescale/mtipsw/Makefile
> create mode 100644 drivers/net/ethernet/freescale/mtipsw/mtipl2sw.c
> create mode 100644 drivers/net/ethernet/freescale/mtipsw/mtipl2sw.h
> create mode 100644
> drivers/net/ethernet/freescale/mtipsw/mtipl2sw_br.c create mode
> 100644 drivers/net/ethernet/freescale/mtipsw/mtipl2sw_mgnt.c
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2025-07-08 6:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-01 11:49 [net-next v14 00/12] net: mtip: Add support for MTIP imx287 L2 switch driver Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 01/12] dt-bindings: net: Add MTIP L2 switch description Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 02/12] ARM: dts: nxp: mxs: Adjust the imx28.dtsi " Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 03/12] ARM: dts: nxp: mxs: Adjust XEA board's DTS to support L2 switch Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 04/12] net: mtip: The L2 switch driver for imx287 Lukasz Majewski
2025-07-08 10:06 ` Paolo Abeni
2025-07-09 10:14 ` Lukasz Majewski
2025-07-08 11:10 ` Paolo Abeni
2025-07-09 11:16 ` Lukasz Majewski
2025-07-10 21:04 ` Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 05/12] net: mtip: Add buffers management functions to the L2 switch driver Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 06/12] net: mtip: Add net_device_ops " Lukasz Majewski
2025-07-08 10:03 ` Paolo Abeni
2025-07-09 10:08 ` Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 07/12] net: mtip: Add mtip_switch_{rx|tx} " Lukasz Majewski
2025-07-08 9:52 ` Paolo Abeni
2025-07-09 9:18 ` Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 08/12] net: mtip: Extend the L2 switch driver with management operations Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 09/12] net: mtip: Extend the L2 switch driver for imx287 with bridge operations Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 10/12] ARM: mxs_defconfig: Enable CONFIG_NFS_FSCACHE Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 11/12] ARM: mxs_defconfig: Update mxs_defconfig to 6.16-rc1 Lukasz Majewski
2025-07-01 11:49 ` [net-next v14 12/12] ARM: mxs_defconfig: Enable CONFIG_FEC_MTIP_L2SW to support MTIP L2 switch Lukasz Majewski
2025-07-08 6:30 ` Lukasz Majewski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250708083020.0d2a73cd@wsk \
--to=lukma@denx.de \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=festevam@gmail.com \
--cc=horms@kernel.org \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=wahrenst@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).