Commit cb68d1e5 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'mlx5-misc-fixes-2025-10-22'

Tariq Toukan says:

====================
mlx5 misc fixes 2025-10-22

This patchset provides misc bug fixes from the team to the mlx5 core and
Eth drivers.
====================

Link: https://patch.msgid.link/1761136182-918470-1-git-send-email-tariqt@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents b2284768 664f76be
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -342,6 +342,7 @@ void mlx5e_ipsec_build_accel_xfrm_attrs(struct mlx5e_ipsec_sa_entry *sa_entry,
void mlx5e_ipsec_handle_mpv_event(int event, struct mlx5e_priv *slave_priv,
				  struct mlx5e_priv *master_priv);
void mlx5e_ipsec_send_event(struct mlx5e_priv *priv, int event);
void mlx5e_ipsec_disable_events(struct mlx5e_priv *priv);

static inline struct mlx5_core_dev *
mlx5e_ipsec_sa2dev(struct mlx5e_ipsec_sa_entry *sa_entry)
@@ -387,6 +388,10 @@ static inline void mlx5e_ipsec_handle_mpv_event(int event, struct mlx5e_priv *sl
static inline void mlx5e_ipsec_send_event(struct mlx5e_priv *priv, int event)
{
}

static inline void mlx5e_ipsec_disable_events(struct mlx5e_priv *priv)
{
}
#endif

#endif	/* __MLX5E_IPSEC_H__ */
+23 −2
Original line number Diff line number Diff line
@@ -2893,9 +2893,30 @@ void mlx5e_ipsec_handle_mpv_event(int event, struct mlx5e_priv *slave_priv,

void mlx5e_ipsec_send_event(struct mlx5e_priv *priv, int event)
{
	if (!priv->ipsec)
		return; /* IPsec not supported */
	if (!priv->ipsec || mlx5_devcom_comp_get_size(priv->devcom) < 2)
		return; /* IPsec not supported or no peers */

	mlx5_devcom_send_event(priv->devcom, event, event, priv);
	wait_for_completion(&priv->ipsec->comp);
}

void mlx5e_ipsec_disable_events(struct mlx5e_priv *priv)
{
	struct mlx5_devcom_comp_dev *tmp = NULL;
	struct mlx5e_priv *peer_priv;

	if (!priv->devcom)
		return;

	if (!mlx5_devcom_for_each_peer_begin(priv->devcom))
		goto out;

	peer_priv = mlx5_devcom_get_next_peer_data(priv->devcom, &tmp);
	if (peer_priv)
		complete_all(&peer_priv->ipsec->comp);

	mlx5_devcom_for_each_peer_end(priv->devcom);
out:
	mlx5_devcom_unregister_component(priv->devcom);
	priv->devcom = NULL;
}
+5 −3
Original line number Diff line number Diff line
@@ -242,8 +242,8 @@ static int mlx5e_devcom_init_mpv(struct mlx5e_priv *priv, u64 *data)
						      &attr,
						      mlx5e_devcom_event_mpv,
						      priv);
	if (IS_ERR(priv->devcom))
		return PTR_ERR(priv->devcom);
	if (!priv->devcom)
		return -EINVAL;

	if (mlx5_core_is_mp_master(priv->mdev)) {
		mlx5_devcom_send_event(priv->devcom, MPV_DEVCOM_MASTER_UP,
@@ -256,7 +256,7 @@ static int mlx5e_devcom_init_mpv(struct mlx5e_priv *priv, u64 *data)

static void mlx5e_devcom_cleanup_mpv(struct mlx5e_priv *priv)
{
	if (IS_ERR_OR_NULL(priv->devcom))
	if (!priv->devcom)
		return;

	if (mlx5_core_is_mp_master(priv->mdev)) {
@@ -266,6 +266,7 @@ static void mlx5e_devcom_cleanup_mpv(struct mlx5e_priv *priv)
	}

	mlx5_devcom_unregister_component(priv->devcom);
	priv->devcom = NULL;
}

static int blocking_event(struct notifier_block *nb, unsigned long event, void *data)
@@ -6120,6 +6121,7 @@ static void mlx5e_nic_disable(struct mlx5e_priv *priv)
	if (mlx5e_monitor_counter_supported(priv))
		mlx5e_monitor_counter_cleanup(priv);

	mlx5e_ipsec_disable_events(priv);
	mlx5e_disable_blocking_events(priv);
	mlx5e_disable_async_events(priv);
	mlx5_lag_remove_netdev(mdev, priv->netdev);
+3 −1
Original line number Diff line number Diff line
@@ -1614,6 +1614,8 @@ void mlx5e_stats_fec_get(struct mlx5e_priv *priv,

	fec_set_corrected_bits_total(priv, fec_stats);
	fec_set_block_stats(priv, mode, fec_stats);

	if (MLX5_CAP_PCAM_REG(priv->mdev, pphcr))
		fec_set_histograms_stats(priv, mode, hist);
}

+2 −2
Original line number Diff line number Diff line
@@ -3129,7 +3129,7 @@ void mlx5_esw_offloads_devcom_init(struct mlx5_eswitch *esw,
						     attr,
						     mlx5_esw_offloads_devcom_event,
						     esw);
	if (IS_ERR(esw->devcom))
	if (!esw->devcom)
		return;

	mlx5_devcom_send_event(esw->devcom,
@@ -3140,7 +3140,7 @@ void mlx5_esw_offloads_devcom_init(struct mlx5_eswitch *esw,

void mlx5_esw_offloads_devcom_cleanup(struct mlx5_eswitch *esw)
{
	if (IS_ERR_OR_NULL(esw->devcom))
	if (!esw->devcom)
		return;

	mlx5_devcom_send_event(esw->devcom,
Loading