mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
bridge: Avoid unnecessary clone on forward path
When the packet is delivered to the local bridge device we may end up cloning it unnecessarily if no bridge port can receive the packet in br_flood. This patch avoids this by moving the skb_clone into br_flood. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
68b7c895be
commit
b33084be19
3 changed files with 26 additions and 17 deletions
|
@ -72,14 +72,11 @@ int br_handle_frame_finish(struct sk_buff *skb)
|
|||
skb = NULL;
|
||||
}
|
||||
|
||||
if (skb2 == skb)
|
||||
skb2 = skb_clone(skb, GFP_ATOMIC);
|
||||
|
||||
if (skb) {
|
||||
if (dst)
|
||||
br_forward(dst->dst, skb);
|
||||
else
|
||||
br_flood_forward(br, skb);
|
||||
br_flood_forward(br, skb, skb2);
|
||||
}
|
||||
|
||||
if (skb2)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue