netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Ahmed Zaki <ahmed.zaki@intel.com>,
	stephen@networkplumber.org, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, corbet@lwn.net,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com,
	netdev@vger.kernel.org, "Chittim,
	Madhu" <madhu.chittim@intel.com>,
	"Samudrala, Sridhar" <sridhar.samudrala@intel.com>,
	amritha.nambiar@intel.com,
	Jan Sokolowski <jan.sokolowski@intel.com>
Subject: Re: [RFC]: raw packet filtering via tc-flower
Date: Fri, 23 Feb 2024 10:51:00 +0100	[thread overview]
Message-ID: <ZdhqhKbly60La_4h@nanopsycho> (raw)
In-Reply-To: <20240222184045.478a8986@kernel.org>

Fri, Feb 23, 2024 at 03:40:45AM CET, kuba@kernel.org wrote:
>On Wed, 21 Feb 2024 12:43:47 -0700 Ahmed Zaki wrote:
>> Following on the discussion in [1] regarding raw packet filtering via 
>> ethtool and ntuple. To recap, we wanted to enable the user to offload 
>> filtering and flow direction using binary patterns of extended lengths 
>> and masks (e.g. 512 bytes). The conclusion was that ethtool and ntuple 
>> are deemed legacy and are not the best approach.
>> 
>> After some internal discussions, tc-flower seems to be another 
>> possibility. In [2], the skbedit and queue-mapping is now supported on 
>> the rx and the user can offload flow direction to a specific rx queue.
>> 
>> Can we extend tc-flower to support raw packet filtering, for example:
>> 
>> # tc filter add dev $IFACE ingress protocol 802_3 flower \
>>     offset $OFF pattern $BYTES mask $MASK \
>>     action skbedit queue_mapping $RXQ_ID skip_sw
>> 
>> where offset, pattern and mask are new the flower args, $BYTES and $MASK 
>> could be up to 512 bytes.
>
>Have you looked at cls_u32 offload?

Hmm, but why flower can't be extended this direction. I mean, it is very
convenient to match on well-defined fields. I can imagine that the
combination of match on well-defined fields and random chunks together
is completely valid use-case. Also, offloading of flower is
straightforward.

U32 is, well, not that convenient.

  reply	other threads:[~2024-02-23  9:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-21 19:43 [RFC]: raw packet filtering via tc-flower Ahmed Zaki
2024-02-23  2:40 ` Jakub Kicinski
2024-02-23  9:51   ` Jiri Pirko [this message]
2024-02-23 12:07     ` Edward Cree
2024-02-23 12:22       ` Jiri Pirko
2024-02-23 12:36         ` Edward Cree
2024-02-23 13:32           ` Jamal Hadi Salim
2024-02-23 13:44             ` Edward Cree
2024-02-26 14:40               ` Ahmed Zaki
2024-02-26 15:03                 ` Jakub Kicinski
2024-02-27 15:25                   ` Jamal Hadi Salim

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=ZdhqhKbly60La_4h@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=ahmed.zaki@intel.com \
    --cc=amritha.nambiar@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jan.sokolowski@intel.com \
    --cc=jhs@mojatatu.com \
    --cc=kuba@kernel.org \
    --cc=madhu.chittim@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=stephen@networkplumber.org \
    --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).