net: avoid to call skb_queue_len again
Subsystems (2)
PATCH v2 1/1 net: avoid to call skb_queue_len again
From: Li RongQing <[email protected]>
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 <[email protected]>
Acked-by Eric Dumazet <[email protected]>
Cc Sergei Shtylyov <[email protected]>
--- net/core/dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/dev.c +1 -1
@@ -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);
Signature · 1 line
2.1.0
From: [email protected]
Date: Mon, 8 Dec 2014 09:42:55 +0800
Quoted 7 lines
From: Li RongQing <[email protected]>
the queue length of
sd->input_pkt_queuehas been put into qlen, and impossible to change, since hold the lockSigned-off-by Li RongQing <[email protected]>Acked-by Eric Dumazet <[email protected]>
Applied, thanks.