Skip to content

Commit

Permalink
dpaa2-switch: mark skbs with offload_fwd_mark
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ioana Ciornei authored and David S. Miller committed Mar 22, 2021
1 parent 6253d5e commit b175dfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b175dfd

Please sign in to comment.