[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinvSgc3MTAJZEmhBqmRpYlHdOZ6HQ_j43_m8XX1@mail.gmail.com>
Date: Thu, 20 May 2010 07:45:42 +0800
From: Changli Gao <xiaosuo@...il.com>
To: Tom Herbert <therbert@...gle.com>
Cc: davem@...emloft.net, eric.dumazet@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH] net: fix problem in dequeuing from input_pkt_queue
On Thu, May 20, 2010 at 5:47 AM, Tom Herbert <therbert@...gle.com> wrote:
> 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.
>
> In process_backlog the processing of the packet queue can be done
> without irq's being disabled.
>
> static int napi_gro_complete(struct sk_buff *skb)
> @@ -3320,26 +3319,24 @@ static int process_backlog(struct napi_struct *napi, int quota)
> }
> #endif
> napi->weight = weight_p;
> - local_irq_disable();
> while (work < quota) {
> struct sk_buff *skb;
> unsigned int qlen;
>
> while ((skb = __skb_dequeue(&sd->process_queue))) {
> - local_irq_enable();
we need to keep local irq disabled. If not, flush_backlog may be
called, and it will access sd->process_queue.
--
Regards,
Changli Gao(xiaosuo@...il.com)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists