OSDN Git Service

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)
commiteed38eeee734756596e2cc163bdc7dac3be501b1
tree849d3211934c7e99a3e8a1388006a5be7366dec9
parent0f2dcade69f2af56b74bce432e48ff3957830ce2
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: 1edae2335adf ("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