]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
dpaa2-switch: mark skbs with offload_fwd_mark
authorIoana Ciornei <ioana.ciornei@nxp.com>
Mon, 22 Mar 2021 20:58:59 +0000 (22:58 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 Mar 2021 23:37:45 +0000 (16:37 -0700)
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>
drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c

index 9f1a59219435088516352018d122f04337167748..a9b30a72ddadfb85849653238f4730118bd3b02e 100644 (file)
@@ -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;