[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1417772948-17909-1-git-send-email-roy.qing.li@gmail.com>
Date: Fri, 5 Dec 2014 17:49:08 +0800
From: roy.qing.li@...il.com
To: netdev@...r.kernel.org
Subject: [PATCH][net-next] net: avoid to call skb_queue_len again
From: Li RongQing <roy.qing.li@...il.com>
the queue length of sd->input_pkt_queue has been putted into qlen,
and impossible to change, since hold the lock
Signed-off-by: Li RongQing <roy.qing.li@...il.com>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 0814a56..b954400 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3297,7 +3297,7 @@ static int enqueue_to_backlog(struct sk_buff *skb, int cpu,
rps_lock(sd);
qlen = skb_queue_len(&sd->input_pkt_queue);
if (qlen <= netdev_max_backlog && !skb_flow_limit(skb, qlen)) {
- if (skb_queue_len(&sd->input_pkt_queue)) {
+ if (qlen) {
enqueue:
__skb_queue_tail(&sd->input_pkt_queue, skb);
input_queue_tail_incr_save(sd, qtail);
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists