From: Chris Mi Date: Tue, 16 May 2017 11:07:11 +0000 (-0400) Subject: net/mlx5e: Fix min inline value for VF rep SQs X-Git-Tag: v4.11.9~62 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=050efbe12925bc9fe1fa2695afc2ba186c1f9cc2;p=thirdparty%2Fkernel%2Fstable.git net/mlx5e: Fix min inline value for VF rep SQs [ Upstream commit 5f195c2c5cba60241004146cd12d71451d6b0fc4 ] The offending commit only changed the code path for PF/VF, but it didn't take care of VF representors. As a result, since params->tx_min_inline_mode for VF representors is kzalloced to 0 (MLX5_INLINE_MODE_NONE), all VF reps SQs were set to that mode. This actually works on CX5 by default but broke CX4. Fix that by adding a call to query the min inline mode from the VF rep build up code. Fixes: a6f402e49901 ("net/mlx5e: Tx, no inline copy on ConnectX-5") Signed-off-by: Chris Mi Reviewed-by: Or Gerlitz Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c index f621373bd7a56..4be6b346f14ae 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -424,6 +424,8 @@ static void mlx5e_build_rep_netdev_priv(struct mlx5_core_dev *mdev, priv->params.lro_wqe_sz = MLX5E_PARAMS_DEFAULT_LRO_WQE_SZ; + mlx5_query_min_inline(mdev, &priv->params.tx_min_inline_mode); + priv->mdev = mdev; priv->netdev = netdev; priv->params.num_channels = profile->max_nch(mdev);