Commit 76d71eee authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'mlx5-misc-fixes-2024-11-07'

Tariq Toukan says:

====================
mlx5 misc fixes 2024-11-07

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

Link: https://patch.msgid.link/20241107183527.676877-1-tariqt@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents cf8fbc6d d1ac3393
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -866,7 +866,7 @@ mlx5_tc_ct_entry_add_rule(struct mlx5_tc_ct_priv *ct_priv,
	return 0;

err_rule:
	mlx5_tc_ct_entry_destroy_mod_hdr(ct_priv, zone_rule->attr, zone_rule->mh);
	mlx5_tc_ct_entry_destroy_mod_hdr(ct_priv, attr, zone_rule->mh);
	mlx5_put_label_mapping(ct_priv, attr->ct_attr.ct_labels_id);
err_mod_hdr:
	kfree(attr);
+4 −4
Original line number Diff line number Diff line
@@ -660,7 +660,7 @@ tx_sync_info_get(struct mlx5e_ktls_offload_context_tx *priv_tx,
	while (remaining > 0) {
		skb_frag_t *frag = &record->frags[i];

		get_page(skb_frag_page(frag));
		page_ref_inc(skb_frag_page(frag));
		remaining -= skb_frag_size(frag);
		info->frags[i++] = *frag;
	}
@@ -763,7 +763,7 @@ void mlx5e_ktls_tx_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
	stats = sq->stats;

	mlx5e_tx_dma_unmap(sq->pdev, dma);
	put_page(wi->resync_dump_frag_page);
	page_ref_dec(wi->resync_dump_frag_page);
	stats->tls_dump_packets++;
	stats->tls_dump_bytes += wi->num_bytes;
}
@@ -816,12 +816,12 @@ mlx5e_ktls_tx_handle_ooo(struct mlx5e_ktls_offload_context_tx *priv_tx,

err_out:
	for (; i < info.nr_frags; i++)
		/* The put_page() here undoes the page ref obtained in tx_sync_info_get().
		/* The page_ref_dec() here undoes the page ref obtained in tx_sync_info_get().
		 * Page refs obtained for the DUMP WQEs above (by page_ref_add) will be
		 * released only upon their completions (or in mlx5e_free_txqsq_descs,
		 * if channel closes).
		 */
		put_page(skb_frag_page(&info.frags[i]));
		page_ref_dec(skb_frag_page(&info.frags[i]));

	return MLX5E_KTLS_SYNC_FAIL;
}
+2 −1
Original line number Diff line number Diff line
@@ -4267,7 +4267,8 @@ void mlx5e_set_xdp_feature(struct net_device *netdev)
	struct mlx5e_params *params = &priv->channels.params;
	xdp_features_t val;

	if (params->packet_merge.type != MLX5E_PACKET_MERGE_NONE) {
	if (!netdev->netdev_ops->ndo_bpf ||
	    params->packet_merge.type != MLX5E_PACKET_MERGE_NONE) {
		xdp_clear_features_flag(netdev);
		return;
	}
+4 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include "en.h"
#include "en/port.h"
#include "eswitch.h"
#include "lib/mlx5.h"

static int mlx5e_test_health_info(struct mlx5e_priv *priv)
{
@@ -247,6 +248,9 @@ static int mlx5e_cond_loopback(struct mlx5e_priv *priv)
	if (is_mdev_switchdev_mode(priv->mdev))
		return -EOPNOTSUPP;

	if (mlx5_get_sd(priv->mdev))
		return -EOPNOTSUPP;

	return 0;
}

+4 −1
Original line number Diff line number Diff line
@@ -2527,9 +2527,12 @@ static void __esw_offloads_unload_rep(struct mlx5_eswitch *esw,
				      struct mlx5_eswitch_rep *rep, u8 rep_type)
{
	if (atomic_cmpxchg(&rep->rep_data[rep_type].state,
			   REP_LOADED, REP_REGISTERED) == REP_LOADED)
			   REP_LOADED, REP_REGISTERED) == REP_LOADED) {
		if (rep_type == REP_ETH)
			__esw_offloads_unload_rep(esw, rep, REP_IB);
		esw->offloads.rep_ops[rep_type]->unload(rep);
	}
}

static void __unload_reps_all_vport(struct mlx5_eswitch *esw, u8 rep_type)
{
Loading