OpenCloudOS-Kernel/net/dsa
Vladimir Oltean bea7907837 net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge
DSA has gained the recent ability to deal gracefully with upper
interfaces it cannot offload, such as the bridge, bonding or team
drivers. When such uppers exist, the ports are still in standalone mode
as far as the hardware is concerned.

But when we deliver packets to the software bridge in order for that to
do the forwarding, there is an unpleasant surprise in that the bridge
will refuse to forward them. This is because we unconditionally set
skb->offload_fwd_mark = true, meaning that the bridge thinks the frames
were already forwarded in hardware by us.

Since dp->bridge_dev is populated only when there is hardware offload
for it, but not in the software fallback case, let's introduce a new
helper that can be called from the tagger data path which sets the
skb->offload_fwd_mark accordingly to zero when there is no hardware
offload for bridging. This lets the bridge forward packets back to other
interfaces of our switch, if needed.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-07-29 22:17:37 +01:00
..
Kconfig net: dsa: build tag_8021q.c as part of DSA core 2021-07-20 06:36:42 -07:00
Makefile net: dsa: build tag_8021q.c as part of DSA core 2021-07-20 06:36:42 -07:00
dsa.c net: dsa: allow changing the tag protocol via the "tagging" device attribute 2021-01-29 21:24:39 -08:00
dsa2.c net: dsa: add support for bridge TX forwarding offload 2021-07-23 16:32:37 +01:00
dsa_priv.h net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
master.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
port.c Revert "net: dsa: Allow drivers to filter packets they can decode source port from" 2021-07-26 22:35:22 +01:00
slave.c dev_ioctl: split out ndo_eth_ioctl 2021-07-27 20:11:45 +01:00
switch.c net: dsa: tag_8021q: add proper cross-chip notifier support 2021-07-20 06:36:42 -07:00
tag_8021q.c net: dsa: sja1105: add bridge TX data plane offload based on tag_8021q 2021-07-26 22:35:22 +01:00
tag_ar9331.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_brcm.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_dsa.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_gswip.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_hellcreek.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_ksz.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_lan9303.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_mtk.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_ocelot.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_ocelot_8021q.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_qca.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_rtl4_a.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_sja1105.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00
tag_trailer.c net: dsa: generalize overhead for taggers that use both headers and trailers 2021-06-11 12:45:38 -07:00
tag_xrs700x.c net: dsa: don't set skb->offload_fwd_mark when not offloading the bridge 2021-07-29 22:17:37 +01:00