diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-02-27 19:41:41 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-28 00:48:43 -0800 |
commit | b33084be192ee1e347d98bb5c9e38a53d98d35e2 (patch) | |
tree | 940c62309437ca5fa087275bc64b4ffd677c79c3 /net/bridge/br_input.c | |
parent | 68b7c895be336b19f4c38d7cb500132fabba0afd (diff) | |
download | op-kernel-dev-b33084be192ee1e347d98bb5c9e38a53d98d35e2.zip op-kernel-dev-b33084be192ee1e347d98bb5c9e38a53d98d35e2.tar.gz |
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>
Diffstat (limited to 'net/bridge/br_input.c')
-rw-r--r-- | net/bridge/br_input.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c index be5ab8d..edfdaef 100644 --- a/net/bridge/br_input.c +++ b/net/bridge/br_input.c @@ -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) |