From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] NIU support for skb->rxhash
Date: Thu, 22 Apr 2010 14:19:22 -0700 (PDT) [thread overview]
Message-ID: <20100422.141922.39169749.davem@davemloft.net> (raw)
In-Reply-To: <1271936598.7895.5304.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 22 Apr 2010 13:43:18 +0200
> Then, our stack also touch all 256 bytes of skb structure itself.
>
> offsetof(struct sk_buff, next) =0x0
> offsetof(struct sk_buff, rxhash) =0xa8
> offsetof(struct sk_buff, dev) =0x20
> offsetof(struct sk_buff, len) =0x68
> offsetof(struct sk_buff, protocol)=0x7e
> offsetof(struct sk_buff, network_header)=0xc0
> offsetof(struct sk_buff, data) =0xd8
> offsetof(struct sk_buff, head) =0xd0
>
> Time for a reordering I guess ;)
Indeed.
Also I have some ideas about what we can do if we have
just the rxhash. It seems we can avoid the type_trans
overhead on the interrupting cpu.
Things like eth_type_trans() become a netdev operation rather than
something drivers statically call by hand. ->ndo_type_trans or
similar.
SKB has a state bit saying whether ->ndo_type_trans has been invoked
yet on RX.
Drivers pass raw SKBs up into the stack.
We defer the ->ndo_type_trans as far as possible, for RPS when we have
->rxhash we can defer this all the way to the destination RPS cpu.
If we lack ->rxhash, the source cpu will need to invoke
->ndo_type_trans before it can begin parsing the packet.
Anyways, something like that.
next prev parent reply other threads:[~2010-04-22 21:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 11:21 [PATCH] NIU support for skb->rxhash David Miller
2010-04-22 11:43 ` Eric Dumazet
2010-04-22 21:19 ` David Miller [this message]
2010-04-23 8:14 ` David Miller
2010-04-23 15:32 ` Tom Herbert
2010-04-23 20:28 ` David Miller
2010-04-22 16:21 ` Stephen Hemminger
2010-04-22 21:36 ` David Miller
2010-04-22 22:11 ` Stephen Hemminger
2010-04-22 22:24 ` David Miller
2010-04-22 21:37 ` David Miller
2010-04-22 22:53 ` 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=20100422.141922.39169749.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).