]> 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)
commitd22acbe231145eed0b6ff106b46418b54312efb5
tree849d3211934c7e99a3e8a1388006a5be7366dec9
parent9adafa71ef49dcfbb2e49eb89b32e8a5c066c986
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: da404640cb59 ("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