Re: [PATCH net-next] tc: cls_bpf: make ingress and egress qdiscs consistent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>

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.
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux