[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ef49605a-8065-4567-f62b-83e13156b6c0@gmail.com>
Date: Wed, 27 Mar 2019 19:55:04 +0100
From: Heiner Kallweit <hkallweit1@...il.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: Edward Cree <ecree@...arflare.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: netif_receive_skb_list and interrupts enabled/disabled
On 27.03.2019 09:20, Jesper Dangaard Brouer wrote:
> On Tue, 26 Mar 2019 21:04:09 +0100
> Heiner Kallweit <hkallweit1@...il.com> wrote:
>
>> A question inspired by 0a25d92c6f4f ("dpaa2-eth: use netif_receive_skb_list"):
>> kerneldoc of netif_receive_skb_list states that interrupts should be
>> enabled.
>
> Do notice that the exact same comment (and rule) applies to
> netif_receive_skb() which also have below comment:
>
> /* [...]
> * This function may only be called from softirq context and interrupts
> * should be enabled.
> */
>
>> When used from NAPI context irqs typically are disabled.
>> And if the NAPI budget is fully consumed then interrupts don't get enabled
>> in the same NAPI poll loop. How is this supposed to play together?
>
> You have misunderstood that is means that interrupts should be
> enabled. It is talking about local_irq_disable/enable and
> local_irq_save/restore. This is different from disabling the IRQs on a
> given NIC RX-queue.
>
Uh, you're right of course, my bad. One more question because this part
of the network stack was beyond my horizon so far.
The referenced patch replaces a number of calls to napi_gro_receive()
with a call to netif_receive_skb_list(). In a follow-up to this mail thread
there was a remark "We should likely add a similar napi_gro_receive_list()
function."
For my understanding: When is it safe to replace a number of
napi_gro_receive() calls with netif_receive_skb_list() and when would we
need the new napi_gro_receive_list()?
Powered by blists - more mailing lists