From: Rahul Lakkireddy <rahul.lakkireddy@chelsio•com>
To: Jakub Kicinski <jakub.kicinski@netronome•com>
Cc: netdev@vger•kernel.org, davem@davemloft•net,
nirranjan@chelsio•com, vishal@chelsio•com, dt@chelsio•com
Subject: Re: [PATCH net-next v4 2/3] cxgb4: check rule prio conflicts before offload
Date: Tue, 19 Nov 2019 09:57:56 +0530 [thread overview]
Message-ID: <20191119042754.GA21175@chelsio.com> (raw)
In-Reply-To: <20191118153606.27aa9863@cakuba.netronome.com>
On Monday, November 11/18/19, 2019 at 15:36:06 -0800, Jakub Kicinski wrote:
> Hi Rahul!
>
> Please remember to CC people who have you feedback to make sure we
> don't miss the next version of the set.
>
Ok, got it.
> On Mon, 18 Nov 2019 22:30:18 +0530, Rahul Lakkireddy wrote:
> > Only offload rule if it satisfies following conditions:
> > 1. The immediate previous rule has priority < current rule's priority.
> > 2. The immediate next rule has priority > current rule's priority.
>
> Hm, the strict comparison here looks suspicious.
>
> The most common use case for flower is to insert many non-conflicting
> rules (different keys) at the same priority. From looking at this
> description and the code:
>
Yes, I had seen this regression in one of my tests and updated the
check below to consider equal priority in the equation. But, looks
like I missed to update the commit and comment. It should be <=
and >=, respectively. Will fix in v5.
> + if ((prev_fe->valid && prio < prev_fe->fs.tc_prio) ||
> + (next_fe->valid && prio > next_fe->fs.tc_prio))
> + valid = false;
>
> I get the feeling that either you haven't tested flower well or these
> ->valid flags are unreliable?
>
I'm guessing the confusion here is because of my commit message. Let me
know if I'm missing something else. Here, the ->valid tells if the rule
is active in hardware. If previous entry's prio is greater than current
entry's prio OR if next entry's prio is less than current entry, then
reject the rule. If current entry's prio is equal, then still consider
accepting the rule.
> > Also rework free entry fetch logic to search from end of TCAM, instead
> > of beginning, because higher indices have lower priority than lower
> > indices. This is similar to how TC auto generates priority values.
> >
> > Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio•com>
> > ---
> > v4:
> > - Patch added in this version.
>
> FWIW in the networking world we like the version history to be included
> in the commit message, i.e. above the --- lines. It's useful
> information.
Ok, got it.
Thanks,
Rahul
next prev parent reply other threads:[~2019-11-19 4:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-18 17:00 [PATCH net-next v4 0/3] cxgb4: add TC-MATCHALL classifier offload Rahul Lakkireddy
2019-11-18 17:00 ` [PATCH net-next v4 1/3] cxgb4: add TC-MATCHALL classifier egress offload Rahul Lakkireddy
2019-11-18 17:00 ` [PATCH net-next v4 2/3] cxgb4: check rule prio conflicts before offload Rahul Lakkireddy
2019-11-18 23:36 ` Jakub Kicinski
2019-11-19 4:27 ` Rahul Lakkireddy [this message]
2019-11-19 20:15 ` Jakub Kicinski
2019-11-18 17:00 ` [PATCH net-next v4 3/3] cxgb4: add TC-MATCHALL classifier ingress offload 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=20191119042754.GA21175@chelsio.com \
--to=rahul.lakkireddy@chelsio$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=dt@chelsio$(echo .)com \
--cc=jakub.kicinski@netronome$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nirranjan@chelsio$(echo .)com \
--cc=vishal@chelsio$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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