[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1548775942-6476-1-git-send-email-albin_yang@163.com>
Date: Tue, 29 Jan 2019 23:32:22 +0800
From: Yang Wei <albin_yang@....com>
To: netdev@...r.kernel.org
Cc: dmitry.tarnyagin@...kless.no, davem@...emloft.net,
yang.wei9@....com.cn
Subject: [PATCH net] net: caif: call dev_consume_skb_any when skb xmit done
From: Yang Wei <yang.wei9@....com.cn>
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@....com.cn>
---
drivers/net/caif/caif_serial.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/caif/caif_serial.c b/drivers/net/caif/caif_serial.c
index a0f954f..44e6c7b 100644
--- a/drivers/net/caif/caif_serial.c
+++ b/drivers/net/caif/caif_serial.c
@@ -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 */
--
2.7.4
Powered by blists - more mailing lists