patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH 21.11] net/cnxk: fix Rx/Tx function update
@ 2022-03-09  4:06 psatheesh
  2022-03-10 12:18 ` Kevin Traynor
  0 siblings, 1 reply; 3+ messages in thread
From: psatheesh @ 2022-03-09  4:06 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: stable, Satheesh Paul

From: Satheesh Paul <psatheesh@marvell.com>

[ 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 <psatheesh@marvell.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH 21.11] net/cnxk: fix Rx/Tx function update
@ 2022-03-03  6:16 psatheesh
  0 siblings, 0 replies; 3+ messages in thread
From: psatheesh @ 2022-03-03  6:16 UTC (permalink / raw)
  To: Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao
  Cc: stable, Satheesh Paul

From: Satheesh Paul <psatheesh@marvell.com>

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 <psatheesh@marvell.com>
---
 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-10 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-09  4:06 [PATCH 21.11] net/cnxk: fix Rx/Tx function update psatheesh
2022-03-10 12:18 ` Kevin Traynor
  -- strict thread matches above, loose matches on Subject: below --
2022-03-03  6:16 psatheesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).