All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: "Björn Töpel" <bjorn@kernel.org>
Cc: Michael Chan <michael.chan@broadcom.com>,
	Pavan Chebbi <pavan.chebbi@broadcom.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	linux-kselftest@vger.kernel.org,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next 1/5] ethtool: Add RSS indirection table resize helpers
Date: Wed, 4 Mar 2026 09:09:21 -0800	[thread overview]
Message-ID: <20260304090921.408a8c4f@kernel.org> (raw)
In-Reply-To: <CAJ+HfNj9Z61aE1ydoKZBUqeWJsPOBC4J4ZgMd6JjSfC6J89-9w@mail.gmail.com>

On Wed, 4 Mar 2026 12:37:09 +0100 Björn Töpel wrote:
> > > +             return -EINVAL;
> > > +
> > > +     scoped_guard(mutex, &dev->ethtool->rss_lock) {
> > > +             xa_for_each(&dev->ethtool->rss_ctx, context, ctx) {
> > > +                     ret = ethtool_rxfh_indir_can_resize(ethtool_rxfh_context_indir(ctx),  
> >
> > 80 char limit width limit is still king in netdev
> > please shrink the length of the helpers you're adding?
> > And/or take the locks in a normal way..  
> 
> Hmm, is guard() and friends discouraged in netdev, or ethtool
> specific? I'll fix the 100 chars lines (sad face)!

Yes, non-scoped guards are discouraged.

> > > +                                                         ctx->indir_size, new_indir_size);
> > > +                     if (ret)
> > > +                             return ret;
> > > +             }
> > > +
> > > +             xa_for_each(&dev->ethtool->rss_ctx, context, ctx) {
> > > +                     __ethtool_rxfh_indir_resize(ethtool_rxfh_context_indir(ctx),
> > > +                                                 ctx->indir_size, new_indir_size);
> > > +                     ctx->indir_size = new_indir_size;
> > > +             }
> > > +     }
> > > +
> > > +     xa_for_each(&dev->ethtool->rss_ctx, context, ctx)
> > > +             ethtool_rss_notify(dev, ETHTOOL_MSG_RSS_NTF, context);  
> >
> > Why a separate loop ?  
> 
> We can't hold the rss_lock for the notify;
> ethnl_default_notify->rss_prepare->... deadlock.

LOL I guess scoped guard also has negative impact on readability

  reply	other threads:[~2026-03-04 17:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 18:15 [PATCH net-next 0/5] ethtool: Dynamic RSS context indirection table resizing Björn Töpel
2026-03-03 18:15 ` [PATCH net-next 1/5] ethtool: Add RSS indirection table resize helpers Björn Töpel
2026-03-04  0:03   ` Jakub Kicinski
2026-03-04 11:37     ` Björn Töpel
2026-03-04 17:09       ` Jakub Kicinski [this message]
2026-03-03 18:15 ` [PATCH net-next 2/5] bnxt_en: Resize RSS contexts on channel count change Björn Töpel
2026-03-03 19:20   ` Michael Chan
2026-03-04 11:38     ` Björn Töpel
2026-03-04  0:05   ` Jakub Kicinski
2026-03-04 11:39     ` Björn Töpel
2026-03-03 18:15 ` [PATCH net-next 3/5] netdevsim: Add RSS context support with dynamic table sizing Björn Töpel
2026-03-04  0:07   ` Jakub Kicinski
2026-03-04 11:40     ` Björn Töpel
2026-03-03 18:15 ` [PATCH net-next 4/5] selftests: netdevsim: Add RSS indirection table resize test Björn Töpel
2026-03-04  0:07   ` Jakub Kicinski
2026-03-03 18:15 ` [PATCH net-next 5/5] selftests: rss_drv: Add RSS indirection table resize tests Björn Töpel
2026-03-04  0:16   ` Jakub Kicinski
2026-03-04  8:23 ` [PATCH net-next 0/5] ethtool: Dynamic RSS context indirection table resizing Pavan Chebbi

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=20260304090921.408a8c4f@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=bjorn@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=willemb@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.