From: Yevgeny Kliteynik Date: Wed, 29 Jun 2022 10:19:36 +0000 (+0300) Subject: net/mlx5: DR, In rehash write the line in the entry immediately X-Git-Tag: v6.2-rc1~99^2~338^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1bea2dc7f4ff30bd785e1949d237cd2ce1e87c4f;p=thirdparty%2Flinux.git net/mlx5: DR, In rehash write the line in the entry immediately 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 Signed-off-by: Yevgeny Kliteynik Reviewed-by: Alex Vesker Signed-off-by: Saeed Mahameed --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c index 6cbc444ad7919..22878dcd7c8b5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_rule.c @@ -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: