]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
net: caif: call dev_consume_skb_any when skb xmit done
authorYang Wei <yang.wei9@zte.com.cn>
Tue, 29 Jan 2019 15:32:22 +0000 (23:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Jan 2019 18:09:28 +0000 (10:09 -0800)
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>
drivers/net/caif/caif_serial.c

index a0f954f36c09f37371dea2e74cd6de489fcf7b26..44e6c7b1b2226f06c66bc84b9463e69e0e09000e 100644 (file)
@@ -257,10 +257,7 @@ static int handle_tx(struct ser_device *ser)
                if (skb->len == 0) {
                        struct sk_buff *tmp = skb_dequeue(&ser->head);
                        WARN_ON(tmp != skb);
-                       if (in_interrupt())
-                               dev_kfree_skb_irq(skb);
-                       else
-                               kfree_skb(skb);
+                       dev_consume_skb_any(skb);
                }
        }
        /* Send flow off if queue is empty */