From: Michal Swiatkowski <michal.swiatkowski@linux•intel.com>
To: David Laight <david.laight.linux@gmail•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: Wed, 5 Feb 2025 08:40:28 +0100 [thread overview]
Message-ID: <Z6MV7KY81S+/bGGY@mev-dev.igk.intel.com> (raw)
In-Reply-To: <20250204184121.168eaba2@pumpkin>
On Tue, Feb 04, 2025 at 06:41:21PM +0000, David Laight wrote:
> 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
Right, I though it is better to have any additional validation for min >
max cases, but it looks like it is more problematic. I can drop it to
algin with the bnxt solution.
Thanks,
Michal
>
> >
> > Thanks,
> > Michal
next prev parent reply other threads:[~2025-02-05 7:44 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
2025-02-05 7:40 ` Michal Swiatkowski [this message]
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=Z6MV7KY81S+/bGGY@mev-dev.igk.intel.com \
--to=michal.swiatkowski@linux$(echo .)intel.com \
--cc=David.Laight@aculab$(echo .)com \
--cc=andrew+netdev@lunn$(echo .)ch \
--cc=anthony.l.nguyen@intel$(echo .)com \
--cc=corbet@lwn$(echo .)net \
--cc=davem@davemloft$(echo .)net \
--cc=david.laight.linux@gmail$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=horms@kernel$(echo .)org \
--cc=jacob.e.keller@intel$(echo .)com \
--cc=jgg@ziepe$(echo .)ca \
--cc=jiri@resnulli$(echo .)us \
--cc=konrad.knitter@intel$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=leon@kernel$(echo .)org \
--cc=linux-doc@vger$(echo .)kernel.org \
--cc=linux-rdma@vger$(echo .)kernel.org \
--cc=marcin.szycik@intel$(echo .)com \
--cc=mschmidt@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=nex.sw.ncis.nat.hpm.dev@intel$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=pio.raczynski@gmail$(echo .)com \
--cc=pmenzel@molgen$(echo .)mpg.de \
--cc=przemyslaw.kitszel@intel$(echo .)com \
--cc=sridhar.samudrala@intel$(echo .)com \
--cc=tatyana.e.nikolova@intel$(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