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 DF6F6A0543 for ; Tue, 21 Jun 2022 10:11:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EFE9742B7C; Tue, 21 Jun 2022 10:11:20 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2087.outbound.protection.outlook.com [40.107.93.87]) by mails.dpdk.org (Postfix) with ESMTP id 3930642B74 for ; Tue, 21 Jun 2022 10:11:18 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QTohjwobwfRu2FfVU6k188UwV2nWpxZZcpTDayfJIgD4vKP+KsTCaP7Az7rWgbULCEJzE2Vyj4/GxJGAFCw7SvqTXuOKE8JQVJqe2jGQtqDTNtdg9hSVSCbrujx0p7j0t1fSYIQzwbpNoXOB3xzXcNBWTbrgYBKrOwiN57fiT1q1vJraeanjokiXXpKVHozn2SKz0JGrXeW2PFohbvjonmqLoohksoNwcTpVi45ByY5ESDa6Ytxr1mrYCd+bqV8xm8tPWQi82anv3gjEsW4iQdcjTue3DIeZCMNujqocJjypf0PLELPTHzi5qMk3bXP1nJhw86i6B+cMgUHhq/X4Aw== 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=LZeLvI4oJvDqAYOaEDm8wWRtmQl4eJU/yaL8ULANMZA=; b=dUe9D3tAa9DEwG+AmWosdLP11mQ/5MC4uTqf947gp5/ZxM+AoocECvDWAdSC4T7a5efJcXGFkHFtnvDbYI8zCOsnfShPBtLb9xsk0SvXw9tp2Of/vQTnreO4Mw+4AZm7TSC6WetZvKilFLYOK6z1GMPcAT/CmG0upt1P35BPU4boqkF0lIMe0uCK8qsJu7lcfJwRT4SrrJoqc+siGy95UGN9odH0iJWAzgt5xQP6v9dhnxQHPdW7gd0y72Bv8Oa4qavpEjeKaQ34WeFBwhU5WloH566pY7NDTVPwZdb7mT96zOkyPTJL4jJGoYnjhDPyQYHgsWbq+opPkFzHTEzeSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 12.22.5.236) smtp.rcpttodomain=dpdk.org 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=LZeLvI4oJvDqAYOaEDm8wWRtmQl4eJU/yaL8ULANMZA=; b=GaixYPN8Kw7Byvm1jsCx3NRFCQuh/xQMAqo/oL5kpB+UbyOeQvDZE+HV2tsNDc6/1bTYoXOXKyjlKK3XUjgH8sZan8mEFEPyadKpdtiRvccFOvk1Jy29T/vPh+334CDMCipSaCXzlTIbTKKHo0lfUSukq/mKdaCOwBSyjgAFdOqm+/EAKgf5k2rksWMqdz81roHRpF0HLz67SVnp5ymMvOrCxTYWEb3Pi+lr5YfkRj3AlTL8ldob8i208Hpy5Ukvi4qR4n2HU/j9y4NEu2AqUoxiB29LYMwJsS2E0t+f0Y+Y7apUtEyUiJ6to8i9dxGhmOQBBx+ZeaIPdEi0nU5yOw== Received: from BN6PR19CA0072.namprd19.prod.outlook.com (2603:10b6:404:e3::34) by DM6PR12MB2985.namprd12.prod.outlook.com (2603:10b6:5:116::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.15; Tue, 21 Jun 2022 08:11:16 +0000 Received: from BN8NAM11FT010.eop-nam11.prod.protection.outlook.com (2603:10b6:404:e3:cafe::a8) by BN6PR19CA0072.outlook.office365.com (2603:10b6:404:e3::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.22 via Frontend Transport; Tue, 21 Jun 2022 08:11:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 12.22.5.236) 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 12.22.5.236 as permitted sender) receiver=protection.outlook.com; client-ip=12.22.5.236; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (12.22.5.236) by BN8NAM11FT010.mail.protection.outlook.com (10.13.177.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.5353.14 via Frontend Transport; Tue, 21 Jun 2022 08:11:16 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by DRHQMAIL109.nvidia.com (10.27.9.19) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Tue, 21 Jun 2022 08:11:15 +0000 Received: from nvidia.com (10.126.230.35) 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.22; Tue, 21 Jun 2022 01:11:13 -0700 From: Xueming Li To: Yiding Zhou CC: Qi Zhang , dpdk stable Subject: patch 'net/iavf: fix data path selection' has been queued to stable release 20.11.6 Date: Tue, 21 Jun 2022 11:02:39 +0300 Message-ID: <20220621080301.2315720-94-xuemingl@nvidia.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220621080301.2315720-1-xuemingl@nvidia.com> References: <20220621080301.2315720-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1a67036a-e285-43e8-d061-08da535d9d6e X-MS-TrafficTypeDiagnostic: DM6PR12MB2985:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mZYKRwFsWgIrg0Qqx7IIx5HBDkQJ6H47cRhFWlTsDEqOGoAAnd4u7KUEGd31I9qGS7PjToluVkk61QB+l3wRirm6XwljqJIeMO2b/9Pp3QXOVwqdrkL02F5nFdGKC5pIgYFjCWqKZ8hzN+uBbm/qyl8P13QyztaKIyWojtbHFrpsdmzGSGxn/KxiFgCLrwwbtiQMsZpWz7NQBgSf8cAR8miuLisJdSU3u5Dd0fY96UMGxUijz1AcVeut/syk28ph9+vSEEyPWSDvnS2B157twi1R9L+n8PYYsR5VhD64o9k6/JPugrHibevBlRmoxfkSETnIHcVTqmp2q9QYi9auQDA1us5mhyV83mtAII/ncJPTVQ1hbkw6Cj9XTjF7Xcc/aakFCshaZ6zH3cDXA3PIkiF1HoGHAk1mTGQsY7N0Fl9BahFiq4ZOKxSV3eI6Q48IH/417iRPl+nHm7357AA1kO+BWywuALhvfAb72xrzbQPlgrWZWQrEYSSuoSnXppOT9PbyrH7x2lE3eFkuthvKdRaWN+ReXVcM5aP6BSExQX1/ZZZ0Slrp3g0Dr44jQKiJX8rm6s4f+kPjoAcAuS6WYKX5KatbVqKHbGPQMbYSABh0BASPuO9DtAjBN+Qki183nviWI9jMpaWCqHr78hgeY6eCnhz0vBeSIplP9gCEpmkhZC/KTWWmWOWmT+uS5FMr335oTR+Y/So0Z+K2haOtXqMKqCOwe4IxFIJPYyhEwzVbIyNMJgMStjOkWdGcTY7fnJ+6Fvko2WvfP7hUC+rsbelkgXlF97Qe/V31/NAoKRIF3j1blbNKkKOIkHpIzGuWiK4KaIIgxxhQQTEUOk3RVkT1jewWXrPNHH4ujUn8qEU= X-Forefront-Antispam-Report: CIP:12.22.5.236; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:InfoNoRecords; CAT:NONE; SFS:(13230016)(4636009)(39860400002)(136003)(396003)(376002)(346002)(36840700001)(46966006)(40470700004)(16526019)(426003)(86362001)(5660300002)(186003)(316002)(336012)(1076003)(2616005)(47076005)(41300700001)(82310400005)(36860700001)(83380400001)(82740400003)(8936002)(6916009)(40460700003)(8676002)(356005)(81166007)(70206006)(70586007)(4326008)(55016003)(40480700001)(36756003)(53546011)(6286002)(478600001)(7696005)(6666004)(2906002)(26005)(966005)(54906003)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jun 2022 08:11:16.2820 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1a67036a-e285-43e8-d061-08da535d9d6e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[12.22.5.236]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT010.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB2985 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 20.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 06/23/22. 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://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/e0658c31961ef7e6760aa577d50e19bc5b0d4617 Thanks. Xueming Li --- >From e0658c31961ef7e6760aa577d50e19bc5b0d4617 Mon Sep 17 00:00:00 2001 From: Yiding Zhou Date: Sun, 8 May 2022 03:52:39 +0800 Subject: [PATCH] net/iavf: fix data path selection Cc: Xueming Li [ upstream commit 865df516f931827580f00e65f246f49838c722bb ] If PF driver don't support a flex Rx descriptor that required by VF, legacy descriptor format will be negotiated to configure the hardware queue. The patch fixes the issue that an Rx data path that handle flexible descriptor (e.g.: iavf_recv_scattered_pkts_vec_avx512_flex_rxd) is selected while the actual hardware queues are configured as legacy due to above scenario, which will cause following coredump. Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata extraction") Signed-off-by: Yiding Zhou Acked-by: Qi Zhang --- drivers/net/iavf/iavf_rxtx.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index 7554ce3593..516a1684c2 100644 --- a/drivers/net/iavf/iavf_rxtx.c +++ b/drivers/net/iavf/iavf_rxtx.c @@ -2370,10 +2370,24 @@ iavf_set_rx_function(struct rte_eth_dev *dev) struct iavf_adapter *adapter = IAVF_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private); struct iavf_info *vf = IAVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); + int i; + struct iavf_rx_queue *rxq; + bool use_flex = true; + + for (i = 0; i < dev->data->nb_rx_queues; i++) { + rxq = dev->data->rx_queues[i]; + if (rxq->rxdid <= IAVF_RXDID_LEGACY_1) { + PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is legacy, " + "set rx_pkt_burst as legacy for all queues", rxq->rxdid, i); + use_flex = false; + } else if (!(vf->supported_rxdid & BIT(rxq->rxdid))) { + PMD_DRV_LOG(NOTICE, "request RXDID[%d] in Queue[%d] is not supported, " + "set rx_pkt_burst as legacy for all queues", rxq->rxdid, i); + use_flex = false; + } + } #ifdef RTE_ARCH_X86 - struct iavf_rx_queue *rxq; - int i; bool use_avx2 = false; #ifdef CC_AVX512_SUPPORT bool use_avx512 = false; @@ -2455,7 +2469,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev) if (dev->data->scattered_rx) { PMD_DRV_LOG(DEBUG, "Using a Scattered Rx callback (port=%d).", dev->data->port_id); - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) + if (use_flex) dev->rx_pkt_burst = iavf_recv_scattered_pkts_flex_rxd; else dev->rx_pkt_burst = iavf_recv_scattered_pkts; @@ -2466,7 +2480,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev) } else { PMD_DRV_LOG(DEBUG, "Using Basic Rx callback (port=%d).", dev->data->port_id); - if (vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) + if (use_flex) dev->rx_pkt_burst = iavf_recv_pkts_flex_rxd; else dev->rx_pkt_burst = iavf_recv_pkts; -- 2.35.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-06-21 15:37:53.412738993 +0800 +++ 0093-net-iavf-fix-data-path-selection.patch 2022-06-21 15:37:49.191118462 +0800 @@ -1 +1 @@ -From 865df516f931827580f00e65f246f49838c722bb Mon Sep 17 00:00:00 2001 +From e0658c31961ef7e6760aa577d50e19bc5b0d4617 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 865df516f931827580f00e65f246f49838c722bb ] @@ -17 +19,0 @@ -Cc: stable@dpdk.org @@ -22,2 +24,2 @@ - drivers/net/iavf/iavf_rxtx.c | 27 ++++++++++++++++++--------- - 1 file changed, 18 insertions(+), 9 deletions(-) + drivers/net/iavf/iavf_rxtx.c | 22 ++++++++++++++++++---- + 1 file changed, 18 insertions(+), 4 deletions(-) @@ -26 +28 @@ -index 345f6aeebc..d3b1a58b27 100644 +index 7554ce3593..516a1684c2 100644 @@ -29 +31 @@ -@@ -2899,14 +2899,27 @@ iavf_set_rx_function(struct rte_eth_dev *dev) +@@ -2370,10 +2370,24 @@ iavf_set_rx_function(struct rte_eth_dev *dev) @@ -53 +54,0 @@ - int check_ret; @@ -54,0 +56 @@ + #ifdef CC_AVX512_SUPPORT @@ -56,16 +58 @@ -- bool use_flex = false; - - check_ret = iavf_rx_vec_dev_check(dev); - if (check_ret >= 0 && -@@ -2923,10 +2936,6 @@ iavf_set_rx_function(struct rte_eth_dev *dev) - use_avx512 = true; - #endif - -- if (vf->vf_res->vf_cap_flags & -- VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) -- use_flex = true; -- - for (i = 0; i < dev->data->nb_rx_queues; i++) { - rxq = dev->data->rx_queues[i]; - (void)iavf_rxq_vec_setup(rxq); -@@ -3030,7 +3039,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev) +@@ -2455,7 +2469,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev) @@ -80 +67 @@ -@@ -3041,7 +3050,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev) +@@ -2466,7 +2480,7 @@ iavf_set_rx_function(struct rte_eth_dev *dev)