netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
	netdev@vger.kernel.org, davem@davemloft.net,
	nirranjan@chelsio.com, vishal@chelsio.com, dt@chelsio.com
Subject: Re: [PATCH net-next v3 1/2] cxgb4: add TC-MATCHALL classifier egress offload
Date: Fri, 15 Nov 2019 11:28:17 -0800	[thread overview]
Message-ID: <20191115112817.3b7d0c13@cakuba.netronome.com> (raw)
In-Reply-To: <20191115190056.GA14695@chelsio.com>

On Sat, 16 Nov 2019 00:30:57 +0530, Rahul Lakkireddy wrote:
> > > I don't think that is correct. If matchall is the only filter there, it
> > > does not matter which prio is it. It matters only in case there are
> > > other filters.  
> > 
> > Yup, the ingress side is the one that matters.
> >   
> > > The code should just check for other filters and forbid to insert the
> > > rule if other filters have higher prio (lower number).  
> > 
> > Ack as well, that'd work even better. 
> > 
> > I've capitulated to the prio == 1 condition as "good enough" when
> > netronome was adding the policer offload for OvS.  
> 
> I see. I thought there was some sort of mutual agreement, that to
> offload police, then prio must be 1, when I saw several drivers do
> it. I don't have a police offload on ingress side yet. So, I'm
> guessing this check for prio is not needed at all for my series?
> Please confirm again so that I'm on the same page. :)

You still need to make sure that Hw orders the rules the same as SW
would. If there are lower prio flower offloads added first and then
high prio matchall rule, the flower filters should no longer match.
And vice versa if higher prio flower rules are inserted after match 
all they should take precedence.

If that's how it currently works then all is good, but I don't see the
relevant checks anywhere.

As Jiri suggested, you can narrow the scope to whatever you're actual
use case requires. For example simply refuse to offload the filters if
it would require reordering or ejecting rules from HW.

  reply	other threads:[~2019-11-15 19:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-15 12:14 [PATCH net-next v3 0/2] cxgb4: add TC-MATCHALL classifier offload Rahul Lakkireddy
2019-11-15 12:14 ` [PATCH net-next v3 1/2] cxgb4: add TC-MATCHALL classifier egress offload Rahul Lakkireddy
2019-11-15 13:58   ` Jiri Pirko
2019-11-15 15:08     ` Rahul Lakkireddy
2019-11-15 15:32       ` Jiri Pirko
2019-11-15 18:51         ` Jakub Kicinski
2019-11-15 19:00           ` Rahul Lakkireddy
2019-11-15 19:28             ` Jakub Kicinski [this message]
2019-11-15 12:14 ` [PATCH net-next v3 2/2] cxgb4: add TC-MATCHALL classifier ingress offload Rahul Lakkireddy
2019-11-15 13:53   ` Jiri Pirko
2019-11-15 15:10     ` Rahul Lakkireddy

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=20191115112817.3b7d0c13@cakuba.netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=davem@davemloft.net \
    --cc=dt@chelsio.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    --cc=nirranjan@chelsio.com \
    --cc=rahul.lakkireddy@chelsio.com \
    --cc=vishal@chelsio.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).