diff options
| author | Amir Vadai <amirva@mellanox.com> | 2016-05-13 08:55:40 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2016-05-16 13:43:51 -0400 |
| commit | bd5251dbf156b6bc0661a9409d46e47160df61dd (patch) | |
| tree | 4d2fa3780ab1a0c30c6b1814245e84fe1b69e22c /include/linux | |
| parent | 9dc0b289c4c09bc1a92bdcc055cb37af9b72eb28 (diff) | |
net/mlx5_core: Introduce flow steering destination of type counter
When adding a flow steering rule with a counter, need to supply a
destination of type MLX5_FLOW_DESTINATION_TYPE_COUNTER, with a pointer
to a struct mlx5_fc.
Also, MLX5_FLOW_CONTEXT_ACTION_COUNT bit should be set in the action.
Signed-off-by: Amir Vadai <amirva@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/mlx5/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/mlx5/mlx5_ifc.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h index 6467569ad76e..c8b9ede1c20a 100644 --- a/include/linux/mlx5/fs.h +++ b/include/linux/mlx5/fs.h | |||
| @@ -73,6 +73,7 @@ struct mlx5_flow_destination { | |||
| 73 | u32 tir_num; | 73 | u32 tir_num; |
| 74 | struct mlx5_flow_table *ft; | 74 | struct mlx5_flow_table *ft; |
| 75 | u32 vport_num; | 75 | u32 vport_num; |
| 76 | struct mlx5_fc *counter; | ||
| 76 | }; | 77 | }; |
| 77 | }; | 78 | }; |
| 78 | 79 | ||
| @@ -125,4 +126,5 @@ void mlx5_del_flow_rule(struct mlx5_flow_rule *fr); | |||
| 125 | int mlx5_modify_rule_destination(struct mlx5_flow_rule *rule, | 126 | int mlx5_modify_rule_destination(struct mlx5_flow_rule *rule, |
| 126 | struct mlx5_flow_destination *dest); | 127 | struct mlx5_flow_destination *dest); |
| 127 | 128 | ||
| 129 | struct mlx5_fc *mlx5_flow_rule_counter(struct mlx5_flow_rule *rule); | ||
| 128 | #endif | 130 | #endif |
diff --git a/include/linux/mlx5/mlx5_ifc.h b/include/linux/mlx5/mlx5_ifc.h index 614c795eadea..9a05cd7e5890 100644 --- a/include/linux/mlx5/mlx5_ifc.h +++ b/include/linux/mlx5/mlx5_ifc.h | |||
| @@ -936,6 +936,8 @@ enum mlx5_flow_destination_type { | |||
| 936 | MLX5_FLOW_DESTINATION_TYPE_VPORT = 0x0, | 936 | MLX5_FLOW_DESTINATION_TYPE_VPORT = 0x0, |
| 937 | MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE = 0x1, | 937 | MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE = 0x1, |
| 938 | MLX5_FLOW_DESTINATION_TYPE_TIR = 0x2, | 938 | MLX5_FLOW_DESTINATION_TYPE_TIR = 0x2, |
| 939 | |||
| 940 | MLX5_FLOW_DESTINATION_TYPE_COUNTER = 0x100, | ||
| 939 | }; | 941 | }; |
| 940 | 942 | ||
| 941 | struct mlx5_ifc_dest_format_struct_bits { | 943 | struct mlx5_ifc_dest_format_struct_bits { |
