]> git.itanic.dy.fi Git - linux-stable/commitdiff
net/mlx5: DR, In rehash write the line in the entry immediately
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Wed, 29 Jun 2022 10:19:36 +0000 (13:19 +0300)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 27 Oct 2022 14:50:38 +0000 (15:50 +0100)
Don't wait for the whole table to be ready - write each row immediately.
This way we save allocations of the ste_send_info structure and improve
performance.

Signed-off-by: Erez Shitrit <erezsh@nvidia.com>
Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Reviewed-by: Alex Vesker <valex@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c

index 6cbc444ad7919bc8f0fba6f1240c72c50e16d232..22878dcd7c8b555a9223536e152b192da3e98396 100644 (file)
@@ -358,6 +358,15 @@ static int dr_rule_rehash_copy_htbl(struct mlx5dr_matcher *matcher,
                                                    update_list);
                if (err)
                        goto clean_copy;
+
+               /* In order to decrease the number of allocated ste_send_info
+                * structs, send the current table row now.
+                */
+               err = dr_rule_send_update_list(update_list, matcher->tbl->dmn, false);
+               if (err) {
+                       mlx5dr_dbg(matcher->tbl->dmn, "Failed updating table to HW\n");
+                       goto clean_copy;
+               }
        }
 
 clean_copy: