]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: CT: Use per flow counter when CT flow accounting is enabled
authorOz Shlomo <ozsh@nvidia.com>
Mon, 7 Dec 2020 08:15:18 +0000 (08:15 +0000)
committerSaeed Mahameed <saeedm@nvidia.com>
Thu, 7 Jan 2021 20:22:49 +0000 (12:22 -0800)
commit6e5117de9000cece5ef6eed4a1aabc04a43b0809
tree849d3211934c7e99a3e8a1388006a5be7366dec9
parenta297f9c6118118be5a88860ff54478aed066b3d9
net/mlx5e: CT: Use per flow counter when CT flow accounting is enabled

Connection counters may be shared for both directions when the counter
is used for connection aging purposes. However, if TC flow
accounting is enabled then a unique counter is required per direction.

Instantiate a unique counter per direction if the conntrack accounting
extension is enabled. Use a shared counter when the connection accounting
extension is disabled.

Fixes: f11a9363d0f3 ("net/mlx5e: CT: Use the same counter for both directions")
Signed-off-by: Oz Shlomo <ozsh@nvidia.com>
Reported-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Reviewed-by: Paul Blakey <paulb@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c