aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mlx5/fs.h
diff options
context:
space:
mode:
authorMaor Gottlieb <maorg@mellanox.com>2016-07-04 17:23:05 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-05 00:06:02 -0700
commitc5bb17302e734967822be559cf661704b707b4ed (patch)
tree5fe959504ac3236a3c7bafb9bd9401f5fec0c26e /include/linux/mlx5/fs.h
parentnet-next: mediatek: remove superfluous free_irq() call (diff)
downloadlinux-dev-c5bb17302e734967822be559cf661704b707b4ed.tar.xz
linux-dev-c5bb17302e734967822be559cf661704b707b4ed.zip
net/mlx5: Refactor mlx5_add_flow_rule
Reduce the set of arguments passed to mlx5_add_flow_rule by introducing flow_spec structure. Signed-off-by: Maor Gottlieb <maorg@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--include/linux/mlx5/fs.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h
index 6ad111938709..d22fe7e5a39a 100644
--- a/include/linux/mlx5/fs.h
+++ b/include/linux/mlx5/fs.h
@@ -68,6 +68,12 @@ struct mlx5_flow_group;
struct mlx5_flow_rule;
struct mlx5_flow_namespace;
+struct mlx5_flow_spec {
+ u8 match_criteria_enable;
+ u32 match_criteria[MLX5_ST_SZ_DW(fte_match_param)];
+ u32 match_value[MLX5_ST_SZ_DW(fte_match_param)];
+};
+
struct mlx5_flow_destination {
enum mlx5_flow_destination_type type;
union {
@@ -116,9 +122,7 @@ void mlx5_destroy_flow_group(struct mlx5_flow_group *fg);
*/
struct mlx5_flow_rule *
mlx5_add_flow_rule(struct mlx5_flow_table *ft,
- u8 match_criteria_enable,
- u32 *match_criteria,
- u32 *match_value,
+ struct mlx5_flow_spec *spec,
u32 action,
u32 flow_tag,
struct mlx5_flow_destination *dest);