netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boris Sukholitko <boris.sukholitko@broadcom.com>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Vadym Kochan <vadym.kochan@plvision.eu>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Cong Wang <xiyou.wangcong@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Serhiy Boiko <serhiy.boiko@plvision.eu>,
	Volodymyr Mytnyk <volodymyr.mytnyk@plvision.eu>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jiri@resnulli.us, idosch@idosch.org, ilya.lifshits@broadcom.com
Subject: Re: [PATCH net-next] net/sched: cls_flower: fix resetting of ether proto mask
Date: Mon, 21 Jun 2021 11:32:27 +0300	[thread overview]
Message-ID: <20210621083037.GA9665@builder> (raw)
In-Reply-To: <20210617195102.h3bg6khvaogc2vwh@skbuf>

[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]

On Thu, Jun 17, 2021 at 10:51:02PM +0300, Vladimir Oltean wrote:
> On Thu, Jun 17, 2021 at 07:41:55PM +0300, Vladimir Oltean wrote:
> > On Thu, Jun 17, 2021 at 07:14:35PM +0300, Vadym Kochan wrote:

[snip excellent problem analysis]

> So maybe it is the flow dissector we need to fix, to make it give us an
> additional pure EtherType if asked for, make tc-flower use that
> dissector key instead, and then revert Jamal's user space patch, and we
> should all install our tc filters as:
> 
> tc filter add dev sw1p0 ingress handle 11 protocol all flower eth_type 0x8864 skip_hw action drop
> 
> ?

I like this solution. To be more explicit, the plan becomes:

1. Add FLOW_DISSECTOR_KEY_ETH_TYPE and struct flow_dissector_key_eth_type.
2. Have skb flow dissector use it.
3. Userspace does not set TCA_FLOWER_KEY_ETH_TYPE automagically
   anymore. cls_flower takes basic.n_proto from struct tcf_proto.
4. Add eth_type to the userspace and use it to set TCA_FLOWER_KEY_ETH_TYPE
5. Existence of TCA_FLOWER_KEY_ETH_TYPE triggers new eth_type dissector.

IMHO this neatly solves non-vlan protocol match case.

What should we do with the VLANs then? Should we have vlan_pure_ethtype
and cvlan_pure_ethtype as additional keys?

> 
> Or maybe just be like you, say I don't care about any of that, I just
> want it to behave as before, and simply revert Boris's patch. Ok, maybe

FTR I fully support reverting the patch. Please accept my apologies for
breaking the HW offload and big thanks to Vadym for finding it.

I will send the revert shortly.

Thanks,
Boris.

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]

  reply	other threads:[~2021-06-21  8:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-17 16:14 [PATCH net-next] net/sched: cls_flower: fix resetting of ether proto mask Vadym Kochan
2021-06-17 16:41 ` Vladimir Oltean
2021-06-17 19:51   ` Vladimir Oltean
2021-06-21  8:32     ` Boris Sukholitko [this message]
2021-06-21 10:09       ` Vladimir Oltean
2021-06-21 14:04       ` Jamal Hadi Salim
2021-06-22 13:13         ` Boris Sukholitko
2021-06-22 14:17           ` Jamal Hadi Salim
2021-06-22 15:22             ` Boris Sukholitko
2021-06-24 20:07               ` Jamal Hadi Salim
2021-06-28  6:24                 ` 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=20210621083037.GA9665@builder \
    --to=boris.sukholitko@broadcom.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=idosch@idosch.org \
    --cc=ilya.lifshits@broadcom.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=serhiy.boiko@plvision.eu \
    --cc=vadym.kochan@plvision.eu \
    --cc=volodymyr.mytnyk@plvision.eu \
    --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).