bonding: drop_monitor aware
When packets are dropped in TX path, its better to use kfree_skb()
instead of dev_kfree_skb() to give proper drop_monitor events.
Also move the kfree_skb() call after read_unlock() in bond_alb_xmit()
and bond_xmit_activebackup()
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
index ef3791a..e15cc11 100644
--- a/drivers/net/bonding/bond_alb.c
+++ b/drivers/net/bonding/bond_alb.c
@@ -1346,12 +1346,12 @@
}
}
- if (res) {
- /* no suitable interface, frame not sent */
- dev_kfree_skb(skb);
- }
read_unlock(&bond->curr_slave_lock);
+ if (res) {
+ /* no suitable interface, frame not sent */
+ kfree_skb(skb);
+ }
return NETDEV_TX_OK;
}