From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Ahmed Zaki <ahmed.zaki@intel.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Wojciech Drewek <wojciech.drewek@intel.com>,
Jakub Kicinski <kuba@kernel.org>, Sasha Levin <sashal@kernel.org>,
anthony.l.nguyen@intel.com, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com,
intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 6.1 46/68] ice: fix ICE_AQ_VSI_Q_OPT_RSS_* register values
Date: Tue, 16 Jan 2024 14:53:45 -0500 [thread overview]
Message-ID: <20240116195511.255854-46-sashal@kernel.org> (raw)
In-Reply-To: <20240116195511.255854-1-sashal@kernel.org>
From: Ahmed Zaki <ahmed.zaki@intel.com>
[ Upstream commit 20f73b60bb5c276cee9b1a530f100c677bc74af8 ]
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.
Also, rename ICE_AQ_VSI_Q_OPT_RSS_XXX to ICE_AQ_VSI_Q_OPT_RSS_HASH_XXX
for consistency.
Co-developed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Signed-off-by: Ahmed Zaki <ahmed.zaki@intel.com>
Link: https://lore.kernel.org/r/20231213003321.605376-5-ahmed.zaki@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/intel/ice/ice_adminq_cmd.h | 8 ++++----
drivers/net/ethernet/intel/ice/ice_lib.c | 4 ++--
drivers/net/ethernet/intel/ice/ice_virtchnl.c | 12 +++++-------
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index 1bdc70aa979d..a141680f3c1c 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -483,10 +483,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_HASH_TPLZ 0x0U
+#define ICE_AQ_VSI_Q_OPT_RSS_HASH_SYM_TPLZ 0x1U
+#define ICE_AQ_VSI_Q_OPT_RSS_HASH_XOR 0x2U
+#define ICE_AQ_VSI_Q_OPT_RSS_HASH_JHASH 0x3U
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_lib.c b/drivers/net/ethernet/intel/ice/ice_lib.c
index c051503c3a89..f074a1cf7166 100644
--- a/drivers/net/ethernet/intel/ice/ice_lib.c
+++ b/drivers/net/ethernet/intel/ice/ice_lib.c
@@ -1085,12 +1085,12 @@ static void ice_set_rss_vsi_ctx(struct ice_vsi_ctx *ctxt, struct ice_vsi *vsi)
case ICE_VSI_PF:
/* PF VSI will inherit RSS instance of PF */
lut_type = ICE_AQ_VSI_Q_OPT_RSS_LUT_PF;
- hash_type = ICE_AQ_VSI_Q_OPT_RSS_TPLZ;
+ hash_type = ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ;
break;
case ICE_VSI_VF:
/* VF VSI will gets a small RSS table which is a VSI LUT type */
lut_type = ICE_AQ_VSI_Q_OPT_RSS_LUT_VSI;
- hash_type = ICE_AQ_VSI_Q_OPT_RSS_TPLZ;
+ hash_type = ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ;
break;
default:
dev_dbg(dev, "Unsupported VSI type %s\n",
diff --git a/drivers/net/ethernet/intel/ice/ice_virtchnl.c b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
index 2b4c791b6cba..6c03ebf81ffd 100644
--- a/drivers/net/ethernet/intel/ice/ice_virtchnl.c
+++ b/drivers/net/ethernet/intel/ice/ice_virtchnl.c
@@ -817,8 +817,8 @@ static int ice_vc_handle_rss_cfg(struct ice_vf *vf, u8 *msg, bool add)
int status;
lut_type = ICE_AQ_VSI_Q_OPT_RSS_LUT_VSI;
- hash_type = add ? ICE_AQ_VSI_Q_OPT_RSS_XOR :
- ICE_AQ_VSI_Q_OPT_RSS_TPLZ;
+ hash_type = add ? ICE_AQ_VSI_Q_OPT_RSS_HASH_XOR :
+ ICE_AQ_VSI_Q_OPT_RSS_HASH_TPLZ;
ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
if (!ctx) {
@@ -826,11 +826,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.43.0
next prev parent reply other threads:[~2024-01-16 19:57 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 19:53 [PATCH AUTOSEL 6.1 01/68] wifi: rt2x00: restart beacon queue when hardware reset Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 02/68] selftests/bpf: satisfy compiler by having explicit return in btf test Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 03/68] selftests/bpf: Fix pyperf180 compilation failure with clang18 Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 04/68] wifi: rt2x00: correct wrong BBP register in RxDCOC calibration Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 05/68] selftests/bpf: Fix issues in setup_classid_environment() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 06/68] soc: xilinx: Fix for call trace due to the usage of smp_processor_id() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 07/68] soc: xilinx: fix unhandled SGI warning message Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 08/68] scsi: lpfc: Fix possible file string name overflow when updating firmware Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 09/68] PCI: Add no PM reset quirk for NVIDIA Spectrum devices Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 10/68] bonding: return -ENOMEM instead of BUG in alb_upper_dev_walk Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 11/68] net: usb: ax88179_178a: avoid two consecutive device resets Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 12/68] wifi: ieee80211: fix PV1 frame control field name Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 13/68] scsi: mpi3mr: Add PCI checks where SAS5116 diverges from SAS4116 Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 14/68] scsi: arcmsr: Support new PCI device IDs 1883 and 1886 Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 15/68] ARM: dts: imx7d: Fix coresight funnel ports Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 16/68] ARM: dts: imx7s: Fix lcdif compatible Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 17/68] ARM: dts: imx7s: Fix nand-controller #size-cells Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 18/68] wifi: ath9k: Fix potential array-index-out-of-bounds read in ath9k_htc_txstatus() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 19/68] wifi: ath11k: fix race due to setting ATH11K_FLAG_EXT_IRQ_ENABLED too early Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 20/68] bnxt_en: Add 5760X (P7) PCI IDs Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 21/68] bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 22/68] bpf: Add map and need_defer parameters to .map_fd_put_ptr() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 23/68] bpf: Set need_defer as false when clearing fd array during map free Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 24/68] scsi: libfc: Don't schedule abort twice Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 25/68] scsi: libfc: Fix up timeout error in fc_fcp_rec_error() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 26/68] net: mvmdio: Avoid excessive sleeps in polled mode Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 27/68] net: wangxun: fix changing mac failed when running Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 28/68] bpf: Guard stack limits against 32bit overflow Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 29/68] bpf: Set uattr->batch.count as zero before batched update or deletion Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 30/68] wifi: wfx: fix possible NULL pointer dereference in wfx_set_mfp_ap() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 31/68] ARM: dts: rockchip: fix rk3036 hdmi ports node Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 32/68] ARM: dts: imx25/27-eukrea: Fix RTC node name Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 33/68] ARM: dts: imx: Use flash@0,0 pattern Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 34/68] ARM: dts: imx27: Fix sram node Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 35/68] ARM: dts: imx1: " Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 36/68] net: phy: at803x: fix passing the wrong reference for config_intr Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 37/68] ionic: pass opcode to devcmd_wait Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 38/68] ionic: bypass firmware cmds when stuck in reset Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 39/68] block/rnbd-srv: Check for unlikely string overflow Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 40/68] ARM: dts: imx25: Fix the iim compatible string Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 41/68] ARM: dts: imx25/27: Pass timing0 Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 42/68] ARM: dts: imx27-apf27dev: Fix LED name Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 43/68] ARM: dts: imx23-sansa: Use preferred i2c-gpios properties Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 44/68] ARM: dts: imx23/28: Fix the DMA controller node name Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 45/68] scsi: hisi_sas: Set .phy_attached before notifing phyup event HISI_PHYE_PHY_UP_PM Sasha Levin
2024-01-16 19:53 ` Sasha Levin [this message]
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 47/68] net: atlantic: eliminate double free in error handling logic Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 48/68] net: dsa: mv88e6xxx: Fix mv88e6352_serdes_get_stats error path Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 49/68] block: prevent an integer overflow in bvec_try_merge_hw_page Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 50/68] md: Whenassemble the array, consult the superblock of the freshest device Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 51/68] cfi: Add CFI_NOSEAL() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 52/68] arm64: dts: qcom: msm8996: Fix 'in-ports' is a required property Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 53/68] arm64: dts: qcom: msm8998: Fix 'out-ports' " Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 54/68] ice: fix pre-shifted bit usage Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 55/68] arm64: dts: amlogic: fix format for s4 uart node Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 56/68] wifi: rtl8xxxu: Add additional USB IDs for RTL8192EU devices Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 57/68] libbpf: Fix NULL pointer dereference in bpf_object__collect_prog_relos Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 58/68] wifi: rtlwifi: add calculate_bit_shift() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 59/68] wifi: rtlwifi: rtl8723{be,ae}: using calculate_bit_shift() Sasha Levin
2024-01-16 19:53 ` [PATCH AUTOSEL 6.1 60/68] wifi: cfg80211: free beacon_ies when overridden from hidden BSS Sasha Levin
2024-01-16 19:54 ` [PATCH AUTOSEL 6.1 61/68] Bluetooth: qca: Set both WIDEBAND_SPEECH and LE_STATES quirks for QCA2066 Sasha Levin
2024-01-16 19:54 ` [PATCH AUTOSEL 6.1 62/68] Bluetooth: hci_sync: fix BR/EDR wakeup bug Sasha Levin
2024-01-16 19:54 ` [PATCH AUTOSEL 6.1 63/68] Bluetooth: L2CAP: Fix possible multiple reject send Sasha Levin
2024-01-16 19:54 ` [PATCH AUTOSEL 6.1 64/68] net/smc: disable SEID on non-s390 archs where virtual ISM may be used Sasha Levin
2024-01-16 19:54 ` [PATCH AUTOSEL 6.1 65/68] bridge: cfm: fix enum typo in br_cc_ccm_tx_parse Sasha Levin
2024-01-16 19:54 ` [PATCH AUTOSEL 6.1 66/68] i40e: Fix VF disable behavior to block all traffic Sasha Levin
2024-01-16 19:54 ` [PATCH AUTOSEL 6.1 67/68] octeontx2-af: Fix max NPC MCAM entry check while validating ref_entry Sasha Levin
2024-01-16 19:54 ` [PATCH AUTOSEL 6.1 68/68] net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure Sasha Levin
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=20240116195511.255854-46-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=ahmed.zaki@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®