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:
committed by
David S. Miller
parent
68b7c895be
commit
b33084be19
@ -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)
|
||||
|
Reference in New Issue
Block a user