From: Ahmed Zaki <ahmed.zaki@intel.com>
To: netdev@vger.kernel.org
Cc: jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
Ahmed Zaki <ahmed.zaki@intel.com>
Subject: [RFC PATCH net-next 2/3] ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values
Date: Wed, 23 Aug 2023 10:48:30 -0600 [thread overview]
Message-ID: <20230823164831.3284341-3-ahmed.zaki@intel.com> (raw)
In-Reply-To: <20230823164831.3284341-1-ahmed.zaki@intel.com>
Fix the values of the ICE_AQ_VSI_Q_OPT_RSS_* registers. Shifting is
already done when the values are used, no need to double shift. Bug was
not discovered earlier since only ICE_AQ_VSI_Q_OPT_RSS_TPLZ (Zero) is
currently used.
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
---
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 8 ++++----
drivers/net/ethernet/intel/ice/ice_virtchnl.c | 8 +++-----
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index 29f7a9852aec..b6c66dea92cc 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -491,10 +491,10 @@ struct ice_aqc_vsi_props {
#define ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_M (0xF << ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S)
#define ICE_AQ_VSI_Q_OPT_RSS_HASH_S 6
#define ICE_AQ_VSI_Q_OPT_RSS_HASH_M (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
-#define ICE_AQ_VSI_Q_OPT_RSS_TPLZ (0x0 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
-#define ICE_AQ_VSI_Q_OPT_RSS_SYM_TPLZ (0x1 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
-#define ICE_AQ_VSI_Q_OPT_RSS_XOR (0x2 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
-#define ICE_AQ_VSI_Q_OPT_RSS_JHASH (0x3 << ICE_AQ_VSI_Q_OPT_RSS_HASH_S)
+#define ICE_AQ_VSI_Q_OPT_RSS_TPLZ 0x0
+#define ICE_AQ_VSI_Q_OPT_RSS_SYM_TPLZ 0x1
+#define ICE_AQ_VSI_Q_OPT_RSS_XOR 0x2
+#define ICE_AQ_VSI_Q_OPT_RSS_JHASH 0x3
u8 q_opt_tc;
#define ICE_AQ_VSI_Q_OPT_TC_OVR_S 0
#define ICE_AQ_VSI_Q_OPT_TC_OVR_M (0x1F << ICE_AQ_VSI_Q_OPT_TC_OVR_S)
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
index 4a02ed91ba73..d9e1ee20d695 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
@@ -829,11 +829,9 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add)
goto error_param;
}
- ctx->info.q_opt_rss = ((lut_type <<
- ICE_AQ_VSI_Q_OPT_RSS_LUT_S) &
- ICE_AQ_VSI_Q_OPT_RSS_LUT_M) |
- (hash_type &
- ICE_AQ_VSI_Q_OPT_RSS_HASH_M);
+ ctx->info.q_opt_rss =
+ FIELD_PREP(ICE_AQ_VSI_Q_OPT_RSS_LUT_M, lut_type) |
+ FIELD_PREP(ICE_AQ_VSI_Q_OPT_RSS_HASH_M, hash_type);
/* Preserve existing queueing option setting */
ctx->info.q_opt_rss |= (vsi->info.q_opt_rss &
--
2.39.2
next prev parent reply other threads:[~2023-08-23 16:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-23 16:48 [RFC PATCH net-next 0/3] Support Symmetric Toeplitz RSS hash Ahmed Zaki
2023-08-23 16:48 ` [RFC PATCH net-next 1/3] net: ethtool: add symmetric Toeplitz RSS hash function Ahmed Zaki
2023-08-23 19:45 ` Saeed Mahameed
2023-08-24 13:14 ` Ahmed Zaki
2023-08-24 18:36 ` Saeed Mahameed
2023-08-24 22:56 ` Ahmed Zaki
2023-08-24 23:30 ` Willem de Bruijn
2023-08-25 21:21 ` Ahmed Zaki
2023-08-24 18:14 ` Jakub Kicinski
2023-08-24 22:55 ` Ahmed Zaki
2023-08-25 0:43 ` Jakub Kicinski
2023-08-25 20:46 ` Ahmed Zaki
2023-08-26 0:49 ` Jakub Kicinski
2023-08-30 18:11 ` Ahmed Zaki
2023-08-23 16:48 ` Ahmed Zaki [this message]
2023-08-23 16:48 ` [RFC PATCH net-next 3/3] ice: add support for " Ahmed Zaki
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=20230823164831.3284341-3-ahmed.zaki@intel.com \
--to=ahmed.zaki@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=netdev@vger.kernel.org \
/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).