netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Krishna Kumar <krikku@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
	tom@herbertland.com, pabeni@redhat.com, horms@kernel.org,
	sdf@fomichev.me, kuniyu@google.com, ahmed.zaki@intel.com,
	aleksander.lobakin@intel.com, atenart@kernel.org,
	krishna.ku@flipkart.com
Subject: Re: [PATCH v6 net-next 1/2] net: Prevent RPS table overwrite for active flows
Date: Mon, 28 Jul 2025 09:01:55 -0700	[thread overview]
Message-ID: <20250728090155.384b2b14@kernel.org> (raw)
In-Reply-To: <CACLgkEY4cRWsRQW=-PSxnE=V6AvRuKuvYzXSuofmB8NMJ=9ZqQ@mail.gmail.com>

On Mon, 28 Jul 2025 07:43:25 +0530 Krishna Kumar wrote:
> > > +                             if (hash != READ_ONCE(tmp_rflow->hash) ||
> > > +                                 next_cpu == tmp_cpu) {
> > > +                                     /*
> > > +                                      * Don't unnecessarily reprogram if:
> > > +                                      * 1. This slot has an active different
> > > +                                      *    flow.
> > > +                                      * 2. This slot has the same flow (very
> > > +                                      *    likely but not guaranteed) and
> > > +                                      *    the rx-queue# did not change.
> > > +                                      */  
> 
> I took some time to figure out the different paths here as it was a
> new area for me, hence I put this comment. Shall I keep it as the
> condition is not very intuitive?

To me it just restates the condition, so not worth keeping the comment.
You could add the explanation of the logic with more justifications to
the commit message if you'd like? (perhaps you have it there already..)

  reply	other threads:[~2025-07-28 16:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23  6:16 [PATCH v6 net-next 0/2] net: RPS table overwrite prevention and flow_id caching Krishna Kumar
2025-07-23  6:16 ` [PATCH v6 net-next 1/2] net: Prevent RPS table overwrite for active flows Krishna Kumar
2025-07-25 22:45   ` Jakub Kicinski
2025-07-28  2:13     ` Krishna Kumar
2025-07-28 16:01       ` Jakub Kicinski [this message]
2025-07-29  4:25         ` Krishna Kumar
2025-07-23  6:16 ` [PATCH v6 net-next 2/2] net: Cache hash and flow_id to avoid recalculation Krishna Kumar

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=20250728090155.384b2b14@kernel.org \
    --to=kuba@kernel.org \
    --cc=ahmed.zaki@intel.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=atenart@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=krikku@gmail.com \
    --cc=krishna.ku@flipkart.com \
    --cc=kuniyu@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=tom@herbertland.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).