diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2010-02-27 19:41:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-28 00:48:44 -0800 |
commit | 6088a539d8d1666dca6979b5759bf966ee9124ef (patch) | |
tree | 84adf98d3efb8dc71563c2b717b8aa1b781bb560 /net/bridge/br_forward.c | |
parent | b33084be192ee1e347d98bb5c9e38a53d98d35e2 (diff) | |
download | lwn-6088a539d8d1666dca6979b5759bf966ee9124ef.tar.gz lwn-6088a539d8d1666dca6979b5759bf966ee9124ef.zip |
bridge: Use BR_INPUT_SKB_CB on xmit path
this patch makes BR_INPUT_SKB_CB available on the xmit path so
that we could avoid passing the br pointer around for the purpose
of collecting device statistics.
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_forward.c')
-rw-r--r-- | net/bridge/br_forward.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c index 6cd50c6e57cf..2e1cb434f6cd 100644 --- a/net/bridge/br_forward.c +++ b/net/bridge/br_forward.c @@ -111,6 +111,7 @@ static void br_flood(struct net_bridge *br, struct sk_buff *skb, { struct net_bridge_port *p; struct net_bridge_port *prev; + struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev; prev = NULL; @@ -120,7 +121,7 @@ static void br_flood(struct net_bridge *br, struct sk_buff *skb, struct sk_buff *skb2; if ((skb2 = skb_clone(skb, GFP_ATOMIC)) == NULL) { - br->dev->stats.tx_dropped++; + dev->stats.tx_dropped++; goto out; } @@ -137,7 +138,7 @@ static void br_flood(struct net_bridge *br, struct sk_buff *skb, if (skb0) { skb = skb_clone(skb, GFP_ATOMIC); if (!skb) { - br->dev->stats.tx_dropped++; + dev->stats.tx_dropped++; goto out; } } |