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 2DE9041D8D for ; Mon, 27 Feb 2023 08:13:34 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2904B410DC; Mon, 27 Feb 2023 08:13:34 +0100 (CET) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2061.outbound.protection.outlook.com [40.107.212.61]) by mails.dpdk.org (Postfix) with ESMTP id 04D9940A84 for ; Mon, 27 Feb 2023 08:13:32 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Bczitdj1z9YJNtodgFyFPzAi+MPy7wXwcFK0C47fxIqXAldUt8h+HL0YnfP7paXLWdZcmbqCgoXiutSKTZb1pdfG6H8cz86Wp3li5DvPC7t1tPPgAA9ZRRzq0AgEbiG1uG0xHIBMK3/AMmGPadTkSZYa4IuS2HEGruQ56Iok9o1XQjDtwnAE0iIyiHz9Jxyvw47Of/NLdSJm7DGwUqqe0cNUZlPbrb0zJnbLxrpv9GTYT9mW0Kjq4OhslAV1vEY1JGq8oA7KWuUMZSirk7nL/WemiL0dL7cotb+1z3M1n7OsVY3sbSVrfRxZqEyr7Vg2SkQFkzRGx8U9pQ2j+xLI+g== 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=ACFJjR+Z2uBy2y6UygkE+u7a5Ggh+nNwEiD/j3OoD3I=; b=iC5gLkvfE+kBOvvoxNNSzcZd2IlDG5k6h5sKT58Rg0PE5W2DvNlECawh6PeXvJIvgTvZuIlMpK1j7TtCSUHomw1azF9O302b4Z610MPxTVDMLpvNnLw/iza7dDZwozACh595WcnsJwad4wWwZYSU27qHuWMyKaFaR0zmFZ+7+xcbZw4uH/syyI8swyaZbJboGXGXT3qA4hS301bPFV1OXSxLz8AxHqjMtl5x8snNcdB/GBG2e9/R2GGGbObX5hOZ1thqCm/BzG8Sluo3YcEDQaC+uZG0RipUVbelCpmJrIQAYBnShCzEdW+2RMIgXKTzLNAma4/kiAvmA/hwj1rTFQ== 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=ACFJjR+Z2uBy2y6UygkE+u7a5Ggh+nNwEiD/j3OoD3I=; b=rKeqfidh1xHBKKW/Ixvuebzv8yXZ1lclp1HiabXhHR8JYNCd8VtoVyqjLPateDgKMFfb86n2U29Pkfmnp7+8Gn4oDTuk3jR6ntLqVrgdIHNVTMg5yQKUE3oAD5OH8V3sp7dWAXXEFaUzuw4X0eJzUMMHwltwE8cSlkNuuE7Lmr8o4hEqjo2Qh2M0P7EM5v1cvzTfjwAAc9NaEcQRZt4yY4BkTZ3eDbGap+jbjTZ1kcr1TfskQvUgNiVubh2s63TVDBNJ/eqCk5ecfdZgbcFTXc2n57K4ehDIt64amVumP3104ucfCooOSdCHABRNTYsEVkp1jeNqVx52MOgcqOs/MA== Received: from MN2PR20CA0029.namprd20.prod.outlook.com (2603:10b6:208:e8::42) by BL3PR12MB6619.namprd12.prod.outlook.com (2603:10b6:208:38e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.26; Mon, 27 Feb 2023 07:13:30 +0000 Received: from BL02EPF00010206.namprd05.prod.outlook.com (2603:10b6:208:e8:cafe::fc) by MN2PR20CA0029.outlook.office365.com (2603:10b6:208:e8::42) 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:30 +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 BL02EPF00010206.mail.protection.outlook.com (10.167.241.196) 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:30 +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:13:17 -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:13:14 -0800 From: Xueming Li To: Huisong Li CC: Dongdong Liu , dpdk stable Subject: patch 'net/hns3: separate Tx prepare from getting Tx function' has been queued to stable release 22.11.2 Date: Mon, 27 Feb 2023 15:00:20 +0800 Message-ID: <20230227070107.15664-112-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: BL02EPF00010206:EE_|BL3PR12MB6619:EE_ X-MS-Office365-Filtering-Correlation-Id: 052e7e79-6572-4be8-aea8-08db18922118 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1NmOSiyzHRLDw4l3RgvxcihhvEorBVlMC06otUI+O7ZPn85CdO5ZdBZNvFxgjXBxFcTqhUjhzky9vYZdYIowjn9h2M3Mk06sdvBUDbyYWtlTshXWwG6G3kTziVFnCwYKmB+f6JuQQ6vCUui4vjMRQ0itsOeLUzANrHpeF/znfa/UNV5ZdGDDPAroY93gonQqr6TQPI14da185fA4j23kAwTm4LDpksrVz27qDrLGgR5gocIFkaZYZfKiscmPzIKwq0TO1Kf9OWapd3/HeKgFvvXAo2h/pZJTL8ybGlZaYkrhPAPxKmghN4KMGWd7EiVDPlJOsJTEWi1u1lCiorwn6AEPGO03Hu2n60kimTdAtnyTAdL1hTpkovImuVsSP/0e8bF5VpfhKSGDqomgj3FbNS3jWvgpUZrfWweEeec5TaUS/jlJslyD/aRx2e0q2MtlRVS6IGxDaF8VyBblIXYZzfVQMxifc9uokzR58cwHAjufNmn+hqBm/1eMVQ48y/cpmLvuh+I0iD+W22aWov6FjtKzCpwHUSsNX3nxUf72pWSm+niPXFsfTcMvC6cg6Y2x0cYb3jrJSmk7WD3uGRmqi9Z69Js3LmN3itOcHCC095oujhvVz+PLApziZ0gn5X40DAn46cS7P2omK5hwaFlCYPVXPTGoM2CBjpZpSBZ86WlTg0k3OqR3FD+JvO/rTqKrimLzavAhYI5naxtYpdH/XvBoDZR3urM+aLYs9151MWWFEN2SQ7/auOfxc24hSQQe3Iay4GJXdx1WhcxVfdpBOg== 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)(39860400002)(396003)(136003)(376002)(346002)(451199018)(36840700001)(46966006)(40470700004)(82310400005)(26005)(478600001)(7696005)(70206006)(70586007)(8676002)(4326008)(41300700001)(6916009)(356005)(8936002)(40480700001)(40460700003)(55016003)(36756003)(86362001)(186003)(53546011)(966005)(2616005)(16526019)(82740400003)(7636003)(336012)(6666004)(1076003)(47076005)(426003)(2906002)(316002)(54906003)(5660300002)(6286002)(83380400001)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2023 07:13:30.0739 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 052e7e79-6572-4be8-aea8-08db18922118 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: BL02EPF00010206.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6619 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=1df48cce5e848e1f042ee6ee48cc52f57f8d0878 Thanks. Xueming Li --- >From 1df48cce5e848e1f042ee6ee48cc52f57f8d0878 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Sat, 11 Feb 2023 17:18:28 +0800 Subject: [PATCH] net/hns3: separate Tx prepare from getting Tx function Cc: Xueming Li [ upstream commit 6a934ba4c6c48691b119a878981a4e3748766518 ] Separate getting tx prepare from hns3_get_tx_function by extracting an independent function. Fixes: d7ec2c076579 ("net/hns3: select Tx prepare based on Tx offload") Signed-off-by: Huisong Li Signed-off-by: Dongdong Liu --- drivers/net/hns3/hns3_rxtx.c | 32 ++++++++++++++------------------ drivers/net/hns3/hns3_rxtx.h | 3 +-- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 921d72d69d..9b2bd02857 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -4324,26 +4324,30 @@ hns3_get_tx_prep_needed(struct rte_eth_dev *dev) RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO) uint64_t tx_offload = dev->data->dev_conf.txmode.offloads; + if (tx_offload & HNS3_DEV_TX_CSKUM_TSO_OFFLOAD_MASK) return true; return false; } +static eth_tx_prep_t +hns3_get_tx_prepare(struct rte_eth_dev *dev) +{ + return hns3_get_tx_prep_needed(dev) ? hns3_prep_pkts : NULL; +} + eth_tx_burst_t -hns3_get_tx_function(struct rte_eth_dev *dev, eth_tx_prep_t *prep) +hns3_get_tx_function(struct rte_eth_dev *dev) { struct hns3_adapter *hns = dev->data->dev_private; bool vec_allowed, sve_allowed, simple_allowed; - bool vec_support, tx_prepare_needed; + bool vec_support; vec_support = hns3_tx_check_vec_support(dev) == 0; vec_allowed = vec_support && hns3_get_default_vec_support(); sve_allowed = vec_support && hns3_get_sve_support(); simple_allowed = hns3_tx_check_simple_support(dev); - tx_prepare_needed = hns3_get_tx_prep_needed(dev); - - *prep = NULL; if (hns->tx_func_hint == HNS3_IO_FUNC_HINT_VEC && vec_allowed) return hns3_xmit_pkts_vec; @@ -4351,19 +4355,14 @@ hns3_get_tx_function(struct rte_eth_dev *dev, eth_tx_prep_t *prep) return hns3_xmit_pkts_vec_sve; if (hns->tx_func_hint == HNS3_IO_FUNC_HINT_SIMPLE && simple_allowed) return hns3_xmit_pkts_simple; - if (hns->tx_func_hint == HNS3_IO_FUNC_HINT_COMMON) { - if (tx_prepare_needed) - *prep = hns3_prep_pkts; + if (hns->tx_func_hint == HNS3_IO_FUNC_HINT_COMMON) return hns3_xmit_pkts; - } if (vec_allowed) return hns3_xmit_pkts_vec; if (simple_allowed) return hns3_xmit_pkts_simple; - if (tx_prepare_needed) - *prep = hns3_prep_pkts; return hns3_xmit_pkts; } @@ -4403,7 +4402,6 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev) { struct hns3_hw *hw = HNS3_DEV_PRIVATE_TO_HW(eth_dev->data->dev_private); struct hns3_adapter *hns = eth_dev->data->dev_private; - eth_tx_prep_t prep = NULL; if (hns->hw.adapter_state == HNS3_NIC_STARTED && __atomic_load_n(&hns->hw.reset.resetting, __ATOMIC_RELAXED) == 0) { @@ -4411,8 +4409,8 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev) eth_dev->rx_descriptor_status = hns3_dev_rx_descriptor_status; eth_dev->tx_pkt_burst = hw->set_link_down ? rte_eth_pkt_burst_dummy : - hns3_get_tx_function(eth_dev, &prep); - eth_dev->tx_pkt_prepare = prep; + hns3_get_tx_function(eth_dev); + eth_dev->tx_pkt_prepare = hns3_get_tx_prepare(eth_dev); eth_dev->tx_descriptor_status = hns3_dev_tx_descriptor_status; } else { eth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; @@ -4758,10 +4756,8 @@ hns3_stop_tx_datapath(struct rte_eth_dev *dev) void hns3_start_tx_datapath(struct rte_eth_dev *dev) { - eth_tx_prep_t prep = NULL; - - dev->tx_pkt_burst = hns3_get_tx_function(dev, &prep); - dev->tx_pkt_prepare = prep; + dev->tx_pkt_burst = hns3_get_tx_function(dev); + dev->tx_pkt_prepare = hns3_get_tx_prepare(dev); hns3_eth_dev_fp_ops_config(dev); if (rte_eal_process_type() == RTE_PROC_SECONDARY) diff --git a/drivers/net/hns3/hns3_rxtx.h b/drivers/net/hns3/hns3_rxtx.h index ea1a805491..38c3581312 100644 --- a/drivers/net/hns3/hns3_rxtx.h +++ b/drivers/net/hns3/hns3_rxtx.h @@ -740,8 +740,7 @@ int hns3_tx_burst_mode_get(struct rte_eth_dev *dev, const uint32_t *hns3_dev_supported_ptypes_get(struct rte_eth_dev *dev); void hns3_init_rx_ptype_tble(struct rte_eth_dev *dev); void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev); -eth_tx_burst_t hns3_get_tx_function(struct rte_eth_dev *dev, - eth_tx_prep_t *prep); +eth_tx_burst_t hns3_get_tx_function(struct rte_eth_dev *dev); uint32_t hns3_get_tqp_intr_reg_offset(uint16_t tqp_intr_id); void hns3_set_queue_intr_gl(struct hns3_hw *hw, uint16_t queue_id, -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2023-02-27 14:08:44.488539800 +0800 +++ 0113-net-hns3-separate-Tx-prepare-from-getting-Tx-functio.patch 2023-02-27 14:08:40.859237000 +0800 @@ -1 +1 @@ -From 6a934ba4c6c48691b119a878981a4e3748766518 Mon Sep 17 00:00:00 2001 +From 1df48cce5e848e1f042ee6ee48cc52f57f8d0878 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 6a934ba4c6c48691b119a878981a4e3748766518 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org