summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2014-12-08 01:42:55 (GMT)
committerDavid S. Miller <davem@davemloft.net>2014-12-09 22:03:19 (GMT)
commite008f3f07ffba2be471ffd79bd1922af0042f936 (patch)
tree5fc1503bb3315aab6a1a67b183a76d1b9689b5cd /net/core
parent5d6201e11b2c3870ae1124b97cc208bcaf9f0948 (diff)
downloadlinux-e008f3f07ffba2be471ffd79bd1922af0042f936.tar.xz
net: avoid to call skb_queue_len again
the queue length of sd->input_pkt_queue has been put into qlen, and impossible to change, since hold the lock Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index dd3bf58..3f191da 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);