Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f39cc1c7 authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'mlx5-fixes'



Saeed Mahameed says:

====================
Mellanox, mlx5e fixes 2018-08-07

I know it is late into 4.18 release, and this is why I am submitting
only two mlx5e ethernet fixes.

The first one from Or, is needed for -stable and it fixes hairpin
for "same device" check.

The second fix is a non risk fix from Huy which cleans up and improves
error return value reporting for dcbnl_ieee_setapp.

For -stable v4.16
- net/mlx5e: Properly check if hairpin is possible between two functions
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents b13f9c63 f280c6a1
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -858,8 +858,6 @@ struct mlx5e_profile {
		mlx5e_fp_handle_rx_cqe handle_rx_cqe;
		mlx5e_fp_handle_rx_cqe handle_rx_cqe;
		mlx5e_fp_handle_rx_cqe handle_rx_cqe_mpwqe;
		mlx5e_fp_handle_rx_cqe handle_rx_cqe_mpwqe;
	} rx_handlers;
	} rx_handlers;
	void	(*netdev_registered_init)(struct mlx5e_priv *priv);
	void    (*netdev_registered_remove)(struct mlx5e_priv *priv);
	int	max_tc;
	int	max_tc;
};
};


+11 −19
Original line number Original line Diff line number Diff line
@@ -443,16 +443,12 @@ static int mlx5e_dcbnl_ieee_setapp(struct net_device *dev, struct dcb_app *app)
	bool is_new;
	bool is_new;
	int err;
	int err;


	if (app->selector != IEEE_8021QAZ_APP_SEL_DSCP)
	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager) ||
		return -EINVAL;
	    !MLX5_DSCP_SUPPORTED(priv->mdev))

		return -EOPNOTSUPP;
	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager))
		return -EINVAL;

	if (!MLX5_DSCP_SUPPORTED(priv->mdev))
		return -EINVAL;


	if (app->protocol >= MLX5E_MAX_DSCP)
	if ((app->selector != IEEE_8021QAZ_APP_SEL_DSCP) ||
	    (app->protocol >= MLX5E_MAX_DSCP))
		return -EINVAL;
		return -EINVAL;


	/* Save the old entry info */
	/* Save the old entry info */
@@ -500,16 +496,12 @@ static int mlx5e_dcbnl_ieee_delapp(struct net_device *dev, struct dcb_app *app)
	struct mlx5e_priv *priv = netdev_priv(dev);
	struct mlx5e_priv *priv = netdev_priv(dev);
	int err;
	int err;


	if (app->selector != IEEE_8021QAZ_APP_SEL_DSCP)
	if  (!MLX5_CAP_GEN(priv->mdev, vport_group_manager) ||
		return -EINVAL;
	     !MLX5_DSCP_SUPPORTED(priv->mdev))

		return -EOPNOTSUPP;
	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager))
		return -EINVAL;

	if (!MLX5_DSCP_SUPPORTED(priv->mdev))
		return -EINVAL;


	if (app->protocol >= MLX5E_MAX_DSCP)
	if ((app->selector != IEEE_8021QAZ_APP_SEL_DSCP) ||
	    (app->protocol >= MLX5E_MAX_DSCP))
		return -EINVAL;
		return -EINVAL;


	/* Skip if no dscp app entry */
	/* Skip if no dscp app entry */
+4 −4
Original line number Original line Diff line number Diff line
@@ -1970,15 +1970,15 @@ static bool actions_match_supported(struct mlx5e_priv *priv,
static bool same_hw_devs(struct mlx5e_priv *priv, struct mlx5e_priv *peer_priv)
static bool same_hw_devs(struct mlx5e_priv *priv, struct mlx5e_priv *peer_priv)
{
{
	struct mlx5_core_dev *fmdev, *pmdev;
	struct mlx5_core_dev *fmdev, *pmdev;
	u16 func_id, peer_id;
	u64 fsystem_guid, psystem_guid;


	fmdev = priv->mdev;
	fmdev = priv->mdev;
	pmdev = peer_priv->mdev;
	pmdev = peer_priv->mdev;


	func_id = (u16)((fmdev->pdev->bus->number << 8) | PCI_SLOT(fmdev->pdev->devfn));
	mlx5_query_nic_vport_system_image_guid(fmdev, &fsystem_guid);
	peer_id = (u16)((pmdev->pdev->bus->number << 8) | PCI_SLOT(pmdev->pdev->devfn));
	mlx5_query_nic_vport_system_image_guid(pmdev, &psystem_guid);


	return (func_id == peer_id);
	return (fsystem_guid == psystem_guid);
}
}


static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
static int parse_tc_nic_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,