Skip to content

Commit 13edbdb

Browse files
lunndavem330
authored andcommitted
net: dsa: {e}dsa: set offload_fwd_mark on received packets
The software bridge needs to know if a packet has already been bridged by hardware offload to ports in the same hardware offload, in order that it does not re-flood them, causing duplicates. This is particularly true for broadcast and multicast traffic which the host has requested. By setting offload_fwd_mark in the skb the bridge will only flood to ports in other offloads and other netifs. Set this flag in the DSA and EDSA tag driver. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent a42c8e3 commit 13edbdb

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

net/dsa/tag_dsa.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ static struct sk_buff *dsa_rcv(struct sk_buff *skb, struct net_device *dev,
141141
2 * ETH_ALEN);
142142
}
143143

144+
skb->offload_fwd_mark = 1;
145+
144146
return skb;
145147
}
146148

net/dsa/tag_edsa.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,8 @@ static struct sk_buff *edsa_rcv(struct sk_buff *skb, struct net_device *dev,
160160
2 * ETH_ALEN);
161161
}
162162

163+
skb->offload_fwd_mark = 1;
164+
163165
return skb;
164166
}
165167

0 commit comments

Comments
 (0)