aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2022-02-10 10:12:21 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2022-02-11 10:15:00 +0000
commit16635c7b213a8da75bd54cf81abb984f69b0bbc5 (patch)
treea04a384379b7ea56ad0931ce3541b8aa595069b2
parenta605a66017ec53e42c06b35a1786edf1b33cd8ab (diff)
downloadsrc-16635c7b213a8da75bd54cf81abb984f69b0bbc5.tar.gz
src-16635c7b213a8da75bd54cf81abb984f69b0bbc5.zip
mlx5en: Make sure the NIC IP addresses are written to firmware on link up.
Fixes e059c120b4223fd5ec3af9def21c0519f439fe57 . PR: 261746 Sponsored by: NVIDIA Networking (cherry picked from commit 04f407a3e5e7bf452768201ace260b575f1a7924)
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c6
1 files changed, 3 insertions, 3 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 dab2d4bfda38..5607aad50da5 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_flow_table.c
@@ -1254,7 +1254,7 @@ mlx5e_apply_ifp_addr(struct mlx5e_priv *priv)
}
static void
-mlx5e_handle_ifp_addr(struct mlx5e_priv *priv)
+mlx5e_handle_ifp_addr(struct mlx5e_priv *priv, bool rx_mode_enable)
{
struct mlx5e_eth_addr_hash_node *hn;
struct mlx5e_eth_addr_hash_node *tmp;
@@ -1265,7 +1265,7 @@ mlx5e_handle_ifp_addr(struct mlx5e_priv *priv)
mlx5e_for_each_hash_node(hn, tmp, priv->eth_addr.if_mc, i)
hn->action = MLX5E_ACTION_DEL;
- if (test_bit(MLX5E_STATE_FLOW_RULES_READY, &priv->state))
+ if (rx_mode_enable)
mlx5e_sync_ifp_addr(priv);
mlx5e_apply_ifp_addr(priv);
@@ -1302,7 +1302,7 @@ mlx5e_set_rx_mode_core(struct mlx5e_priv *priv, bool rx_mode_enable)
if (enable_broadcast)
mlx5e_add_eth_addr_rule(priv, &ea->broadcast, MLX5E_FULLMATCH);
- mlx5e_handle_ifp_addr(priv);
+ mlx5e_handle_ifp_addr(priv, rx_mode_enable);
if (disable_broadcast)
mlx5e_del_eth_addr_from_flow_table(priv, &ea->broadcast);