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

Merge tag 'mlx5-fixes-2023-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5 fixes 2023-03-21

This series provides bug fixes to mlx5 driver.

* tag 'mlx5-fixes-2023-03-21' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux:
  net/mlx5: E-Switch, Fix an Oops in error handling code
  net/mlx5: Read the TC mapping of all priorities on ETS query
  net/mlx5e: Overcome slow response for first macsec ASO WQE
  net/mlx5e: Initialize link speed to zero
  net/mlx5: Fix steering rules cleanup
  net/mlx5e: Block entering switchdev mode with ns inconsistency
  net/mlx5e: Set uplink rep as NETNS_LOCAL
====================

Link: https://lore.kernel.org/r/20230321211135.47711-1-saeed@kernel.org


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 3e212b0b 640fcdbc
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1412,6 +1412,7 @@ static int macsec_aso_query(struct mlx5_core_dev *mdev, struct mlx5e_macsec *mac
	struct mlx5e_macsec_aso *aso;
	struct mlx5_aso_wqe *aso_wqe;
	struct mlx5_aso *maso;
	unsigned long expires;
	int err;

	aso = &macsec->aso;
@@ -1425,7 +1426,13 @@ static int macsec_aso_query(struct mlx5_core_dev *mdev, struct mlx5e_macsec *mac
	macsec_aso_build_wqe_ctrl_seg(aso, &aso_wqe->aso_ctrl, NULL);

	mlx5_aso_post_wqe(maso, false, &aso_wqe->ctrl);
	expires = jiffies + msecs_to_jiffies(10);
	do {
		err = mlx5_aso_poll_cq(maso, false);
		if (err)
			usleep_range(2, 10);
	} while (err && time_is_after_jiffies(expires));

	if (err)
		goto err_out;

+4 −2
Original line number Diff line number Diff line
@@ -117,12 +117,14 @@ static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
	if (!MLX5_CAP_GEN(priv->mdev, ets))
		return -EOPNOTSUPP;

	ets->ets_cap = mlx5_max_tc(priv->mdev) + 1;
	for (i = 0; i < ets->ets_cap; i++) {
	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
		err = mlx5_query_port_prio_tc(mdev, i, &ets->prio_tc[i]);
		if (err)
			return err;
	}

	ets->ets_cap = mlx5_max_tc(priv->mdev) + 1;
	for (i = 0; i < ets->ets_cap; i++) {
		err = mlx5_query_port_tc_group(mdev, i, &tc_group[i]);
		if (err)
			return err;
+5 −1
Original line number Diff line number Diff line
@@ -4150,8 +4150,12 @@ static netdev_features_t mlx5e_fix_features(struct net_device *netdev,
		}
	}

	if (mlx5e_is_uplink_rep(priv))
	if (mlx5e_is_uplink_rep(priv)) {
		features = mlx5e_fix_uplink_rep_features(netdev, features);
		features |= NETIF_F_NETNS_LOCAL;
	} else {
		features &= ~NETIF_F_NETNS_LOCAL;
	}

	mutex_unlock(&priv->state_lock);

+1 −1
Original line number Diff line number Diff line
@@ -1103,8 +1103,8 @@ static void
mlx5e_hairpin_params_init(struct mlx5e_hairpin_params *hairpin_params,
			  struct mlx5_core_dev *mdev)
{
	u32 link_speed = 0;
	u64 link_speed64;
	u32 link_speed;

	hairpin_params->mdev = mdev;
	/* set hairpin pair per each 50Gbs share of the link */
+1 −2
Original line number Diff line number Diff line
@@ -364,8 +364,7 @@ int mlx5_esw_acl_ingress_vport_metadata_update(struct mlx5_eswitch *esw, u16 vpo

	if (WARN_ON_ONCE(IS_ERR(vport))) {
		esw_warn(esw->dev, "vport(%d) invalid!\n", vport_num);
		err = PTR_ERR(vport);
		goto out;
		return PTR_ERR(vport);
	}

	esw_acl_ingress_ofld_rules_destroy(esw, vport);
Loading