netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Boris Sukholitko <boris.sukholitko@broadcom.com>
Cc: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@resnulli.us>,
	Mina Almasry <almasrymina@google.com>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	David Howells <dhowells@redhat.com>,
	Ilya Lifshits <ilya.lifshits@broadcom.com>
Subject: Re: [PATCH net-next 0/5] tc: adjust network header after second vlan push
Date: Wed, 14 Aug 2024 07:39:50 -0700	[thread overview]
Message-ID: <20240814073950.53c6d4d7@kernel.org> (raw)
In-Reply-To: <ZrysAhVp8AaxPz4b@noodle>

On Wed, 14 Aug 2024 16:07:14 +0300 Boris Sukholitko wrote:
> > The series is structured quite nicely for review, so kudos for that.
> > But I'm not seeing the motivation for changing how TC pushes VLANs
> > and not changing OvS (or BPF?), IOW the other callers of
> > skb_vlan_push().
> > 
> > Why would pushing a tag from TC actions behave differently?  
> 
> IMHO, the difference between TC and OvS and BPF is that in the TC case
> the dissector is invoked on the wrong position in the packet (IP vs L2
> header). We can regard reading garbage from there as a bug.
> 
> I am not sure that this is the case in OvS or BPF. E.g. in the BPF
> case there may some script expecting the skb to point to an IP header
> after second vlan push. My change will break it.

The packet either has correct format or it doesn't. You could easily
construct a TC ruleset which pushes the VLAN using act_bpf, instead of
act_vlan.

Let's not be too conservative, worrying about very unlikely
regressions, IMHO. Such divergence makes the code base much harder 
to maintainer.

> > Please also add your test case to
> > tools/testing/selftests/net/forwarding/tc_actions.sh
> > if you can.  
> 
> Done in v2.

Please do not respond to a discussion and immediate send the next
version.

  reply	other threads:[~2024-08-14 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 10:56 [PATCH net-next 0/5] tc: adjust network header after second vlan push Boris Sukholitko
2024-08-05 10:56 ` [PATCH net-next 1/5] skb: add skb_vlan_flush helper Boris Sukholitko
2024-08-05 10:56 ` [PATCH net-next 2/5] skb: move mac_len adjustment out of skb_vlan_flush Boris Sukholitko
2024-08-05 10:56 ` [PATCH net-next 3/5] skb: export skb_vlan_flush Boris Sukholitko
2024-08-05 10:56 ` [PATCH net-next 4/5] act_vlan: open code skb_vlan_push Boris Sukholitko
2024-08-05 10:56 ` [PATCH net-next 5/5] act_vlan: adjust network header Boris Sukholitko
2024-08-13  0:40 ` [PATCH net-next 0/5] tc: adjust network header after second vlan push Jakub Kicinski
2024-08-14 13:07   ` Boris Sukholitko
2024-08-14 14:39     ` Jakub Kicinski [this message]
2024-08-14 14:55       ` Boris Sukholitko

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=20240814073950.53c6d4d7@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=almasrymina@google.com \
    --cc=asml.silence@gmail.com \
    --cc=boris.sukholitko@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=edumazet@google.com \
    --cc=ilya.lifshits@broadcom.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=lorenzo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.com \
    /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).