* [PATCH] net/ice: adjust RSS LUT settings
@ 2025-11-06 17:17 Vladimir Medvedkin
2025-11-06 17:56 ` Bruce Richardson
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Medvedkin @ 2025-11-06 17:17 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson, anatoly.burakov
For E830 using global RSS LUT for PFs with a small number of
queues shows better performance than using per-PF RSS LUT. This patch
adds a condition to use global RSS LUT instead of PF LUT if number of
queues is less than 64.
Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
---
drivers/net/intel/ice/ice_ethdev.c | 42 ++++++++++++++++++++++++++++--
drivers/net/intel/ice/ice_ethdev.h | 2 ++
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
index 4669eba7c7..1c8540ef1d 100644
--- a/drivers/net/intel/ice/ice_ethdev.c
+++ b/drivers/net/intel/ice/ice_ethdev.c
@@ -104,6 +104,8 @@ enum ice_link_state_on_close {
#define ICE_MAC_TC_MAX_WATERMARK (((hw)->mac_type == ICE_MAC_E830) ? \
ICE_MAC_E830_MAX_WATERMARK : ICE_MAC_E810_MAX_WATERMARK)
+#define ICE_RSS_LUT_GLOBAL_QUEUE_NB 64
+
static int ice_dev_configure(struct rte_eth_dev *dev);
static int ice_dev_start(struct rte_eth_dev *dev);
static int ice_dev_stop(struct rte_eth_dev *dev);
@@ -3769,11 +3771,47 @@ static int ice_init_rss(struct ice_pf *pf)
for (i = 0; i < vsi->rss_lut_size; i++)
vsi->rss_lut[i] = i % nb_q;
+ if (nb_q <= ICE_RSS_LUT_GLOBAL_QUEUE_NB && (hw)->mac_type == ICE_MAC_E830) {
+ struct ice_vsi_ctx vsi_ctx;
+ uint16_t global_lut;
+
+ if (!vsi->global_lut_allocated) {
+ ret = ice_alloc_rss_global_lut(hw, false, &global_lut);
+ if (ret)
+ goto out;
+ vsi->global_lut_allocated = true;
+ vsi->global_lut_id = global_lut;
+ }
+ global_lut = vsi->global_lut_id;
+
+ vsi_ctx.flags = ICE_AQ_VSI_TYPE_PF;
+ vsi_ctx.info = vsi->info;
+ vsi_ctx.info.q_opt_rss &= ICE_AQ_VSI_Q_OPT_RSS_LUT_M |
+ ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_M;
+ vsi_ctx.info.q_opt_rss |= ICE_AQ_VSI_Q_OPT_RSS_LUT_GBL |
+ ((global_lut << ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_S) &
+ ICE_AQ_VSI_Q_OPT_RSS_GBL_LUT_M);
+
+ vsi_ctx.info.valid_sections =
+ rte_cpu_to_le_16(ICE_AQ_VSI_PROP_Q_OPT_VALID);
+
+ ret = ice_update_vsi(hw, vsi->idx, &vsi_ctx, NULL);
+ if (ret != ICE_SUCCESS) {
+ PMD_INIT_LOG(ERR, "update vsi failed, err = %d", ret);
+ goto out;
+ }
+
+ vsi->info = vsi_ctx.info;
+ lut_params.lut_type = ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_GLOBAL;
+ lut_params.global_lut_id = global_lut;
+ } else {
+ lut_params.lut_type = ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF;
+ lut_params.global_lut_id = 0;
+ }
+
lut_params.vsi_handle = vsi->idx;
lut_params.lut_size = vsi->rss_lut_size;
- lut_params.lut_type = ICE_AQC_GSET_RSS_LUT_TABLE_TYPE_PF;
lut_params.lut = vsi->rss_lut;
- lut_params.global_lut_id = 0;
ret = ice_aq_set_rss_lut(hw, &lut_params);
if (ret)
goto out;
diff --git a/drivers/net/intel/ice/ice_ethdev.h b/drivers/net/intel/ice/ice_ethdev.h
index 6478d6dfbd..efa90cf39a 100644
--- a/drivers/net/intel/ice/ice_ethdev.h
+++ b/drivers/net/intel/ice/ice_ethdev.h
@@ -333,6 +333,8 @@ struct ice_vsi {
uint8_t vlan_anti_spoof_on; /* The VLAN anti-spoofing enabled */
uint8_t vlan_filter_on; /* The VLAN filter enabled */
/* information about rss configuration */
+ uint8_t global_lut_allocated : 1;
+ uint8_t global_lut_id : 7;
u32 rss_key_size;
u32 rss_lut_size;
uint8_t *rss_lut;
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] net/ice: adjust RSS LUT settings
2025-11-06 17:17 [PATCH] net/ice: adjust RSS LUT settings Vladimir Medvedkin
@ 2025-11-06 17:56 ` Bruce Richardson
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2025-11-06 17:56 UTC (permalink / raw)
To: Vladimir Medvedkin; +Cc: dev, anatoly.burakov
On Thu, Nov 06, 2025 at 05:17:36PM +0000, Vladimir Medvedkin wrote:
> For E830 using global RSS LUT for PFs with a small number of
> queues shows better performance than using per-PF RSS LUT. This patch
> adds a condition to use global RSS LUT instead of PF LUT if number of
> queues is less than 64.
>
> Signed-off-by: Vladimir Medvedkin <vladimir.medvedkin@intel.com>
> ---
> drivers/net/intel/ice/ice_ethdev.c | 42 ++++++++++++++++++++++++++++--
> drivers/net/intel/ice/ice_ethdev.h | 2 ++
> 2 files changed, 42 insertions(+), 2 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied to dpdk-next-net-intel.
Thanks,
/Bruce
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-11-06 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-06 17:17 [PATCH] net/ice: adjust RSS LUT settings Vladimir Medvedkin
2025-11-06 17:56 ` Bruce Richardson
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).