From nobody Sun Sep 7 12:38:19 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 291C7C38145 for ; Fri, 2 Sep 2022 12:36:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237049AbiIBMgv (ORCPT ); Fri, 2 Sep 2022 08:36:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236718AbiIBMf6 (ORCPT ); Fri, 2 Sep 2022 08:35:58 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17AA8DDB46; Fri, 2 Sep 2022 05:29:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 52A34B82AA7; Fri, 2 Sep 2022 12:27:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5672AC433D6; Fri, 2 Sep 2022 12:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1662121635; bh=2V1w68Fy2o1YhSqtTCc+epSatNmmazG7elgRFq6rYWU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P7P5jS48qWFFWJWDT47tze/NW/MdnM/HAQMWY8c6WXyCgcDmNlFKAL4Hr08j0bRwe OcVxW+KTs/+wuskY57LQiH+xb+UMI+iZRINIkVHt/QZ4ZJsaQ58GuAF5mqSybWy+tv CNsW4M+6kqxJVb5uPdulmAvd8YiuHItvcy36aTDo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vlad Buslov , Roi Dayan , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.4 16/77] net/mlx5e: Properly disable vlan strip on non-UL reps Date: Fri, 2 Sep 2022 14:18:25 +0200 Message-Id: <20220902121404.186661786@linuxfoundation.org> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20220902121403.569927325@linuxfoundation.org> References: <20220902121403.569927325@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Vlad Buslov [ Upstream commit f37044fd759b6bc40b6398a978e0b1acdf717372 ] When querying mlx5 non-uplink representors capabilities with ethtool rx-vlan-offload is marked as "off [fixed]". However, it is actually always enabled because mlx5e_params->vlan_strip_disable is 0 by default when initializing struct mlx5e_params instance. Fix the issue by explicitly setting the vlan_strip_disable to 'true' for non-uplink representors. Fixes: cb67b832921c ("net/mlx5e: Introduce SRIOV VF representors") Signed-off-by: Vlad Buslov Reviewed-by: Roi Dayan Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c b/drivers/net= /ethernet/mellanox/mlx5/core/en_rep.c index 88b51f64a64ea..f448a139e222e 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c @@ -1434,6 +1434,8 @@ static void mlx5e_build_rep_params(struct net_device = *netdev) =20 params->num_tc =3D 1; params->tunneled_offload_en =3D false; + if (rep->vport !=3D MLX5_VPORT_UPLINK) + params->vlan_strip_disable =3D true; =20 mlx5_query_min_inline(mdev, ¶ms->tx_min_inline_mode); =20 --=20 2.35.1