[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ef0411526d0e699a590c1546507cd179e73e8559.camel@sipsolutions.net>
Date: Fri, 28 Jun 2019 12:55:33 +0200
From: Johannes Berg <johannes@...solutions.net>
To: Daniel Borkmann <daniel@...earbox.net>,
Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc: netdev@...r.kernel.org, bridge@...ts.linux-foundation.org,
nikolay@...ulusnetworks.com, roopa@...ulusnetworks.com,
jhs@...atatu.com, David Ahern <dsahern@...il.com>,
Zahari Doychev <zahari.doychev@...ux.com>,
Simon Horman <simon.horman@...ronome.com>,
Toshiaki Makita <makita.toshiaki@....ntt.co.jp>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...lanox.com>
Subject: Re: VLAN tags in mac_len
On Mon, 2019-06-17 at 10:49 +0200, Daniel Borkmann wrote:
> > > > Any other thoughts?
> > >
> > > imo skb_vlan_push() should still change mac_len.
> > > tc, ovs, bpf use it and expect vlan to be part of L2.
> >
> > I'm not sure tc really cares, but it *is* a reasonable argument to make.
> >
> > Like I said, whichever way I look at the problem, a different solution
> > looks more reasonable ;-)
>
> Agree with Alexei that the approach which would be least confusing and/or
> potentially causing regressions might be to go for 1).
Toshiaki explained already that (1) [changing the bridge code] isn't
sufficient, but Zahari is going to send patches to do (1) since that
lets use disentangle the bridge code from the rest of the discussion,
basically making it able to handle anything we throw at it.
> tc *does* care at least
> for the *BPF* case. In sch_clsact we have the ingress and egress hook where we
> can attach to and programs don't need to care where they are being attached
> since for both cases they see skb->data starting at eth header! In order to
> do this, we do a __skb_push()/__skb_pull() dance based on skb->mac_len depending
> from where we come. This also means that if a program pushed/popped a vlan tag,
> this still must be correct wrt expectations for the receive side. It is essential
> that there is consistent behavior on skb->mac_len given skbs can also be redirected
> from TX->RX or RX->TX(->RX), so that we don't pull to a wrong offset next time.
As somebody (also Toshiaki I think) explained, this is already not right
and tc mirred is broken.
So I still think we have a semantic problem here with mac_len and TX/RX,
but it's not something I feel I'm competent enough to really address.
johannes
Powered by blists - more mailing lists