From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
David Miller <davem@davemloft.net>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
Jiri Pirko <jiri@resnulli.us>,
Ariel Levkovich <lariel@mellanox.com>
Subject: Re: [PATCH net-next 1/1] net/sched: Introduce skb hash classifier
Date: Wed, 12 Aug 2020 18:07:21 -0300 [thread overview]
Message-ID: <20200812210721.GE3398@localhost.localdomain> (raw)
In-Reply-To: <CAM_iQpU6KE4O6L1qAB5MjJGsc-zeQwx6x3HjgmevExaHntMyzA@mail.gmail.com>
On Tue, Aug 11, 2020 at 04:25:43PM -0700, Cong Wang wrote:
> On Sun, Aug 9, 2020 at 4:41 PM Jamal Hadi Salim <jhs@mojatatu.com> wrote:
> >
> > Interesting idea. Note: my experience is that typical setup is
> > to have only one of those (from offload perspective). Ariel,
> > are your use cases requiring say both fields?
> >
> > From policy perspective, i think above will get more complex
> > mostly because you have to deal with either mark or hash
> > being optional. It also opens doors for more complex matching
> > requirements. Example "match mark X AND hash Y" and
> > "match mark X OR hash Y".
> > The new classifier will have to deal with that semantic.
> >
> > With fw and hash being the complex/optional semantics are easy:
> >
> > "match mark X AND hash Y":
> > $TC filter add dev $DEV1 parent ffff: protocol ip prio 3 handle X
> > skbhash flowid 1:12 action continue
> > $TC filter add dev $DEV1 parent ffff: protocol ip prio 4 handle Y fw
> > flowid 1:12 action ok
> >
> > "match mark X OR hash Y":
> > $TC filter add dev $DEV1 parent ffff: protocol ip prio 3 handle X
> > skbhash flowid 1:12 action ok
> > $TC filter add dev $DEV1 parent ffff: protocol ip prio 4 handle Y fw
> > flowid 1:12 action ok
>
> Not sure if I get you correctly, but with a combined implementation
> you can do above too, right? Something like:
>
> (AND case)
> $TC filter add dev $DEV1 parent ffff: protocol ip prio 3 handle 1
> skb hash Y mark X flowid 1:12 action ok
I probably missed something, but this kind of matching is pretty much
what flower does today. Is it just to avoid key extraction/flow
dissector or did I miss something? I know there was a thread on how
to match on this hash before, but other than what I just said, I can't
recall other arguments.
next prev parent reply other threads:[~2020-08-12 21:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-07 22:28 [PATCH net-next 1/1] net/sched: Introduce skb hash classifier Jamal Hadi Salim
2020-08-09 18:15 ` Cong Wang
2020-08-09 23:41 ` Jamal Hadi Salim
2020-08-11 23:25 ` Cong Wang
2020-08-12 21:07 ` Marcelo Ricardo Leitner [this message]
2020-08-13 12:52 ` Jamal Hadi Salim
2020-08-16 18:59 ` Cong Wang
2020-08-17 11:19 ` Jamal Hadi Salim
2020-08-17 19:47 ` Cong Wang
2020-08-19 9:48 ` 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=20200812210721.GE3398@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=lariel@mellanox.com \
--cc=netdev@vger.kernel.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