diff options
author | Eli Cohen <eli@mellanox.com> | 2018-04-29 10:17:34 -0400 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2018-08-13 15:50:17 -0400 |
commit | cf916ffbe0c628bb072ea829f300cff1874162ce (patch) | |
tree | 83b5c10d30d421ffc902cd4ee734207507134a86 | |
parent | a8274b854b5e7c78187d7b9eaf701e1f6e1ccfcb (diff) |
net/mlx5: Improve argument name for add flow API
The last argument to mlx5_add_flow_rules passes the number of
destinations in the struct pointed to by the dest arg. Change the name
to better reflect this fact.
Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 8 | ||||
-rw-r--r-- | include/linux/mlx5/fs.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index a21df24b695e..261cb6aacf12 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | |||
@@ -1876,7 +1876,7 @@ mlx5_add_flow_rules(struct mlx5_flow_table *ft, | |||
1876 | struct mlx5_flow_spec *spec, | 1876 | struct mlx5_flow_spec *spec, |
1877 | struct mlx5_flow_act *flow_act, | 1877 | struct mlx5_flow_act *flow_act, |
1878 | struct mlx5_flow_destination *dest, | 1878 | struct mlx5_flow_destination *dest, |
1879 | int dest_num) | 1879 | int num_dest) |
1880 | { | 1880 | { |
1881 | struct mlx5_flow_root_namespace *root = find_root(&ft->node); | 1881 | struct mlx5_flow_root_namespace *root = find_root(&ft->node); |
1882 | struct mlx5_flow_destination gen_dest = {}; | 1882 | struct mlx5_flow_destination gen_dest = {}; |
@@ -1889,7 +1889,7 @@ mlx5_add_flow_rules(struct mlx5_flow_table *ft, | |||
1889 | if (flow_act->action == MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO) { | 1889 | if (flow_act->action == MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO) { |
1890 | if (!fwd_next_prio_supported(ft)) | 1890 | if (!fwd_next_prio_supported(ft)) |
1891 | return ERR_PTR(-EOPNOTSUPP); | 1891 | return ERR_PTR(-EOPNOTSUPP); |
1892 | if (dest_num) | 1892 | if (num_dest) |
1893 | return ERR_PTR(-EINVAL); | 1893 | return ERR_PTR(-EINVAL); |
1894 | mutex_lock(&root->chain_lock); | 1894 | mutex_lock(&root->chain_lock); |
1895 | next_ft = find_next_chained_ft(prio); | 1895 | next_ft = find_next_chained_ft(prio); |
@@ -1897,7 +1897,7 @@ mlx5_add_flow_rules(struct mlx5_flow_table *ft, | |||
1897 | gen_dest.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE; | 1897 | gen_dest.type = MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE; |
1898 | gen_dest.ft = next_ft; | 1898 | gen_dest.ft = next_ft; |
1899 | dest = &gen_dest; | 1899 | dest = &gen_dest; |
1900 | dest_num = 1; | 1900 | num_dest = 1; |
1901 | flow_act->action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; | 1901 | flow_act->action = MLX5_FLOW_CONTEXT_ACTION_FWD_DEST; |
1902 | } else { | 1902 | } else { |
1903 | mutex_unlock(&root->chain_lock); | 1903 | mutex_unlock(&root->chain_lock); |
@@ -1905,7 +1905,7 @@ mlx5_add_flow_rules(struct mlx5_flow_table *ft, | |||
1905 | } | 1905 | } |
1906 | } | 1906 | } |
1907 | 1907 | ||
1908 | handle = _mlx5_add_flow_rules(ft, spec, flow_act, dest, dest_num); | 1908 | handle = _mlx5_add_flow_rules(ft, spec, flow_act, dest, num_dest); |
1909 | 1909 | ||
1910 | if (sw_action == MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO) { | 1910 | if (sw_action == MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO) { |
1911 | if (!IS_ERR_OR_NULL(handle) && | 1911 | if (!IS_ERR_OR_NULL(handle) && |
diff --git a/include/linux/mlx5/fs.h b/include/linux/mlx5/fs.h index c40f2fc68655..71fb503b2b52 100644 --- a/include/linux/mlx5/fs.h +++ b/include/linux/mlx5/fs.h | |||
@@ -177,7 +177,7 @@ mlx5_add_flow_rules(struct mlx5_flow_table *ft, | |||
177 | struct mlx5_flow_spec *spec, | 177 | struct mlx5_flow_spec *spec, |
178 | struct mlx5_flow_act *flow_act, | 178 | struct mlx5_flow_act *flow_act, |
179 | struct mlx5_flow_destination *dest, | 179 | struct mlx5_flow_destination *dest, |
180 | int dest_num); | 180 | int num_dest); |
181 | void mlx5_del_flow_rules(struct mlx5_flow_handle *fr); | 181 | void mlx5_del_flow_rules(struct mlx5_flow_handle *fr); |
182 | 182 | ||
183 | int mlx5_modify_rule_destination(struct mlx5_flow_handle *handler, | 183 | int mlx5_modify_rule_destination(struct mlx5_flow_handle *handler, |