Netdev List
 help / color / mirror / Atom feed
From: Oliver Hartkopp <socketcan-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
To: Hayes Wang <hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org>,
	Oliver Neukum <oneukum-IBi9RG/b67k@public.gmane.org>
Cc: "netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: NAPI on USB network drivers
Date: Wed, 25 Jan 2017 14:33:51 +0100	[thread overview]
Message-ID: <65d97336-d3c8-0fe7-659a-88ddecd1b13e@hartkopp.net> (raw)
In-Reply-To: <0835B3720019904CB8F7AA43166CEEB201A134A7-JIZ+AM9kKNzKeZCINmmWEypo8c9IxeqyAjHCUHv49ws@public.gmane.org>

On 01/25/2017 10:39 AM, Hayes Wang wrote:
> Oliver Neukum [mailto:oneukum-IBi9RG/b67k@public.gmane.org]
>> 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

--
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

  parent reply	other threads:[~2017-01-25 13:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25  9:34 NAPI on USB network drivers Oliver Neukum
     [not found] ` <1485336881.16604.2.camel-IBi9RG/b67k@public.gmane.org>
2017-01-25  9:39   ` Hayes Wang
     [not found]     ` <0835B3720019904CB8F7AA43166CEEB201A134A7-JIZ+AM9kKNzKeZCINmmWEypo8c9IxeqyAjHCUHv49ws@public.gmane.org>
2017-01-25 13:33       ` Oliver Hartkopp [this message]
2017-01-25 20:57         ` Alexander Duyck
2017-01-26 18:59           ` Oliver Hartkopp
2017-01-25 14:13     ` Eric Dumazet
     [not found]       ` <1485353591.5145.8.camel-XN9IlZ5yJG9HTL0Zs8A6p+yfmBU6pStAUsxypvmhUTTZJqsBc5GL+g@public.gmane.org>
2017-01-26  1:43         ` Hayes Wang
2017-01-25 19:32 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65d97336-d3c8-0fe7-659a-88ddecd1b13e@hartkopp.net \
    --to=socketcan-fj+pqtutwrtk1umjsbkqmq@public.gmane.org \
    --cc=hayeswang-Rasf1IRRPZFBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oneukum-IBi9RG/b67k@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox