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 860C9A04A2 for ; Thu, 3 Mar 2022 07:16:25 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 54E5F40141; Thu, 3 Mar 2022 07:16:25 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 5594C40141 for ; Thu, 3 Mar 2022 07:16:23 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 2233tob3004026 for ; Wed, 2 Mar 2022 22:16:22 -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=fYQPqAsnPmr5i8HszEK1YTfhVHztk+U8NuIT0DCjYPA=; b=ap2UXMkustBfzRp3SXec353Mmt+MR+a5SW2x/qmLQ3frf81G5Id4DSpHUl9Dk2hWNoQn x6gDZzlnsWps0OfrPOw0TSHzvLpSgRwk0I3hWCj4M1rECK2pJAhtDlBlywQarezPzqTf NAsK/PYhQr/TfSVdLufobsdOTWioJDXTYsN1N4QT+n50hUoiDQ6ygAjEaHgwU0diQMcz bo0ij20LT67phMHDVrrWCelnOAt6scMm7zTiyyRJ4OUwrxLy/Ua98or4tfVYUf7u6575 +CDYtpVMiVZ1a7xAaHbBsq8uphljh9OrtOwpLz9c7kFDSLM1dpugvXggymhKnPb9VzqB fw== Received: from dc5-exch01.marvell.com ([199.233.59.181]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3ej4vfde7w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 02 Mar 2022 22:16:21 -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; Wed, 2 Mar 2022 22:16:19 -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; Wed, 2 Mar 2022 22:16:19 -0800 Received: from localhost.localdomain (unknown [10.28.34.33]) by maili.marvell.com (Postfix) with ESMTP id 704465B694B; Wed, 2 Mar 2022 22:16:17 -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: Thu, 3 Mar 2022 11:46:01 +0530 Message-ID: <20220303061601.2045026-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: ySeau10NgZ35yh_i-Z0WN1U9PjAEFfJO X-Proofpoint-GUID: ySeau10NgZ35yh_i-Z0WN1U9PjAEFfJO 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-03_02,2022-02-26_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 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