net/mlx5: fix RETA update without stopping device
authorBing Zhao <bingz@nvidia.com>
Fri, 5 Nov 2021 06:10:57 +0000 (08:10 +0200)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 10 Nov 2021 14:44:44 +0000 (15:44 +0100)
commit6b5b3005cb1854e471fa1ef3eb579dbd444c05b0
treec37d3e8c0ba7c915607d86d202649dc165e35851
parenta9b6ea45bed6acb2d95c93bc177f9d5cb53275ef
net/mlx5: fix 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 tunnel
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: stable@dpdk.org
Signed-off-by: Bing Zhao <bingz@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx5/mlx5_rss.c