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 46979A0093 for ; Wed, 9 Mar 2022 05:06:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4882740395; Wed, 9 Mar 2022 05:06:52 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id 01A0440395 for ; Wed, 9 Mar 2022 05:06:50 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 228N54ZW000815 for ; Tue, 8 Mar 2022 20:06:49 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=pfpt0220; bh=Knc8ZCYzxWBTdV3TA2/8suwdIsyAHb6qwTAM+pSvdC8=; b=fZzh+8PMIU/yFLiXH0ydGZT4McDCD2N2VFxBOFx4XbEidguxsum+Wvmdy/mSkzcvTDcH QDAfhfjcWv9vdRSFVQ7hXPRJ/LmuC8PsQ52bGZPv3W0LrE1X/jAVXk092+igkUKcqN6L bLuFgrHC+ITBxI4jdb2IAHb6u1h30tLFSd2Tot/u/Pp8i1l3s5KpsBb3fWl3aysLlxtI 2ru/ak4f17y/JJ2WsiH5z8v3A6MAxC4W6jdqUyJMrNUdluIc6onJp/6MHMibPzqtpzEH qE/ggaB7tvKU/2n1hJKJHuUH12t+/O3BMIDep3PhmufXusVEt8bfjjAlscb9gdFPSjUm gA== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3ep39xdeky-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Tue, 08 Mar 2022 20:06:49 -0800 Received: from DC5-EXCH01.marvell.com (10.69.176.38) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 8 Mar 2022 20:06:48 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH01.marvell.com (10.69.176.38) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Tue, 8 Mar 2022 20:06:48 -0800 Received: from localhost.localdomain (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id 685A53F7053; Tue, 8 Mar 2022 20:06:46 -0800 (PST) From: To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Satheesh Paul Subject: [PATCH 21.11] net/cnxk: fix Rx/Tx function update Date: Wed, 9 Mar 2022 09:36:35 +0530 Message-ID: <20220309040635.2084196-1-psatheesh@marvell.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: RyHNS686VGMMt5_EAnToKEwlm6ArhgdO X-Proofpoint-GUID: RyHNS686VGMMt5_EAnToKEwlm6ArhgdO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.816,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-03-09_01,2022-03-04_01,2022-02-23_01 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 From: Satheesh Paul [ upstream commit 3cebc8f35f541c15a00d27f4f6a7fc7e63e849b1 ] When Rx/Tx functions are updated such as in a rte flow rule creation with VLAN stripping or marking action, update the fastpath ops table as well. Fixes: b951c2efcb15 ("net/cnxk: add Rx burst for CN9K") Fixes: f742a9a66813 ("net/cnxk: add Rx burst for CN10K") Signed-off-by: Satheesh Paul --- drivers/net/cnxk/cn10k_rx.c | 4 ++++ drivers/net/cnxk/cn10k_tx.c | 4 ++++ drivers/net/cnxk/cn9k_rx.c | 4 ++++ drivers/net/cnxk/cn9k_tx.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/drivers/net/cnxk/cn10k_rx.c b/drivers/net/cnxk/cn10k_rx.c index 5d603514c0..94b0dfcde7 100644 --- a/drivers/net/cnxk/cn10k_rx.c +++ b/drivers/net/cnxk/cn10k_rx.c @@ -31,6 +31,10 @@ pick_rx_func(struct rte_eth_dev *eth_dev, [!!(dev->rx_offload_flags & NIX_RX_OFFLOAD_PTYPE_F)] [!!(dev->rx_offload_flags & NIX_RX_OFFLOAD_RSS_F)]; + if (eth_dev->data->dev_started) + rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = + eth_dev->rx_pkt_burst; + rte_atomic_thread_fence(__ATOMIC_RELEASE); } diff --git a/drivers/net/cnxk/cn10k_tx.c b/drivers/net/cnxk/cn10k_tx.c index 5e6c5ee111..4e1abf7804 100644 --- a/drivers/net/cnxk/cn10k_tx.c +++ b/drivers/net/cnxk/cn10k_tx.c @@ -37,6 +37,10 @@ pick_tx_func(struct rte_eth_dev *eth_dev, [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_VLAN_QINQ_F)] [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_OL3_OL4_CSUM_F)] [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_L3_L4_CSUM_F)]; + + if (eth_dev->data->dev_started) + rte_eth_fp_ops[eth_dev->data->port_id].tx_pkt_burst = + eth_dev->tx_pkt_burst; } void diff --git a/drivers/net/cnxk/cn9k_rx.c b/drivers/net/cnxk/cn9k_rx.c index 8d504c4a6d..60baf10b39 100644 --- a/drivers/net/cnxk/cn9k_rx.c +++ b/drivers/net/cnxk/cn9k_rx.c @@ -31,6 +31,10 @@ pick_rx_func(struct rte_eth_dev *eth_dev, [!!(dev->rx_offload_flags & NIX_RX_OFFLOAD_PTYPE_F)] [!!(dev->rx_offload_flags & NIX_RX_OFFLOAD_RSS_F)]; + if (eth_dev->data->dev_started) + rte_eth_fp_ops[eth_dev->data->port_id].rx_pkt_burst = + eth_dev->rx_pkt_burst; + rte_atomic_thread_fence(__ATOMIC_RELEASE); } diff --git a/drivers/net/cnxk/cn9k_tx.c b/drivers/net/cnxk/cn9k_tx.c index f3f19fed97..f560286c97 100644 --- a/drivers/net/cnxk/cn9k_tx.c +++ b/drivers/net/cnxk/cn9k_tx.c @@ -36,6 +36,10 @@ pick_tx_func(struct rte_eth_dev *eth_dev, [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_VLAN_QINQ_F)] [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_OL3_OL4_CSUM_F)] [!!(dev->tx_offload_flags & NIX_TX_OFFLOAD_L3_L4_CSUM_F)]; + + if (eth_dev->data->dev_started) + rte_eth_fp_ops[eth_dev->data->port_id].tx_pkt_burst = + eth_dev->tx_pkt_burst; } void -- 2.25.4