diff options
author | Shahar Klein <shahark@mellanox.com> | 2018-12-12 19:11:38 -0800 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-12-14 09:58:57 -0800 |
commit | 8bb957d2557db072b46f6a1339c2dd709bb25ef6 (patch) | |
tree | b768ab6c170d918b8c294d5e69cfbbefd80fef8f /include | |
parent | 06cc74af05c33091a9877b54f1821966b446003c (diff) | |
download | linux-stable-8bb957d2557db072b46f6a1339c2dd709bb25ef6.tar.gz linux-stable-8bb957d2557db072b46f6a1339c2dd709bb25ef6.tar.bz2 linux-stable-8bb957d2557db072b46f6a1339c2dd709bb25ef6.zip |
net/mlx5: E-Switch, Introduce flow counter affinity
This dictates the device affinity for eswitch flow counters, set by the FW
according to the HW device capabilities.
Under "source eswitch" affinity, the counter should be allocated on the
device related to the source vport in the match. This covers both non
merged e-switch mode as well as old FW that does not advertise this cap.
Under "flow eswitch" affinity, the counter should be allocated on the
device where the eswitch rule is set.
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 'include')
-rw-r--r-- | include/linux/mlx5/mlx5_ifc.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index a56bd3b1f579..f48d7ee345ff 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h @@ -608,13 +608,19 @@ struct mlx5_ifc_flow_table_eswitch_cap_bits { u8 reserved_at_800[0x7800]; }; +enum { + MLX5_COUNTER_SOURCE_ESWITCH = 0x0, + MLX5_COUNTER_FLOW_ESWITCH = 0x1, +}; + struct mlx5_ifc_e_switch_cap_bits { u8 vport_svlan_strip[0x1]; u8 vport_cvlan_strip[0x1]; u8 vport_svlan_insert[0x1]; u8 vport_cvlan_insert_if_not_exist[0x1]; u8 vport_cvlan_insert_overwrite[0x1]; - u8 reserved_at_5[0x18]; + u8 reserved_at_5[0x17]; + u8 counter_eswitch_affinity[0x1]; u8 merged_eswitch[0x1]; u8 nic_vport_node_guid_modify[0x1]; u8 nic_vport_port_guid_modify[0x1]; |