lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 2 Aug 2011 23:43:49 +0200
From:	Michał Mirosław <mirq-linux@...e.qmqm.pl>
To:	Stephen Hemminger <shemminger@...tta.com>
Cc:	netdev@...r.kernel.org, Eric Dumazet <eric.dumazet@...il.com>
Subject: Re: [RFC PATCH] common receive API + r8169 use

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@...e.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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