From: David Miller <davem@davemloft.net>
To: ast@plumgrid.com
Cc: cwang@twopensource.com, daniel@iogearbox.net,
edumazet@google.com, tgraf@suug.ch, jiri@resnulli.us,
jhs@mojatatu.com, netdev@vger.kernel.org
Subject: Re: [PATCH v4 net-next 2/2] tc: add 'needs_l2' flag to ingress qdisc
Date: Tue, 14 Apr 2015 14:05:06 -0400 (EDT) [thread overview]
Message-ID: <20150414.140506.401099074422805944.davem@davemloft.net> (raw)
In-Reply-To: <552C65F1.8010402@plumgrid.com>
From: Alexei Starovoitov <ast@plumgrid.com>
Date: Mon, 13 Apr 2015 17:57:21 -0700
> On 4/13/15 3:44 PM, Cong Wang wrote:
>>
>> My suggestion is fairly simple: move skb_pull() out of
>> eth_type_trans()
>> and move it to netif_receive_skb(), it apparently needs much more work
>> but it worth the effort. This would eliminate the skb_push() in mirred
>> and in ifb too, dev_forward_skb() would benefit too.
>
> wow. That would be massive. We're talking months worth of work here.
I think it's worth the effort.
Alexei I cannot apply your needs_l2 patch, it's fundamentally broken
because it assumes the whole chain of classifiers and actions starting
from a given qdisc root want the skb->data in one place or another.
It can be mixed, and quite easily so, and for that scenerio it's
broken.
You've been told multiple ways to keep the existing stuff working
yet give cls_bpf what it wants. I'll add another one so you'll have
three options:
1) Firstly, to propagate the packet offset into the code generated
for the BPF classifier when being attached to the ingress qdisc.
Not only is this doable, you'll know you aren't being shared with
other kinds of qdiscs so it'll just work.
2) Adjust where skb_pull() happens, Cong's idea.
3) Do the SKB share_check/pull/push in cls_bpf. No impact on anyone
else in the qdisc paths, mixed configurations handled in a guaranteed
way.
I know none of these fit into your unreasonable idealistic model of
how you want all of this to work, but surprise this is the real world
and you'll need to compromise some of your absolute requirements in
order to meet your goals of proper functionality.
Thanks.
next prev parent reply other threads:[~2015-04-14 18:05 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-11 0:45 [PATCH v4 net-next 2/2] tc: add 'needs_l2' flag to ingress qdisc Cong Wang
2015-04-11 1:39 ` Alexei Starovoitov
2015-04-11 6:53 ` Daniel Borkmann
2015-04-13 22:44 ` Cong Wang
2015-04-14 0:57 ` Alexei Starovoitov
2015-04-14 18:05 ` David Miller [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-04-10 23:33 [PATCH v4 net-next 1/2] net: introduce skb_postpush_rcsum() helper Alexei Starovoitov
2015-04-10 23:33 ` [PATCH v4 net-next 2/2] tc: add 'needs_l2' flag to ingress qdisc Alexei Starovoitov
2015-04-11 6:46 ` Daniel Borkmann
2015-04-13 14:16 ` Jamal Hadi Salim
2015-04-13 17:37 ` Alexei Starovoitov
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=20150414.140506.401099074422805944.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ast@plumgrid.com \
--cc=cwang@twopensource.com \
--cc=daniel@iogearbox.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=tgraf@suug.ch \
/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).