Skip to contentSkip to conversation

net/axgbe: add multi-process support

PATCH Applied Jesna K E 2 participants 2 messages Jan 4, 2023 Network drivers

lore
Share & tools
lore

Jesna K E

author
#0 lore raw

PATCH v2 1/1 net/axgbe: add multi-process support

Added multi-process support for axgbe PMD
To achieve multi-process support separate out TX and RX function inside the axgbe driver and call that from a secondary process when it is attaching to an already-configured NIC

---
 .mailmap                               |  1 +
 doc/guides/nics/features/axgbe.ini     |  1 +
 doc/guides/rel_notes/release_23_03.rst |  2 +
 drivers/net/axgbe/axgbe_ethdev.c       | 62 ++++++++++++++++++++------
 drivers/net/axgbe/axgbe_rxtx.c         | 11 -----
 drivers/net/axgbe/axgbe_rxtx.h         |  5 +++
 6 files changed, 57 insertions(+), 25 deletions(-)
.mailmap +1 -0
index 75884b6fe2..a153c9ab93 100644
@@ -581,6 +581,7 @@ Jerome Jutteau <[email protected]>
 Jerry Hao OS <[email protected]>
 Jerry Lilijun <[email protected]>
 Jerry Zhang <[email protected]>
+Jesna K E <[email protected]>
 Jesper Wramberg <[email protected]>
 Jesse Brandeburg <[email protected]>
 Jesse Bruni <[email protected]>
doc/guides/nics/features/axgbe.ini +1 -0
index 821bb682d4..5e2d6498e5 100644
@@ -18,6 +18,7 @@ L3 checksum offload  = Y
 L4 checksum offload  = Y
 Basic stats          = Y
 FW version           = Y
+Multiprocess aware   = Y
 Linux                = Y
 x86-32               = Y
 x86-64               = Y
doc/guides/rel_notes/release_23_03.rst +2 -0
index b8c5b68d6c..92ec1e4b88 100644
@@ -55,6 +55,8 @@ New Features
      Also, make sure to start the actual text at the margin.
      =======================================================
 
+* **Added multi-process support for axgbe PMD.**
+
 
 Removed Items
 -------------
drivers/net/axgbe/axgbe_ethdev.c +48 -14

91 lines not on this page · raw message

drivers/net/axgbe/axgbe_rxtx.c +0 -11
index 7cff79e030..9b283bd9d0 100644
@@ -629,17 +629,6 @@ int axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t queue_idx,
 				RTE_ETH_TX_OFFLOAD_MULTI_SEGS))
 		pdata->multi_segs_tx = true;
 
-	if (pdata->multi_segs_tx)
-		dev->tx_pkt_burst = &axgbe_xmit_pkts_seg;
-	else if (txq->vector_disable ||
-			rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_128)
-		dev->tx_pkt_burst = &axgbe_xmit_pkts;
-	else
-#ifdef RTE_ARCH_X86
-		dev->tx_pkt_burst = &axgbe_xmit_pkts_vec;
-#else
-		dev->tx_pkt_burst = &axgbe_xmit_pkts;
-#endif
 
 	return 0;
 }
drivers/net/axgbe/axgbe_rxtx.h +5 -0
index eeef908ceb..1dceb76606 100644
@@ -158,6 +158,11 @@ struct axgbe_tx_queue {
  * RX/TX function prototypes
  */
 
+/* Used in dev_start by primary process and then
+ * in dev_init by secondary process when attaching to an existing ethdev.
+ */
+void axgbe_set_tx_function(struct rte_eth_dev *dev);
+void axgbe_set_rx_function(struct rte_eth_dev *dev);
 
 void axgbe_dev_tx_queue_release(struct rte_eth_dev *dev, uint16_t queue_idx);
 int  axgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
Signature · 1 line
2.25.1
Reviewed-by on v2 1/1 Applied
#1 lore raw
Quoted 6 lines · Jesna K E

Added multi-process support for axgbe PMD
To achieve multi-process support separate out TX and RX function inside the axgbe driver and call that from a secondary process when it is attaching to an already-configured NIC

Applied to dpdk-next-net/main, thanks.