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 262E04590C; Thu, 5 Sep 2024 11:29:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 595A342E57; Thu, 5 Sep 2024 11:29:31 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id E92C342E5B for ; Thu, 5 Sep 2024 11:29:27 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.162.254]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WzvDv2gnszyRWN; Thu, 5 Sep 2024 17:28:47 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id 74FB51800FE; Thu, 5 Sep 2024 17:29:26 +0800 (CST) Received: from localhost.localdomain (10.50.165.33) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Thu, 5 Sep 2024 17:29:26 +0800 From: Chengwen Feng To: , , , , Jie Hai , Yisen Zhuang CC: , , , Subject: [PATCH v4 2/7] net/hns3: replace fp ops config function Date: Thu, 5 Sep 2024 09:24:59 +0000 Message-ID: <20240905092504.10725-3-fengchengwen@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240905092504.10725-1-fengchengwen@huawei.com> References: <20230301030610.49468-1-fengchengwen@huawei.com> <20240905092504.10725-1-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.50.165.33] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org This patch replace hns3_eth_dev_fp_ops_config() with rte_eth_fp_ops_setup(). Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Acked-by: Dongdong Liu Acked-by: Konstantin Ananyev Acked-by: Huisong Li --- drivers/net/hns3/hns3_rxtx.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx.c b/drivers/net/hns3/hns3_rxtx.c index 5941b966e0..a879a33519 100644 --- a/drivers/net/hns3/hns3_rxtx.c +++ b/drivers/net/hns3/hns3_rxtx.c @@ -4389,21 +4389,6 @@ hns3_trace_rxtx_function(struct rte_eth_dev *dev) rx_mode.info, tx_mode.info); } -static void -hns3_eth_dev_fp_ops_config(const struct rte_eth_dev *dev) -{ - struct rte_eth_fp_ops *fpo = rte_eth_fp_ops; - uint16_t port_id = dev->data->port_id; - - fpo[port_id].rx_pkt_burst = dev->rx_pkt_burst; - fpo[port_id].tx_pkt_burst = dev->tx_pkt_burst; - fpo[port_id].tx_pkt_prepare = dev->tx_pkt_prepare; - fpo[port_id].rx_descriptor_status = dev->rx_descriptor_status; - fpo[port_id].tx_descriptor_status = dev->tx_descriptor_status; - fpo[port_id].rxq.data = dev->data->rx_queues; - fpo[port_id].txq.data = dev->data->tx_queues; -} - void hns3_set_rxtx_function(struct rte_eth_dev *eth_dev) { @@ -4426,7 +4411,7 @@ hns3_set_rxtx_function(struct rte_eth_dev *eth_dev) } hns3_trace_rxtx_function(eth_dev); - hns3_eth_dev_fp_ops_config(eth_dev); + rte_eth_fp_ops_setup(eth_dev); } void @@ -4779,7 +4764,7 @@ hns3_stop_tx_datapath(struct rte_eth_dev *dev) { dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; dev->tx_pkt_prepare = NULL; - hns3_eth_dev_fp_ops_config(dev); + rte_eth_fp_ops_setup(dev); if (rte_eal_process_type() == RTE_PROC_SECONDARY) return; @@ -4796,7 +4781,7 @@ hns3_start_tx_datapath(struct rte_eth_dev *dev) { 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); + rte_eth_fp_ops_setup(dev); if (rte_eal_process_type() == RTE_PROC_SECONDARY) return; -- 2.17.1