net: enqueue_to_backlog() cleanup
We can remove a goto and a label by reversing a condition. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a7ae7b0b2e
commit
f7efd01fe2
@ -4816,20 +4816,18 @@ static int enqueue_to_backlog(struct sk_buff *skb, int cpu,
|
||||
backlog_lock_irq_save(sd, &flags);
|
||||
qlen = skb_queue_len(&sd->input_pkt_queue);
|
||||
if (qlen <= max_backlog && !skb_flow_limit(skb, qlen)) {
|
||||
if (qlen) {
|
||||
enqueue:
|
||||
__skb_queue_tail(&sd->input_pkt_queue, skb);
|
||||
input_queue_tail_incr_save(sd, qtail);
|
||||
backlog_unlock_irq_restore(sd, &flags);
|
||||
return NET_RX_SUCCESS;
|
||||
if (!qlen) {
|
||||
/* Schedule NAPI for backlog device. We can use
|
||||
* non atomic operation as we own the queue lock.
|
||||
*/
|
||||
if (!__test_and_set_bit(NAPI_STATE_SCHED,
|
||||
&sd->backlog.state))
|
||||
napi_schedule_rps(sd);
|
||||
}
|
||||
|
||||
/* Schedule NAPI for backlog device
|
||||
* We can use non atomic operation since we own the queue lock
|
||||
*/
|
||||
if (!__test_and_set_bit(NAPI_STATE_SCHED, &sd->backlog.state))
|
||||
napi_schedule_rps(sd);
|
||||
goto enqueue;
|
||||
__skb_queue_tail(&sd->input_pkt_queue, skb);
|
||||
input_queue_tail_incr_save(sd, qtail);
|
||||
backlog_unlock_irq_restore(sd, &flags);
|
||||
return NET_RX_SUCCESS;
|
||||
}
|
||||
|
||||
backlog_unlock_irq_restore(sd, &flags);
|
||||
|
Loading…
x
Reference in New Issue
Block a user