On 01/25/2017 10:39 AM, Hayes Wang wrote:
Oliver Neukum [mailto:oneukum-IBi9RG/b67k@public.gmane.org]
quoted
Sent: Wednesday, January 25, 2017 5:35 PM
[...]
quoted
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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Jan 25, 2017 at 5:33 AM, Oliver Hartkopp [off-list ref] wrote:
On 01/25/2017 10:39 AM, Hayes Wang wrote:
quoted
Oliver Neukum [mailto:oneukum@suse.com]
quoted
Sent: Wednesday, January 25, 2017 5:35 PM
[...]
quoted
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
On 01/25/2017 09:57 PM, Alexander Duyck wrote:
On Wed, Jan 25, 2017 at 5:33 AM, Oliver Hartkopp [off-list ref] wrote:
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.
Sounds promising!
In fact I tried to fix this o-o-o stuff here:
http://marc.info/?l=linux-can&m=143637774606287&w=2
Do you have an example how to do it right?
Best regards,
Oliver