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 2DEC341D8D for ; Mon, 27 Feb 2023 08:13:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 29EFC410DC; Mon, 27 Feb 2023 08:13:05 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2081.outbound.protection.outlook.com [40.107.94.81]) by mails.dpdk.org (Postfix) with ESMTP id 456B6410DC for ; Mon, 27 Feb 2023 08:13:04 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K9HGgPiphkqAD9b5eUL0YT6NqsCHdV5oaFEVIzUA4WjyqEHNLj9VgKPtoc7U/i/ftN32WysoJkLlLGV976GTeEimj5XdhJpqkFwyMWwmw8cYSEQz44rSQBtXX6v4ha4atekrPNR2dL8qpJ/js2HqDajxOTvUJOte3ynJ+EOcyt0vBjdYyZqlbMCRmpyQUZWilH0U0J+r0Y4aacrnFn7SU2zuhEGy+L/Zu9yo93L8zFwt/QFIG+Zyk3U4ySICMu7uacrr19WonqLqji9ZtCqYvUb7iARQgOUiPgT5ABl2hMkg4WOVaJRZTEmv4KzbOFPVXVZlLd297XXoXlm2/UtD8Q== 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=afszxrqKTzAZqkbPyY7PcK1wKfzNB42HfAKA/NQ6ykA=; b=eDUeRBA17uRetvySgs3Diuuo8eITTmHhg5zx22Z32G8haPiXPVpU9baN1DAg6s2awD3E8NdKCQ4SCgdXcICnZbU4PfXSZWgV99jCppJoJog7PhUvwY4j/P1YTKOgriqlouNOePEHB74+zpgmLaMueFKEfenYUC6+Xyilt0dBIGLQozQrLIEbcSVMWI1tacTSn8JnM9+NCZI+g48NXesiX3h9A+c7vtzKt5pgyg9O7kEFRaLlo69LB7qs7FDYudXmlh2K5v9jEO15t6bqrbA4kXn1M40/YjTTSZGaiUqO0S6ZEQH/KZn2Pr8d2UYirJGEZBDV/9XEBSaFKbSoZ6RAew== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=huawei.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=afszxrqKTzAZqkbPyY7PcK1wKfzNB42HfAKA/NQ6ykA=; b=miQ5Z4PVpVpqAJylYBuS5TsW8kyRL3OsXvkvOUfuBYCsch9PNltGvlynWdxut37jAsYeN/gKsasYdBJy/AaLy73YXzGnjNOtCgFkPl5i34FJRAKFDUmYKPd//VqxomMG9ByOmvm2LCXO8hnoXYRTcALvdt1ttOtonkFWBUwyCL6rP6d4hgb/T9Izhe4txpw2Fcuy1ART0IAdBAEmQ0hBjuvyXUXU1GFSeWV/Hi6saPL8KcKh0CE7WGmV0w+lgR6LMlvhS5APuae5jD+FclfMp4T4UuO1uUEhq9pF9q4+kfCyx6MaqsIR8l5DPVhOreIUB75wjpjvv/v4SdVGTDrK1g== Received: from MN2PR16CA0057.namprd16.prod.outlook.com (2603:10b6:208:234::26) by DM4PR12MB7670.namprd12.prod.outlook.com (2603:10b6:8:105::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.25; Mon, 27 Feb 2023 07:13:01 +0000 Received: from BL02EPF00010208.namprd05.prod.outlook.com (2603:10b6:208:234:cafe::ec) by MN2PR16CA0057.outlook.office365.com (2603:10b6:208:234::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.29 via Frontend Transport; Mon, 27 Feb 2023 07:13:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by BL02EPF00010208.mail.protection.outlook.com (10.167.241.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6156.12 via Frontend Transport; Mon, 27 Feb 2023 07:13:01 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.36; Sun, 26 Feb 2023 23:12:49 -0800 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, 26 Feb 2023 23:12:46 -0800 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: fix burst mode query with dummy function' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 15:00:17 +0800 Message-ID: <20230227070107.15664-109-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230227070107.15664-1-xuemingl@nvidia.com> References: <20230227062349.13764-1-xuemingl@nvidia.com> <20230227070107.15664-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: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL02EPF00010208:EE_|DM4PR12MB7670:EE_ X-MS-Office365-Filtering-Correlation-Id: 71d82032-e55c-4489-4d54-08db18920fcb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mJro2H6PU4Wknvl1l9U4uVATS3lRwevnc5BQauylOC8y8wPOtDn8UNEDCrIHS9BpmXdhW+6/gNbWPI6Ej28e8ZvkHes6cvdLWyVniZjIFGyOCKYAzkP8x4i7f9yCTxZmZp8mNx/CNt8ci9BenrVRT0zmUqlF/JfwpjDd0Oa3zCjTK7rTJVwlyn9DUTs+vFikCXyhr6WLL7cE0XGImfz3cqo/sqp5V050yPmvf8N56dc0w/dM+tnDa+wikzGHZYPNVCQOJOfscNwq7Go2s2YxXir7+vsVwqeMufk7mTFm2sgYZnML4ne31h85EewqGEEEv6c6MQ6apc6Qz5Y03wZLXFiNuMTVR82B5VnatmvWhPX91hZx2Q/NuHp6hsIT4G33lwLSaGF0cNgiQuQZxSgpWlGNbjmm+IHcpCZGgJ8uPec67QzL5ZapIh3Hgy61T61SBRokYYV7uAUEgKfvCoHRId2LfuCQ0sk4w1rWrl93q2dBOj0eDHLEHmCcRq/HCDy1Oh028v72Vi9jpNDlwAapVm7LOD6ZeBJiUMoPXdzbcmuWhWSnhOIBDjJR356CXl/wQmGNWB55N/ZzEodZuE9NA1wm/9vN+5Bk2qd0k2JcqzBKA2380fDtF61e6e82aIkxfngkRZ43TUdyYGZaIXm5jWwUh7S0A3oByx484Wg+K1akuQQPuEjjPma7mTSKzGAO83awh7F5ahEdix96gAt85U5Cdan/ettnxAtYm3R8pxas+dK8mxVsDisunmW1xbyrlutWX2T4Qn0xBZbD6phYH/XR+wyBg8AaQpkLbvu8Pc4= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230025)(4636009)(136003)(396003)(39860400002)(376002)(346002)(451199018)(36840700001)(46966006)(40470700004)(40460700003)(6286002)(16526019)(186003)(82740400003)(2906002)(7636003)(83380400001)(356005)(8936002)(41300700001)(6916009)(8676002)(4326008)(70586007)(336012)(70206006)(36860700001)(7696005)(40480700001)(55016003)(426003)(478600001)(26005)(53546011)(2616005)(1076003)(6666004)(47076005)(5660300002)(966005)(316002)(36756003)(86362001)(54906003)(82310400005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:13:01.0300 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 71d82032-e55c-4489-4d54-08db18920fcb 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BL02EPF00010208.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7670 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 03/01/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/commit/?h=22.11-staging&id=c6b36e818356bf81a6e4d8b38689603b6e9b21ea Thanks. Xueming Li --- >From c6b36e818356bf81a6e4d8b38689603b6e9b21ea Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Sat, 11 Feb 2023 17:18:25 +0800 Subject: [PATCH] net/hns3: fix burst mode query with dummy function Cc: Xueming Li [ upstream commit 10f91af5a5b370df922f888826a4387abebe1cde ] The rte_eth_rx/tx_burst_mode_get API will fail when Rx/Tx function is dummy. Fixes: 7ef933908f04 ("net/hns3: add simple Tx path") Fixes: 521ab3e93361 ("net/hns3: add simple Rx path") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_rxtx.c | 38 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index f1163ce8a9..feef9e1c7b 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -2786,6 +2786,7 @@ hns3_rx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id, { hns3_recv_scattered_pkts, "Scalar Scattered" }, { hns3_recv_pkts_vec, "Vector Neon" }, { hns3_recv_pkts_vec_sve, "Vector Sve" }, + { rte_eth_pkt_burst_dummy, "Dummy" }, }; eth_rx_burst_t pkt_burst = dev->rx_pkt_burst; @@ -4272,24 +4273,31 @@ int hns3_tx_burst_mode_get(struct rte_eth_dev *dev, __rte_unused uint16_t queue_id, struct rte_eth_burst_mode *mode) { + static const struct { + eth_tx_burst_t pkt_burst; + const char *info; + } burst_infos[] = { + { hns3_xmit_pkts_simple, "Scalar Simple" }, + { hns3_xmit_pkts, "Scalar" }, + { hns3_xmit_pkts_vec, "Vector Neon" }, + { hns3_xmit_pkts_vec_sve, "Vector Sve" }, + { rte_eth_pkt_burst_dummy, "Dummy" }, + }; + eth_tx_burst_t pkt_burst = dev->tx_pkt_burst; - const char *info = NULL; - - if (pkt_burst == hns3_xmit_pkts_simple) - info = "Scalar Simple"; - else if (pkt_burst == hns3_xmit_pkts) - info = "Scalar"; - else if (pkt_burst == hns3_xmit_pkts_vec) - info = "Vector Neon"; - else if (pkt_burst == hns3_xmit_pkts_vec_sve) - info = "Vector Sve"; - - if (info == NULL) - return -EINVAL; + int ret = -EINVAL; + unsigned int i; - snprintf(mode->info, sizeof(mode->info), "%s", info); + for (i = 0; i < RTE_DIM(burst_infos); i++) { + if (pkt_burst == burst_infos[i].pkt_burst) { + snprintf(mode->info, sizeof(mode->info), "%s", + burst_infos[i].info); + ret = 0; + break; + } + } - return 0; + return ret; } static bool -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:44.391761900 +0800 +++ 0110-net-hns3-fix-burst-mode-query-with-dummy-function.patch 2023-02-27 14:08:40.859237000 +0800 @@ -1 +1 @@ -From 10f91af5a5b370df922f888826a4387abebe1cde Mon Sep 17 00:00:00 2001 +From c6b36e818356bf81a6e4d8b38689603b6e9b21ea Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 10f91af5a5b370df922f888826a4387abebe1cde ] @@ -11 +13,0 @@ -Cc: stable@dpdk.org