From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08679428F8 for ; Sun, 9 Apr 2023 17:35:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 02799427EE; Sun, 9 Apr 2023 17:35:58 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2060.outbound.protection.outlook.com [40.107.92.60]) by mails.dpdk.org (Postfix) with ESMTP id 5628A40EDE for ; Sun, 9 Apr 2023 17:35:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Uz5wG1H2r+ZvbbSebX70YUxH07Z56mEMWST0REIZZtrLntK2qkI90bQzRR0bIETi+YKCBC7IWEB9u2Fv81XdO14tU0P2zOF/1AWqNwyA0qrnu2YCMfprRKKA3xh7coUaiTEuMHbCwEfzUFRSfJAwbzPMseWJsflA8dIWZB1LIsU6gypcbX2qGIi1zQqm8+9vMPd82Lfnn1MmhhCN23Ii+GJDSHgr1xQBhKMsuqW/1bOXA3RkT8Se3txT7wyYZfH40nD6g5x0hiBbXOuaNENvpJo4XhVS0qj5dW04YhHzYcG/+eYNkPIuvrl0cIrtSgSdOJQZGAQK7wLmVkXzdZwIjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nlvAPYuCV/Q7+mTy0fOk9d/QurRhsF1oPdyn2ItdIjQ=; b=IRWoxOU3EqSnNn1bhrVresNmkD2ASrW237C6JBo858CSC7Da1IDpzOqOA1O+jqzlSdQ/dPRZQQ5W2aw1CY3vg/9hFNrI3AlGBhPya0iojriekUp2A7Y9tTn4Upb1bx5EXfQBoO5WVd/QJmQkIvbj4/soKhAzEF1+35IC0oj9z0qcUwgWC8oF6dVocgvf3TIQ89vkfBMEIjUKifaBAxkAPA5KppLwUR4oNBEkCGQxC/++crCZMI/vV7FE8caJa5u4zIJAlWsGGIa3qwLBNdTPOCysJi4qOaEbHHl91D7U8JP4uwbFz0bN81bY2s/KERgmExVoNdR2YNvk7/94HtD+fA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nlvAPYuCV/Q7+mTy0fOk9d/QurRhsF1oPdyn2ItdIjQ=; b=QOWcaKn/t9AsDBaeifhB8tjco64nHWNXi1NKQLPehFzq0l5u4AT6p1SNKBxjzEuAicZB+heSPvySLburSm+eIY9PWafcgNK11BUiri57th9ouZI28qBZV0z7XfSOa4goLCcAmThK2XqZYJoV4E5CNKUi3yY0YgWMzcehE5uTFHiEl/+H46ViB+5BQoRkUFyw0fSHvE8X2U8O0jnCx8C3EsBeWl30PWVWlcvEGbRgWCK+kjdL7Q34OTEc5l4V7a94bRK+J9edZ3C43pp1OJ6M74iBFjpa0INMKOc3duQLJt/Gofk4tq+ZlFNQvFhc/fx7sZcV8hepDjLTMCe9lzm6JA== Received: from BN9P223CA0001.NAMP223.PROD.OUTLOOK.COM (2603:10b6:408:10b::6) by SJ0PR12MB7457.namprd12.prod.outlook.com (2603:10b6:a03:48d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Sun, 9 Apr 2023 15:35:54 +0000 Received: from BN8NAM11FT036.eop-nam11.prod.protection.outlook.com (2603:10b6:408:10b:cafe::e7) by BN9P223CA0001.outlook.office365.com (2603:10b6:408:10b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38 via Frontend Transport; Sun, 9 Apr 2023 15:35:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by BN8NAM11FT036.mail.protection.outlook.com (10.13.177.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.25 via Frontend Transport; Sun, 9 Apr 2023 15:35:53 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Sun, 9 Apr 2023 08:35:36 -0700 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Sun, 9 Apr 2023 08:35:35 -0700 From: Xueming Li To: Wenjing Qiao CC: Dukai Yuan , dpdk stable Subject: patch 'net/i40e: fix MAC loopback on X722' has been queued to stable release 22.11.2 Date: Sun, 9 Apr 2023 23:25:04 +0800 Message-ID: <20230409152529.5308-117-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230409152529.5308-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230409152529.5308-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT036:EE_|SJ0PR12MB7457:EE_ X-MS-Office365-Filtering-Correlation-Id: 1d437f38-b7e6-4a20-87f7-08db39101acc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KtNplu7/rsC+HKcw+chcp5RJUyV0hOoNWqdYTdTdzhtPypQQKpaN0w6rpE2i26V6FX0sUuhkiiHHB6FFC57dCXd80VV6A6QtR1IKaAJSWDe1npN+YXX56JM34iXgCvdOna3ymmdrwjCGa63vXZLIB9oXasTzz6Fj8XxHv1gg+BRCu70v9e6h3I2c6Ib9t6TCF04EgovECkOhwtPrq8Vtl9WeDLYv5eXoARre3oPKZQxY3XLTWi7FKKqGI747X19L+o40SaKo0yDwvn7G2T0YulfmzhPNIxhHrTBVNumGVNhB1AOh6Fid8K7HwDlopdwtiKjlC6cYzsjHwszdGWTr9msj0JZahmCq4pMWoPDxu/T9aAOOfCglym8zX5NiwZGlMDQHaG5unsVn7y2SU8nf2Y9narccg2yv2xLQycO1hXRIMmAJUrX0zplKtaJ/hnXqOQd3cusMbGn2cE46k2Igb46XF77TWajSYEfU+e7xmXFmNkY+l1Fa2KPXrG922xcotnk0JBfRNvknnHdPOyQVc+8tNvMW2dPSOVBm6X4+Q/D/MrYXaUIYjNpCUKpxK1WV8p0UVcJKvN/HEdQiKucfB0s+i4aPgpflt6lLUz+d5cXVqxcIa+63EoOwIgKySpyQll4htGw+klree0dlMC8VNKGHzZkzwkwOhMez44Rtd0ZgvwF4LU+8tnPRhonT9zEzqkdmnufQ55v870NUYZCucd+BuoD8ad/9EoI4LVzBWnl8ris/mRKh0yZX+h1hPSMIkoljuJntVw6xM3yK0IoRsTKfGKdYrPHpTePk8uHH4WF3CAKOFbzNMVPdXHAC9SoOVC98HDjrIULeg8HFPxTMIw== X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(396003)(39860400002)(376002)(451199021)(40470700004)(36840700001)(46966006)(478600001)(7696005)(19627235002)(54906003)(316002)(53546011)(1076003)(26005)(16526019)(6286002)(186003)(6666004)(966005)(2906002)(4326008)(70586007)(70206006)(5660300002)(8676002)(6916009)(41300700001)(8936002)(82310400005)(7636003)(356005)(82740400003)(55016003)(86362001)(40480700001)(36756003)(40460700003)(47076005)(83380400001)(2616005)(426003)(336012)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Apr 2023 15:35:53.3054 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1d437f38-b7e6-4a20-87f7-08db39101acc X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT036.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB7457 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Hi, FYI, your patch has been queued to stable release 22.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 04/11/23. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/log/?h=22.11-staging/commit/8cb2ee860c5ed932cd797c1f75ce9fa5770fa396 Thanks. Xueming Li --- >From 8cb2ee860c5ed932cd797c1f75ce9fa5770fa396 Mon Sep 17 00:00:00 2001 From: Wenjing Qiao Date: Mon, 13 Mar 2023 23:16:19 -0400 Subject: [PATCH] net/i40e: fix MAC loopback on X722 Cc: Xueming Li [ upstream commit 6355ff768b0b5871cc82a69194b376db39ee6e9c ] If enabling MAC loopback mode on X722 NIC, transmitted packets are not seen in the receive queue. The root cause is using wrong loopback mode bits. Correct it according to the X722 datasheet. Fixes: 3a838ab649df ("net/i40e: support MAC loopback") Fixes: 5712e6407089 ("net/i40e: revert enhancing loopback AQ command") Signed-off-by: Wenjing Qiao Tested-by: Dukai Yuan --- drivers/net/i40e/i40e_ethdev.c | 17 ++++++++++++++--- drivers/net/i40e/i40e_ethdev.h | 3 +++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 371f42233e..cb0070f94b 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2411,10 +2411,21 @@ i40e_dev_start(struct rte_eth_dev *dev) } } + /* Disable mac loopback mode */ + if (dev->data->dev_conf.lpbk_mode == I40E_AQ_LB_MODE_NONE) { + ret = i40e_aq_set_lb_modes(hw, I40E_AQ_LB_MODE_NONE, NULL); + if (ret != I40E_SUCCESS) { + PMD_DRV_LOG(ERR, "fail to set loopback link"); + goto tx_err; + } + } + /* Enable mac loopback mode */ - if (dev->data->dev_conf.lpbk_mode == I40E_AQ_LB_MODE_NONE || - dev->data->dev_conf.lpbk_mode == I40E_AQ_LB_PHY_LOCAL) { - ret = i40e_aq_set_lb_modes(hw, dev->data->dev_conf.lpbk_mode, NULL); + if (dev->data->dev_conf.lpbk_mode == I40E_AQ_LB_MODE_EN) { + if (hw->mac.type == I40E_MAC_X722) + ret = i40e_aq_set_lb_modes(hw, I40E_AQ_LB_MAC_LOCAL_X722, NULL); + else + ret = i40e_aq_set_lb_modes(hw, I40E_AQ_LB_MAC, NULL); if (ret != I40E_SUCCESS) { PMD_DRV_LOG(ERR, "fail to set loopback link"); goto tx_err; diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index 7c4cc44a27..9b806d130e 100644 --- a/drivers/net/i40e/i40e_ethdev.h +++ b/drivers/net/i40e/i40e_ethdev.h @@ -48,6 +48,9 @@ #define I40E_MAX_VF 128 /*flag of no loopback*/ #define I40E_AQ_LB_MODE_NONE 0x0 +#define I40E_AQ_LB_MODE_EN 0x01 +#define I40E_AQ_LB_MAC 0x01 +#define I40E_AQ_LB_MAC_LOCAL_X722 0x04 /* * vlan_id is a 12 bit number. * The VFTA array is actually a 4096 bit array, 128 of 32bit elements. -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-04-09 21:45:41.746741400 +0800 +++ 0116-net-i40e-fix-MAC-loopback-on-X722.patch 2023-04-09 21:45:38.779042200 +0800 @@ -1 +1 @@ -From 6355ff768b0b5871cc82a69194b376db39ee6e9c Mon Sep 17 00:00:00 2001 +From 8cb2ee860c5ed932cd797c1f75ce9fa5770fa396 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6355ff768b0b5871cc82a69194b376db39ee6e9c ] @@ -12 +14,0 @@ -Cc: stable@dpdk.org