DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start
@ 2026-08-12 14:38 Ciara Loftus
  2026-08-12 14:38 ` [PATCH 2/2] net/i40e: program default RSS RETA at port configure Ciara Loftus
  2026-08-14 11:25 ` [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start Bruce Richardson
  0 siblings, 2 replies; 5+ messages in thread
From: Ciara Loftus @ 2026-08-12 14:38 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

Currently, updating the RSS redirection table and then stopping and
starting a port loses the update. The port comes back with the default
table. The ethdev API requires RSS settings to be retained across
stop/start.

The `rss_reta_updated` flag protects a user-provided RETA from being
overwritten by the default table when the device is started. However
`i40e_dev_stop()` clears this flag, so a subsequent `i40e_dev_start()`
treats the RETA as untouched and resets it to the default.

Fix it by clearing `rss_reta_updated` in `i40e_dev_configure()` instead of
`i40e_dev_stop()`. A reconfiguration still reverts to the default table,
while a plain stop/start now preserves the RETA.

Bugzilla ID: 1127

Fixes: 36c5dc8e5d3c ("net/i40e: fix overwriting RSS RETA")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/intel/i40e/i40e_ethdev.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index b6b2d291ee..3de3423634 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -1992,6 +1992,9 @@ i40e_dev_configure(struct rte_eth_dev *dev)
 	if (dev->data->dev_conf.rxmode.mq_mode & RTE_ETH_MQ_RX_RSS_FLAG)
 		dev->data->dev_conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_RSS_HASH;
 
+	/* A new configuration reverts the RETA to the driver default. */
+	pf->adapter->rss_reta_updated = 0;
+
 	ret = i40e_dev_init_vlan(dev);
 	if (ret < 0)
 		goto err;
@@ -2676,8 +2679,6 @@ i40e_dev_stop(struct rte_eth_dev *dev)
 	hw->adapter_stopped = 1;
 	dev->data->dev_started = 0;
 
-	pf->adapter->rss_reta_updated = 0;
-
 	return 0;
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] net/i40e: program default RSS RETA at port configure
  2026-08-12 14:38 [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start Ciara Loftus
@ 2026-08-12 14:38 ` Ciara Loftus
  2026-08-14 11:26   ` Bruce Richardson
  2026-08-14 11:25 ` [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start Bruce Richardson
  1 sibling, 1 reply; 5+ messages in thread
From: Ciara Loftus @ 2026-08-12 14:38 UTC (permalink / raw)
  To: dev; +Cc: Ciara Loftus, stable

Currently the default RSS redirection table is only programmed
when the port is started, in `i40e_dev_rx_init()`. Between
`rte_eth_dev_configure()` and `rte_eth_dev_start()` the table holds a
stale value, so querying it with `rte_eth_dev_rss_reta_query()` reports
entries spread over the hardware default queue count instead of the
number of Rx queues the port was just configured with.

Program the default table in `i40e_dev_configure()`, where the Rx queue
count is already known, so a query before start reflects the configured
queues. VMDQ queue counts aren't known until queue setup, so that case is
still handled at start.

Fixes: 4861cde46116 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
---
 drivers/net/intel/i40e/i40e_ethdev.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/net/intel/i40e/i40e_ethdev.c b/drivers/net/intel/i40e/i40e_ethdev.c
index 3de3423634..e84c9ea857 100644
--- a/drivers/net/intel/i40e/i40e_ethdev.c
+++ b/drivers/net/intel/i40e/i40e_ethdev.c
@@ -1995,6 +1995,13 @@ i40e_dev_configure(struct rte_eth_dev *dev)
 	/* A new configuration reverts the RETA to the driver default. */
 	pf->adapter->rss_reta_updated = 0;
 
+	/* Program the default RETA now while the Rx queue count is known, so that
+	 * a query before the port is started reflects the configured queues.
+	 */
+	ret = i40e_pf_reset_rss_reta(pf);
+	if (ret)
+		return ret;
+
 	ret = i40e_dev_init_vlan(dev);
 	if (ret < 0)
 		goto err;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start
  2026-08-12 14:38 [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start Ciara Loftus
  2026-08-12 14:38 ` [PATCH 2/2] net/i40e: program default RSS RETA at port configure Ciara Loftus
@ 2026-08-14 11:25 ` Bruce Richardson
  2026-08-14 11:42   ` Bruce Richardson
  1 sibling, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2026-08-14 11:25 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dev, stable

On Wed, Aug 12, 2026 at 02:38:43PM +0000, Ciara Loftus wrote:
> Currently, updating the RSS redirection table and then stopping and
> starting a port loses the update. The port comes back with the default
> table. The ethdev API requires RSS settings to be retained across
> stop/start.
> 
> The `rss_reta_updated` flag protects a user-provided RETA from being
> overwritten by the default table when the device is started. However
> `i40e_dev_stop()` clears this flag, so a subsequent `i40e_dev_start()`
> treats the RETA as untouched and resets it to the default.
> 
> Fix it by clearing `rss_reta_updated` in `i40e_dev_configure()` instead of
> `i40e_dev_stop()`. A reconfiguration still reverts to the default table,
> while a plain stop/start now preserves the RETA.
> 
> Bugzilla ID: 1127
> 
> Fixes: 36c5dc8e5d3c ("net/i40e: fix overwriting RSS RETA")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
>  drivers/net/intel/i40e/i40e_ethdev.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] net/i40e: program default RSS RETA at port configure
  2026-08-12 14:38 ` [PATCH 2/2] net/i40e: program default RSS RETA at port configure Ciara Loftus
@ 2026-08-14 11:26   ` Bruce Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2026-08-14 11:26 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dev, stable

