aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
diff options
context:
space:
mode:
authorShahar Klein <shahark@mellanox.com>2017-11-30 17:55:46 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2018-12-14 13:28:52 -0800
commitf9392795e2e35449a7dca46574b1a86eace20e9c (patch)
tree1c4eb8012f92cdb5cf3dd04398d37d9bc28b2125 /drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
parentnet/mlx5e: Infrastructure for duplicated offloading of TC flows (diff)
downloadlinux-dev-f9392795e2e35449a7dca46574b1a86eace20e9c.tar.xz
linux-dev-f9392795e2e35449a7dca46574b1a86eace20e9c.zip
net/mlx5e: Enhance flow counter scheme for offloaded TC eswitch rules
Assign a counter dev attribute according to device capability and use it for management of counters related to offloaded eswitch TC flows. With upcoming support for uplink LAG, we have two HW rules per one logical SW (TC) rule. Although the HW supports attaching one counter to multiple rules, we are allocating counter per HW rule. We need this separation for two reasons: 1. "flow eswitch" counter affinity HW require the counter to be allocated on the device where the eswitch rule is set. 2. for some use-cases (multi-path routing) each HW flow relates to different neighbour, hence our neigh update logic must have a per-rule HW accountant in order to provide the proper feedback to the kernel. Signed-off-by: Shahar Klein <shahark@mellanox.com> Signed-off-by: Roi Dayan <roid@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/eswitch.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
index 4d048f7e703b..701abd794dab 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch.h
@@ -293,6 +293,7 @@ enum {
struct mlx5_esw_flow_attr {
struct mlx5_eswitch_rep *in_rep;
struct mlx5_core_dev *in_mdev;
+ struct mlx5_core_dev *counter_dev;
int split_count;
int out_count;