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 67B4F4324A; Wed, 1 Nov 2023 04:48:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 538A8402CF; Wed, 1 Nov 2023 04:48:10 +0100 (CET) Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by mails.dpdk.org (Postfix) with ESMTP id C7A8C402B0 for ; Wed, 1 Nov 2023 04:48:08 +0100 (CET) Received: from kwepemm000004.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SKtCh5pYXzPnvX; Wed, 1 Nov 2023 11:44:00 +0800 (CST) Received: from [10.67.121.59] (10.67.121.59) by kwepemm000004.china.huawei.com (7.193.23.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Wed, 1 Nov 2023 11:48:04 +0800 Message-ID: <2e8c0440-cc0e-1fee-40f9-c0befe12b717@huawei.com> Date: Wed, 1 Nov 2023 11:48:03 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [PATCH v2 4/7] net/bnxt: use fp ops setup function To: Chengwen Feng , , , , , Somnath Kotur CC: , , , References: <20230301030610.49468-1-fengchengwen@huawei.com> <20231020100746.31520-1-fengchengwen@huawei.com> <20231020100746.31520-5-fengchengwen@huawei.com> From: "lihuisong (C)" In-Reply-To: <20231020100746.31520-5-fengchengwen@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.121.59] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm000004.china.huawei.com (7.193.23.18) X-CFilter-Loop: Reflected 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 +1 use new api to modify rte_eth_fp_ops[] Acked-by: Huisong Li 在 2023/10/20 18:07, Chengwen Feng 写道: > Use rte_eth_fp_ops_setup() instead of directly manipulating > rte_eth_fp_ops variable. > > Cc: stable@dpdk.org > > Signed-off-by: Chengwen Feng > --- > 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 d8947d5b5f..3a08028331 100644 > --- a/drivers/net/bnxt/bnxt_cpr.c > +++ b/drivers/net/bnxt/bnxt_cpr.c > @@ -416,10 +416,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 003a6eec11..9d9b9ae8cf 100644 > --- a/drivers/net/bnxt/bnxt_ethdev.c > +++ b/drivers/net/bnxt/bnxt_ethdev.c > @@ -4428,10 +4428,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",