Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 2021 15:19:36 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 2226c0e78528 - stable/13 - mlx5en: remove unneeded protocol and port parameters from mlx5e_add_vxal_rule
Message-ID:  <202107261519.16QFJaW3025576@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=2226c0e78528a94675a071dfcf079ee211dacdfa

commit 2226c0e78528a94675a071dfcf079ee211dacdfa
Author:     Konstantin Belousov <konstantinb@nvidia.com>
AuthorDate: 2021-04-14 07:03:46 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2021-07-26 13:51:11 +0000

    mlx5en: remove unneeded protocol and port parameters from mlx5e_add_vxal_rule
    
    (cherry picked from commit e012189d0265851c631261bdcb175727ba715b34)
---
 sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c | 11 +++++------
 1 file 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 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107261519.16QFJaW3025576>