From: Jakub Kicinski Date: Thu, 31 Oct 2024 00:33:57 +0000 (-0700) Subject: Merge branch 'mirroring-to-dsa-cpu-port' X-Git-Tag: v6.13-rc1~135^2~190 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b4d0679b34e47873fff04bb91ba54d2bcc06df27;p=thirdparty%2Fkernel%2Flinux.git Merge branch 'mirroring-to-dsa-cpu-port' Vladimir Oltean says: ==================== Mirroring to DSA CPU port Users of the NXP LS1028A SoC (drivers/net/dsa/ocelot L2 switch inside) have requested to mirror packets from the ingress of a switch port to software. Both port-based and flow-based mirroring is required. The simplest way I could come up with was to set up tc mirred actions towards a dummy net_device, and make the offloading of that be accepted by the driver. Currently, the pattern in drivers is to reject mirred towards ports they don't know about, but I'm now permitting that, precisely by mirroring "to the CPU". For testers, this series depends on commit 34d35b4edbbe ("net/sched: act_api: deny mismatched skip_sw/skip_hw flags for actions created by classifiers") from net/main, which is absent from net-next as of the day of posting (Oct 23). Without the bug fix it is possible to create invalid configurations which are not rejected by the kernel. v2: https://lore.kernel.org/20241017165215.3709000-1-vladimir.oltean@nxp.com RFC: https://lore.kernel.org/20240913152915.2981126-1-vladimir.oltean@nxp.com For historical purposes, link to a much older (and much different) attempt: https://lore.kernel.org/20191002233750.13566-1-olteanv@gmail.com ==================== Link: https://patch.msgid.link/20241023135251.1752488-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski --- b4d0679b34e47873fff04bb91ba54d2bcc06df27