* [dpdk-dev] [PATCH] net/mlx5: fix the RETA update without stopping device
@ 2021-11-05 6:10 Bing Zhao
2021-11-10 8:48 ` Raslan Darawsheh
0 siblings, 1 reply; 2+ messages in thread
From: Bing Zhao @ 2021-11-05 6:10 UTC (permalink / raw)
To: viacheslavo, matan; +Cc: dev, rasland, stable, orika, nelio.laranjeiro
The global redirection table is used to create the default flow
rules for the ingress traffic with the lowest priority. It is also
used to create the default RSS rule in the destination table when
there is a tunnel offload.
To update the RETA in-flight, there is no restriction in the ethdev
API. In the previous implementation of mlx5, a port restart was
needed to make the new configuration take effect.
The restart is heavy, e.g., all the queues will be released and
reallocated, users' rules will be flushed. Since the restart is
internal, there is a risk to crash the application when some change
in the ethdev is introduced but no workaround is done in mlx5 PMD.
The users' rules, including the default miss rule for tunnul
offload, should not be impacted by the RETA update. It is improper
to flush all rules when updating RETA.
With this patch, only the default rules will be flushed and
re-created with the new table configuration.
Fixes: 3f2fe392bd49 ("net/mlx5: fix crash during RETA update")
Cc: nelio.laranjeiro@6wind.com
Cc: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
---
| 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
--git a/drivers/net/mlx5/mlx5_rss.c b/drivers/net/mlx5/mlx5_rss.c
index 75af05b7b0..e2b478b75c 100644
--- a/drivers/net/mlx5/mlx5_rss.c
+++ b/drivers/net/mlx5/mlx5_rss.c
@@ -218,12 +218,6 @@ mlx5_dev_rss_reta_update(struct rte_eth_dev *dev,
MLX5_ASSERT(reta_conf[idx].reta[pos] < priv->rxqs_n);
(*priv->reta_idx)[i] = reta_conf[idx].reta[pos];
}
-
priv->skip_default_rss_reta = 1;
-
- if (dev->data->dev_started) {
- mlx5_dev_stop(dev);
- return mlx5_dev_start(dev);
- }
- return 0;
+ return mlx5_traffic_restart(dev);
}
--
2.27.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] net/mlx5: fix the RETA update without stopping device
2021-11-05 6:10 [dpdk-dev] [PATCH] net/mlx5: fix the RETA update without stopping device Bing Zhao
@ 2021-11-10 8:48 ` Raslan Darawsheh
0 siblings, 0 replies; 2+ messages in thread
From: Raslan Darawsheh @ 2021-11-10 8:48 UTC (permalink / raw)
To: Bing Zhao, Slava Ovsiienko, Matan Azrad
Cc: dev, stable, Ori Kam, NBU-Contact-N?lio Laranjeiro
Hi,
> -----Original Message-----
> From: Bing Zhao <bingz@nvidia.com>
> Sent: Friday, November 5, 2021 8:11 AM
> To: Slava Ovsiienko <viacheslavo@nvidia.com>; Matan Azrad
> <matan@nvidia.com>
> Cc: dev@dpdk.org; Raslan Darawsheh <rasland@nvidia.com>;
> stable@dpdk.org; Ori Kam <orika@nvidia.com>; NBU-Contact-N?lio
> Laranjeiro <nelio.laranjeiro@6wind.com>
> Subject: [PATCH] net/mlx5: fix the RETA update without stopping device
>
> The global redirection table is used to create the default flow
> rules for the ingress traffic with the lowest priority. It is also
> used to create the default RSS rule in the destination table when
> there is a tunnel offload.
>
> To update the RETA in-flight, there is no restriction in the ethdev
> API. In the previous implementation of mlx5, a port restart was
> needed to make the new configuration take effect.
>
> The restart is heavy, e.g., all the queues will be released and
> reallocated, users' rules will be flushed. Since the restart is
> internal, there is a risk to crash the application when some change
> in the ethdev is introduced but no workaround is done in mlx5 PMD.
>
> The users' rules, including the default miss rule for tunnul
> offload, should not be impacted by the RETA update. It is improper
> to flush all rules when updating RETA.
>
> With this patch, only the default rules will be flushed and
> re-created with the new table configuration.
>
> Fixes: 3f2fe392bd49 ("net/mlx5: fix crash during RETA update")
> Cc: nelio.laranjeiro@6wind.com
> Cc: stable@dpdk.org
>
> Signed-off-by: Bing Zhao <bingz@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-10 8:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 6:10 [dpdk-dev] [PATCH] net/mlx5: fix the RETA update without stopping device Bing Zhao
2021-11-10 8:48 ` Raslan Darawsheh
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).