From: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <eric.dumazet@gmail.com>
Subject: Re: [RFC PATCH] common receive API + r8169 use
Date: Tue, 2 Aug 2011 23:43:49 +0200 [thread overview]
Message-ID: <20110802214349.GA17411@rere.qmqm.pl> (raw)
In-Reply-To: <20110802141500.3c99185b@nehalam.ftrdhcpuser.net>
On Tue, Aug 02, 2011 at 02:15:00PM -0700, Stephen Hemminger wrote:
> On Tue, 2 Aug 2011 22:24:35 +0200 (CEST)
> Michał Mirosław <mirq-linux@rere.qmqm.pl> wrote:
> > Here is a preliminary version of common RX path for network drivers. The idea
> > is an extension to Eric Dumazet's patch introducing build_skb() (it's
> > incorporated here for easier testing).
> >
> > Future plans:
> > - extend this API to devices which can do split buffer receives correctly
> > and use napi_gro_frags() instead;
> > - implement DaveM's idea of RX buffer handling (fill first, process
> > if buffers available) in parallel to my version (process first, refill
> > later);
> > - get rid of indirect calls in fast path (process_buffer() and
> > add_buffer()) - ideas? inline netdev_rx_poll() and pass callback to it?
> >
> > Version rebased on v3.0 is running succesfully on one laptop with r8169 on
> > board since about a week. No problems showed up yet. For net-next this
> > needs retesting because of changes in device reset handling.
>
> 1. Don't put #ifdef code in, just go with the new code.
I have a patch that removes old code. I left it out for now to make review
of the main code easier.
> 2. Get rid of the inline on all those functions. Anything over 3 lines
> really shouldn't be inlined.
I plan to move most of those functions to dev.c later. For the receive
processing hot path (netdev_rx_poll), inlining won't add much code to
running kernel (I expect most systems use single or at most a few drivers
at once), but will allow the compiler to optimize out function calls from
the inner loop.
> 3. What is the performance difference (if any)?
I don't have fast enough transmitter yet, so have no real data. Eric's
testing showed dramatic reduction in CPU usage after changing igb to use
build_skb(). Inlined version of this patch should give similar results.
Eric: can you share the igb changes? I have no hardware for it, but could
merge our changes for you to test.
Best Regards,
Michał Mirosław
next prev parent reply other threads:[~2011-08-02 21:43 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-02 20:24 [RFC PATCH] common receive API + r8169 use Michał Mirosław
2011-08-02 21:15 ` Stephen Hemminger
2011-08-02 21:43 ` Michał Mirosław [this message]
2011-08-08 16:47 ` Eric Dumazet
2011-08-26 18:44 ` Michał Mirosław
2011-08-02 22:01 ` Francois Romieu
2011-08-03 14:06 ` Michał Mirosław
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=20110802214349.GA17411@rere.qmqm.pl \
--to=mirq-linux@rere.qmqm.pl \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
/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