[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0UcxhhJVJZY-XrdD7ySkUHCnRy6GJ6_WWY8cVr1uE968CQ@mail.gmail.com>
Date: Wed, 25 Jan 2017 12:57:04 -0800
From: Alexander Duyck <alexander.duyck@...il.com>
To: Oliver Hartkopp <socketcan@...tkopp.net>
Cc: Hayes Wang <hayeswang@...ltek.com>,
Oliver Neukum <oneukum@...e.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>
Subject: Re: NAPI on USB network drivers
On Wed, Jan 25, 2017 at 5:33 AM, Oliver Hartkopp <socketcan@...tkopp.net> wrote:
> On 01/25/2017 10:39 AM, Hayes Wang wrote:
>>
>> Oliver Neukum [mailto:oneukum@...e.com]
>>>
>>> Sent: Wednesday, January 25, 2017 5:35 PM
>>
>> [...]
>>>
>>> looking at r8152 I noticed that it uses NAPI. I never considered
>>> this for the generic USB networking code as you cannot disable
>>> interrupts for USB. Is it still worth it? What are the benefits?
>>
>>
>> You could use napi_gro_receive() and it influences the performance.
>
>
> Another positive effect with NAPI is that you won't face out-of-order
> ethernet frames as you get with non-NAPI drivers, e.g. ax88179_178a
>
> http://marc.info/?l=linux-can&m=148049063812807&w=2
>
> We have the issue with CAN drivers where all USB drivers and >90% of the I/O
> mapped drivers do not use NAPI.
>
> I wonder whether it makes sense to add NAPI to a driver which only has ONE
> RX buffer ... but when searching for a solution for o-o-o frames I was
> always pointed to NAPI.
>
> Regards,
> Oliver
>
You could probably get around the o-o-o problem by enabling RPS for
the interface. I have found that it works for me to do that in order
to resolve o-o-o frames generated by VMs on virtual interfaces that
can't use NAPI.
- Alex
Powered by blists - more mailing lists