All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Laight <David.Laight@ACULAB.COM>
To: 'Michal Swiatkowski' <michal.swiatkowski@linux.intel.com>,
	Michal Schmidt <mschmidt@redhat.com>
Cc: "intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"pawel.chmielewski@intel.com" <pawel.chmielewski@intel.com>,
	"sridhar.samudrala@intel.com" <sridhar.samudrala@intel.com>,
	"jacob.e.keller@intel.com" <jacob.e.keller@intel.com>,
	"pio.raczynski@gmail.com" <pio.raczynski@gmail.com>,
	"konrad.knitter@intel.com" <konrad.knitter@intel.com>,
	"marcin.szycik@intel.com" <marcin.szycik@intel.com>,
	"wojciech.drewek@intel.com" <wojciech.drewek@intel.com>,
	"nex.sw.ncis.nat.hpm.dev@intel.com"
	<nex.sw.ncis.nat.hpm.dev@intel.com>,
	"przemyslaw.kitszel@intel.com" <przemyslaw.kitszel@intel.com>,
	"jiri@resnulli.us" <jiri@resnulli.us>,
	"horms@kernel.org" <horms@kernel.org>
Subject: Re: [Intel-wired-lan] [iwl-next v6 2/9] ice: devlink PF MSI-X max and min parameter
Date: Mon, 4 Nov 2024 08:51:25 +0000	[thread overview]
Message-ID: <ad5bf0e312d44737a18c076ab2990924@AcuMS.aculab.com> (raw)
In-Reply-To: <ZyhxmxnxPcLk2ZcX@mev-dev.igk.intel.com>

From: Michal Swiatkowski
> Sent: 04 November 2024 07:03
...
> > The type of the devlink parameters msix_vec_per_pf_{min,max} is
> > specified as u32, so you must use value.vu32 everywhere you work with
> > them, not vu16.
> >
> 
> I will change it.

You also need a pretty good reason to use u16 anywhere at all.
Just because the domain of the value is small doesn't mean the
best type isn't [unsigned] int.

Any arithmetic (particularly on non x86) is likely to increase
the code size above any perceived data saving.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

WARNING: multiple messages have this Message-ID (diff)
From: David Laight <David.Laight@ACULAB.COM>
To: 'Michal Swiatkowski' <michal.swiatkowski@linux.intel.com>,
	Michal Schmidt <mschmidt@redhat.com>
Cc: "intel-wired-lan@lists.osuosl.org"
	<intel-wired-lan@lists.osuosl.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"pawel.chmielewski@intel.com" <pawel.chmielewski@intel.com>,
	"sridhar.samudrala@intel.com" <sridhar.samudrala@intel.com>,
	"jacob.e.keller@intel.com" <jacob.e.keller@intel.com>,
	"pio.raczynski@gmail.com" <pio.raczynski@gmail.com>,
	"konrad.knitter@intel.com" <konrad.knitter@intel.com>,
	"marcin.szycik@intel.com" <marcin.szycik@intel.com>,
	"wojciech.drewek@intel.com" <wojciech.drewek@intel.com>,
	"nex.sw.ncis.nat.hpm.dev@intel.com"
	<nex.sw.ncis.nat.hpm.dev@intel.com>,
	"przemyslaw.kitszel@intel.com" <przemyslaw.kitszel@intel.com>,
	"jiri@resnulli.us" <jiri@resnulli.us>,
	"horms@kernel.org" <horms@kernel.org>
Subject: RE: [Intel-wired-lan] [iwl-next v6 2/9] ice: devlink PF MSI-X max and min parameter
Date: Mon, 4 Nov 2024 08:51:25 +0000	[thread overview]
Message-ID: <ad5bf0e312d44737a18c076ab2990924@AcuMS.aculab.com> (raw)
In-Reply-To: <ZyhxmxnxPcLk2ZcX@mev-dev.igk.intel.com>

From: Michal Swiatkowski
> Sent: 04 November 2024 07:03
...
> > The type of the devlink parameters msix_vec_per_pf_{min,max} is
> > specified as u32, so you must use value.vu32 everywhere you work with
> > them, not vu16.
> >
> 
> I will change it.

You also need a pretty good reason to use u16 anywhere at all.
Just because the domain of the value is small doesn't mean the
best type isn't [unsigned] int.

Any arithmetic (particularly on non x86) is likely to increase
the code size above any perceived data saving.

	David

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

  reply	other threads:[~2024-11-04  8:58 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28 10:03 [Intel-wired-lan] [iwl-next v6 0/9] ice: managing MSI-X in driver Michal Swiatkowski
2024-10-28 10:03 ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 1/9] ice: count combined queues using Rx/Tx count Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 2/9] ice: devlink PF MSI-X max and min parameter Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-31 21:48   ` [Intel-wired-lan] " Michal Schmidt
2024-11-04  7:02     ` Michal Swiatkowski
2024-11-04  8:51       ` David Laight [this message]
2024-11-04  8:51         ` David Laight
2024-11-04  9:09         ` [Intel-wired-lan] Small Integers: Big Penalty (was: [iwl-next v6 2/9] ice: devlink PF MSI-X max and min parameter) Paul Menzel
2024-11-04  9:09           ` Small Integers: Big Penalty (was: [Intel-wired-lan] " Paul Menzel
2024-11-04  9:12           ` [Intel-wired-lan] Small Integers: Big Penalty Paul Menzel
2024-11-04 11:24             ` Michal Swiatkowski
2024-11-05 22:36               ` Keller, Jacob E
2024-11-05 22:36                 ` Keller, Jacob E
2024-10-31 21:58   ` [Intel-wired-lan] [iwl-next v6 2/9] ice: devlink PF MSI-X max and min parameter Michal Schmidt
2024-11-04  7:03     ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 3/9] ice: remove splitting MSI-X between features Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 4/9] ice: get rid of num_lan_msix field Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 5/9] ice, irdma: move interrupts code to irdma Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 6/9] ice: treat dyn_allowed only as suggestion Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 7/9] ice: enable_rdma devlink param Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 8/9] ice: simplify VF MSI-X managing Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-28 10:03 ` [Intel-wired-lan] [iwl-next v6 9/9] ice: init flow director before RDMA Michal Swiatkowski
2024-10-28 10:03   ` Michal Swiatkowski
2024-10-30 20:23 ` [Intel-wired-lan] [iwl-next v6 0/9] ice: managing MSI-X in driver Jacob Keller
2024-10-30 20:23   ` Jacob Keller

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=ad5bf0e312d44737a18c076ab2990924@AcuMS.aculab.com \
    --to=david.laight@aculab.com \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=konrad.knitter@intel.com \
    --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=pawel.chmielewski@intel.com \
    --cc=pio.raczynski@gmail.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=sridhar.samudrala@intel.com \
    --cc=wojciech.drewek@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.