Skip to content

Commit

Permalink
mlx5: DR, Force QP drain on table creation
Browse files Browse the repository at this point in the history
[ Upstream commit 6b8e9bc ]

When a table is created we first write the data to the STE anchor that
represents the table and then create/register the table using a FW
CREATE_FLOW_TABLE command. Since we write data using an RC QP a
theoretical race can happen between FW and SW, in case the FW will allow
to access the FT anchor ICM address prior to getting a CQE on the anchor
write. To resolve this a force drain will be done on the QP to assure
the anchor is written successfully.

Fixes: 94300b3 ("mlx5: Expose steering table functionality")
Signed-off-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
  • Loading branch information
alexvesker authored and nmorey committed Mar 18, 2021
1 parent 897575f commit 3341588
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions providers/mlx5/dr_table.c
Expand Up @@ -199,6 +199,10 @@ struct mlx5dv_dr_table *mlx5dv_dr_table_create(struct mlx5dv_dr_domain *dmn,
if (ret)
goto free_tbl;

ret = dr_send_ring_force_drain(dmn);
if (ret)
goto uninit_tbl;

ret = dr_table_create_devx_tbl(tbl);
if (ret)
goto uninit_tbl;
Expand Down

0 comments on commit 3341588

Please sign in to comment.