summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorIoana Ciornei <ioana.ciornei@nxp.com>2021-03-22 22:58:59 +0200
committerDavid S. Miller <davem@davemloft.net>2021-03-22 16:37:45 -0700
commitb175dfd7e691ba264d190f23197cc29d0ba8bc67 (patch)
tree80267388883bef8c9d698c308855026d053eebaf /drivers/net
parent6253d5e39ce2bba13c601274768c481846526a80 (diff)
downloadlinux-stable-b175dfd7e691ba264d190f23197cc29d0ba8bc67.tar.gz
linux-stable-b175dfd7e691ba264d190f23197cc29d0ba8bc67.tar.bz2
linux-stable-b175dfd7e691ba264d190f23197cc29d0ba8bc67.zip
dpaa2-switch: mark skbs with offload_fwd_mark
If a switch port is under a bridge, the offload_fwd_mark should be setup before sending the skb towards the stack so that the bridge does not try to flood the packet on the other switch ports. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
index 9f1a59219435..a9b30a72ddad 100644
--- a/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
+++ b/drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
@@ -2005,6 +2005,9 @@ static void dpaa2_switch_rx(struct dpaa2_switch_fq *fq,
skb->dev = netdev;
skb->protocol = eth_type_trans(skb, skb->dev);
+ /* Setup the offload_fwd_mark only if the port is under a bridge */
+ skb->offload_fwd_mark = !!(port_priv->fdb->bridge_dev);
+
netif_receive_skb(skb);
return;