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

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

Mark Bloch says:

====================
mlx5 misc fixes 2025-06-10

This patchset includes misc fixes from the team for the mlx5 core
and Ethernet drivers.
====================

Link: https://patch.msgid.link/20250610151514.1094735-1-mbloch@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents c7bdeed3 875d7c16
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@
#include "en/fs_ethtool.h"

#define LANES_UNKNOWN		 0
#define MAX_LANES		 8

void mlx5e_ethtool_get_drvinfo(struct mlx5e_priv *priv,
			       struct ethtool_drvinfo *drvinfo)
@@ -1098,10 +1097,8 @@ static void get_link_properties(struct net_device *netdev,
		speed = info->speed;
		lanes = info->lanes;
		duplex = DUPLEX_FULL;
	} else if (data_rate_oper) {
	} else if (data_rate_oper)
		speed = 100 * data_rate_oper;
		lanes = MAX_LANES;
	}

out:
	link_ksettings->base.duplex = duplex;
+6 −6
Original line number Diff line number Diff line
@@ -2028,9 +2028,8 @@ mlx5e_tc_add_fdb_flow(struct mlx5e_priv *priv,
	return err;
}

static bool mlx5_flow_has_geneve_opt(struct mlx5e_tc_flow *flow)
static bool mlx5_flow_has_geneve_opt(struct mlx5_flow_spec *spec)
{
	struct mlx5_flow_spec *spec = &flow->attr->parse_attr->spec;
	void *headers_v = MLX5_ADDR_OF(fte_match_param,
				       spec->match_value,
				       misc_parameters_3);
@@ -2069,7 +2068,7 @@ static void mlx5e_tc_del_fdb_flow(struct mlx5e_priv *priv,
	}
	complete_all(&flow->del_hw_done);

	if (mlx5_flow_has_geneve_opt(flow))
	if (mlx5_flow_has_geneve_opt(&attr->parse_attr->spec))
		mlx5_geneve_tlv_option_del(priv->mdev->geneve);

	if (flow->decap_route)
@@ -2574,12 +2573,13 @@ static int parse_tunnel_attr(struct mlx5e_priv *priv,

		err = mlx5e_tc_tun_parse(filter_dev, priv, tmp_spec, f, match_level);
		if (err) {
			kvfree(tmp_spec);
			NL_SET_ERR_MSG_MOD(extack, "Failed to parse tunnel attributes");
			netdev_warn(priv->netdev, "Failed to parse tunnel attributes");
			return err;
		}
		} else {
			err = mlx5e_tc_set_attr_rx_tun(flow, tmp_spec);
		}
		if (mlx5_flow_has_geneve_opt(tmp_spec))
			mlx5_geneve_tlv_option_del(priv->mdev->geneve);
		kvfree(tmp_spec);
		if (err)
			return err;
+13 −8
Original line number Diff line number Diff line
@@ -1295,13 +1295,16 @@ mlx5_eswitch_enable_pf_vf_vports(struct mlx5_eswitch *esw,
		ret = mlx5_eswitch_load_pf_vf_vport(esw, MLX5_VPORT_ECPF, enabled_events);
		if (ret)
			goto ecpf_err;
	}

	/* Enable ECVF vports */
	if (mlx5_core_ec_sriov_enabled(esw->dev)) {
			ret = mlx5_eswitch_load_ec_vf_vports(esw, esw->esw_funcs.num_ec_vfs,
		ret = mlx5_eswitch_load_ec_vf_vports(esw,
						     esw->esw_funcs.num_ec_vfs,
						     enabled_events);
		if (ret)
			goto ec_vf_err;
	}
	}

	/* Enable VF vports */
	ret = mlx5_eswitch_load_vf_vports(esw, esw->esw_funcs.num_vfs,
@@ -1331,9 +1334,11 @@ void mlx5_eswitch_disable_pf_vf_vports(struct mlx5_eswitch *esw)
{
	mlx5_eswitch_unload_vf_vports(esw, esw->esw_funcs.num_vfs);

	if (mlx5_ecpf_vport_exists(esw->dev)) {
	if (mlx5_core_ec_sriov_enabled(esw->dev))
			mlx5_eswitch_unload_ec_vf_vports(esw, esw->esw_funcs.num_vfs);
		mlx5_eswitch_unload_ec_vf_vports(esw,
						 esw->esw_funcs.num_ec_vfs);

	if (mlx5_ecpf_vport_exists(esw->dev)) {
		mlx5_eswitch_unload_pf_vf_vport(esw, MLX5_VPORT_ECPF);
	}

+4 −1
Original line number Diff line number Diff line
@@ -2228,6 +2228,7 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,
	struct mlx5_flow_handle *rule;
	struct match_list *iter;
	bool take_write = false;
	bool try_again = false;
	struct fs_fte *fte;
	u64  version = 0;
	int err;
@@ -2292,6 +2293,7 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,
		nested_down_write_ref_node(&g->node, FS_LOCK_PARENT);

		if (!g->node.active) {
			try_again = true;
			up_write_ref_node(&g->node, false);
			continue;
		}
@@ -2313,7 +2315,8 @@ try_add_to_existing_fg(struct mlx5_flow_table *ft,
			tree_put_node(&fte->node, false);
		return rule;
	}
	rule = ERR_PTR(-ENOENT);
	err = try_again ? -EAGAIN : -ENOENT;
	rule = ERR_PTR(err);
out:
	kmem_cache_free(steering->ftes_cache, fte);
	return rule;
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ static void free_4k(struct mlx5_core_dev *dev, u64 addr, u32 function)
static int alloc_system_page(struct mlx5_core_dev *dev, u32 function)
{
	struct device *device = mlx5_core_dma_dev(dev);
	int nid = dev_to_node(device);
	int nid = dev->priv.numa_node;
	struct page *page;
	u64 zero_addr = 1;
	u64 addr;
Loading