From: Simon Horman <simon.horman@corigine.com>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
intel-wired-lan@lists.osuosl.org,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>,
Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>,
netdev@vger.kernel.org
Subject: Re: [PATCH iwl-next v2] ice: clean up __ice_aq_get_set_rss_lut()
Date: Thu, 8 Jun 2023 12:28:58 +0200 [thread overview]
Message-ID: <ZIGtaoFbvttiFD1r@corigine.com> (raw)
In-Reply-To: <20230607130957.115573-1-przemyslaw.kitszel@intel.com>
On Wed, Jun 07, 2023 at 09:09:57AM -0400, Przemek Kitszel wrote:
> Refactor __ice_aq_get_set_rss_lut() to improve reader experience and limit
> misuse scenarios (undesired LUT size for given LUT type).
>
> Allow only 3 RSS LUT type+size variants:
> PF LUT sized 2048, GLOBAL LUT sized 512, and VSI LUT sized 64, which were
> used on default flows prior to this commit.
>
> Prior to the change, code was mixing the meaning of @params->lut_size and
> @params->lut_type, flag assigning logic was cryptic, while long defines
> made everything harder to follow.
>
> Fix that by extracting some code out to separate helpers.
> Drop some of "shift by 0" statements that originated from Intel's
> internal HW documentation.
>
> Drop some redundant VSI masks (since ice_is_vsi_valid() gives "valid" for
> up to 0x300 VSIs).
>
> After sweeping all the defines out of struct ice_aqc_get_set_rss_lut,
> it fits into 7 lines.
>
> Finally apply some cleanup to the callsite
> (use of the new enums, tmp var for lengthy bit extraction).
>
> Note that flags for 128 and 64 sized VSI LUT are the same,
> and 64 is used everywhere in the code (updated to new enum here), it just
> happened that there was 128 in flag name.
>
> __ice_aq_get_set_rss_key() uses the same VSI valid bit, make constant
> common for it and __ice_aq_get_set_rss_lut().
>
> Signed-off-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-06-08 10:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-07 13:09 [PATCH iwl-next v2] ice: clean up __ice_aq_get_set_rss_lut() Przemek Kitszel
2023-06-08 10:28 ` Simon Horman [this message]
2023-06-29 7:07 ` [Intel-wired-lan] " Arland, ArpanaX
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=ZIGtaoFbvttiFD1r@corigine.com \
--to=simon.horman@corigine.com \
--cc=aleksander.lobakin@intel.com \
--cc=anirudh.venkataramanan@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
--cc=przemyslaw.kitszel@intel.com \
--cc=sudheer.mogilappagari@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 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).