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>
const unsigned char *dest = skb->data;
struct net_bridge_fdb_entry *dst;
+ BR_INPUT_SKB_CB(skb)->brdev = dev;
+
dev->stats.tx_packets++;
dev->stats.tx_bytes += skb->len;
{
struct net_bridge_port *p;
struct net_bridge_port *prev;
+ struct net_device *dev = BR_INPUT_SKB_CB(skb)->brdev;
prev = NULL;
struct sk_buff *skb2;
if ((skb2 = skb_clone(skb, GFP_ATOMIC)) == NULL) {
- br->dev->stats.tx_dropped++;
+ dev->stats.tx_dropped++;
goto out;
}
if (skb0) {
skb = skb_clone(skb, GFP_ATOMIC);
if (!skb) {
- br->dev->stats.tx_dropped++;
+ dev->stats.tx_dropped++;
goto out;
}
}