netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@vyatta.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Tom Herbert <therbert@google.com>, netdev@vger.kernel.org
Subject: Re: Receive steering and hash and cache misses
Date: Fri, 2 Apr 2010 15:52:14 -0700	[thread overview]
Message-ID: <20100402155214.0adfa9e2@nehalam> (raw)
In-Reply-To: <1270236991.1978.17.camel@edumazet-laptop>

On Fri, 02 Apr 2010 21:36:31 +0200
Eric Dumazet <eric.dumazet@gmail.com> wrote:

> Le vendredi 02 avril 2010 à 11:54 -0700, Stephen Hemminger a écrit :
> > On Fri, 2 Apr 2010 10:59:43 -0700
> > Tom Herbert <therbert@google.com> wrote:
> > 
> > > On Fri, Apr 2, 2010 at 10:26 AM, Stephen Hemminger
> > > <shemminger@vyatta.com> wrote:
> > > >
> > > > Although Receive Packet Steering can use a hardware generated receive hash
> > > > the device driver still causes an unnecessary cache miss on the interrupt
> > > > processing CPU.  The current Ethernet network device driver receive processing
> > > > has the device driver calling eth_type_trans() which causes a the
> > > > interrupt CPU to read the received frame header.
> > > >
> > > 
> > > It should be possible to deduce the values set by eth_type_trans from
> > > the RX descriptor along with the RX hash.  I'll post the patch getting
> > > rxhash from bnx2x which does this.
> > > 
> > 
> > On sky2, I get only RSS, Checksum, and length from descriptor info.
> 
> Doesnt sky2 also provide vlan id (OP_RXVLAN/OP_RXCHKSVLAN) ?
> 
> A future version of hardware could provide more info perhaps...

I have only some information from Marvell and no idea what they might
do with future hardware. 

> Must eth_type_trans() be done *before* netif_receive_skb() ?

In current arch yes, because netif_receive_skb is used for multiple
hardware types and the backlog queue could theoretically contain
skb's of different hardware types.  Also GRO works against RPS
since it does lookup work on the initial CPU and dirties the skb.

This is mostly theoretical at this point the bigger performance bottlenecks
are farther down the packet processing chain.




      reply	other threads:[~2010-04-03  1:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-02 17:26 Receive steering and hash and cache misses Stephen Hemminger
2010-04-02 17:59 ` Tom Herbert
2010-04-02 18:54   ` Stephen Hemminger
2010-04-02 19:36     ` Eric Dumazet
2010-04-02 22:52       ` Stephen Hemminger [this message]

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=20100402155214.0adfa9e2@nehalam \
    --to=shemminger@vyatta.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=therbert@google.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;
as well as URLs for NNTP newsgroup(s).