On Wed, Aug 12, 2026 at 02:38:44PM +0000, Ciara Loftus wrote:
> Currently the default RSS redirection table is only programmed
> when the port is started, in `i40e_dev_rx_init()`. Between
> `rte_eth_dev_configure()` and `rte_eth_dev_start()` the table holds a
> stale value, so querying it with `rte_eth_dev_rss_reta_query()` reports
> entries spread over the hardware default queue count instead of the
> number of Rx queues the port was just configured with.
> 
> Program the default table in `i40e_dev_configure()`, where the Rx queue
> count is already known, so a query before start reflects the configured
> queues. VMDQ queue counts aren't known until queue setup, so that case is
> still handled at start.
> 
> Fixes: 4861cde46116 ("i40e: new poll mode driver")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start
  2026-08-14 11:25 ` [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start Bruce Richardson
@ 2026-08-14 11:42   ` Bruce Richardson
  0 siblings, 0 replies; 5+ messages in thread
From: Bruce Richardson @ 2026-08-14 11:42 UTC (permalink / raw)
  To: Ciara Loftus; +Cc: dev, stable

On Fri, Aug 14, 2026 at 12:25:49PM +0100, Bruce Richardson wrote:
> On Wed, Aug 12, 2026 at 02:38:43PM +0000, Ciara Loftus wrote:
> > Currently, updating the RSS redirection table and then stopping and
> > starting a port loses the update. The port comes back with the default
> > table. The ethdev API requires RSS settings to be retained across
> > stop/start.
> > 
> > The `rss_reta_updated` flag protects a user-provided RETA from being
> > overwritten by the default table when the device is started. However
> > `i40e_dev_stop()` clears this flag, so a subsequent `i40e_dev_start()`
> > treats the RETA as untouched and resets it to the default.
> > 
> > Fix it by clearing `rss_reta_updated` in `i40e_dev_configure()` instead of
> > `i40e_dev_stop()`. A reconfiguration still reverts to the default table,
> > while a plain stop/start now preserves the RETA.
> > 
> > Bugzilla ID: 1127
> > 
> > Fixes: 36c5dc8e5d3c ("net/i40e: fix overwriting RSS RETA")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Ciara Loftus <ciara.loftus@intel.com>
> > ---
> >  drivers/net/intel/i40e/i40e_ethdev.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Patches applied to dpdk-next-net-intel.
Thanks,
/Bruce

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-14 11:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 14:38 [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start Ciara Loftus
2026-08-12 14:38 ` [PATCH 2/2] net/i40e: program default RSS RETA at port configure Ciara Loftus
2026-08-14 11:26   ` Bruce Richardson
2026-08-14 11:25 ` [PATCH 1/2] net/i40e: preserve RSS RETA across port stop and start Bruce Richardson
2026-08-14 11:42   ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox