All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
	davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
	edumazet@google.com, andrew+netdev@lunn.ch,
	netdev@vger.kernel.org, sridhar.samudrala@intel.com,
	jacob.e.keller@intel.com, pio.raczynski@gmail.com,
	konrad.knitter@intel.com, marcin.szycik@intel.com,
	nex.sw.ncis.nat.hpm.dev@intel.com, przemyslaw.kitszel@intel.com,
	jiri@resnulli.us, horms@kernel.org, David.Laight@aculab.com,
	pmenzel@molgen.mpg.de, mschmidt@redhat.com,
	tatyana.e.nikolova@intel.com, Jason Gunthorpe <jgg@ziepe.ca>,
	Leon Romanovsky <leon@kernel.org>,
	linux-rdma@vger.kernel.org, corbet@lwn.net,
	linux-doc@vger.kernel.org
Subject: Re: [PATCH net-next 2/9] ice: devlink PF MSI-X max and min parameter
Date: Tue, 4 Feb 2025 18:41:21 +0000	[thread overview]
Message-ID: <20250204184121.168eaba2@pumpkin> (raw)
In-Reply-To: <Z6GuSJCshbWlkiLu@mev-dev.igk.intel.com>

On Tue, 4 Feb 2025 07:06:00 +0100
Michal Swiatkowski <michal.swiatkowski@linux.intel.com> wrote:

> On Mon, Feb 03, 2025 at 09:48:08PM +0000, David Laight wrote:
> > On Mon,  3 Feb 2025 13:09:31 -0800
> > Tony Nguyen <anthony.l.nguyen@intel.com> wrote:
> >   
> > > From: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
> > > 
> > > Use generic devlink PF MSI-X parameter to allow user to change MSI-X
> > > range.
> > > 
> > > Add notes about this parameters into ice devlink documentation.
....
> > Don't those checks make it difficult to set the min and max together?
> > I think you need to create the new min/max pair and check they are
> > valid together.
> > Which probably requires one parameter with two values.
> >   
> 
> I wanted to reuse exsisting parameter. The other user of it is bnxt
> driver. In it there is a separate check for min "max" and max "max".
> It is also problematic, because min can be set to value greater than
> max (here it can happen when setting together to specific values).
> I can do a follow up to this series and change this parameter as you
> suggested. What do you think?

Changing the way a parameter is used will break API compatibility.
Perhaps you can get the generic parameter validation function to
update a 'pending' copy, and then do the final min < max check after
all the parameters have been processed before actually updating
the live limits.

The other option is just not to check whether min < max and just
document which takes precedence (and not use clamp()).

It may even be worth saving the 'live limits' as 'hi << 16 | lo' so
that then can be accessed atomically (with READ/WRITE_ONCE) to avoid
anything looking at the limits getting confused.
(Although maybe that doesn't matter here?)

	David

> 
> Thanks,
> Michal

  reply	other threads:[~2025-02-04 18:41 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 21:09 [PATCH net-next 0/9][pull request] ice: managing MSI-X in driver Tony Nguyen
2025-02-03 21:09 ` [PATCH net-next 1/9] ice: count combined queues using Rx/Tx count Tony Nguyen
2025-02-03 21:09 ` [PATCH net-next 2/9] ice: devlink PF MSI-X max and min parameter Tony Nguyen
2025-02-03 21:48   ` David Laight
2025-02-04  6:06     ` Michal Swiatkowski
2025-02-04 18:41       ` David Laight [this message]
2025-02-05  7:40         ` Michal Swiatkowski
2025-02-04 22:35   ` Jakub Kicinski
2025-02-05  5:46     ` Michal Swiatkowski
2025-02-03 21:09 ` [PATCH net-next 3/9] ice: remove splitting MSI-X between features Tony Nguyen
2025-02-03 21:09 ` [PATCH net-next 4/9] ice: get rid of num_lan_msix field Tony Nguyen
2025-02-03 21:09 ` [PATCH net-next 5/9] ice, irdma: move interrupts code to irdma Tony Nguyen
2025-02-03 21:09 ` [PATCH net-next 6/9] ice: treat dyn_allowed only as suggestion Tony Nguyen
2025-02-03 21:09 ` [PATCH net-next 7/9] ice: enable_rdma devlink param Tony Nguyen
2025-02-03 21:09 ` [PATCH net-next 8/9] ice: simplify VF MSI-X managing Tony Nguyen
2025-02-03 21:09 ` [PATCH net-next 9/9] ice: init flow director before RDMA Tony Nguyen
2025-02-04 22:42 ` [PATCH net-next 0/9][pull request] ice: managing MSI-X in driver Jakub Kicinski
2025-02-04 23:07   ` Tony Nguyen
2025-02-05  5:46   ` Michal Swiatkowski

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=20250204184121.168eaba2@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=David.Laight@aculab.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jgg@ziepe.ca \
    --cc=jiri@resnulli.us \
    --cc=konrad.knitter@intel.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=marcin.szycik@intel.com \
    --cc=michal.swiatkowski@linux.intel.com \
    --cc=mschmidt@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nex.sw.ncis.nat.hpm.dev@intel.com \
    --cc=pabeni@redhat.com \
    --cc=pio.raczynski@gmail.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=tatyana.e.nikolova@intel.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.