From: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
To: Daniel Borkmann <daniel-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
Cc: Jiri Pirko <jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org>,
Jamal Hadi Salim <jhs-jkUAjuhPggJWk0Htik3J/w@public.gmane.org>,
linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH net-next] tc: cls_bpf: make ingress and egress qdiscs consistent
Date: Fri, 03 Apr 2015 14:52:22 -0700 [thread overview]
Message-ID: <551F0B96.2090403@plumgrid.com> (raw)
In-Reply-To: <551F0A1B.3000100-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
On 4/3/15 2:46 PM, Daniel Borkmann wrote:
> On 04/03/2015 11:16 PM, Alexei Starovoitov wrote:
>> BPF programs attached to ingress and egress qdiscs see inconsistent
>> skb->data.
>> For ingress L2 header is already pulled, whereas for egress it's present.
>> That makes writing programs more difficult.
>> Make them consistent by pushing L2 before running the programs and
>> pulling
>> it back afterwards.
>> Similar approach is taken by skb_defer_rx_timestamp() which does
>> push/pull
>> before calling ptp_classify_raw()->BPF_PROG_RUN().
>>
>> Signed-off-by: Alexei Starovoitov <ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
>
> Thanks for looking into this. This ends up going via ingress_enqueue(),
yes.
> right? Maybe it would be better to add a new netlink attribute for
> ingress qdisc there that sets a flag in ingress_qdisc_data to pull the
> header space before calling tc_classify() and restore it later on?
> So, it would be configurable from tc. Would that work?
you mean a flag that will affect all classifiers? I'm not sure other
classifiers care. Noone complained for years. I think it would be
overdesign. Here the fix is trivial, which is my preference.
next prev parent reply other threads:[~2015-04-03 21:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 21:16 [PATCH net-next] tc: cls_bpf: make ingress and egress qdiscs consistent Alexei Starovoitov
[not found] ` <1428095784-7091-1-git-send-email-ast-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-04-03 21:46 ` Daniel Borkmann
[not found] ` <551F0A1B.3000100-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-04-03 21:52 ` Alexei Starovoitov [this message]
[not found] ` <551F0B96.2090403-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-04-03 22:10 ` Daniel Borkmann
[not found] ` <551F0FE2.8000502-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-04-03 22:17 ` Alexei Starovoitov
2015-04-03 22:54 ` Daniel Borkmann
[not found] ` <551F1A14.7080205-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org>
2015-04-03 23:04 ` Alexei Starovoitov
2015-04-03 23:11 ` Alexei Starovoitov
[not found] ` <551F1E13.8050508-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-04-03 23:26 ` Daniel Borkmann
2015-04-03 23:48 ` Daniel Borkmann
2015-04-04 0:14 ` Alexei Starovoitov
[not found] ` <551F2CD4.2080502-uqk4Ao+rVK5Wk0Htik3J/w@public.gmane.org>
2015-04-04 6:34 ` Daniel Borkmann
2015-04-07 18:51 ` 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=551F0B96.2090403@plumgrid.com \
--to=ast-uqk4ao+rvk5wk0htik3j/w@public.gmane.org \
--cc=daniel-FeC+5ew28dpmcu3hnIyYJQ@public.gmane.org \
--cc=davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org \
--cc=jhs-jkUAjuhPggJWk0Htik3J/w@public.gmane.org \
--cc=jiri-rHqAuBHg3fBzbRFIqnYvSA@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.