From: Patrick McHardy <kaber@trash.net>
To: Jarek Poplawski <jarkao2@gmail.com>
Cc: Jay Cliburn <jcliburn@gmail.com>, netdev@vger.kernel.org
Subject: Re: atl1 warn_on_slowpath help
Date: Wed, 29 Oct 2008 14:09:08 +0100 [thread overview]
Message-ID: <49086074.3080208@trash.net> (raw)
In-Reply-To: <20081029130313.GA7256@ff.dom.local>
Jarek Poplawski wrote:
> On Wed, Oct 29, 2008 at 11:17:09AM +0100, Patrick McHardy wrote:
>> The __vlan_hwaccel_rx function only does the device lookup and
>> stores it in the cb. The remaining processing is done in a new
>> function that is invoked by netif_receive_skb(), in the proper
>> context. Unfortunatly this needs vlan-specific handling in
>> netif_receive_skb().
>>
>
> Unfortunately I'm not up-to-date with vlans and especially this
> nit_deliver problem, but here is a little doubt: since this is
> probably for stable, and skb->cb is rather tricky, I wonder why
> vlan_group_get_device() couldn't be used directly in
> vlan_hwaccel_do_receive()?
Because it needs the VLAN group, and that has to be passed
around somehow (=> skb->cb). So we might as well look up the
device immediately.
Its trivial to verify that the use of skb->cb is fine, the
only codepath besides the one leading to vlan_hwaccel_do_receive
immediately is through netif_rx.
> BTW: if we call netif_nit_deliver() from vlan_hwaccel_do_receive()
> from netif_receive_skb() this comment about bypassing looks a bit
> confusing to me:
>
> /*
> * netif_nit_deliver - deliver received packets to network taps
> * @skb: buffer
> *
> * This function is used to deliver incoming packets to network
> * taps. It should be used when the normal netif_receive_skb path
> * is bypassed, for example because of VLAN acceleration.
> */
Agreed, this could be improved.
> As a matter of fact without this patch it's not so apparent why
> netif_receive_skb() can't happen after netif_nit_deliver() in
> __vlan_hwaccel_rx() too.
I don't understand what you're saying.
next prev parent reply other threads:[~2008-10-29 13:09 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-29 0:08 atl1 warn_on_slowpath help Jay Cliburn
2008-10-29 7:15 ` Jarek Poplawski
2008-10-29 8:12 ` Patrick McHardy
2008-10-29 10:17 ` Patrick McHardy
2008-10-29 12:51 ` J. K. Cliburn
2008-10-29 12:54 ` Patrick McHardy
2008-10-29 14:15 ` Ramon Casellas
2008-10-29 16:47 ` Patrick McHardy
2008-10-29 13:03 ` Jarek Poplawski
2008-10-29 13:09 ` Patrick McHardy [this message]
2008-10-29 13:22 ` Jarek Poplawski
2008-10-29 13:26 ` Patrick McHardy
2008-10-29 14:04 ` Jarek Poplawski
2008-10-29 16:40 ` Patrick McHardy
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=49086074.3080208@trash.net \
--to=kaber@trash.net \
--cc=jarkao2@gmail.com \
--cc=jcliburn@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).