diff options
author | Konstantin Belousov <konstantinb@nvidia.com> | 2021-04-14 07:03:46 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2021-07-12 09:34:38 +0000 |
commit | e012189d0265851c631261bdcb175727ba715b34 (patch) | |
tree | 5776a8dbae3cd6dff2234aa7d45dc53b9d517a01 | |
parent | 859e41e90165b00b99addf4c498b8ec031ba9df9 (diff) | |
download | src-e012189d0265851c631261bdcb175727ba715b34.tar.gz src-e012189d0265851c631261bdcb175727ba715b34.zip |
mlx5en: remove unneeded protocol and port parameters from mlx5e_add_vxal_rule
the values are already passed in the db element
Reviewed by: hselasky
Sponsored by: Mellanox Technologies/NVidia Networking
MFC after: 1 week
-rw-r--r-- | sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c index f4f9e494308e..9e10a3728b1d 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c @@ -1728,8 +1728,8 @@ mlx5e_destroy_vlan_flow_table(struct mlx5e_priv *priv) } static int -mlx5e_add_vxlan_rule_sub(struct mlx5e_priv *priv, u_int protocol, u_int port, - u32 *mc, u32 *mv, struct mlx5e_vxlan_db_el *el) +mlx5e_add_vxlan_rule_sub(struct mlx5e_priv *priv, u32 *mc, u32 *mv, + struct mlx5e_vxlan_db_el *el) { struct mlx5_flow_table *ft = priv->fts.vxlan.t; struct mlx5_flow_destination dest = {}; @@ -1743,11 +1743,11 @@ mlx5e_add_vxlan_rule_sub(struct mlx5e_priv *priv, u_int protocol, u_int port, mc_enable = MLX5_MATCH_OUTER_HEADERS; rule_p = &el->vxlan_ft_rule; MLX5_SET_TO_ONES(fte_match_param, mc, outer_headers.ethertype); - MLX5_SET(fte_match_param, mv, outer_headers.ethertype, protocol); + MLX5_SET(fte_match_param, mv, outer_headers.ethertype, el->proto); MLX5_SET_TO_ONES(fte_match_param, mc, outer_headers.ip_protocol); MLX5_SET(fte_match_param, mv, outer_headers.ip_protocol, IPPROTO_UDP); MLX5_SET_TO_ONES(fte_match_param, mc, outer_headers.udp_dport); - MLX5_SET(fte_match_param, mv, outer_headers.udp_dport, port); + MLX5_SET(fte_match_param, mv, outer_headers.udp_dport, el->port); *rule_p = mlx5_add_flow_rule(ft, mc_enable, mc, mv, MLX5_FLOW_CONTEXT_ACTION_FWD_DEST, MLX5_FS_ETH_FLOW_TAG, &dest); @@ -1829,8 +1829,7 @@ mlx5e_add_vxlan_rule(struct mlx5e_priv *priv, sa_family_t family, u_int port) goto add_vxlan_rule_out; } - err = mlx5e_add_vxlan_rule_sub(priv, proto, port, match_criteria, - match_value, el); + err = mlx5e_add_vxlan_rule_sub(priv, match_criteria, match_value, el); if (err == 0) { TAILQ_INSERT_TAIL(&priv->vxlan.head, el, link); } else { |