net/mlx5e: CT: Re-use tuple modify headers for identical modify actions
authorPaul Blakey <paulb@mellanox.com>
Tue, 18 Feb 2020 08:24:07 +0000 (10:24 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 10 Jul 2020 02:51:15 +0000 (19:51 -0700)
commit6702d393557406e986bd6cfe250472b46a76e804
tree82668e04f1b22bb97541e711dbd05960acb2b41b
parentb2fdf3d04714d4eea2f8a5c011cdd84b428c7df5
net/mlx5e: CT: Re-use tuple modify headers for identical modify actions

After removing the tupleid register which changed per tuple,
tuple modify headers set the ct_state, zone, mark, and label registers.
For non-natted tuples going through the same tc rules path, their values
will be the same, and all their modify headers will be the same.

Re-use tuple modify header when possible, by adding each new modify
header to an hahstable, and looking up identical ones before creating
a new one.

Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Oz Shlomo <ozsh@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c