net: caif: call dev_consume_skb_any when skb xmit done
The skb shouled be consumed when xmit done, it makes drop profiles (dropwatch, perf) more friendly. dev_kfree_skb_irq()/kfree_skb() shouled be replaced by dev_consume_skb_any(), it makes code cleaner. Signed-off-by: Yang Wei <yang.wei9@zte.com.cn> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
896cebc0e2
commit
e339f8631e
@@ -257,10 +257,7 @@ static int handle_tx(struct ser_device *ser)
|
|||||||
if (skb->len == 0) {
|
if (skb->len == 0) {
|
||||||
struct sk_buff *tmp = skb_dequeue(&ser->head);
|
struct sk_buff *tmp = skb_dequeue(&ser->head);
|
||||||
WARN_ON(tmp != skb);
|
WARN_ON(tmp != skb);
|
||||||
if (in_interrupt())
|
dev_consume_skb_any(skb);
|
||||||
dev_kfree_skb_irq(skb);
|
|
||||||
else
|
|
||||||
kfree_skb(skb);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Send flow off if queue is empty */
|
/* Send flow off if queue is empty */
|
||||||
|
Reference in New Issue
Block a user