diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2014-12-08 09:42:55 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-09 17:03:19 -0500 |
commit | e008f3f07ffba2be471ffd79bd1922af0042f936 (patch) | |
tree | 5fc1503bb3315aab6a1a67b183a76d1b9689b5cd /net | |
parent | 5d6201e11b2c3870ae1124b97cc208bcaf9f0948 (diff) |
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')
-rw-r--r-- | net/core/dev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index dd3bf582e6f0..3f191da383f6 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); |