]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix problem in dequeuing from input_pkt_queue
authorTom Herbert <therbert@google.com>
Thu, 20 May 2010 18:37:59 +0000 (18:37 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 May 2010 07:38:33 +0000 (00:38 -0700)
commitba4709887603c9e508f3e735334ad2e9b72b1af4
treea8a25a4f23be5c0eeed77dd9fcb30dc9b315e519
parent14d822185d6e69fd7caf04ea7d75080208e55889
net: fix problem in dequeuing from input_pkt_queue

Fix some issues introduced in batch skb dequeuing for input_pkt_queue.
The primary issue it that the queue head must be incremented only
after a packet has been processed, that is only after
__netif_receive_skb has been called.  This is needed for the mechanism
to prevent OOO packet in RFS.  Also when flushing the input_pkt_queue
and process_queue, the process queue should be done first to prevent
OOO packets.

Because the input_pkt_queue has been effectively split into two queues,
the calculation of the tail ptr is no longer correct.  The correct value
would be head+input_pkt_queue->len+process_queue->len.  To avoid
this calculation we added an explict input_queue_tail in softnet_data.
The tail value is simply incremented when queuing to input_pkt_queue.

Signed-off-by: Tom Herbert <therbert@google.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c