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 67AEA4590C; Thu, 5 Sep 2024 11:29:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8D37142E70; Thu, 5 Sep 2024 11:29:32 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 36DED42E6D for ; Thu, 5 Sep 2024 11:29:29 +0200 (CEST) Received: from mail.maildlp.com (unknown [172.19.163.174]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4Wzv7w30Vkz69XX; Thu, 5 Sep 2024 17:24:28 +0800 (CST) Received: from dggpeml500024.china.huawei.com (unknown [7.185.36.10]) by mail.maildlp.com (Postfix) with ESMTPS id EF7D91400D1; 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: , , , , Somnath Kotur CC: , , , Subject: [PATCH v4 4/7] net/bnxt: use fp ops setup function Date: Thu, 5 Sep 2024 09:25:01 +0000 Message-ID: <20240905092504.10725-5-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 Use rte_eth_fp_ops_setup() instead of directly manipulating rte_eth_fp_ops variable. Cc: stable@dpdk.org Signed-off-by: Chengwen Feng Acked-by: Konstantin Ananyev Acked-by: Ajit Khaparde Acked-by: Huisong Li --- drivers/net/bnxt/bnxt_cpr.c | 5 +---- drivers/net/bnxt/bnxt_ethdev.c | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c index 1da0fc62f4..dab8a5a158 100644 --- a/drivers/net/bnxt/bnxt_cpr.c +++ b/drivers/net/bnxt/bnxt_cpr.c @@ -440,10 +440,7 @@ void bnxt_stop_rxtx(struct rte_eth_dev *eth_dev) eth_dev->rx_pkt_burst = rte_eth_pkt_burst_dummy; eth_dev->tx_pkt_burst = rte_eth_pkt_burst_dummy; - rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = - eth_dev->rx_pkt_burst; - rte_eth_fp_ops[eth_dev->data->port_id].tx_pkt_burst = - eth_dev->tx_pkt_burst; + rte_eth_fp_ops_setup(eth_dev); rte_mb(); /* Allow time for threads to exit the real burst functions. */ diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 2813ce5035..e1507474e5 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -4550,10 +4550,7 @@ static void bnxt_dev_recover(void *arg) if (rc) goto err_start; - rte_eth_fp_ops[bp->eth_dev->data->port_id].rx_pkt_burst = - bp->eth_dev->rx_pkt_burst; - rte_eth_fp_ops[bp->eth_dev->data->port_id].tx_pkt_burst = - bp->eth_dev->tx_pkt_burst; + rte_eth_fp_ops_setup(bp->eth_dev); rte_mb(); PMD_DRV_LOG(INFO, "Port: %u Recovered from FW reset\n", -- 2.17.1