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>
        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;