Skip to contentSkip to conversation

ethdev: remove legacy descriptor status check API

PATCH Superseded Ferruh Yigit 7 participants 60 messages Aug 24, 2020 – Jan 11, 2021 Page 1 of 2

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/7 ethdev: remove legacy descriptor status check API

Removing 'rte_eth_rx_descriptor_done()' API and relevant 'rx_descriptor_done' function pointer from 'struct eth_dev_ops'.

Deprecation notice is to deprecate the API in 20.11 and remove one year later, this is useful to prevent new applications use the API but keep the support for old application. But since 20.11 have the ABI break and most of the applications need to re-compile anyway will prevent them to use the API, the affect will be same as removing the API. So removing it in the 20.11 to reduce the churn.

'rx_descriptor_done' implementations removed from PMDs.

---
 doc/guides/nics/features.rst            |  6 +-----
 doc/guides/rel_notes/deprecation.rst    |  5 -----
 drivers/net/e1000/e1000_ethdev.h        |  4 ----
 drivers/net/e1000/em_ethdev.c           |  1 -
 drivers/net/e1000/em_rxtx.c             | 17 ----------------
 drivers/net/e1000/igb_ethdev.c          |  2 --
 drivers/net/e1000/igb_rxtx.c            | 17 ----------------
 drivers/net/enic/enic_ethdev.c          |  1 -
 drivers/net/fm10k/fm10k.h               |  3 ---
 drivers/net/fm10k/fm10k_ethdev.c        |  1 -
 drivers/net/fm10k/fm10k_rxtx.c          | 25 ------------------------
 drivers/net/i40e/i40e_ethdev.c          |  1 -
 drivers/net/i40e/i40e_ethdev_vf.c       |  1 -
 drivers/net/i40e/i40e_rxtx.c            | 26 -------------------------
 drivers/net/i40e/i40e_rxtx.h            |  1 -
 drivers/net/igc/igc_ethdev.c            |  1 -
 drivers/net/igc/igc_txrx.c              | 18 -----------------
 drivers/net/igc/igc_txrx.h              |  2 --
 drivers/net/ixgbe/ixgbe_ethdev.c        |  2 --
 drivers/net/ixgbe/ixgbe_ethdev.h        |  2 --
 drivers/net/ixgbe/ixgbe_rxtx.c          | 18 -----------------
 drivers/net/octeontx2/otx2_ethdev.c     |  1 -
 drivers/net/octeontx2/otx2_ethdev.h     |  1 -
 drivers/net/octeontx2/otx2_ethdev_ops.c | 12 ------------
 drivers/net/sfc/sfc_ethdev.c            | 17 ----------------
 drivers/net/virtio/virtio_ethdev.c      |  1 -
 drivers/net/virtio/virtio_ethdev.h      |  2 --
 drivers/net/virtio/virtio_rxtx.c        |  9 ---------
 lib/librte_ethdev/rte_ethdev.h          | 25 ------------------------
 lib/librte_ethdev/rte_ethdev_core.h     |  4 ----
 30 files changed, 1 insertion(+), 225 deletions(-)
doc/guides/nics/features.rst +1 -5
index edd21c4d8e..701c592b26 100644
@@ -642,14 +642,10 @@ Rx descriptor status
 --------------------
 
 Supports check the status of a Rx descriptor. When ``rx_descriptor_status`` is
-used, status can be "Available", "Done" or "Unavailable". When
-``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is
-not set".
+used, status can be "Available", "Done" or "Unavailable".
 
 * **[implements] eth_dev_ops**: ``rx_descriptor_status``.
 * **[related]    API**: ``rte_eth_rx_descriptor_status()``.
-* **[implements] eth_dev_ops**: ``rx_descriptor_done``.
-* **[related]    API**: ``rte_eth_rx_descriptor_done()``.
 
 
 .. _nic_features_tx_descriptor_status:
doc/guides/rel_notes/deprecation.rst +0 -5
index 345c38d5b6..811eaad6ce 100644
@@ -220,11 +220,6 @@ Deprecation Notices
   for HW. This change is planned for 20.11. For more details:
   https://mails.dpdk.org/archives/dev/2020-July/176135.html.
 
-* ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done``
-  will be deprecated in 20.11 and will be removed in 21.11.
-  Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status``
-  APIs can be used as replacement.
-
 * ethdev: The port mirroring API can be replaced with a more fine grain flow API.
   The structs ``rte_eth_mirror_conf``, ``rte_eth_vlan_mirror`` and the functions
   ``rte_eth_mirror_rule_set``, ``rte_eth_mirror_rule_reset`` will be marked
drivers/net/e1000/e1000_ethdev.h +0 -4
index 1e41ae9de1..dce365226b 100644
@@ -384,8 +384,6 @@ int eth_igb_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 uint32_t eth_igb_rx_queue_count(struct rte_eth_dev *dev,
 		uint16_t rx_queue_id);
 
-int eth_igb_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int eth_igb_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int eth_igb_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
@@ -461,8 +459,6 @@ int eth_em_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 uint32_t eth_em_rx_queue_count(struct rte_eth_dev *dev,
 		uint16_t rx_queue_id);
 
-int eth_em_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int eth_em_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int eth_em_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
drivers/net/e1000/em_ethdev.c +0 -1
index 902b1cdca0..32872db9c2 100644
@@ -177,7 +177,6 @@ static const struct eth_dev_ops eth_em_ops = {
 	.rx_queue_setup       = eth_em_rx_queue_setup,
 	.rx_queue_release     = eth_em_rx_queue_release,
 	.rx_queue_count       = eth_em_rx_queue_count,
-	.rx_descriptor_done   = eth_em_rx_descriptor_done,
 	.rx_descriptor_status = eth_em_rx_descriptor_status,
 	.tx_descriptor_status = eth_em_tx_descriptor_status,
 	.tx_queue_setup       = eth_em_tx_queue_setup,
drivers/net/e1000/em_rxtx.c +0 -17
index 67a271e8ce..2ffc31b41d 100644
@@ -1511,23 +1511,6 @@ eth_em_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-eth_em_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile struct e1000_rx_desc *rxdp;
-	struct em_rx_queue *rxq = rx_queue;
-	uint32_t desc;
-
-	if (unlikely(offset >= rxq->nb_rx_desc))
-		return 0;
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &rxq->rx_ring[desc];
-	return !!(rxdp->status & E1000_RXD_STAT_DD);
-}
-
 int
 eth_em_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/e1000/igb_ethdev.c +0 -2
index a5551e8175..aec79c6ceb 100644
@@ -381,7 +381,6 @@ static const struct eth_dev_ops eth_igb_ops = {
 	.rx_queue_intr_disable = eth_igb_rx_queue_intr_disable,
 	.rx_queue_release     = eth_igb_rx_queue_release,
 	.rx_queue_count       = eth_igb_rx_queue_count,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
 	.rx_descriptor_status = eth_igb_rx_descriptor_status,
 	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
@@ -441,7 +440,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {
 	.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
 	.rx_queue_setup       = eth_igb_rx_queue_setup,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
 	.rx_descriptor_status = eth_igb_rx_descriptor_status,
 	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
drivers/net/e1000/igb_rxtx.c +0 -17
index dd520cd82c..d313893c3a 100644
@@ -1791,23 +1791,6 @@ eth_igb_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-eth_igb_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union e1000_adv_rx_desc *rxdp;
-	struct igb_rx_queue *rxq = rx_queue;
-	uint32_t desc;
-
-	if (unlikely(offset >= rxq->nb_rx_desc))
-		return 0;
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &rxq->rx_ring[desc];
-	return !!(rxdp->wb.upper.status_error & E1000_RXD_STAT_DD);
-}
-
 int
 eth_igb_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/enic/enic_ethdev.c +0 -1
index ca75919ee2..1316c5c739 100644
@@ -1142,7 +1142,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
 	.rx_queue_setup       = enicpmd_dev_rx_queue_setup,
 	.rx_queue_release     = enicpmd_dev_rx_queue_release,
 	.rx_queue_count       = enicpmd_dev_rx_queue_count,
-	.rx_descriptor_done   = NULL,
 	.tx_queue_setup       = enicpmd_dev_tx_queue_setup,
 	.tx_queue_release     = enicpmd_dev_tx_queue_release,
 	.rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
drivers/net/fm10k/fm10k.h +0 -3
index 916b856acc..2e47ada829 100644
@@ -326,9 +326,6 @@ uint16_t fm10k_recv_scattered_pkts(void *rx_queue,
 uint32_t
 fm10k_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-int
-fm10k_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int
 fm10k_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
 
drivers/net/fm10k/fm10k_ethdev.c +0 -1
index b574693bca..092eade547 100644
@@ -2856,7 +2856,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = {
 	.tx_queue_setup		= fm10k_tx_queue_setup,
 	.tx_queue_release	= fm10k_tx_queue_release,
 	.rx_queue_count		= fm10k_dev_rx_queue_count,
-	.rx_descriptor_done	= fm10k_dev_rx_descriptor_done,
 	.rx_descriptor_status = fm10k_dev_rx_descriptor_status,
 	.tx_descriptor_status = fm10k_dev_tx_descriptor_status,
 	.rx_queue_intr_enable	= fm10k_dev_rx_queue_intr_enable,
drivers/net/fm10k/fm10k_rxtx.c +0 -25
index 4accaa2cd6..399bb3da19 100644
@@ -393,31 +393,6 @@ fm10k_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-fm10k_dev_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union fm10k_rx_desc *rxdp;
-	struct fm10k_rx_queue *rxq = rx_queue;
-	uint16_t desc;
-	int ret;
-
-	if (unlikely(offset >= rxq->nb_desc)) {
-		PMD_DRV_LOG(ERR, "Invalid RX descriptor offset %u", offset);
-		return 0;
-	}
-
-	desc = rxq->next_dd + offset;
-	if (desc >= rxq->nb_desc)
-		desc -= rxq->nb_desc;
-
-	rxdp = &rxq->hw_ring[desc];
-
-	ret = !!(rxdp->w.status &
-			rte_cpu_to_le_16(FM10K_RXD_STATUS_DD));
-
-	return ret;
-}
-
 int
 fm10k_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/i40e/i40e_ethdev.c +0 -1
index 11c02b1888..f8ed4a0b36 100644
@@ -475,7 +475,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 	.rx_queue_intr_disable        = i40e_dev_rx_queue_intr_disable,
 	.rx_queue_release             = i40e_dev_rx_queue_release,
 	.rx_queue_count               = i40e_dev_rx_queue_count,
-	.rx_descriptor_done           = i40e_dev_rx_descriptor_done,
 	.rx_descriptor_status         = i40e_dev_rx_descriptor_status,
 	.tx_descriptor_status         = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup               = i40e_dev_tx_queue_setup,
drivers/net/i40e/i40e_ethdev_vf.c +0 -1
index 69cab8e739..a3d19fc1d7 100644
@@ -199,7 +199,6 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = {
 	.rx_queue_release     = i40e_dev_rx_queue_release,
 	.rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable,
-	.rx_descriptor_done   = i40e_dev_rx_descriptor_done,
 	.rx_descriptor_status = i40e_dev_rx_descriptor_status,
 	.tx_descriptor_status = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup       = i40e_dev_tx_queue_setup,
drivers/net/i40e/i40e_rxtx.c +0 -26
index fe7f9200c1..645fbf401c 100644
@@ -2032,32 +2032,6 @@ i40e_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union i40e_rx_desc *rxdp;
-	struct i40e_rx_queue *rxq = rx_queue;
-	uint16_t desc;
-	int ret;
-
-	if (unlikely(offset >= rxq->nb_rx_desc)) {
-		PMD_DRV_LOG(ERR, "Invalid RX descriptor id %u", offset);
-		return 0;
-	}
-
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &(rxq->rx_ring[desc]);
-
-	ret = !!(((rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len) &
-		I40E_RXD_QW1_STATUS_MASK) >> I40E_RXD_QW1_STATUS_SHIFT) &
-				(1 << I40E_RX_DESC_STATUS_DD_SHIFT));
-
-	return ret;
-}
-
 int
 i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/i40e/i40e_rxtx.h +0 -1
index 57d7b4160b..925f3d853d 100644
@@ -221,7 +221,6 @@ void i40e_rx_queue_release_mbufs(struct i40e_rx_queue *rxq);
 
 uint32_t i40e_dev_rx_queue_count(struct rte_eth_dev *dev,
 				 uint16_t rx_queue_id);
-int i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);
 int i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int i40e_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
drivers/net/igc/igc_ethdev.c +0 -1
index 6ab3ee909d..ace6b3fb3d 100644
@@ -273,7 +273,6 @@ static const struct eth_dev_ops eth_igc_ops = {
 	.rx_queue_setup		= eth_igc_rx_queue_setup,
 	.rx_queue_release	= eth_igc_rx_queue_release,
 	.rx_queue_count		= eth_igc_rx_queue_count,
-	.rx_descriptor_done	= eth_igc_rx_descriptor_done,
 	.rx_descriptor_status	= eth_igc_rx_descriptor_status,
 	.tx_descriptor_status	= eth_igc_tx_descriptor_status,
 	.tx_queue_setup		= eth_igc_tx_queue_setup,
drivers/net/igc/igc_txrx.c +0 -18
index 4654ec41f0..f3962533d5 100644
@@ -756,24 +756,6 @@ uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev,
 	return desc;
 }
 
-int eth_igc_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union igc_adv_rx_desc *rxdp;
-	struct igc_rx_queue *rxq = rx_queue;
-	uint32_t desc;
-
-	if (unlikely(!rxq || offset >= rxq->nb_rx_desc))
-		return 0;
-
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &rxq->rx_ring[desc];
-	return !!(rxdp->wb.upper.status_error &
-			rte_cpu_to_le_32(IGC_RXD_STAT_DD));
-}
-
 int eth_igc_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
 	struct igc_rx_queue *rxq = rx_queue;
drivers/net/igc/igc_txrx.h +0 -2
index f2b2d75bbc..d6f3799639 100644
@@ -25,8 +25,6 @@ int eth_igc_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev,
 		uint16_t rx_queue_id);
 
-int eth_igc_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int eth_igc_rx_descriptor_status(void *rx_queue, uint16_t offset);
 
 int eth_igc_tx_descriptor_status(void *tx_queue, uint16_t offset);
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
index fd0cb9b0e2..f536ca61cf 100644
@@ -546,7 +546,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
 	.rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
 	.rx_queue_count       = ixgbe_dev_rx_queue_count,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
 	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
 	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
@@ -622,7 +621,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
 	.vlan_offload_set     = ixgbevf_vlan_offload_set,
 	.rx_queue_setup       = ixgbe_dev_rx_queue_setup,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
 	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
 	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
drivers/net/ixgbe/ixgbe_ethdev.h +0 -2
index 9bdef87fbd..b0e2b2452f 100644
@@ -602,8 +602,6 @@ int  ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
 uint32_t ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev,
 		uint16_t rx_queue_id);
 
-int ixgbe_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int ixgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int ixgbe_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
drivers/net/ixgbe/ixgbe_rxtx.c +0 -18
index 977ecf5137..5254fe3738 100644
@@ -3216,24 +3216,6 @@ ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-ixgbe_dev_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union ixgbe_adv_rx_desc *rxdp;
-	struct ixgbe_rx_queue *rxq = rx_queue;
-	uint32_t desc;
-
-	if (unlikely(offset >= rxq->nb_rx_desc))
-		return 0;
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &rxq->rx_ring[desc];
-	return !!(rxdp->wb.upper.status_error &
-			rte_cpu_to_le_32(IXGBE_RXDADV_STAT_DD));
-}
-
 int
 ixgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/octeontx2/otx2_ethdev.c +0 -1
index 33b72bd4db..b5d25fe68e 100644
@@ -2273,7 +2273,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = {
 	.rx_burst_mode_get        = otx2_rx_burst_mode_get,
 	.tx_burst_mode_get        = otx2_tx_burst_mode_get,
 	.rx_queue_count           = otx2_nix_rx_queue_count,
-	.rx_descriptor_done       = otx2_nix_rx_descriptor_done,
 	.rx_descriptor_status     = otx2_nix_rx_descriptor_status,
 	.tx_descriptor_status     = otx2_nix_tx_descriptor_status,
 	.tx_done_cleanup          = otx2_nix_tx_done_cleanup,
drivers/net/octeontx2/otx2_ethdev.h +0 -1
index e9efe52bb0..10bcd1b6a4 100644
@@ -412,7 +412,6 @@ int otx2_tx_burst_mode_get(struct rte_eth_dev *dev, uint16_t queue_id,
 			   struct rte_eth_burst_mode *mode);
 uint32_t otx2_nix_rx_queue_count(struct rte_eth_dev *eth_dev, uint16_t qidx);
 int otx2_nix_tx_done_cleanup(void *txq, uint32_t free_cnt);
-int otx2_nix_rx_descriptor_done(void *rxq, uint16_t offset);
 int otx2_nix_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int otx2_nix_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
drivers/net/octeontx2/otx2_ethdev_ops.c +0 -12
index faecf216c1..6c6a4f35e9 100644
@@ -371,18 +371,6 @@ nix_offset_has_packet(uint32_t head, uint32_t tail, uint16_t offset)
 	return 0;
 }
 
-int
-otx2_nix_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	struct otx2_eth_rxq *rxq = rx_queue;
-	uint32_t head, tail;
-
-	nix_rx_head_tail_get(otx2_eth_pmd_priv(rxq->eth_dev),
-			     &head, &tail, rxq->rq);
-
-	return nix_offset_has_packet(head, tail, offset);
-}
-
 int
 otx2_nix_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/sfc/sfc_ethdev.c +0 -17
index acee3e48e4..65e0ff7d48 100644
@@ -1221,21 +1221,6 @@ sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return sap->dp_rx->qdesc_npending(rxq_info->dp);
 }
 
-/*
- * The function is used by the secondary process as well. It must not
- * use any process-local pointers from the adapter data.
- */
-static int
-sfc_rx_descriptor_done(void *queue, uint16_t offset)
-{
-	struct sfc_dp_rxq *dp_rxq = queue;
-	const struct sfc_dp_rx *dp_rx;
-
-	dp_rx = sfc_dp_rx_by_dp_rxq(dp_rxq);
-
-	return offset < dp_rx->qdesc_npending(dp_rxq);
-}
-
 /*
  * The function is used by the secondary process as well. It must not
  * use any process-local pointers from the adapter data.
@@ -1820,7 +1805,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = {
 	.rx_queue_setup			= sfc_rx_queue_setup,
 	.rx_queue_release		= sfc_rx_queue_release,
 	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
 	.rx_descriptor_status		= sfc_rx_descriptor_status,
 	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.rx_queue_intr_enable		= sfc_rx_queue_intr_enable,
@@ -2018,7 +2002,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
 	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
 	.rx_descriptor_status		= sfc_rx_descriptor_status,
 	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.reta_query			= sfc_dev_rss_reta_query,
drivers/net/virtio/virtio_ethdev.c +0 -1
index dc0093bdf0..8658b6f2f0 100644
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
 	.rx_queue_intr_enable    = virtio_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable   = virtio_dev_rx_queue_intr_disable,
 	.rx_queue_release        = virtio_dev_queue_release,
-	.rx_descriptor_done      = virtio_dev_rx_queue_done,
 	.tx_queue_setup          = virtio_dev_tx_queue_setup,
 	.tx_queue_release        = virtio_dev_queue_release,
 	/* collect stats per queue */
drivers/net/virtio/virtio_ethdev.h +0 -2
index b7d52d497f..c93f320f83 100644
@@ -60,8 +60,6 @@ void virtio_dev_cq_start(struct rte_eth_dev *dev);
  * RX/TX function prototypes
  */
 
-int virtio_dev_rx_queue_done(void *rxq, uint16_t offset);
-
 int  virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 		uint16_t nb_rx_desc, unsigned int socket_id,
 		const struct rte_eth_rxconf *rx_conf,
drivers/net/virtio/virtio_rxtx.c +0 -9
index f915b8a2c9..043788876e 100644
@@ -39,15 +39,6 @@
 #define  VIRTIO_DUMP_PACKET(m, len) do { } while (0)
 #endif
 
-int
-virtio_dev_rx_queue_done(void *rxq, uint16_t offset)
-{
-	struct virtnet_rx *rxvq = rxq;
-	struct virtqueue *vq = rxvq->vq;
-
-	return virtqueue_nused(vq) >= offset;
-}
-
 void
 vq_ring_free_inorder(struct virtqueue *vq, uint16_t desc_idx, uint16_t num)
 {
lib/librte_ethdev/rte_ethdev.h +0 -25
index 70295d7ab7..b52b04f7e0 100644
@@ -4552,31 +4552,6 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 	return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
 }
 
-/**
- * Check if the DD bit of the specific RX descriptor in the queue has been set
- *
- * @param port_id
- *  The port identifier of the Ethernet device.
- * @param queue_id
- *  The queue id on the specific port.
- * @param offset
- *  The offset of the descriptor ID from tail.
- * @return
- *  - (1) if the specific DD bit is set.
- *  - (0) if the specific DD bit is not set.
- *  - (-ENODEV) if *port_id* invalid.
- *  - (-ENOTSUP) if the device does not support this function
- */
-static inline int
-rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
-{
-	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
-	return (*dev->dev_ops->rx_descriptor_done)( \
-		dev->data->rx_queues[queue_id], offset);
-}
-
 #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */
 #define RTE_ETH_RX_DESC_DONE     1 /**< Desc done, filled by hw. */
 #define RTE_ETH_RX_DESC_UNAVAIL  2 /**< Desc used by driver or hw. */
lib/librte_ethdev/rte_ethdev_core.h +0 -4
index 32407dd418..292a6423c4 100644
@@ -287,9 +287,6 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,
 					 uint16_t rx_queue_id);
 /**< @internal Get number of used descriptors on a receive queue. */
 
-typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);
-/**< @internal Check DD bit of specific RX descriptor */
-
 typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
 /**< @internal Check the status of a Rx descriptor */
 
@@ -662,7 +659,6 @@ struct eth_dev_ops {
 	eth_queue_release_t        rx_queue_release; /**< Release RX queue. */
 	eth_rx_queue_count_t       rx_queue_count;
 	/**< Get the number of used RX descriptors. */
-	eth_rx_descriptor_done_t   rx_descriptor_done; /**< Check rxd DD bit. */
 	eth_rx_descriptor_status_t rx_descriptor_status;
 	/**< Check the status of a Rx descriptor. */
 	eth_tx_descriptor_status_t tx_descriptor_status;
Signature · 1 line
2.25.4
#1 lore raw

PATCH 2/7 ethdev: move inline device operations

This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.

Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.

Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.

To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.

The list of dev_ops moved:
eth_rx_queue_count_t rx_queue_count;
eth_rx_descriptor_status_t rx_descriptor_status;
eth_tx_descriptor_status_t tx_descriptor_status;

---
 drivers/net/ark/ark_ethdev.c        |  2 +-
 drivers/net/atlantic/atl_ethdev.c   |  9 +++++----
 drivers/net/axgbe/axgbe_ethdev.c    |  5 +++--
 drivers/net/bnxt/bnxt_ethdev.c      |  6 +++---
 drivers/net/dpaa/dpaa_ethdev.c      |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  2 +-
 drivers/net/e1000/em_ethdev.c       |  6 +++---
 drivers/net/e1000/igb_ethdev.c      | 10 +++++-----
 drivers/net/enic/enic_ethdev.c      |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c    |  6 +++---
 drivers/net/i40e/i40e_ethdev.c      |  6 +++---
 drivers/net/i40e/i40e_ethdev_vf.c   |  6 +++---
 drivers/net/iavf/iavf_ethdev.c      |  6 +++---
 drivers/net/ice/ice_ethdev.c        |  6 +++---
 drivers/net/igc/igc_ethdev.c        |  6 +++---
 drivers/net/ixgbe/ixgbe_ethdev.c    | 10 +++++-----
 drivers/net/mlx5/linux/mlx5_os.c    | 12 +++++-------
 drivers/net/mlx5/mlx5_flow.c        |  4 ++++
 drivers/net/netvsc/hn_ethdev.c      |  6 +++---
 drivers/net/nfp/nfp_net.c           |  2 +-
 drivers/net/octeontx2/otx2_ethdev.c |  6 +++---
 drivers/net/qede/qede_ethdev.c      |  3 +--
 drivers/net/sfc/sfc_ethdev.c        | 12 ++++++------
 drivers/net/thunderx/nicvf_ethdev.c |  2 +-
 drivers/net/vhost/rte_eth_vhost.c   |  2 +-
 lib/librte_ethdev/rte_ethdev.h      | 12 ++++++------
 lib/librte_ethdev/rte_ethdev_core.h | 11 +++++------
 27 files changed, 82 insertions(+), 80 deletions(-)
drivers/net/ark/ark_ethdev.c +1 -1
index b32ccd8677..ce7f6e4803 100644
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = {
 	.dev_infos_get = eth_ark_dev_info_get,
 
 	.rx_queue_setup = eth_ark_dev_rx_queue_setup,
-	.rx_queue_count = eth_ark_dev_rx_queue_count,
 	.tx_queue_setup = eth_ark_tx_queue_setup,
 
 	.link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		return -1;
 
 	dev->dev_ops = &ark_eth_dev_ops;
+	dev->rx_queue_count = eth_ark_dev_rx_queue_count;
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
index d3b00ab295..540b106045 100644
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = {
 	.rx_queue_intr_enable = atl_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = atl_dev_rx_queue_intr_disable,
 
-	.rx_queue_count       = atl_rx_queue_count,
-	.rx_descriptor_status = atl_dev_rx_descriptor_status,
-	.tx_descriptor_status = atl_dev_tx_descriptor_status,
-
 	/* EEPROM */
 	.get_eeprom_length    = atl_dev_get_eeprom_length,
 	.get_eeprom           = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &atl_eth_dev_ops;
+
+	eth_dev->rx_queue_count       = atl_rx_queue_count;
+	eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status;
+
 	eth_dev->rx_pkt_burst = &atl_recv_pkts;
 	eth_dev->tx_pkt_burst = &atl_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
index 0c25739f82..02ceb95754 100644
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
 	.rxq_info_get                 = axgbe_rxq_info_get,
 	.txq_info_get                 = axgbe_txq_info_get,
 	.dev_supported_ptypes_get     = axgbe_dev_supported_ptypes_get,
-	.rx_descriptor_status         = axgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status         = axgbe_dev_tx_descriptor_status,
 	.mtu_set		= axgb_mtu_set,
 };
 
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 	eth_dev->dev_ops = &axgbe_eth_dev_ops;
 
+	eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status;
+
 	/*
 	 * For secondary processes, we don't initialise any further as primary
 	 * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 510a0d9e0a..f94dd88b8c 100644
@@ -4233,9 +4233,6 @@ static const struct eth_dev_ops bnxt_dev_ops = {
 	.dev_led_off = bnxt_dev_led_off_op,
 	.xstats_get_by_id = bnxt_dev_xstats_get_by_id_op,
 	.xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op,
-	.rx_queue_count = bnxt_rx_queue_count_op,
-	.rx_descriptor_status = bnxt_rx_descriptor_status_op,
-	.tx_descriptor_status = bnxt_tx_descriptor_status_op,
 	.rx_queue_start = bnxt_rx_queue_start,
 	.rx_queue_stop = bnxt_rx_queue_stop,
 	.tx_queue_start = bnxt_tx_queue_start,
@@ -5668,6 +5665,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 		PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
 
 	eth_dev->dev_ops = &bnxt_dev_ops;
+	eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
+	eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op;
+	eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op;
 	eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
 	eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
 
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index c15e2b5462..bfc6504139 100644
@@ -1303,7 +1303,6 @@ static struct eth_dev_ops dpaa_devops = {
 	.tx_queue_setup		  = dpaa_eth_tx_queue_setup,
 	.rx_queue_release	  = dpaa_eth_rx_queue_release,
 	.tx_queue_release	  = dpaa_eth_tx_queue_release,
-	.rx_queue_count		  = dpaa_dev_rx_queue_count,
 	.rx_burst_mode_get	  = dpaa_dev_rx_burst_mode_get,
 	.tx_burst_mode_get	  = dpaa_dev_tx_burst_mode_get,
 	.rxq_info_get		  = dpaa_rxq_info_get,
@@ -1766,6 +1765,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* Populate ethdev structure */
 	eth_dev->dev_ops = &dpaa_devops;
+	eth_dev->rx_queue_count = dpaa_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
 	eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
 
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
index 02c254846c..38cf0ab71c 100644
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
 	.tx_queue_release  = dpaa2_dev_tx_queue_release,
 	.rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get,
 	.tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get,
-	.rx_queue_count       = dpaa2_dev_rx_queue_count,
 	.flow_ctrl_get	      = dpaa2_flow_ctrl_get,
 	.flow_ctrl_set	      = dpaa2_flow_ctrl_set,
 	.mac_addr_add         = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
 		 * plugged.
 		 */
 		eth_dev->dev_ops = &dpaa2_ethdev_ops;
+		eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;
 		if (dpaa2_get_devargs(dev->devargs, DRIVER_LOOPBACK_MODE))
 			eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx;
 		else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +3 -3
index 32872db9c2..66c5022bb7 100644
@@ -176,9 +176,6 @@ static const struct eth_dev_ops eth_em_ops = {
 	.vlan_offload_set     = eth_em_vlan_offload_set,
 	.rx_queue_setup       = eth_em_rx_queue_setup,
 	.rx_queue_release     = eth_em_rx_queue_release,
-	.rx_queue_count       = eth_em_rx_queue_count,
-	.rx_descriptor_status = eth_em_rx_descriptor_status,
-	.tx_descriptor_status = eth_em_tx_descriptor_status,
 	.tx_queue_setup       = eth_em_tx_queue_setup,
 	.tx_queue_release     = eth_em_tx_queue_release,
 	.rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -249,6 +246,9 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
 		E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
 
 	eth_dev->dev_ops = &eth_em_ops;
+	eth_dev->rx_queue_count = eth_em_rx_queue_count;
+	eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;
 	eth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;
 	eth_dev->tx_pkt_prepare = (eth_tx_prep_t)&eth_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +5 -5
index aec79c6ceb..2db04fa88c 100644
@@ -380,9 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = {
 	.rx_queue_intr_enable = eth_igb_rx_queue_intr_enable,
 	.rx_queue_intr_disable = eth_igb_rx_queue_intr_disable,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_queue_count       = eth_igb_rx_queue_count,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
 	.tx_queue_release     = eth_igb_tx_queue_release,
 	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -440,8 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {
 	.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
 	.rx_queue_setup       = eth_igb_rx_queue_setup,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
 	.tx_queue_release     = eth_igb_tx_queue_release,
 	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -752,6 +747,9 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 	uint32_t ctrl_ext;
 
 	eth_dev->dev_ops = &eth_igb_ops;
+	eth_dev->rx_queue_count = eth_igb_rx_queue_count;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
@@ -947,6 +945,8 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &igbvf_eth_dev_ops;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -1
index 1316c5c739..2cffa3aa2d 100644
@@ -1141,7 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
 	.tx_queue_stop        = enicpmd_dev_tx_queue_stop,
 	.rx_queue_setup       = enicpmd_dev_rx_queue_setup,
 	.rx_queue_release     = enicpmd_dev_rx_queue_release,
-	.rx_queue_count       = enicpmd_dev_rx_queue_count,
 	.tx_queue_setup       = enicpmd_dev_tx_queue_setup,
 	.tx_queue_release     = enicpmd_dev_tx_queue_release,
 	.rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1278,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
 	ENICPMD_FUNC_TRACE();
 
 	eth_dev->dev_ops = &enicpmd_eth_dev_ops;
+	eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = &enic_recv_pkts;
 	eth_dev->tx_pkt_burst = &enic_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +3 -3
index 092eade547..20d48c30ea 100644
@@ -2855,9 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = {
 	.rx_queue_release	= fm10k_rx_queue_release,
 	.tx_queue_setup		= fm10k_tx_queue_setup,
 	.tx_queue_release	= fm10k_tx_queue_release,
-	.rx_queue_count		= fm10k_dev_rx_queue_count,
-	.rx_descriptor_status = fm10k_dev_rx_descriptor_status,
-	.tx_descriptor_status = fm10k_dev_tx_descriptor_status,
 	.rx_queue_intr_enable	= fm10k_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable	= fm10k_dev_rx_queue_intr_disable,
 	.reta_update		= fm10k_reta_update,
@@ -3054,6 +3051,9 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	dev->dev_ops = &fm10k_eth_dev_ops;
+	dev->rx_queue_count = fm10k_dev_rx_queue_count;
+	dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status;
 	dev->rx_pkt_burst = &fm10k_recv_pkts;
 	dev->tx_pkt_burst = &fm10k_xmit_pkts;
 	dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +3 -3
index f8ed4a0b36..ad5a536d73 100644
@@ -474,9 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 	.rx_queue_intr_enable         = i40e_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable        = i40e_dev_rx_queue_intr_disable,
 	.rx_queue_release             = i40e_dev_rx_queue_release,
-	.rx_queue_count               = i40e_dev_rx_queue_count,
-	.rx_descriptor_status         = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status         = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup               = i40e_dev_tx_queue_setup,
 	.tx_queue_release             = i40e_dev_tx_queue_release,
 	.dev_led_on                   = i40e_dev_led_on,
@@ -1447,6 +1444,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	PMD_INIT_FUNC_TRACE();
 
 	dev->dev_ops = &i40e_eth_dev_ops;
+	dev->rx_queue_count = i40e_dev_rx_queue_count;
+	dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
 	dev->rx_pkt_burst = i40e_recv_pkts;
 	dev->tx_pkt_burst = i40e_xmit_pkts;
 	dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +3 -3
index a3d19fc1d7..1b4ffaa383 100644
@@ -199,11 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = {
 	.rx_queue_release     = i40e_dev_rx_queue_release,
 	.rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable,
-	.rx_descriptor_status = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup       = i40e_dev_tx_queue_setup,
 	.tx_queue_release     = i40e_dev_tx_queue_release,
-	.rx_queue_count       = i40e_dev_rx_queue_count,
 	.rxq_info_get         = i40e_rxq_info_get,
 	.txq_info_get         = i40e_txq_info_get,
 	.mac_addr_add	      = i40evf_add_mac_addr,
@@ -1517,6 +1514,9 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* assign ops func pointer */
 	eth_dev->dev_ops = &i40evf_eth_dev_ops;
+	eth_dev->rx_queue_count       = i40e_dev_rx_queue_count;
+	eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &i40e_recv_pkts;
 	eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
 
drivers/net/iavf/iavf_ethdev.c +3 -3
index c3aa4cd725..e7e8cccd85 100644
@@ -113,9 +113,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
 	.rss_hash_conf_get          = iavf_dev_rss_hash_conf_get,
 	.rxq_info_get               = iavf_dev_rxq_info_get,
 	.txq_info_get               = iavf_dev_txq_info_get,
-	.rx_queue_count             = iavf_dev_rxq_count,
-	.rx_descriptor_status       = iavf_dev_rx_desc_status,
-	.tx_descriptor_status       = iavf_dev_tx_desc_status,
 	.mtu_set                    = iavf_dev_mtu_set,
 	.rx_queue_intr_enable       = iavf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable      = iavf_dev_rx_queue_intr_disable,
@@ -1335,6 +1332,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* assign ops func pointer */
 	eth_dev->dev_ops = &iavf_eth_dev_ops;
+	eth_dev->rx_queue_count = iavf_dev_rxq_count;
+	eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status;
+	eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;
 	eth_dev->rx_pkt_burst = &iavf_recv_pkts;
 	eth_dev->tx_pkt_burst = &iavf_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
index 8d435e8892..613b6638ad 100644
@@ -200,9 +200,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
 	.tx_burst_mode_get            = ice_tx_burst_mode_get,
 	.get_eeprom_length            = ice_get_eeprom_length,
 	.get_eeprom                   = ice_get_eeprom,
-	.rx_queue_count               = ice_rx_queue_count,
-	.rx_descriptor_status         = ice_rx_descriptor_status,
-	.tx_descriptor_status         = ice_tx_descriptor_status,
 	.stats_get                    = ice_stats_get,
 	.stats_reset                  = ice_stats_reset,
 	.xstats_get                   = ice_xstats_get,
@@ -2139,6 +2136,9 @@ ice_dev_init(struct rte_eth_dev *dev)
 	int ret;
 
 	dev->dev_ops = &ice_eth_dev_ops;
+	dev->rx_queue_count = ice_rx_queue_count;
+	dev->rx_descriptor_status = ice_rx_descriptor_status;
+	dev->tx_descriptor_status = ice_tx_descriptor_status;
 	dev->rx_pkt_burst = ice_recv_pkts;
 	dev->tx_pkt_burst = ice_xmit_pkts;
 	dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +3 -3
index ace6b3fb3d..1fdbfcb60d 100644
@@ -272,9 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = {
 
 	.rx_queue_setup		= eth_igc_rx_queue_setup,
 	.rx_queue_release	= eth_igc_rx_queue_release,
-	.rx_queue_count		= eth_igc_rx_queue_count,
-	.rx_descriptor_status	= eth_igc_rx_descriptor_status,
-	.tx_descriptor_status	= eth_igc_tx_descriptor_status,
 	.tx_queue_setup		= eth_igc_tx_queue_setup,
 	.tx_queue_release	= eth_igc_tx_queue_release,
 	.tx_done_cleanup	= eth_igc_tx_done_cleanup,
@@ -1226,6 +1223,9 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 	dev->dev_ops = &eth_igc_ops;
+	dev->rx_queue_count = eth_igc_rx_queue_count;
+	dev->rx_descriptor_status = eth_igc_rx_descriptor_status;
+	dev->tx_descriptor_status = eth_igc_tx_descriptor_status;
 
 	/*
 	 * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +5 -5
index f536ca61cf..ac1dc7841d 100644
@@ -545,9 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
 	.rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_queue_count       = ixgbe_dev_rx_queue_count,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
 	.tx_queue_release     = ixgbe_dev_tx_queue_release,
 	.dev_led_on           = ixgbe_dev_led_on,
@@ -621,8 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
 	.vlan_offload_set     = ixgbevf_vlan_offload_set,
 	.rx_queue_setup       = ixgbe_dev_rx_queue_setup,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
 	.tx_queue_release     = ixgbe_dev_tx_queue_release,
 	.rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1089,6 +1084,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	ixgbe_dev_macsec_setting_reset(eth_dev);
 
 	eth_dev->dev_ops = &ixgbe_eth_dev_ops;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
+	eth_dev->rx_queue_count       = ixgbe_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
 	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1568,6 +1566,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &ixgbevf_eth_dev_ops;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
 	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 
drivers/net/mlx5/linux/mlx5_os.c +5 -7
index 69123e12c3..d07f55cb49 100644
@@ -585,6 +585,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		}
 		eth_dev->device = dpdk_dev;
 		eth_dev->dev_ops = &mlx5_os_dev_sec_ops;
+		eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+		eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
 		err = mlx5_proc_priv_init(eth_dev);
 		if (err)
 			return NULL;
@@ -1192,6 +1194,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	eth_dev->rx_pkt_burst = removed_rx_burst;
 	eth_dev->tx_pkt_burst = removed_tx_burst;
 	eth_dev->dev_ops = &mlx5_os_dev_ops;
+	eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+	eth_dev->rx_queue_count = mlx5_rx_queue_count;
 	/* Register MAC address. */
 	claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
 	if (config->vf && config->vf_nl_en)
@@ -2363,13 +2368,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = {
 	.rss_hash_update = mlx5_rss_hash_update,
 	.rss_hash_conf_get = mlx5_rss_hash_conf_get,
 	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
 	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
-	.rx_queue_count = mlx5_rx_queue_count,
 	.rx_queue_intr_enable = mlx5_rx_intr_enable,
 	.rx_queue_intr_disable = mlx5_rx_intr_disable,
 	.is_removed = mlx5_is_removed,
@@ -2394,8 +2396,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = {
 	.rx_queue_stop = mlx5_rx_queue_stop,
 	.tx_queue_start = mlx5_tx_queue_start,
 	.tx_queue_stop = mlx5_tx_queue_stop,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2447,8 +2447,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = {
 	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
 	.vlan_offload_set = mlx5_vlan_offload_set,
 	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
index 71501730b5..226b7bfd23 100644
@@ -5131,6 +5131,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
 		dev->dev_ops = &mlx5_os_dev_ops_isolate;
 	else
 		dev->dev_ops = &mlx5_os_dev_ops;
+
+	dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+
 	return 0;
 }
 
drivers/net/netvsc/hn_ethdev.c +3 -3
index fd91c0e491..229c1b9149 100644
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = {
 	.tx_queue_setup		= hn_dev_tx_queue_setup,
 	.tx_queue_release	= hn_dev_tx_queue_release,
 	.tx_done_cleanup        = hn_dev_tx_done_cleanup,
-	.tx_descriptor_status	= hn_dev_tx_descriptor_status,
 	.rx_queue_setup		= hn_dev_rx_queue_setup,
 	.rx_queue_release	= hn_dev_rx_queue_release,
-	.rx_queue_count		= hn_dev_rx_queue_count,
-	.rx_descriptor_status   = hn_dev_rx_queue_status,
 	.link_update		= hn_dev_link_update,
 	.stats_get		= hn_dev_stats_get,
 	.stats_reset            = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 
 	vmbus = container_of(device, struct rte_vmbus_device, device);
 	eth_dev->dev_ops = &hn_eth_dev_ops;
+	eth_dev->rx_queue_count = hn_dev_rx_queue_count;
+	eth_dev->rx_descriptor_status = hn_dev_rx_queue_status;
+	eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status;
 	eth_dev->tx_pkt_burst = &hn_xmit_pkts;
 	eth_dev->rx_pkt_burst = &hn_recv_pkts;
 
drivers/net/nfp/nfp_net.c +1 -1
index 99946279db..c556dedab6 100644
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = {
 	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
 	.rx_queue_setup		= nfp_net_rx_queue_setup,
 	.rx_queue_release	= nfp_net_rx_queue_release,
-	.rx_queue_count		= nfp_net_rx_queue_count,
 	.tx_queue_setup		= nfp_net_tx_queue_setup,
 	.tx_queue_release	= nfp_net_tx_queue_release,
 	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	}
 
 	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
 	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
 
drivers/net/octeontx2/otx2_ethdev.c +3 -3
index b5d25fe68e..98f360f1b4 100644
@@ -2272,9 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = {
 	.txq_info_get             = otx2_nix_txq_info_get,
 	.rx_burst_mode_get        = otx2_rx_burst_mode_get,
 	.tx_burst_mode_get        = otx2_tx_burst_mode_get,
-	.rx_queue_count           = otx2_nix_rx_queue_count,
-	.rx_descriptor_status     = otx2_nix_rx_descriptor_status,
-	.tx_descriptor_status     = otx2_nix_tx_descriptor_status,
 	.tx_done_cleanup          = otx2_nix_tx_done_cleanup,
 	.set_queue_rate_limit     = otx2_nix_tm_set_queue_rate_limit,
 	.pool_ops_supported       = otx2_nix_pool_ops_supported,
@@ -2381,6 +2378,9 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
 	int rc, max_entries;
 
 	eth_dev->dev_ops = &otx2_eth_dev_ops;
+	eth_dev->rx_queue_count = otx2_nix_rx_queue_count;
+	eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/qede/qede_ethdev.c +1 -2
index 70d48e48ef..59f1746ee9 100644
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
 	.dev_infos_get = qede_dev_info_get,
 	.rx_queue_setup = qede_rx_queue_setup,
 	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
 	.tx_queue_setup = qede_tx_queue_setup,
 	.tx_queue_release = qede_tx_queue_release,
 	.dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
 	.dev_infos_get = qede_dev_info_get,
 	.rx_queue_setup = qede_rx_queue_setup,
 	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
 	.tx_queue_setup = qede_tx_queue_setup,
 	.tx_queue_release = qede_tx_queue_release,
 	.dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	}
 
 	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
+	eth_dev->rx_descriptor_status = qede_rx_descriptor_status;
 
 	adapter->num_tx_queues = 0;
 	adapter->num_rx_queues = 0;
drivers/net/sfc/sfc_ethdev.c +6 -6
index 65e0ff7d48..0b06bf91a0 100644
@@ -1804,9 +1804,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = {
 	.tx_queue_stop			= sfc_tx_queue_stop,
 	.rx_queue_setup			= sfc_rx_queue_setup,
 	.rx_queue_release		= sfc_rx_queue_release,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.rx_queue_intr_enable		= sfc_rx_queue_intr_enable,
 	.rx_queue_intr_disable		= sfc_rx_queue_intr_disable,
 	.tx_queue_setup			= sfc_tx_queue_setup,
@@ -1962,6 +1959,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
 
 	dev->dev_ops = &sfc_eth_dev_ops;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
 
 	return 0;
 
@@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 
 static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.reta_query			= sfc_dev_rss_reta_query,
 	.rss_hash_conf_get		= sfc_dev_rss_hash_conf_get,
 	.rxq_info_get			= sfc_rx_queue_info_get,
@@ -2069,6 +2066,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
 	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
 	dev->dev_ops = &sfc_eth_dev_secondary_ops;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
 
 	return 0;
 
drivers/net/thunderx/nicvf_ethdev.c +1 -1
index d955a7ee23..959c8e4ddc 100644
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = {
 	.tx_queue_stop            = nicvf_dev_tx_queue_stop,
 	.rx_queue_setup           = nicvf_dev_rx_queue_setup,
 	.rx_queue_release         = nicvf_dev_rx_queue_release,
-	.rx_queue_count           = nicvf_dev_rx_queue_count,
 	.tx_queue_setup           = nicvf_dev_tx_queue_setup,
 	.tx_queue_release         = nicvf_dev_tx_queue_release,
 	.dev_set_link_up          = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &nicvf_eth_dev_ops;
+	eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
index e55278af69..fa365605ef 100644
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = {
 	.rx_queue_release = eth_queue_release,
 	.tx_queue_release = eth_queue_release,
 	.tx_done_cleanup = eth_tx_done_cleanup,
-	.rx_queue_count = eth_rx_queue_count,
 	.link_update = eth_link_update,
 	.stats_get = eth_stats_get,
 	.stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 	data->all_multicast = 1;
 
 	eth_dev->dev_ops = &ops;
+	eth_dev->rx_queue_count = eth_rx_queue_count;
 
 	/* finally assign rx and tx ops */
 	eth_dev->rx_pkt_burst = eth_vhost_rx;
lib/librte_ethdev/rte_ethdev.h +6 -6
index b52b04f7e0..2ce186610b 100644
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
 	dev = &rte_eth_devices[port_id];
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_queue_count, -ENOTSUP);
 	if (queue_id >= dev->data->nb_rx_queues)
 		return -EINVAL;
 
-	return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
+	return (int)(*dev->rx_queue_count)(dev, queue_id);
 }
 
 #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */
@@ -4604,10 +4604,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
 	if (queue_id >= dev->data->nb_rx_queues)
 		return -ENODEV;
 #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_status, -ENOTSUP);
 	rxq = dev->data->rx_queues[queue_id];
 
-	return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
+	return (*dev->rx_descriptor_status)(rxq, offset);
 }
 
 #define RTE_ETH_TX_DESC_FULL    0 /**< Desc filled for hw, waiting xmit. */
@@ -4661,10 +4661,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
 	if (queue_id >= dev->data->nb_tx_queues)
 		return -ENODEV;
 #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_descriptor_status, -ENOTSUP);
 	txq = dev->data->tx_queues[queue_id];
 
-	return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
+	return (*dev->tx_descriptor_status)(txq, offset);
 }
 
 /**
lib/librte_ethdev/rte_ethdev_core.h +5 -6
index 292a6423c4..275d51006b 100644
@@ -657,12 +657,6 @@ struct eth_dev_ops {
 	eth_queue_stop_t           tx_queue_stop; /**< Stop TX for a queue. */
 	eth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue. */
 	eth_queue_release_t        rx_queue_release; /**< Release RX queue. */
-	eth_rx_queue_count_t       rx_queue_count;
-	/**< Get the number of used RX descriptors. */
-	eth_rx_descriptor_status_t rx_descriptor_status;
-	/**< Check the status of a Rx descriptor. */
-	eth_tx_descriptor_status_t tx_descriptor_status;
-	/**< Check the status of a Tx descriptor. */
 	/*
 	 * Static inline functions use functions ABOVE this comment.
 	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -778,6 +772,11 @@ struct rte_eth_dev {
 	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
 	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
 	eth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */
+
+	eth_rx_queue_count_t       rx_queue_count; /**< Get the number of used RX descriptors. */
+	eth_rx_descriptor_status_t rx_descriptor_status; /**< Check the status of a Rx descriptor. */
+	eth_tx_descriptor_status_t tx_descriptor_status; /**< Check the status of a Tx descriptor. */
+
 	/**
 	 * Next two fields are per-device data but *data is shared between
 	 * primary and secondary processes and *process_private is per-process
Signature · 1 line
2.25.4
Reviewed-by on v1 2/7
#2 lore raw

Re: [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations

Quoted 16 lines · Ferruh Yigit

This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.

Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.

Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.

To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.

Quoted 6 lines

The list of dev_ops moved:
eth_rx_queue_count_t rx_queue_count;
eth_rx_descriptor_status_t rx_descriptor_status;
eth_tx_descriptor_status_t tx_descriptor_status;

doc/guides/nics/features.rst should be updated since it says that status callbacks live in eth_dev_ops.

plus an net/sfc-related nit below:

[snip]

Quoted 4 lines
drivers/net/sfc/sfc_ethdev.c +0 -0
index 65e0ff7d48..0b06bf91a0 100644

[snip]

drivers/net/sfc/sfc_ethdev.c sfc_eth_dev_set_ops(struct rte_eth_dev *dev) · line 1964

Quoted 7 lines
drivers/net/sfc/sfc_ethdev.c +3 -0
@@ -1962,6 +1959,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
 
 	dev->dev_ops = &sfc_eth_dev_ops;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;

May I ask to put it just after dev->tx_pkt_burst = ... line since these callbacks go before dev_ops in the structure.

Quoted 14 lines
drivers/net/sfc/sfc_ethdev.c +0 -3
 	return 0;
 
@@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 
 static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.reta_query			= sfc_dev_rss_reta_query,
 	.rss_hash_conf_get		= sfc_dev_rss_hash_conf_get,
 	.rxq_info_get			= sfc_rx_queue_info_get,

drivers/net/sfc/sfc_ethdev.c sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) · line 2071

Quoted 6 lines
drivers/net/sfc/sfc_ethdev.c +3 -0
@@ -2069,6 +2066,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
 	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
 	dev->dev_ops = &sfc_eth_dev_secondary_ops;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;

Same here.

[snip]

#3 lore raw

Re: [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations

Quoted 22 lines · Andrew Rybchenko
Quoted 21 lines · Ferruh Yigit

This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.

Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.

Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.

To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.

The list of dev_ops moved:
eth_rx_queue_count_t rx_queue_count;
eth_rx_descriptor_status_t rx_descriptor_status;
eth_tx_descriptor_status_t tx_descriptor_status;

Quoted 7 lines
Quoted 1 line

doc/guides/nics/features.rst should be updated since it says that status callbacks live in eth_dev_ops.

Yep, I will fix in v2, thanks for review.

Quoted 14 lines

plus an net/sfc-related nit below:

[snip]

Quoted 4 lines
drivers/net/sfc/sfc_ethdev.c +0 -0
index 65e0ff7d48..0b06bf91a0 100644

[snip]

Quoted 3 lines
drivers/net/sfc/sfc_ethdev.c +0 -0
@@ -1962,6 +1959,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
  	dev->tx_pkt_burst = dp_tx->pkt_burst;
 
Quoted 8 lines

drivers/net/sfc/sfc_ethdev.c sfc_eth_dev_set_ops(struct rte_eth_dev *dev) · line 1964

Quoted 4 lines
drivers/net/sfc/sfc_ethdev.c +3 -0
  	dev->dev_ops = &sfc_eth_dev_ops;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;

May I ask to put it just after dev->tx_pkt_burst = ... line since these callbacks go before dev_ops in the structure.

ok

Quoted 14 lines
Quoted 14 lines
drivers/net/sfc/sfc_ethdev.c +0 -3
  	return 0;
 
@@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 
  static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
  	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
  	.reta_query			= sfc_dev_rss_reta_query,
  	.rss_hash_conf_get		= sfc_dev_rss_hash_conf_get,
  	.rxq_info_get			= sfc_rx_queue_info_get,
@@ -2069,6 +2066,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
Quoted 9 lines

drivers/net/sfc/sfc_ethdev.c sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) · line 2071

Quoted 6 lines
drivers/net/sfc/sfc_ethdev.c +3 -0
  	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
  	dev->tx_pkt_burst = dp_tx->pkt_burst;
  	dev->dev_ops = &sfc_eth_dev_secondary_ops;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;

Same here.

ok

#4 lore raw

PATCH 3/7 ethdev: make device operations struct private

In reply to Ferruh Yigit

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

---
 doc/guides/rel_notes/deprecation.rst     |   9 -
 drivers/net/i40e/i40e_vf_representor.c   |   1 +
 drivers/net/ixgbe/ixgbe_vf_representor.c |   1 +
 lib/librte_ethdev/rte_ethdev_core.h      | 708 +----------------------
 lib/librte_ethdev/rte_ethdev_driver.h    | 694 ++++++++++++++++++++++
 lib/librte_ethdev/rte_flow_driver.h      |   1 +
 lib/librte_ethdev/rte_mtr_driver.h       |   1 +
 lib/librte_ethdev/rte_tm_driver.h        |   1 +
 8 files changed, 706 insertions(+), 710 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -9
index 811eaad6ce..d40b95bfa9 100644
@@ -163,15 +163,6 @@ Deprecation Notices
   Due to adoption of C11 atomic builtins, the field ``refcnt_atomic``
   will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11.
 
-* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
-  will be done in 20.11.
-  Currently the ``struct eth_dev_ops`` struct is accessible by the application
-  because some inline functions, like ``rte_eth_tx_descriptor_status()``,
-  access the struct directly.
-  The struct will be separate in two, the ops used by inline functions will be
-  moved next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct
-  will be moved to header file for drivers to hide it from applications.
-
 * ethdev: the legacy filter API, including
   ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
   as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
drivers/net/i40e/i40e_vf_representor.c +1 -0
index 083bc1a5f3..f09d4d8798 100644
@@ -7,6 +7,7 @@
 #include <rte_pci.h>
 #include <rte_malloc.h>
 
+#include "rte_ethdev_driver.h"
 #include "base/i40e_type.h"
 #include "base/virtchnl.h"
 #include "i40e_ethdev.h"
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -0
index dbbef294ae..edb5d43846 100644
@@ -6,6 +6,7 @@
 #include <rte_pci.h>
 #include <rte_malloc.h>
 
+#include "rte_ethdev_driver.h"
 #include "base/ixgbe_type.h"
 #include "base/ixgbe_vf.h"
 #include "ixgbe_ethdev.h"
lib/librte_ethdev/rte_ethdev_core.h +7 -701

726 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev_driver.h +694 -0

700 lines not on this page · raw message

lib/librte_ethdev/rte_flow_driver.h +1 -0
index 881cc469b7..997598db11 100644
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
lib/librte_ethdev/rte_mtr_driver.h +1 -0
index 3ec7ffa2a5..3b39532935 100644
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
lib/librte_ethdev/rte_tm_driver.h +1 -0
index 90114ff53e..b86ed89c00 100644
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
Signature · 1 line
2.25.4
#6 lore raw

PATCH 4/7 ethdev: mark internal functions

In reply to Ferruh Yigit

Some ethdev functions are for drivers only, not for applications.

Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.

Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.

---
 doc/guides/rel_notes/deprecation.rst     |  6 -----
 lib/librte_ethdev/rte_ethdev.h           |  3 +--
 lib/librte_ethdev/rte_ethdev_driver.h    | 33 ++++++++++--------------
 lib/librte_ethdev/rte_ethdev_version.map | 30 ++++++++++-----------
 lib/librte_ethdev/rte_flow_driver.h      |  4 +--
 5 files changed, 29 insertions(+), 47 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -6
index d40b95bfa9..35c06d30ef 100644
@@ -227,12 +227,6 @@ Deprecation Notices
   following the IPv6 header, as proposed in RFC
   https://mails.dpdk.org/archives/dev/2020-August/177257.html.
 
-* ethdev: Some internal APIs for driver usage are exported in the .map file.
-  Now DPDK has ``__rte_internal`` marker so we can mark internal APIs and move
-  them to the INTERNAL block in .map. Although these APIs are internal it will
-  break the ABI checks, that is why change is planned for 20.11.
-  The list of internal APIs are mainly ones listed in ``rte_ethdev_driver.h``.
-
 * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made
   ABI stable in the v19.11 release. The TM maintainer and other contributors have
   agreed to keep the TM APIs as experimental in expectation of additional spec
lib/librte_ethdev/rte_ethdev.h +1 -2
index 2ce186610b..ce2e0ec0e4 100644
@@ -1723,8 +1723,7 @@ rte_eth_find_next_of(uint16_t port_id_start,
  */
 __rte_experimental
 uint16_t
-rte_eth_find_next_sibling(uint16_t port_id_start,
-		uint16_t ref_port_id);
+rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);
 
 /**
  * Macro to iterate over all ethdev ports sharing the same rte_device
lib/librte_ethdev/rte_ethdev_driver.h +13 -20
index b006cbbe92..3d1bc33272 100644
@@ -759,6 +759,7 @@ int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
  * @return
  *   - The pointer to the ethdev slot, on success. NULL on error
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
 
 /**
@@ -770,6 +771,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
 
 /**
@@ -783,6 +785,7 @@ struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
  *        device.
  *   - Error: Null pointer.
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
 
 /**
@@ -801,6 +804,7 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
  * @return
  *   - 0 on success, negative on error
  */
+__rte_internal
 int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
 
 /**
@@ -814,6 +818,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  * @return
  *  void
  */
+__rte_internal
 void _rte_eth_dev_reset(struct rte_eth_dev *dev);
 
 /**
@@ -833,6 +838,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  * @return
  *  int
  */
+__rte_internal
 int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 		enum rte_eth_event_type event, void *ret_param);
 
@@ -848,6 +854,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  * @param dev
  *  New ethdev port.
  */
+__rte_internal
 void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
 
 /**
@@ -869,6 +876,7 @@ void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
  * @param socket_id
  *   The *socket_id* argument is the socket identifier in case of NUMA.
  */
+__rte_internal
 const struct rte_memzone *
 rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,
 			 uint16_t queue_id, size_t size,
@@ -955,9 +963,6 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
 }
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Allocate an unique switch domain identifier.
  *
  * A pool of switch domain identifiers which can be allocated on request. This
@@ -971,14 +976,11 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_switch_domain_alloc(uint16_t *domain_id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Free switch domain.
  *
  * Return a switch domain identifier to the pool of free identifiers after it is
@@ -990,7 +992,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id);
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_switch_domain_free(uint16_t domain_id);
 
@@ -1007,9 +1009,6 @@ struct rte_eth_devargs {
 };
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function to parse ethdev arguments
  *
  * @param devargs
@@ -1020,7 +1019,7 @@ struct rte_eth_devargs {
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs);
 
@@ -1030,9 +1029,6 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
 	void *bus_specific_init_params);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function for the creation of a new ethdev ports.
  *
  * @param device
@@ -1053,7 +1049,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_dev_create(struct rte_device *device, const char *name,
 	size_t priv_data_size,
@@ -1064,9 +1060,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function for cleaning up the resources of a ethdev port on it's
  * destruction.
  *
@@ -1078,7 +1071,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit);
 
lib/librte_ethdev/rte_ethdev_version.map +14 -16
index 8d9d6b1c67..6a84f3d76d 100644
@@ -1,8 +1,6 @@
 DPDK_21 {
 	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
 	rte_eth_add_first_rx_callback;
 	rte_eth_add_rx_callback;
 	rte_eth_add_tx_callback;
@@ -10,9 +8,6 @@ DPDK_21 {
 	rte_eth_allmulticast_enable;
 	rte_eth_allmulticast_get;
 	rte_eth_dev_adjust_nb_rx_tx_desc;
-	rte_eth_dev_allocate;
-	rte_eth_dev_allocated;
-	rte_eth_dev_attach_secondary;
 	rte_eth_dev_callback_register;
 	rte_eth_dev_callback_unregister;
 	rte_eth_dev_close;
@@ -44,8 +39,6 @@ DPDK_21 {
 	rte_eth_dev_mac_addr_remove;
 	rte_eth_dev_pool_ops_supported;
 	rte_eth_dev_priority_flow_ctrl_set;
-	rte_eth_dev_probing_finish;
-	rte_eth_dev_release_port;
 	rte_eth_dev_reset;
 	rte_eth_dev_rss_hash_conf_get;
 	rte_eth_dev_rss_hash_update;
@@ -81,7 +74,6 @@ DPDK_21 {
 	rte_eth_dev_udp_tunnel_port_delete;
 	rte_eth_dev_vlan_filter;
 	rte_eth_devices;
-	rte_eth_dma_zone_reserve;
 	rte_eth_find_next;
 	rte_eth_find_next_owned_by;
 	rte_eth_iterator_cleanup;
@@ -195,16 +187,8 @@ EXPERIMENTAL {
 	rte_eth_dev_owner_unset;
 
 	# added in 18.05
-	rte_eth_dev_create;
-	rte_eth_dev_destroy;
 	rte_eth_dev_get_module_eeprom;
 	rte_eth_dev_get_module_info;
-	rte_eth_devargs_parse;
-	rte_eth_switch_domain_alloc;
-	rte_eth_switch_domain_free;
-
-	# added in 18.08
-	rte_flow_expand_rss;
 
 	# added in 18.11
 	rte_eth_dev_rx_intr_ctl_q_get_fd;
@@ -246,5 +230,19 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
+	_rte_eth_dev_callback_process;
+	_rte_eth_dev_reset;
+	rte_eth_dev_allocate;
+	rte_eth_dev_allocated;
+	rte_eth_dev_attach_secondary;
+	rte_eth_dev_create;
+	rte_eth_dev_destroy;
+	rte_eth_dev_probing_finish;
+	rte_eth_dev_release_port;
+	rte_eth_devargs_parse;
 	rte_eth_dma_zone_free;
+	rte_eth_dma_zone_reserve;
+	rte_eth_switch_domain_alloc;
+	rte_eth_switch_domain_free;
+	rte_flow_expand_rss;
 };
lib/librte_ethdev/rte_flow_driver.h +1 -3
index 997598db11..3ee871d3eb 100644
@@ -161,8 +161,6 @@ struct rte_flow_expand_rss {
  * Expand RSS flows into several possible flows according to the RSS hash
  * fields requested and the driver capabilities.
  *
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * @param[out] buf
  *   Buffer to store the result expansion.
  * @param[in] size
@@ -183,7 +181,7 @@ struct rte_flow_expand_rss {
  *
  *   -E2BIG: graph-depth @p graph is too deep.
  */
-__rte_experimental
+__rte_internal
 int
 rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
 		    const struct rte_flow_item *pattern, uint64_t types,
Signature · 1 line
2.25.4
Acked-by on v1 4/7
#7 lore raw

Re: [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions

Quoted 7 lines · Ferruh Yigit

Some ethdev functions are for drivers only, not for applications.

Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.

Quoted 5 lines

Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.

with a nit below

[snip]

lib/librte_ethdev/rte_ethdev.h rte_eth_find_next_of(uint16_t port_id_start, · line 1726

Quoted 11 lines
lib/librte_ethdev/rte_ethdev.h +1 -2
index 2ce186610b..ce2e0ec0e4 100644
@@ -1723,8 +1723,7 @@ rte_eth_find_next_of(uint16_t port_id_start,
  */
 __rte_experimental
 uint16_t
-rte_eth_find_next_sibling(uint16_t port_id_start,
-		uint16_t ref_port_id);
+rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);

Looks unrelated

[snip]

#8 lore raw

PATCH 5/7 ethdev: use hairpin helper functions

In reply to Ferruh Yigit

Hairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'

Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.

---
 drivers/net/mlx5/mlx5_rxq.c              | 4 ++--
 drivers/net/mlx5/mlx5_txq.c              | 4 ++--
 lib/librte_ethdev/rte_ethdev_driver.h    | 2 ++
 lib/librte_ethdev/rte_ethdev_version.map | 2 ++
 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +2 -2
index 79eb8f8d72..4b200579dd 100644
@@ -542,7 +542,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 	eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
 	int ret;
 
-	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be stopped");
 		rte_errno = EINVAL;
 		return -EINVAL;
@@ -653,7 +653,7 @@ mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be started");
 		rte_errno = EINVAL;
 		return -EINVAL;
drivers/net/mlx5/mlx5_txq.c +2 -2
index 21fe16b7ed..9d5f4d35b2 100644
@@ -244,7 +244,7 @@ mlx5_tx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->tx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_tx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be stopped");
 		rte_errno = EINVAL;
 		return -EINVAL;
@@ -371,7 +371,7 @@ mlx5_tx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->tx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_tx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be started");
 		rte_errno = EINVAL;
 		return -EINVAL;
lib/librte_ethdev/rte_ethdev_driver.h +2 -0
index 3d1bc33272..5dfe9fdf1a 100644
@@ -734,6 +734,7 @@ struct eth_dev_ops {
  * @return
  *   - (1) if the queue is hairpin queue, 0 otherwise.
  */
+__rte_internal
 int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
 
 /**
@@ -748,6 +749,7 @@ int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
  * @return
  *   - (1) if the queue is hairpin queue, 0 otherwise.
  */
+__rte_internal
 int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
 
 /**
lib/librte_ethdev/rte_ethdev_version.map +2 -0
index 6a84f3d76d..5db3fb156a 100644
@@ -237,6 +237,8 @@ INTERNAL {
 	rte_eth_dev_attach_secondary;
 	rte_eth_dev_create;
 	rte_eth_dev_destroy;
+	rte_eth_dev_is_rx_hairpin_queue;
+	rte_eth_dev_is_tx_hairpin_queue;
 	rte_eth_dev_probing_finish;
 	rte_eth_dev_release_port;
 	rte_eth_devargs_parse;
Signature · 1 line
2.25.4
Acked-by on v1 5/7
#9 lore raw

Re: [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions

Quoted 9 lines · Ferruh Yigit

Hairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'

Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.

#10 lore raw

PATCH 6/7 ethdev: remove invalid symbols from map file

In reply to Ferruh Yigit

These are sturct type names, not object names. Removing them from .map file.

Fixes 9d41beed24b0 ("lib: provide initial versioning")
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)
lib/librte_ethdev/rte_ethdev_version.map +0 -2
index 5db3fb156a..a85986a2a2 100644
@@ -81,7 +81,6 @@ DPDK_21 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -96,7 +95,6 @@ DPDK_21 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
Signature · 1 line
2.25.4
#12 lore raw

PATCH 7/7 ethdev: remove underscore prefix from internal API

In reply to Ferruh Yigit

'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.

For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.

---
 app/test/virtual_pmd.c                   |  4 ++--
 doc/guides/prog_guide/poll_mode_drv.rst  |  4 ++--
 drivers/net/atlantic/atl_ethdev.c        |  5 ++---
 drivers/net/bnxt/bnxt_ethdev.c           |  6 +++---
 drivers/net/bnxt/rte_pmd_bnxt.c          |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c   |  8 ++++----
 drivers/net/dpaa/dpaa_ethdev.c           |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c         |  3 +--
 drivers/net/e1000/em_ethdev.c            |  2 +-
 drivers/net/e1000/igb_ethdev.c           |  7 +++----
 drivers/net/ena/ena_ethdev.c             |  4 ++--
 drivers/net/enic/enic_main.c             |  2 +-
 drivers/net/failsafe/failsafe_ether.c    |  6 +++---
 drivers/net/fm10k/fm10k_ethdev.c         | 11 ++++-------
 drivers/net/hinic/base/hinic_pmd_hwdev.c |  6 +++---
 drivers/net/i40e/i40e_ethdev.c           |  2 +-
 drivers/net/i40e/i40e_ethdev_vf.c        |  4 ++--
 drivers/net/i40e/i40e_pf.c               |  2 +-
 drivers/net/iavf/iavf_vchnl.c            |  5 ++---
 drivers/net/ice/ice_ethdev.c             |  4 ++--
 drivers/net/igc/igc_ethdev.c             |  3 +--
 drivers/net/ixgbe/ixgbe_ethdev.c         | 10 ++++------
 drivers/net/ixgbe/ixgbe_pf.c             |  5 ++---
 drivers/net/mlx4/mlx4_intr.c             | 10 +++++-----
 drivers/net/mlx5/linux/mlx5_ethdev_os.c  |  4 ++--
 drivers/net/mlx5/mlx5_flow.c             |  2 +-
 drivers/net/netvsc/hn_rndis.c            |  2 +-
 drivers/net/nfp/nfp_net.c                |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c   |  6 +++---
 drivers/net/octeontx2/otx2_link.c        |  2 +-
 drivers/net/qede/qede_main.c             |  3 +--
 drivers/net/sfc/sfc_intr.c               | 12 ++++++------
 drivers/net/thunderx/nicvf_ethdev.c      |  6 +++---
 drivers/net/vhost/rte_eth_vhost.c        |  6 +++---
 drivers/net/virtio/virtio_ethdev.c       |  6 +++---
 drivers/net/vmxnet3/vmxnet3_ethdev.c     |  6 +++---
 lib/librte_ethdev/rte_ethdev.c           |  8 ++++----
 lib/librte_ethdev/rte_ethdev_driver.h    |  4 ++--
 lib/librte_ethdev/rte_ethdev_version.map |  4 ++--
 39 files changed, 90 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
index 79156cb85a..b49089a33c 100644
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id,
 
 	vrtl_eth_dev->data->dev_link.link_status = link_status;
 
-	_rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
-				      NULL);
+	rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
+				     NULL);
 }
 
 int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
index 6fae39f904..86e0a141e6 100644
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread.
 For example when PF is reset, the PF sends a message to notify VFs of
 this event and also trigger an interrupt to VFs. Then in the interrupt
 service routine the VFs detects this notification message and calls
-_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
+rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
 This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET
-event within VFs. The function _rte_eth_dev_callback_process() will
+event within VFs. The function rte_eth_dev_callback_process() will
 call the registered callback function. The callback function can trigger
 the application to handle all operations the VF reset requires including
 stopping Rx/Tx queues and calling rte_eth_dev_reset().
drivers/net/atlantic/atl_ethdev.c +2 -3
index 540b106045..2fca9140d7 100644
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 	/* Notify userapp if link status changed */
 	if (!atl_dev_link_update(dev, 0)) {
 		atl_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev,
-			RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	} else {
 		if (hw->aq_fw_ops->send_macsec_req == NULL)
 			goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 		    resp.stats.egress_expired ||
 		    resp.stats.ingress_expired) {
 			PMD_DRV_LOG(INFO, "RTE_ETH_EVENT_MACSEC");
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_MACSEC, NULL);
 		}
 	}
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index f94dd88b8c..ec177f8226 100644
@@ -1515,9 +1515,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
 	new.link_speed != eth_dev->data->dev_link.link_speed) {
 		rte_eth_linkstatus_set(eth_dev, &new);
 
-		_rte_eth_dev_callback_process(eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 
 		bnxt_print_link_info(eth_dev);
 	}
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
index eafc1d3868..d67db46c65 100644
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 	ret_param.vf_id = vf_id;
 	ret_param.msg = msg;
 
-	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
+				     &ret_param);
 
 	/* Default to approve */
 	if (ret_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
index cdbd8151ed..4ffd2ca4bb 100644
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals,
 	internals->slave_count--;
 
 	/* force reconfiguration of slave interfaces */
-	_rte_eth_dev_reset(slave_eth_dev);
+	rte_eth_dev_internal_reset(slave_eth_dev);
 }
 
 static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
 	if (arg == NULL)
 		return;
 
-	_rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
+	rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
 			RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						bond_ethdev_delayed_lsc_propagation,
 						(void *)bonded_eth_dev);
 			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
 						RTE_ETH_EVENT_INTR_LSC,
 						NULL);
 
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						bond_ethdev_delayed_lsc_propagation,
 						(void *)bonded_eth_dev);
 			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
 						RTE_ETH_EVENT_INTR_LSC,
 						NULL);
 		}
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index bfc6504139..8d88a3badb 100644
@@ -323,7 +323,7 @@ static void dpaa_interrupt_handler(void *param)
 	if (bytes_read < 0)
 		DPAA_PMD_ERR("Error reading eventfd\n");
 	dpaa_eth_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int dpaa_eth_dev_start(struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
index 38cf0ab71c..0e9f836e55 100644
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param)
 		clear = DPNI_IRQ_EVENT_LINK_CHANGED;
 		dpaa2_dev_link_update(dev, 0);
 		/* calling all the apps registered for link status event */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 out:
 	ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
index 66c5022bb7..ee97877095 100644
@@ -1629,7 +1629,7 @@ eth_em_interrupt_handler(void *param)
 
 	eth_em_interrupt_get_status(dev);
 	eth_em_interrupt_action(dev, dev->intr_handle);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
drivers/net/e1000/igb_ethdev.c +3 -4
index 2db04fa88c..c74e2f4358 100644
@@ -2918,8 +2918,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev,
 			     pci_dev->addr.bus,
 			     pci_dev->addr.devid,
 			     pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	return 0;
@@ -2981,8 +2980,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)
 		/* dummy mbx read to ack pf */
 		if (mbx->ops.read(hw, &in_msg, 1, 0))
 			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 	}
 }
 
drivers/net/ena/ena_ethdev.c +2 -2
index da8c8ad922..8077519735 100644
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
 
 	if (unlikely(adapter->trigger_reset)) {
 		PMD_DRV_LOG(ERR, "Trigger reset is on\n");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 			NULL);
 	}
 }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data,
 	adapter->link_status = status;
 
 	ena_link_update(eth_dev, 0);
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
index 7942b0df6b..8b0441c5cd 100644
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)
 	vnic_intr_return_all_credits(&enic->intr[ENICPMD_LSC_INTR_OFFSET]);
 
 	enic_link_update(dev);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	enic_log_q_error(enic);
 	/* Re-enable irq in case of INTx */
 	rte_intr_ack(&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
index 70972d6717..7c68bbdec0 100644
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused,
 	ret = dev->dev_ops->link_update(dev, 0);
 	/* We must pass on the LSC event */
 	if (ret)
-		return _rte_eth_dev_callback_process(dev,
-						     RTE_ETH_EVENT_INTR_LSC,
-						     NULL);
+		return rte_eth_dev_callback_process(dev,
+						    RTE_ETH_EVENT_INTR_LSC,
+						    NULL);
 	else
 		return 0;
 }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
index 20d48c30ea..1f4fa76e4d 100644
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
 					true);
 
 			dev_info->sm_down = 0;
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC,
 					NULL);
 		}
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
 	if (err == FM10K_ERR_RESET_REQUESTED) {
 		PMD_INIT_LOG(INFO, "INT: Switch is down");
 		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 
 		/* Setting reset flag */
 		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 		fm10k_vlan_filter_set(dev, hw->mac.default_vid, true);
 
 		dev_info->sm_down = 0;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
index ac2a72e388..41c99bdbf8 100644
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev,
 	ret = hinic_link_event_process(hwdev, rte_dev, status);
 	/* check if link has changed, notify callback */
 	if (ret == 0)
-		_rte_eth_dev_callback_process(rte_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(rte_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 }
 
 void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
index ad5a536d73..d1f07348ba 100644
@@ -6842,7 +6842,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
 		case i40e_aqc_opc_get_link_status:
 			ret = i40e_dev_link_update(dev, 0);
 			if (!ret)
-				_rte_eth_dev_callback_process(dev,
+				rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC, NULL);
 			break;
 		default:
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
index 1b4ffaa383..833045b564 100644
@@ -1377,8 +1377,8 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_LINK_CHANGE event");
drivers/net/i40e/i40e_pf.c +1 -1
index 7bf1e79410..03c2070c3f 100644
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
 	 * do nothing and send not_supported to VF. As PF must send a response
 	 * to VF and ACK/NACK is not defined.
 	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 	if (ret_param.retval != RTE_PMD_I40E_MB_EVENT_PROCEED) {
 		PMD_DRV_LOG(WARNING, "VF to PF message(%d) is not permitted!",
 			    opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
index 33acea54a5..67d6a63f9f 100644
@@ -183,7 +183,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 					      NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -198,8 +198,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 			vf->link_speed = iavf_convert_link_speed(speed);
 		}
 		iavf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
drivers/net/ice/ice_ethdev.c +2 -2
index 613b6638ad..e1f706e514 100644
@@ -1295,7 +1295,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)
 		case ice_aqc_opc_get_link_status:
 			ret = ice_link_update(dev, 0);
 			if (!ret)
-				_rte_eth_dev_callback_process
+				rte_eth_dev_callback_process
 					(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 			break;
 		default:
@@ -1360,7 +1360,7 @@ ice_interrupt_handler(void *param)
 		PMD_DRV_LOG(INFO, "OICR: link state change event");
 		ret = ice_link_update(dev, 0);
 		if (!ret)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 #endif
drivers/net/igc/igc_ethdev.c +1 -2
index 1fdbfcb60d..4fbbee2dfe 100644
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev)
 				pci_dev->addr.bus,
 				pci_dev->addr.devid,
 				pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 }
 
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
index ac1dc7841d..693acd9ae9 100644
@@ -4661,13 +4661,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)
 		ixgbe_dev_link_update(dev, 0);
 		intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;
 		ixgbe_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	if (intr->flags & IXGBE_FLAG_MACSEC) {
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC, NULL);
 		intr->flags &= ~IXGBE_FLAG_MACSEC;
 	}
 
@@ -8676,8 +8674,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)
 		/* dummy mbx read to ack pf */
 		if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
 			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 	}
 }
 
drivers/net/ixgbe/ixgbe_pf.c +2 -3
index 67b5bef44f..ed5f96b1a4 100644
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 		vfinfo[vf].clear_to_send = true;
 
 		/* notify application about VF reset */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
 					      &ret_param);
 		return ret;
 	}
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 	 * if 0, do nothing and send ACK to VF
 	 * if ret_param.retval > 1, do nothing and send NAK to VF
 	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 
 	retval = ret_param.retval;
 
drivers/net/mlx4/mlx4_intr.c +5 -5
index 19af9359c9..6786b12ab5 100644
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)
 	MLX4_ASSERT(priv->intr_alarm == 1);
 	priv->intr_alarm = 0;
 	if (intr_conf->lsc && !mlx4_link_status_check(priv))
-		_rte_eth_dev_callback_process(ETH_DEV(priv),
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(ETH_DEV(priv),
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 }
 
 /**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv)
 	}
 	for (i = 0; i != RTE_DIM(caught); ++i)
 		if (caught[i])
-			_rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
-						      NULL);
+			rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
+						     NULL);
 }
 
 /**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
index 3d3dd2e862..7256c1bcfe 100644
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
 		dev = &rte_eth_devices[sh->port[i].ih_port_id];
 		MLX5_ASSERT(dev);
 		if (dev->data->dev_conf.intr_conf.rmv)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_RMV, NULL);
 	}
 }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)
 				usleep(0);
 				continue;
 			}
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 			continue;
 		}
drivers/net/mlx5/mlx5_flow.c +1 -1
index 226b7bfd23..808c01ac71 100644
@@ -6078,7 +6078,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,
 		if (!MLX5_AGE_GET(age_info, MLX5_AGE_EVENT_NEW))
 			continue;
 		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER))
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(&rte_eth_devices[sh->port[i].devx_ih_port_id],
 				RTE_ETH_EVENT_FLOW_AGED, NULL);
 		age_info->flags = 0;
drivers/net/netvsc/hn_rndis.c +1 -1
index d186ddeabd..66d1966f29 100644
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
  */
 static void hn_rndis_link_alarm(void *arg)
 {
-	_rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 void hn_rndis_link_status(struct rte_eth_dev *dev, const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
index c556dedab6..4f03691989 100644
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 
 	nfp_net_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	nfp_net_dev_link_status_print(dev);
 
drivers/net/octeontx/octeontx_ethdev.c +3 -3
index 76c69294d0..808b761b96 100644
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)
 			octeontx_link_status_update(nic, &link);
 			octeontx_link_status_print(dev, &link);
 			rte_eth_linkstatus_set(dev, &link);
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 		}
 	}
 
drivers/net/octeontx2/otx2_link.c +1 -1
index 12bf6c3231..439ec4fa89 100644
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,
 	rte_eth_linkstatus_set(eth_dev, &eth_link);
 
 	/* Set the flag and execute application callbacks */
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
drivers/net/qede/qede_main.c +1 -2
index 987a6f1e13..aecb98261b 100644
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;
 
 	if (!qede_link_update(dev, 0))
-		_rte_eth_dev_callback_process(dev,
-					      RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int qed_drain(struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
index 80feab68f8..da32d393c2 100644
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)
 		sfc_notice(sa, "link status change event: link %s",
 			 sa->eth_dev->data->dev_link.link_status ?
 			 "UP" : "DOWN");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 	}
 }
 
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg)
 exit:
 	if (lsc_seq != sa->port.lsc_seq) {
 		sfc_notice(sa, "link status change event");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 	}
 }
 
drivers/net/thunderx/nicvf_ethdev.c +3 -3
index 959c8e4ddc..83d9488360 100644
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)
 			nicvf_link_status_update(nic, &link);
 			rte_eth_linkstatus_set(dev, &link);
 
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 		}
 	}
 
drivers/net/vhost/rte_eth_vhost.c +3 -3
index fa365605ef..ce32be9ce3 100644
@@ -832,7 +832,7 @@ new_device(int vid)
 
 	VHOST_LOG(INFO, "Vhost device %d created\n", vid);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	return 0;
 }
@@ -889,7 +889,7 @@ destroy_device(int vid)
 	VHOST_LOG(INFO, "Vhost device %d destroyed\n", vid);
 	eth_vhost_uninstall_intr(eth_dev);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
 
 	return 0;
 }
drivers/net/virtio/virtio_ethdev.c +3 -3
index 8658b6f2f0..4ce9ac5941 100644
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)
 
 	if (isr & VIRTIO_PCI_ISR_CONFIG) {
 		if (virtio_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 
 		if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
 			vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
index 815fba2f55..fa80e75a5b 100644
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)
 	if (events & VMXNET3_ECR_LINK) {
 		PMD_DRV_LOG(DEBUG, "Process events: VMXNET3_ECR_LINK event");
 		if (vmxnet3_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 	}
 
 	/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
index 7858ad5f11..bf9bd76f94 100644
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 	rte_eth_dev_shared_data_prepare();
 
 	if (eth_dev->state != RTE_ETH_DEV_UNUSED)
-		_rte_eth_dev_callback_process(eth_dev,
+		rte_eth_dev_callback_process(eth_dev,
 				RTE_ETH_EVENT_DESTROY, NULL);
 
 	rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 }
 
 void
-_rte_eth_dev_reset(struct rte_eth_dev *dev)
+rte_eth_dev_internal_reset(struct rte_eth_dev *dev)
 {
 	if (dev->data->dev_started) {
 		RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
 }
 
 int
-_rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 	enum rte_eth_event_type event, void *ret_param)
 {
 	struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)
 	if (dev == NULL)
 		return;
 
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
 
 	dev->state = RTE_ETH_DEV_ATTACHED;
 }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
index 5dfe9fdf1a..23cc1e0959 100644
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  *  void
  */
 __rte_internal
-void _rte_eth_dev_reset(struct rte_eth_dev *dev);
+void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);
 
 /**
  * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  *  int
  */
 __rte_internal
-int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+int rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 		enum rte_eth_event_type event, void *ret_param);
 
 /**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
index a85986a2a2..b6630dfabe 100644
@@ -228,17 +228,17 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
 	rte_eth_dev_allocate;
 	rte_eth_dev_allocated;
 	rte_eth_dev_attach_secondary;
+	rte_eth_dev_callback_process;
 	rte_eth_dev_create;
 	rte_eth_dev_destroy;
 	rte_eth_dev_is_rx_hairpin_queue;
 	rte_eth_dev_is_tx_hairpin_queue;
 	rte_eth_dev_probing_finish;
 	rte_eth_dev_release_port;
+	rte_eth_dev_internal_reset;
 	rte_eth_devargs_parse;
 	rte_eth_dma_zone_free;
 	rte_eth_dma_zone_reserve;
Signature · 1 line
2.25.4
Acked-by on v1 7/7
#13 lore raw

Re: [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API

Quoted 11 lines · Ferruh Yigit

'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.

For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.

Reviewed-by on v1 1/7
#14 lore raw
In reply to Ferruh Yigit
Quoted 10 lines · Ferruh Yigit

Removing 'rte_eth_rx_descriptor_done()' API and relevant 'rx_descriptor_done' function pointer from 'struct eth_dev_ops'.

Deprecation notice is to deprecate the API in 20.11 and remove one year later, this is useful to prevent new applications use the API but keep the support for old application. But since 20.11 have the ABI break and most of the applications need to re-compile anyway will prevent them to use the API, the affect will be same as removing the API. So removing it in the 20.11 to reduce the churn.

Quoted 3 lines

'rx_descriptor_done' implementations removed from PMDs.

Thanks for working on it.

#15 lore raw

PATCH v2 1/7 ethdev: remove legacy descriptor status check API

In reply to Ferruh Yigit

Removing 'rte_eth_rx_descriptor_done()' API and relevant 'rx_descriptor_done' function pointer from 'struct eth_dev_ops'.

Deprecation notice is to deprecate the API in 20.11 and remove one year later, this is useful to prevent new applications use the API but keep the support for old application. But since 20.11 have the ABI break and most of the applications need to re-compile anyway will prevent them to use the API, the affect will be same as removing the API. So removing it in the 20.11 to reduce the churn.

'rx_descriptor_done' implementations removed from PMDs.

---
 doc/guides/nics/features.rst            |  6 +-----
 doc/guides/rel_notes/deprecation.rst    |  5 -----
 drivers/net/e1000/e1000_ethdev.h        |  4 ----
 drivers/net/e1000/em_ethdev.c           |  1 -
 drivers/net/e1000/em_rxtx.c             | 17 ----------------
 drivers/net/e1000/igb_ethdev.c          |  2 --
 drivers/net/e1000/igb_rxtx.c            | 17 ----------------
 drivers/net/enic/enic_ethdev.c          |  1 -
 drivers/net/fm10k/fm10k.h               |  3 ---
 drivers/net/fm10k/fm10k_ethdev.c        |  1 -
 drivers/net/fm10k/fm10k_rxtx.c          | 25 ------------------------
 drivers/net/i40e/i40e_ethdev.c          |  1 -
 drivers/net/i40e/i40e_ethdev_vf.c       |  1 -
 drivers/net/i40e/i40e_rxtx.c            | 26 -------------------------
 drivers/net/i40e/i40e_rxtx.h            |  1 -
 drivers/net/igc/igc_ethdev.c            |  1 -
 drivers/net/igc/igc_txrx.c              | 18 -----------------
 drivers/net/igc/igc_txrx.h              |  2 --
 drivers/net/ixgbe/ixgbe_ethdev.c        |  2 --
 drivers/net/ixgbe/ixgbe_ethdev.h        |  2 --
 drivers/net/ixgbe/ixgbe_rxtx.c          | 18 -----------------
 drivers/net/octeontx2/otx2_ethdev.c     |  1 -
 drivers/net/octeontx2/otx2_ethdev.h     |  1 -
 drivers/net/octeontx2/otx2_ethdev_ops.c | 12 ------------
 drivers/net/sfc/sfc_ethdev.c            | 17 ----------------
 drivers/net/virtio/virtio_ethdev.c      |  1 -
 drivers/net/virtio/virtio_ethdev.h      |  2 --
 drivers/net/virtio/virtio_rxtx.c        |  9 ---------
 lib/librte_ethdev/rte_ethdev.h          | 25 ------------------------
 lib/librte_ethdev/rte_ethdev_core.h     |  4 ----
 30 files changed, 1 insertion(+), 225 deletions(-)
doc/guides/nics/features.rst +1 -5
index edd21c4d8e..701c592b26 100644
@@ -642,14 +642,10 @@ Rx descriptor status
 --------------------
 
 Supports check the status of a Rx descriptor. When ``rx_descriptor_status`` is
-used, status can be "Available", "Done" or "Unavailable". When
-``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is
-not set".
+used, status can be "Available", "Done" or "Unavailable".
 
 * **[implements] eth_dev_ops**: ``rx_descriptor_status``.
 * **[related]    API**: ``rte_eth_rx_descriptor_status()``.
-* **[implements] eth_dev_ops**: ``rx_descriptor_done``.
-* **[related]    API**: ``rte_eth_rx_descriptor_done()``.
 
 
 .. _nic_features_tx_descriptor_status:
doc/guides/rel_notes/deprecation.rst +0 -5
index 345c38d5b6..811eaad6ce 100644
@@ -220,11 +220,6 @@ Deprecation Notices
   for HW. This change is planned for 20.11. For more details:
   https://mails.dpdk.org/archives/dev/2020-July/176135.html.
 
-* ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done``
-  will be deprecated in 20.11 and will be removed in 21.11.
-  Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status``
-  APIs can be used as replacement.
-
 * ethdev: The port mirroring API can be replaced with a more fine grain flow API.
   The structs ``rte_eth_mirror_conf``, ``rte_eth_vlan_mirror`` and the functions
   ``rte_eth_mirror_rule_set``, ``rte_eth_mirror_rule_reset`` will be marked
drivers/net/e1000/e1000_ethdev.h +0 -4
index 1e41ae9de1..dce365226b 100644
@@ -384,8 +384,6 @@ int eth_igb_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 uint32_t eth_igb_rx_queue_count(struct rte_eth_dev *dev,
 		uint16_t rx_queue_id);
 
-int eth_igb_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int eth_igb_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int eth_igb_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
@@ -461,8 +459,6 @@ int eth_em_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 uint32_t eth_em_rx_queue_count(struct rte_eth_dev *dev,
 		uint16_t rx_queue_id);
 
-int eth_em_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int eth_em_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int eth_em_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
drivers/net/e1000/em_ethdev.c +0 -1
index 902b1cdca0..32872db9c2 100644
@@ -177,7 +177,6 @@ static const struct eth_dev_ops eth_em_ops = {
 	.rx_queue_setup       = eth_em_rx_queue_setup,
 	.rx_queue_release     = eth_em_rx_queue_release,
 	.rx_queue_count       = eth_em_rx_queue_count,
-	.rx_descriptor_done   = eth_em_rx_descriptor_done,
 	.rx_descriptor_status = eth_em_rx_descriptor_status,
 	.tx_descriptor_status = eth_em_tx_descriptor_status,
 	.tx_queue_setup       = eth_em_tx_queue_setup,
drivers/net/e1000/em_rxtx.c +0 -17
index 67a271e8ce..2ffc31b41d 100644
@@ -1511,23 +1511,6 @@ eth_em_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-eth_em_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile struct e1000_rx_desc *rxdp;
-	struct em_rx_queue *rxq = rx_queue;
-	uint32_t desc;
-
-	if (unlikely(offset >= rxq->nb_rx_desc))
-		return 0;
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &rxq->rx_ring[desc];
-	return !!(rxdp->status & E1000_RXD_STAT_DD);
-}
-
 int
 eth_em_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/e1000/igb_ethdev.c +0 -2
index a5551e8175..aec79c6ceb 100644
@@ -381,7 +381,6 @@ static const struct eth_dev_ops eth_igb_ops = {
 	.rx_queue_intr_disable = eth_igb_rx_queue_intr_disable,
 	.rx_queue_release     = eth_igb_rx_queue_release,
 	.rx_queue_count       = eth_igb_rx_queue_count,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
 	.rx_descriptor_status = eth_igb_rx_descriptor_status,
 	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
@@ -441,7 +440,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {
 	.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
 	.rx_queue_setup       = eth_igb_rx_queue_setup,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
 	.rx_descriptor_status = eth_igb_rx_descriptor_status,
 	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
drivers/net/e1000/igb_rxtx.c +0 -17
index dd520cd82c..d313893c3a 100644
@@ -1791,23 +1791,6 @@ eth_igb_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-eth_igb_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union e1000_adv_rx_desc *rxdp;
-	struct igb_rx_queue *rxq = rx_queue;
-	uint32_t desc;
-
-	if (unlikely(offset >= rxq->nb_rx_desc))
-		return 0;
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &rxq->rx_ring[desc];
-	return !!(rxdp->wb.upper.status_error & E1000_RXD_STAT_DD);
-}
-
 int
 eth_igb_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/enic/enic_ethdev.c +0 -1
index ca75919ee2..1316c5c739 100644
@@ -1142,7 +1142,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
 	.rx_queue_setup       = enicpmd_dev_rx_queue_setup,
 	.rx_queue_release     = enicpmd_dev_rx_queue_release,
 	.rx_queue_count       = enicpmd_dev_rx_queue_count,
-	.rx_descriptor_done   = NULL,
 	.tx_queue_setup       = enicpmd_dev_tx_queue_setup,
 	.tx_queue_release     = enicpmd_dev_tx_queue_release,
 	.rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
drivers/net/fm10k/fm10k.h +0 -3
index 916b856acc..2e47ada829 100644
@@ -326,9 +326,6 @@ uint16_t fm10k_recv_scattered_pkts(void *rx_queue,
 uint32_t
 fm10k_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id);
 
-int
-fm10k_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int
 fm10k_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
 
drivers/net/fm10k/fm10k_ethdev.c +0 -1
index fd927923da..56e2425e47 100644
@@ -2856,7 +2856,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = {
 	.tx_queue_setup		= fm10k_tx_queue_setup,
 	.tx_queue_release	= fm10k_tx_queue_release,
 	.rx_queue_count		= fm10k_dev_rx_queue_count,
-	.rx_descriptor_done	= fm10k_dev_rx_descriptor_done,
 	.rx_descriptor_status = fm10k_dev_rx_descriptor_status,
 	.tx_descriptor_status = fm10k_dev_tx_descriptor_status,
 	.rx_queue_intr_enable	= fm10k_dev_rx_queue_intr_enable,
drivers/net/fm10k/fm10k_rxtx.c +0 -25
index 4accaa2cd6..399bb3da19 100644
@@ -393,31 +393,6 @@ fm10k_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-fm10k_dev_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union fm10k_rx_desc *rxdp;
-	struct fm10k_rx_queue *rxq = rx_queue;
-	uint16_t desc;
-	int ret;
-
-	if (unlikely(offset >= rxq->nb_desc)) {
-		PMD_DRV_LOG(ERR, "Invalid RX descriptor offset %u", offset);
-		return 0;
-	}
-
-	desc = rxq->next_dd + offset;
-	if (desc >= rxq->nb_desc)
-		desc -= rxq->nb_desc;
-
-	rxdp = &rxq->hw_ring[desc];
-
-	ret = !!(rxdp->w.status &
-			rte_cpu_to_le_16(FM10K_RXD_STATUS_DD));
-
-	return ret;
-}
-
 int
 fm10k_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/i40e/i40e_ethdev.c +0 -1
index 11c02b1888..f8ed4a0b36 100644
@@ -475,7 +475,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 	.rx_queue_intr_disable        = i40e_dev_rx_queue_intr_disable,
 	.rx_queue_release             = i40e_dev_rx_queue_release,
 	.rx_queue_count               = i40e_dev_rx_queue_count,
-	.rx_descriptor_done           = i40e_dev_rx_descriptor_done,
 	.rx_descriptor_status         = i40e_dev_rx_descriptor_status,
 	.tx_descriptor_status         = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup               = i40e_dev_tx_queue_setup,
drivers/net/i40e/i40e_ethdev_vf.c +0 -1
index b4e42939e6..d32e655d90 100644
@@ -199,7 +199,6 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = {
 	.rx_queue_release     = i40e_dev_rx_queue_release,
 	.rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable,
-	.rx_descriptor_done   = i40e_dev_rx_descriptor_done,
 	.rx_descriptor_status = i40e_dev_rx_descriptor_status,
 	.tx_descriptor_status = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup       = i40e_dev_tx_queue_setup,
drivers/net/i40e/i40e_rxtx.c +0 -26
index fe7f9200c1..645fbf401c 100644
@@ -2032,32 +2032,6 @@ i40e_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union i40e_rx_desc *rxdp;
-	struct i40e_rx_queue *rxq = rx_queue;
-	uint16_t desc;
-	int ret;
-
-	if (unlikely(offset >= rxq->nb_rx_desc)) {
-		PMD_DRV_LOG(ERR, "Invalid RX descriptor id %u", offset);
-		return 0;
-	}
-
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &(rxq->rx_ring[desc]);
-
-	ret = !!(((rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len) &
-		I40E_RXD_QW1_STATUS_MASK) >> I40E_RXD_QW1_STATUS_SHIFT) &
-				(1 << I40E_RX_DESC_STATUS_DD_SHIFT));
-
-	return ret;
-}
-
 int
 i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/i40e/i40e_rxtx.h +0 -1
index 57d7b4160b..925f3d853d 100644
@@ -221,7 +221,6 @@ void i40e_rx_queue_release_mbufs(struct i40e_rx_queue *rxq);
 
 uint32_t i40e_dev_rx_queue_count(struct rte_eth_dev *dev,
 				 uint16_t rx_queue_id);
-int i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);
 int i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int i40e_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
drivers/net/igc/igc_ethdev.c +0 -1
index 6ab3ee909d..ace6b3fb3d 100644
@@ -273,7 +273,6 @@ static const struct eth_dev_ops eth_igc_ops = {
 	.rx_queue_setup		= eth_igc_rx_queue_setup,
 	.rx_queue_release	= eth_igc_rx_queue_release,
 	.rx_queue_count		= eth_igc_rx_queue_count,
-	.rx_descriptor_done	= eth_igc_rx_descriptor_done,
 	.rx_descriptor_status	= eth_igc_rx_descriptor_status,
 	.tx_descriptor_status	= eth_igc_tx_descriptor_status,
 	.tx_queue_setup		= eth_igc_tx_queue_setup,
drivers/net/igc/igc_txrx.c +0 -18
index 4654ec41f0..f3962533d5 100644
@@ -756,24 +756,6 @@ uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev,
 	return desc;
 }
 
-int eth_igc_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union igc_adv_rx_desc *rxdp;
-	struct igc_rx_queue *rxq = rx_queue;
-	uint32_t desc;
-
-	if (unlikely(!rxq || offset >= rxq->nb_rx_desc))
-		return 0;
-
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &rxq->rx_ring[desc];
-	return !!(rxdp->wb.upper.status_error &
-			rte_cpu_to_le_32(IGC_RXD_STAT_DD));
-}
-
 int eth_igc_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
 	struct igc_rx_queue *rxq = rx_queue;
drivers/net/igc/igc_txrx.h +0 -2
index f2b2d75bbc..d6f3799639 100644
@@ -25,8 +25,6 @@ int eth_igc_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev,
 		uint16_t rx_queue_id);
 
-int eth_igc_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int eth_igc_rx_descriptor_status(void *rx_queue, uint16_t offset);
 
 int eth_igc_tx_descriptor_status(void *tx_queue, uint16_t offset);
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
index fd0cb9b0e2..f536ca61cf 100644
@@ -546,7 +546,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
 	.rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
 	.rx_queue_count       = ixgbe_dev_rx_queue_count,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
 	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
 	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
@@ -622,7 +621,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
 	.vlan_offload_set     = ixgbevf_vlan_offload_set,
 	.rx_queue_setup       = ixgbe_dev_rx_queue_setup,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
 	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
 	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
drivers/net/ixgbe/ixgbe_ethdev.h +0 -2
index 9bdef87fbd..b0e2b2452f 100644
@@ -602,8 +602,6 @@ int  ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
 uint32_t ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev,
 		uint16_t rx_queue_id);
 
-int ixgbe_dev_rx_descriptor_done(void *rx_queue, uint16_t offset);
-
 int ixgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int ixgbe_dev_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
drivers/net/ixgbe/ixgbe_rxtx.c +0 -18
index 977ecf5137..5254fe3738 100644
@@ -3216,24 +3216,6 @@ ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return desc;
 }
 
-int
-ixgbe_dev_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	volatile union ixgbe_adv_rx_desc *rxdp;
-	struct ixgbe_rx_queue *rxq = rx_queue;
-	uint32_t desc;
-
-	if (unlikely(offset >= rxq->nb_rx_desc))
-		return 0;
-	desc = rxq->rx_tail + offset;
-	if (desc >= rxq->nb_rx_desc)
-		desc -= rxq->nb_rx_desc;
-
-	rxdp = &rxq->rx_ring[desc];
-	return !!(rxdp->wb.upper.status_error &
-			rte_cpu_to_le_32(IXGBE_RXDADV_STAT_DD));
-}
-
 int
 ixgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/octeontx2/otx2_ethdev.c +0 -1
index 33b72bd4db..b5d25fe68e 100644
@@ -2273,7 +2273,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = {
 	.rx_burst_mode_get        = otx2_rx_burst_mode_get,
 	.tx_burst_mode_get        = otx2_tx_burst_mode_get,
 	.rx_queue_count           = otx2_nix_rx_queue_count,
-	.rx_descriptor_done       = otx2_nix_rx_descriptor_done,
 	.rx_descriptor_status     = otx2_nix_rx_descriptor_status,
 	.tx_descriptor_status     = otx2_nix_tx_descriptor_status,
 	.tx_done_cleanup          = otx2_nix_tx_done_cleanup,
drivers/net/octeontx2/otx2_ethdev.h +0 -1
index e9efe52bb0..10bcd1b6a4 100644
@@ -412,7 +412,6 @@ int otx2_tx_burst_mode_get(struct rte_eth_dev *dev, uint16_t queue_id,
 			   struct rte_eth_burst_mode *mode);
 uint32_t otx2_nix_rx_queue_count(struct rte_eth_dev *eth_dev, uint16_t qidx);
 int otx2_nix_tx_done_cleanup(void *txq, uint32_t free_cnt);
-int otx2_nix_rx_descriptor_done(void *rxq, uint16_t offset);
 int otx2_nix_rx_descriptor_status(void *rx_queue, uint16_t offset);
 int otx2_nix_tx_descriptor_status(void *tx_queue, uint16_t offset);
 
drivers/net/octeontx2/otx2_ethdev_ops.c +0 -12
index faecf216c1..6c6a4f35e9 100644
@@ -371,18 +371,6 @@ nix_offset_has_packet(uint32_t head, uint32_t tail, uint16_t offset)
 	return 0;
 }
 
-int
-otx2_nix_rx_descriptor_done(void *rx_queue, uint16_t offset)
-{
-	struct otx2_eth_rxq *rxq = rx_queue;
-	uint32_t head, tail;
-
-	nix_rx_head_tail_get(otx2_eth_pmd_priv(rxq->eth_dev),
-			     &head, &tail, rxq->rq);
-
-	return nix_offset_has_packet(head, tail, offset);
-}
-
 int
 otx2_nix_rx_descriptor_status(void *rx_queue, uint16_t offset)
 {
drivers/net/sfc/sfc_ethdev.c +0 -17
index acee3e48e4..65e0ff7d48 100644
@@ -1221,21 +1221,6 @@ sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	return sap->dp_rx->qdesc_npending(rxq_info->dp);
 }
 
-/*
- * The function is used by the secondary process as well. It must not
- * use any process-local pointers from the adapter data.
- */
-static int
-sfc_rx_descriptor_done(void *queue, uint16_t offset)
-{
-	struct sfc_dp_rxq *dp_rxq = queue;
-	const struct sfc_dp_rx *dp_rx;
-
-	dp_rx = sfc_dp_rx_by_dp_rxq(dp_rxq);
-
-	return offset < dp_rx->qdesc_npending(dp_rxq);
-}
-
 /*
  * The function is used by the secondary process as well. It must not
  * use any process-local pointers from the adapter data.
@@ -1820,7 +1805,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = {
 	.rx_queue_setup			= sfc_rx_queue_setup,
 	.rx_queue_release		= sfc_rx_queue_release,
 	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
 	.rx_descriptor_status		= sfc_rx_descriptor_status,
 	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.rx_queue_intr_enable		= sfc_rx_queue_intr_enable,
@@ -2018,7 +2002,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
 	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
 	.rx_descriptor_status		= sfc_rx_descriptor_status,
 	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.reta_query			= sfc_dev_rss_reta_query,
drivers/net/virtio/virtio_ethdev.c +0 -1
index dc0093bdf0..8658b6f2f0 100644
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
 	.rx_queue_intr_enable    = virtio_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable   = virtio_dev_rx_queue_intr_disable,
 	.rx_queue_release        = virtio_dev_queue_release,
-	.rx_descriptor_done      = virtio_dev_rx_queue_done,
 	.tx_queue_setup          = virtio_dev_tx_queue_setup,
 	.tx_queue_release        = virtio_dev_queue_release,
 	/* collect stats per queue */
drivers/net/virtio/virtio_ethdev.h +0 -2
index b7d52d497f..c93f320f83 100644
@@ -60,8 +60,6 @@ void virtio_dev_cq_start(struct rte_eth_dev *dev);
  * RX/TX function prototypes
  */
 
-int virtio_dev_rx_queue_done(void *rxq, uint16_t offset);
-
 int  virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,
 		uint16_t nb_rx_desc, unsigned int socket_id,
 		const struct rte_eth_rxconf *rx_conf,
drivers/net/virtio/virtio_rxtx.c +0 -9
index f915b8a2c9..043788876e 100644
@@ -39,15 +39,6 @@
 #define  VIRTIO_DUMP_PACKET(m, len) do { } while (0)
 #endif
 
-int
-virtio_dev_rx_queue_done(void *rxq, uint16_t offset)
-{
-	struct virtnet_rx *rxvq = rxq;
-	struct virtqueue *vq = rxvq->vq;
-
-	return virtqueue_nused(vq) >= offset;
-}
-
 void
 vq_ring_free_inorder(struct virtqueue *vq, uint16_t desc_idx, uint16_t num)
 {
lib/librte_ethdev/rte_ethdev.h +0 -25
index 70295d7ab7..b52b04f7e0 100644
@@ -4552,31 +4552,6 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 	return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
 }
 
-/**
- * Check if the DD bit of the specific RX descriptor in the queue has been set
- *
- * @param port_id
- *  The port identifier of the Ethernet device.
- * @param queue_id
- *  The queue id on the specific port.
- * @param offset
- *  The offset of the descriptor ID from tail.
- * @return
- *  - (1) if the specific DD bit is set.
- *  - (0) if the specific DD bit is not set.
- *  - (-ENODEV) if *port_id* invalid.
- *  - (-ENOTSUP) if the device does not support this function
- */
-static inline int
-rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
-{
-	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
-	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
-	return (*dev->dev_ops->rx_descriptor_done)( \
-		dev->data->rx_queues[queue_id], offset);
-}
-
 #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */
 #define RTE_ETH_RX_DESC_DONE     1 /**< Desc done, filled by hw. */
 #define RTE_ETH_RX_DESC_UNAVAIL  2 /**< Desc used by driver or hw. */
lib/librte_ethdev/rte_ethdev_core.h +0 -4
index 32407dd418..292a6423c4 100644
@@ -287,9 +287,6 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev,
 					 uint16_t rx_queue_id);
 /**< @internal Get number of used descriptors on a receive queue. */
 
-typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);
-/**< @internal Check DD bit of specific RX descriptor */
-
 typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
 /**< @internal Check the status of a Rx descriptor */
 
@@ -662,7 +659,6 @@ struct eth_dev_ops {
 	eth_queue_release_t        rx_queue_release; /**< Release RX queue. */
 	eth_rx_queue_count_t       rx_queue_count;
 	/**< Get the number of used RX descriptors. */
-	eth_rx_descriptor_done_t   rx_descriptor_done; /**< Check rxd DD bit. */
 	eth_rx_descriptor_status_t rx_descriptor_status;
 	/**< Check the status of a Rx descriptor. */
 	eth_tx_descriptor_status_t tx_descriptor_status;
Signature · 1 line
2.25.4
#16 lore raw

PATCH v2 2/7 ethdev: move inline device operations

This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.

Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.

Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.

To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.

The list of dev_ops moved:
eth_rx_queue_count_t rx_queue_count;
eth_rx_descriptor_status_t rx_descriptor_status;
eth_tx_descriptor_status_t tx_descriptor_status;

---
v2:
* Updated features.rst
* Tweak assignment order in sfc

---
 doc/guides/nics/features.rst        |  4 ++--
 drivers/net/ark/ark_ethdev.c        |  2 +-
 drivers/net/atlantic/atl_ethdev.c   |  9 +++++----
 drivers/net/axgbe/axgbe_ethdev.c    |  5 +++--
 drivers/net/bnxt/bnxt_ethdev.c      |  6 +++---
 drivers/net/dpaa/dpaa_ethdev.c      |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c    |  2 +-
 drivers/net/e1000/em_ethdev.c       |  6 +++---
 drivers/net/e1000/igb_ethdev.c      | 10 +++++-----
 drivers/net/enic/enic_ethdev.c      |  2 +-
 drivers/net/fm10k/fm10k_ethdev.c    |  6 +++---
 drivers/net/i40e/i40e_ethdev.c      |  6 +++---
 drivers/net/i40e/i40e_ethdev_vf.c   |  6 +++---
 drivers/net/iavf/iavf_ethdev.c      |  6 +++---
 drivers/net/ice/ice_ethdev.c        |  6 +++---
 drivers/net/igc/igc_ethdev.c        |  6 +++---
 drivers/net/ixgbe/ixgbe_ethdev.c    | 10 +++++-----
 drivers/net/mlx5/linux/mlx5_os.c    | 12 +++++-------
 drivers/net/mlx5/mlx5_flow.c        |  4 ++++
 drivers/net/netvsc/hn_ethdev.c      |  6 +++---
 drivers/net/nfp/nfp_net.c           |  2 +-
 drivers/net/octeontx2/otx2_ethdev.c |  6 +++---
 drivers/net/qede/qede_ethdev.c      |  3 +--
 drivers/net/sfc/sfc_ethdev.c        | 12 ++++++------
 drivers/net/thunderx/nicvf_ethdev.c |  2 +-
 drivers/net/vhost/rte_eth_vhost.c   |  2 +-
 lib/librte_ethdev/rte_ethdev.h      | 12 ++++++------
 lib/librte_ethdev/rte_ethdev_core.h | 11 +++++------
 28 files changed, 84 insertions(+), 82 deletions(-)
doc/guides/nics/features.rst +2 -2
index 701c592b26..60a8e95993 100644
@@ -644,7 +644,7 @@ Rx descriptor status
 Supports check the status of a Rx descriptor. When ``rx_descriptor_status`` is
 used, status can be "Available", "Done" or "Unavailable".
 
-* **[implements] eth_dev_ops**: ``rx_descriptor_status``.
+* **[implements] rte_eth_dev**: ``rx_descriptor_status``.
 * **[related]    API**: ``rte_eth_rx_descriptor_status()``.
 
 
@@ -656,7 +656,7 @@ Tx descriptor status
 Supports checking the status of a Tx descriptor. Status can be "Full", "Done"
 or "Unavailable."
 
-* **[implements] eth_dev_ops**: ``tx_descriptor_status``.
+* **[implements] rte_eth_dev**: ``tx_descriptor_status``.
 * **[related]    API**: ``rte_eth_tx_descriptor_status()``.
 
 
drivers/net/ark/ark_ethdev.c +1 -1
index b32ccd8677..ce7f6e4803 100644
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = {
 	.dev_infos_get = eth_ark_dev_info_get,
 
 	.rx_queue_setup = eth_ark_dev_rx_queue_setup,
-	.rx_queue_count = eth_ark_dev_rx_queue_count,
 	.tx_queue_setup = eth_ark_tx_queue_setup,
 
 	.link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		return -1;
 
 	dev->dev_ops = &ark_eth_dev_ops;
+	dev->rx_queue_count = eth_ark_dev_rx_queue_count;
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
index d3b00ab295..540b106045 100644
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = {
 	.rx_queue_intr_enable = atl_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = atl_dev_rx_queue_intr_disable,
 
-	.rx_queue_count       = atl_rx_queue_count,
-	.rx_descriptor_status = atl_dev_rx_descriptor_status,
-	.tx_descriptor_status = atl_dev_tx_descriptor_status,
-
 	/* EEPROM */
 	.get_eeprom_length    = atl_dev_get_eeprom_length,
 	.get_eeprom           = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &atl_eth_dev_ops;
+
+	eth_dev->rx_queue_count       = atl_rx_queue_count;
+	eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status;
+
 	eth_dev->rx_pkt_burst = &atl_recv_pkts;
 	eth_dev->tx_pkt_burst = &atl_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
index 0c25739f82..02ceb95754 100644
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
 	.rxq_info_get                 = axgbe_rxq_info_get,
 	.txq_info_get                 = axgbe_txq_info_get,
 	.dev_supported_ptypes_get     = axgbe_dev_supported_ptypes_get,
-	.rx_descriptor_status         = axgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status         = axgbe_dev_tx_descriptor_status,
 	.mtu_set		= axgb_mtu_set,
 };
 
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 	eth_dev->dev_ops = &axgbe_eth_dev_ops;
 
+	eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status;
+
 	/*
 	 * For secondary processes, we don't initialise any further as primary
 	 * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 75d055be00..4d224bfa04 100644
@@ -4246,9 +4246,6 @@ static const struct eth_dev_ops bnxt_dev_ops = {
 	.dev_led_off = bnxt_dev_led_off_op,
 	.xstats_get_by_id = bnxt_dev_xstats_get_by_id_op,
 	.xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op,
-	.rx_queue_count = bnxt_rx_queue_count_op,
-	.rx_descriptor_status = bnxt_rx_descriptor_status_op,
-	.tx_descriptor_status = bnxt_tx_descriptor_status_op,
 	.rx_queue_start = bnxt_rx_queue_start,
 	.rx_queue_stop = bnxt_rx_queue_stop,
 	.tx_queue_start = bnxt_tx_queue_start,
@@ -5681,6 +5678,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 		PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
 
 	eth_dev->dev_ops = &bnxt_dev_ops;
+	eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
+	eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op;
+	eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op;
 	eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
 	eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
 
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index c15e2b5462..bfc6504139 100644
@@ -1303,7 +1303,6 @@ static struct eth_dev_ops dpaa_devops = {
 	.tx_queue_setup		  = dpaa_eth_tx_queue_setup,
 	.rx_queue_release	  = dpaa_eth_rx_queue_release,
 	.tx_queue_release	  = dpaa_eth_tx_queue_release,
-	.rx_queue_count		  = dpaa_dev_rx_queue_count,
 	.rx_burst_mode_get	  = dpaa_dev_rx_burst_mode_get,
 	.tx_burst_mode_get	  = dpaa_dev_tx_burst_mode_get,
 	.rxq_info_get		  = dpaa_rxq_info_get,
@@ -1766,6 +1765,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* Populate ethdev structure */
 	eth_dev->dev_ops = &dpaa_devops;
+	eth_dev->rx_queue_count = dpaa_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
 	eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
 
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
index 02c254846c..38cf0ab71c 100644
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
 	.tx_queue_release  = dpaa2_dev_tx_queue_release,
 	.rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get,
 	.tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get,
-	.rx_queue_count       = dpaa2_dev_rx_queue_count,
 	.flow_ctrl_get	      = dpaa2_flow_ctrl_get,
 	.flow_ctrl_set	      = dpaa2_flow_ctrl_set,
 	.mac_addr_add         = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
 		 * plugged.
 		 */
 		eth_dev->dev_ops = &dpaa2_ethdev_ops;
+		eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;
 		if (dpaa2_get_devargs(dev->devargs, DRIVER_LOOPBACK_MODE))
 			eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx;
 		else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +3 -3
index 32872db9c2..66c5022bb7 100644
@@ -176,9 +176,6 @@ static const struct eth_dev_ops eth_em_ops = {
 	.vlan_offload_set     = eth_em_vlan_offload_set,
 	.rx_queue_setup       = eth_em_rx_queue_setup,
 	.rx_queue_release     = eth_em_rx_queue_release,
-	.rx_queue_count       = eth_em_rx_queue_count,
-	.rx_descriptor_status = eth_em_rx_descriptor_status,
-	.tx_descriptor_status = eth_em_tx_descriptor_status,
 	.tx_queue_setup       = eth_em_tx_queue_setup,
 	.tx_queue_release     = eth_em_tx_queue_release,
 	.rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -249,6 +246,9 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
 		E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
 
 	eth_dev->dev_ops = &eth_em_ops;
+	eth_dev->rx_queue_count = eth_em_rx_queue_count;
+	eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;
 	eth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;
 	eth_dev->tx_pkt_prepare = (eth_tx_prep_t)&eth_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +5 -5
index aec79c6ceb..2db04fa88c 100644
@@ -380,9 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = {
 	.rx_queue_intr_enable = eth_igb_rx_queue_intr_enable,
 	.rx_queue_intr_disable = eth_igb_rx_queue_intr_disable,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_queue_count       = eth_igb_rx_queue_count,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
 	.tx_queue_release     = eth_igb_tx_queue_release,
 	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -440,8 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {
 	.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
 	.rx_queue_setup       = eth_igb_rx_queue_setup,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
 	.tx_queue_release     = eth_igb_tx_queue_release,
 	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -752,6 +747,9 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 	uint32_t ctrl_ext;
 
 	eth_dev->dev_ops = &eth_igb_ops;
+	eth_dev->rx_queue_count = eth_igb_rx_queue_count;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
@@ -947,6 +945,8 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &igbvf_eth_dev_ops;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -1
index 1316c5c739..2cffa3aa2d 100644
@@ -1141,7 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
 	.tx_queue_stop        = enicpmd_dev_tx_queue_stop,
 	.rx_queue_setup       = enicpmd_dev_rx_queue_setup,
 	.rx_queue_release     = enicpmd_dev_rx_queue_release,
-	.rx_queue_count       = enicpmd_dev_rx_queue_count,
 	.tx_queue_setup       = enicpmd_dev_tx_queue_setup,
 	.tx_queue_release     = enicpmd_dev_tx_queue_release,
 	.rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1278,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
 	ENICPMD_FUNC_TRACE();
 
 	eth_dev->dev_ops = &enicpmd_eth_dev_ops;
+	eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = &enic_recv_pkts;
 	eth_dev->tx_pkt_burst = &enic_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +3 -3
index 56e2425e47..4f3439cbb2 100644
@@ -2855,9 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = {
 	.rx_queue_release	= fm10k_rx_queue_release,
 	.tx_queue_setup		= fm10k_tx_queue_setup,
 	.tx_queue_release	= fm10k_tx_queue_release,
-	.rx_queue_count		= fm10k_dev_rx_queue_count,
-	.rx_descriptor_status = fm10k_dev_rx_descriptor_status,
-	.tx_descriptor_status = fm10k_dev_tx_descriptor_status,
 	.rx_queue_intr_enable	= fm10k_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable	= fm10k_dev_rx_queue_intr_disable,
 	.reta_update		= fm10k_reta_update,
@@ -3054,6 +3051,9 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	dev->dev_ops = &fm10k_eth_dev_ops;
+	dev->rx_queue_count = fm10k_dev_rx_queue_count;
+	dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status;
 	dev->rx_pkt_burst = &fm10k_recv_pkts;
 	dev->tx_pkt_burst = &fm10k_xmit_pkts;
 	dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +3 -3
index f8ed4a0b36..ad5a536d73 100644
@@ -474,9 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 	.rx_queue_intr_enable         = i40e_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable        = i40e_dev_rx_queue_intr_disable,
 	.rx_queue_release             = i40e_dev_rx_queue_release,
-	.rx_queue_count               = i40e_dev_rx_queue_count,
-	.rx_descriptor_status         = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status         = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup               = i40e_dev_tx_queue_setup,
 	.tx_queue_release             = i40e_dev_tx_queue_release,
 	.dev_led_on                   = i40e_dev_led_on,
@@ -1447,6 +1444,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	PMD_INIT_FUNC_TRACE();
 
 	dev->dev_ops = &i40e_eth_dev_ops;
+	dev->rx_queue_count = i40e_dev_rx_queue_count;
+	dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
 	dev->rx_pkt_burst = i40e_recv_pkts;
 	dev->tx_pkt_burst = i40e_xmit_pkts;
 	dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +3 -3
index d32e655d90..fd45243fb9 100644
@@ -199,11 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = {
 	.rx_queue_release     = i40e_dev_rx_queue_release,
 	.rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable,
-	.rx_descriptor_status = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup       = i40e_dev_tx_queue_setup,
 	.tx_queue_release     = i40e_dev_tx_queue_release,
-	.rx_queue_count       = i40e_dev_rx_queue_count,
 	.rxq_info_get         = i40e_rxq_info_get,
 	.txq_info_get         = i40e_txq_info_get,
 	.mac_addr_add	      = i40evf_add_mac_addr,
@@ -1520,6 +1517,9 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* assign ops func pointer */
 	eth_dev->dev_ops = &i40evf_eth_dev_ops;
+	eth_dev->rx_queue_count       = i40e_dev_rx_queue_count;
+	eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &i40e_recv_pkts;
 	eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
 
drivers/net/iavf/iavf_ethdev.c +3 -3
index 28ca3fa8f7..a6f8e3366f 100644
@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
 	.rss_hash_conf_get          = iavf_dev_rss_hash_conf_get,
 	.rxq_info_get               = iavf_dev_rxq_info_get,
 	.txq_info_get               = iavf_dev_txq_info_get,
-	.rx_queue_count             = iavf_dev_rxq_count,
-	.rx_descriptor_status       = iavf_dev_rx_desc_status,
-	.tx_descriptor_status       = iavf_dev_tx_desc_status,
 	.mtu_set                    = iavf_dev_mtu_set,
 	.rx_queue_intr_enable       = iavf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable      = iavf_dev_rx_queue_intr_disable,
@@ -1378,6 +1375,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* assign ops func pointer */
 	eth_dev->dev_ops = &iavf_eth_dev_ops;
+	eth_dev->rx_queue_count = iavf_dev_rxq_count;
+	eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status;
+	eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;
 	eth_dev->rx_pkt_burst = &iavf_recv_pkts;
 	eth_dev->tx_pkt_burst = &iavf_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
index 4a161ae8a7..2668219494 100644
@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
 	.tx_burst_mode_get            = ice_tx_burst_mode_get,
 	.get_eeprom_length            = ice_get_eeprom_length,
 	.get_eeprom                   = ice_get_eeprom,
-	.rx_queue_count               = ice_rx_queue_count,
-	.rx_descriptor_status         = ice_rx_descriptor_status,
-	.tx_descriptor_status         = ice_tx_descriptor_status,
 	.stats_get                    = ice_stats_get,
 	.stats_reset                  = ice_stats_reset,
 	.xstats_get                   = ice_xstats_get,
@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)
 	int ret;
 
 	dev->dev_ops = &ice_eth_dev_ops;
+	dev->rx_queue_count = ice_rx_queue_count;
+	dev->rx_descriptor_status = ice_rx_descriptor_status;
+	dev->tx_descriptor_status = ice_tx_descriptor_status;
 	dev->rx_pkt_burst = ice_recv_pkts;
 	dev->tx_pkt_burst = ice_xmit_pkts;
 	dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +3 -3
index ace6b3fb3d..1fdbfcb60d 100644
@@ -272,9 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = {
 
 	.rx_queue_setup		= eth_igc_rx_queue_setup,
 	.rx_queue_release	= eth_igc_rx_queue_release,
-	.rx_queue_count		= eth_igc_rx_queue_count,
-	.rx_descriptor_status	= eth_igc_rx_descriptor_status,
-	.tx_descriptor_status	= eth_igc_tx_descriptor_status,
 	.tx_queue_setup		= eth_igc_tx_queue_setup,
 	.tx_queue_release	= eth_igc_tx_queue_release,
 	.tx_done_cleanup	= eth_igc_tx_done_cleanup,
@@ -1226,6 +1223,9 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 	dev->dev_ops = &eth_igc_ops;
+	dev->rx_queue_count = eth_igc_rx_queue_count;
+	dev->rx_descriptor_status = eth_igc_rx_descriptor_status;
+	dev->tx_descriptor_status = eth_igc_tx_descriptor_status;
 
 	/*
 	 * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +5 -5
index f536ca61cf..ac1dc7841d 100644
@@ -545,9 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
 	.rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_queue_count       = ixgbe_dev_rx_queue_count,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
 	.tx_queue_release     = ixgbe_dev_tx_queue_release,
 	.dev_led_on           = ixgbe_dev_led_on,
@@ -621,8 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
 	.vlan_offload_set     = ixgbevf_vlan_offload_set,
 	.rx_queue_setup       = ixgbe_dev_rx_queue_setup,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
 	.tx_queue_release     = ixgbe_dev_tx_queue_release,
 	.rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1089,6 +1084,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	ixgbe_dev_macsec_setting_reset(eth_dev);
 
 	eth_dev->dev_ops = &ixgbe_eth_dev_ops;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
+	eth_dev->rx_queue_count       = ixgbe_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
 	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1568,6 +1566,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &ixgbevf_eth_dev_ops;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
 	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 
drivers/net/mlx5/linux/mlx5_os.c +5 -7
index bf1f82ba67..ec3cc4000e 100644
@@ -601,6 +601,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		}
 		eth_dev->device = dpdk_dev;
 		eth_dev->dev_ops = &mlx5_os_dev_sec_ops;
+		eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+		eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
 		err = mlx5_proc_priv_init(eth_dev);
 		if (err)
 			return NULL;
@@ -1208,6 +1210,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	eth_dev->rx_pkt_burst = removed_rx_burst;
 	eth_dev->tx_pkt_burst = removed_tx_burst;
 	eth_dev->dev_ops = &mlx5_os_dev_ops;
+	eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+	eth_dev->rx_queue_count = mlx5_rx_queue_count;
 	/* Register MAC address. */
 	claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
 	if (config->vf && config->vf_nl_en)
@@ -2396,13 +2401,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = {
 	.rss_hash_update = mlx5_rss_hash_update,
 	.rss_hash_conf_get = mlx5_rss_hash_conf_get,
 	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
 	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
-	.rx_queue_count = mlx5_rx_queue_count,
 	.rx_queue_intr_enable = mlx5_rx_intr_enable,
 	.rx_queue_intr_disable = mlx5_rx_intr_disable,
 	.is_removed = mlx5_is_removed,
@@ -2427,8 +2429,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = {
 	.rx_queue_stop = mlx5_rx_queue_stop,
 	.tx_queue_start = mlx5_tx_queue_start,
 	.tx_queue_stop = mlx5_tx_queue_stop,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2480,8 +2480,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = {
 	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
 	.vlan_offload_set = mlx5_vlan_offload_set,
 	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
index 4c29898203..eb55bd7f99 100644
@@ -5138,6 +5138,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
 		dev->dev_ops = &mlx5_os_dev_ops_isolate;
 	else
 		dev->dev_ops = &mlx5_os_dev_ops;
+
+	dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+
 	return 0;
 }
 
drivers/net/netvsc/hn_ethdev.c +3 -3
index fd91c0e491..229c1b9149 100644
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = {
 	.tx_queue_setup		= hn_dev_tx_queue_setup,
 	.tx_queue_release	= hn_dev_tx_queue_release,
 	.tx_done_cleanup        = hn_dev_tx_done_cleanup,
-	.tx_descriptor_status	= hn_dev_tx_descriptor_status,
 	.rx_queue_setup		= hn_dev_rx_queue_setup,
 	.rx_queue_release	= hn_dev_rx_queue_release,
-	.rx_queue_count		= hn_dev_rx_queue_count,
-	.rx_descriptor_status   = hn_dev_rx_queue_status,
 	.link_update		= hn_dev_link_update,
 	.stats_get		= hn_dev_stats_get,
 	.stats_reset            = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 
 	vmbus = container_of(device, struct rte_vmbus_device, device);
 	eth_dev->dev_ops = &hn_eth_dev_ops;
+	eth_dev->rx_queue_count = hn_dev_rx_queue_count;
+	eth_dev->rx_descriptor_status = hn_dev_rx_queue_status;
+	eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status;
 	eth_dev->tx_pkt_burst = &hn_xmit_pkts;
 	eth_dev->rx_pkt_burst = &hn_recv_pkts;
 
drivers/net/nfp/nfp_net.c +1 -1
index 99946279db..c556dedab6 100644
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = {
 	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
 	.rx_queue_setup		= nfp_net_rx_queue_setup,
 	.rx_queue_release	= nfp_net_rx_queue_release,
-	.rx_queue_count		= nfp_net_rx_queue_count,
 	.tx_queue_setup		= nfp_net_tx_queue_setup,
 	.tx_queue_release	= nfp_net_tx_queue_release,
 	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	}
 
 	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
 	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
 
drivers/net/octeontx2/otx2_ethdev.c +3 -3
index b5d25fe68e..98f360f1b4 100644
@@ -2272,9 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = {
 	.txq_info_get             = otx2_nix_txq_info_get,
 	.rx_burst_mode_get        = otx2_rx_burst_mode_get,
 	.tx_burst_mode_get        = otx2_tx_burst_mode_get,
-	.rx_queue_count           = otx2_nix_rx_queue_count,
-	.rx_descriptor_status     = otx2_nix_rx_descriptor_status,
-	.tx_descriptor_status     = otx2_nix_tx_descriptor_status,
 	.tx_done_cleanup          = otx2_nix_tx_done_cleanup,
 	.set_queue_rate_limit     = otx2_nix_tm_set_queue_rate_limit,
 	.pool_ops_supported       = otx2_nix_pool_ops_supported,
@@ -2381,6 +2378,9 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
 	int rc, max_entries;
 
 	eth_dev->dev_ops = &otx2_eth_dev_ops;
+	eth_dev->rx_queue_count = otx2_nix_rx_queue_count;
+	eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/qede/qede_ethdev.c +1 -2
index 70d48e48ef..59f1746ee9 100644
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
 	.dev_infos_get = qede_dev_info_get,
 	.rx_queue_setup = qede_rx_queue_setup,
 	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
 	.tx_queue_setup = qede_tx_queue_setup,
 	.tx_queue_release = qede_tx_queue_release,
 	.dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
 	.dev_infos_get = qede_dev_info_get,
 	.rx_queue_setup = qede_rx_queue_setup,
 	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
 	.tx_queue_setup = qede_tx_queue_setup,
 	.tx_queue_release = qede_tx_queue_release,
 	.dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	}
 
 	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
+	eth_dev->rx_descriptor_status = qede_rx_descriptor_status;
 
 	adapter->num_tx_queues = 0;
 	adapter->num_rx_queues = 0;
drivers/net/sfc/sfc_ethdev.c +6 -6
index 65e0ff7d48..ffad32a123 100644
@@ -1804,9 +1804,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = {
 	.tx_queue_stop			= sfc_tx_queue_stop,
 	.rx_queue_setup			= sfc_rx_queue_setup,
 	.rx_queue_release		= sfc_rx_queue_release,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.rx_queue_intr_enable		= sfc_rx_queue_intr_enable,
 	.rx_queue_intr_disable		= sfc_rx_queue_intr_disable,
 	.tx_queue_setup			= sfc_tx_queue_setup,
@@ -1961,6 +1958,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
 	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
 
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
 	dev->dev_ops = &sfc_eth_dev_ops;
 
 	return 0;
@@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 
 static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.reta_query			= sfc_dev_rss_reta_query,
 	.rss_hash_conf_get		= sfc_dev_rss_hash_conf_get,
 	.rxq_info_get			= sfc_rx_queue_info_get,
@@ -2068,6 +2065,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
 	dev->rx_pkt_burst = dp_rx->pkt_burst;
 	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
 	dev->dev_ops = &sfc_eth_dev_secondary_ops;
 
 	return 0;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
index d955a7ee23..959c8e4ddc 100644
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = {
 	.tx_queue_stop            = nicvf_dev_tx_queue_stop,
 	.rx_queue_setup           = nicvf_dev_rx_queue_setup,
 	.rx_queue_release         = nicvf_dev_rx_queue_release,
-	.rx_queue_count           = nicvf_dev_rx_queue_count,
 	.tx_queue_setup           = nicvf_dev_tx_queue_setup,
 	.tx_queue_release         = nicvf_dev_tx_queue_release,
 	.dev_set_link_up          = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &nicvf_eth_dev_ops;
+	eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
index e55278af69..fa365605ef 100644
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = {
 	.rx_queue_release = eth_queue_release,
 	.tx_queue_release = eth_queue_release,
 	.tx_done_cleanup = eth_tx_done_cleanup,
-	.rx_queue_count = eth_rx_queue_count,
 	.link_update = eth_link_update,
 	.stats_get = eth_stats_get,
 	.stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 	data->all_multicast = 1;
 
 	eth_dev->dev_ops = &ops;
+	eth_dev->rx_queue_count = eth_rx_queue_count;
 
 	/* finally assign rx and tx ops */
 	eth_dev->rx_pkt_burst = eth_vhost_rx;
lib/librte_ethdev/rte_ethdev.h +6 -6
index b52b04f7e0..2ce186610b 100644
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
 	dev = &rte_eth_devices[port_id];
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_queue_count, -ENOTSUP);
 	if (queue_id >= dev->data->nb_rx_queues)
 		return -EINVAL;
 
-	return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
+	return (int)(*dev->rx_queue_count)(dev, queue_id);
 }
 
 #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */
@@ -4604,10 +4604,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
 	if (queue_id >= dev->data->nb_rx_queues)
 		return -ENODEV;
 #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_status, -ENOTSUP);
 	rxq = dev->data->rx_queues[queue_id];
 
-	return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
+	return (*dev->rx_descriptor_status)(rxq, offset);
 }
 
 #define RTE_ETH_TX_DESC_FULL    0 /**< Desc filled for hw, waiting xmit. */
@@ -4661,10 +4661,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
 	if (queue_id >= dev->data->nb_tx_queues)
 		return -ENODEV;
 #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_descriptor_status, -ENOTSUP);
 	txq = dev->data->tx_queues[queue_id];
 
-	return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
+	return (*dev->tx_descriptor_status)(txq, offset);
 }
 
 /**
lib/librte_ethdev/rte_ethdev_core.h +5 -6
index 292a6423c4..275d51006b 100644
@@ -657,12 +657,6 @@ struct eth_dev_ops {
 	eth_queue_stop_t           tx_queue_stop; /**< Stop TX for a queue. */
 	eth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue. */
 	eth_queue_release_t        rx_queue_release; /**< Release RX queue. */
-	eth_rx_queue_count_t       rx_queue_count;
-	/**< Get the number of used RX descriptors. */
-	eth_rx_descriptor_status_t rx_descriptor_status;
-	/**< Check the status of a Rx descriptor. */
-	eth_tx_descriptor_status_t tx_descriptor_status;
-	/**< Check the status of a Tx descriptor. */
 	/*
 	 * Static inline functions use functions ABOVE this comment.
 	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -778,6 +772,11 @@ struct rte_eth_dev {
 	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
 	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
 	eth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */
+
+	eth_rx_queue_count_t       rx_queue_count; /**< Get the number of used RX descriptors. */
+	eth_rx_descriptor_status_t rx_descriptor_status; /**< Check the status of a Rx descriptor. */
+	eth_tx_descriptor_status_t tx_descriptor_status; /**< Check the status of a Tx descriptor. */
+
 	/**
 	 * Next two fields are per-device data but *data is shared between
 	 * primary and secondary processes and *process_private is per-process
Signature · 1 line
2.25.4
#17 lore raw

PATCH v2 3/7 ethdev: make device operations struct private

In reply to Ferruh Yigit

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

---
 doc/guides/rel_notes/deprecation.rst     |   9 -
 drivers/net/i40e/i40e_vf_representor.c   |   1 +
 drivers/net/ixgbe/ixgbe_vf_representor.c |   1 +
 lib/librte_ethdev/rte_ethdev_core.h      | 708 +----------------------
 lib/librte_ethdev/rte_ethdev_driver.h    | 694 ++++++++++++++++++++++
 lib/librte_ethdev/rte_flow_driver.h      |   1 +
 lib/librte_ethdev/rte_mtr_driver.h       |   1 +
 lib/librte_ethdev/rte_tm_driver.h        |   1 +
 8 files changed, 706 insertions(+), 710 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -9
index 811eaad6ce..d40b95bfa9 100644
@@ -163,15 +163,6 @@ Deprecation Notices
   Due to adoption of C11 atomic builtins, the field ``refcnt_atomic``
   will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11.
 
-* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
-  will be done in 20.11.
-  Currently the ``struct eth_dev_ops`` struct is accessible by the application
-  because some inline functions, like ``rte_eth_tx_descriptor_status()``,
-  access the struct directly.
-  The struct will be separate in two, the ops used by inline functions will be
-  moved next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct
-  will be moved to header file for drivers to hide it from applications.
-
 * ethdev: the legacy filter API, including
   ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
   as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
drivers/net/i40e/i40e_vf_representor.c +1 -0
index 083bc1a5f3..f09d4d8798 100644
@@ -7,6 +7,7 @@
 #include <rte_pci.h>
 #include <rte_malloc.h>
 
+#include "rte_ethdev_driver.h"
 #include "base/i40e_type.h"
 #include "base/virtchnl.h"
 #include "i40e_ethdev.h"
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -0
index dbbef294ae..edb5d43846 100644
@@ -6,6 +6,7 @@
 #include <rte_pci.h>
 #include <rte_malloc.h>
 
+#include "rte_ethdev_driver.h"
 #include "base/ixgbe_type.h"
 #include "base/ixgbe_vf.h"
 #include "ixgbe_ethdev.h"
lib/librte_ethdev/rte_ethdev_core.h +7 -701

726 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev_driver.h +694 -0

700 lines not on this page · raw message

lib/librte_ethdev/rte_flow_driver.h +1 -0
index 881cc469b7..997598db11 100644
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
lib/librte_ethdev/rte_mtr_driver.h +1 -0
index 3ec7ffa2a5..3b39532935 100644
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
lib/librte_ethdev/rte_tm_driver.h +1 -0
index 90114ff53e..b86ed89c00 100644
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
Signature · 1 line
2.25.4
#18 lore raw

Re: [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private

Quoted 6 lines · Ferruh Yigit

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

Hi Thomas and all,

If there is no objection I am willing to merge this series soon to prevent more conflicts caused by this moving/renaming work.

Thanks,
ferruh

#19 lore raw

PATCH v2 4/7 ethdev: mark internal functions

In reply to Ferruh Yigit

Some ethdev functions are for drivers only, not for applications.

Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.

Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.

---
 doc/guides/rel_notes/deprecation.rst     |  6 -----
 lib/librte_ethdev/rte_ethdev.h           |  3 +--
 lib/librte_ethdev/rte_ethdev_driver.h    | 33 ++++++++++--------------
 lib/librte_ethdev/rte_ethdev_version.map | 30 ++++++++++-----------
 lib/librte_ethdev/rte_flow_driver.h      |  4 +--
 5 files changed, 29 insertions(+), 47 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -6
index d40b95bfa9..35c06d30ef 100644
@@ -227,12 +227,6 @@ Deprecation Notices
   following the IPv6 header, as proposed in RFC
   https://mails.dpdk.org/archives/dev/2020-August/177257.html.
 
-* ethdev: Some internal APIs for driver usage are exported in the .map file.
-  Now DPDK has ``__rte_internal`` marker so we can mark internal APIs and move
-  them to the INTERNAL block in .map. Although these APIs are internal it will
-  break the ABI checks, that is why change is planned for 20.11.
-  The list of internal APIs are mainly ones listed in ``rte_ethdev_driver.h``.
-
 * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made
   ABI stable in the v19.11 release. The TM maintainer and other contributors have
   agreed to keep the TM APIs as experimental in expectation of additional spec
lib/librte_ethdev/rte_ethdev.h +1 -2
index 2ce186610b..ce2e0ec0e4 100644
@@ -1723,8 +1723,7 @@ rte_eth_find_next_of(uint16_t port_id_start,
  */
 __rte_experimental
 uint16_t
-rte_eth_find_next_sibling(uint16_t port_id_start,
-		uint16_t ref_port_id);
+rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);
 
 /**
  * Macro to iterate over all ethdev ports sharing the same rte_device
lib/librte_ethdev/rte_ethdev_driver.h +13 -20
index b006cbbe92..3d1bc33272 100644
@@ -759,6 +759,7 @@ int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
  * @return
  *   - The pointer to the ethdev slot, on success. NULL on error
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
 
 /**
@@ -770,6 +771,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
 
 /**
@@ -783,6 +785,7 @@ struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
  *        device.
  *   - Error: Null pointer.
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
 
 /**
@@ -801,6 +804,7 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
  * @return
  *   - 0 on success, negative on error
  */
+__rte_internal
 int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
 
 /**
@@ -814,6 +818,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  * @return
  *  void
  */
+__rte_internal
 void _rte_eth_dev_reset(struct rte_eth_dev *dev);
 
 /**
@@ -833,6 +838,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  * @return
  *  int
  */
+__rte_internal
 int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 		enum rte_eth_event_type event, void *ret_param);
 
@@ -848,6 +854,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  * @param dev
  *  New ethdev port.
  */
+__rte_internal
 void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
 
 /**
@@ -869,6 +876,7 @@ void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
  * @param socket_id
  *   The *socket_id* argument is the socket identifier in case of NUMA.
  */
+__rte_internal
 const struct rte_memzone *
 rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,
 			 uint16_t queue_id, size_t size,
@@ -955,9 +963,6 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
 }
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Allocate an unique switch domain identifier.
  *
  * A pool of switch domain identifiers which can be allocated on request. This
@@ -971,14 +976,11 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_switch_domain_alloc(uint16_t *domain_id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Free switch domain.
  *
  * Return a switch domain identifier to the pool of free identifiers after it is
@@ -990,7 +992,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id);
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_switch_domain_free(uint16_t domain_id);
 
@@ -1007,9 +1009,6 @@ struct rte_eth_devargs {
 };
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function to parse ethdev arguments
  *
  * @param devargs
@@ -1020,7 +1019,7 @@ struct rte_eth_devargs {
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs);
 
@@ -1030,9 +1029,6 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
 	void *bus_specific_init_params);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function for the creation of a new ethdev ports.
  *
  * @param device
@@ -1053,7 +1049,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_dev_create(struct rte_device *device, const char *name,
 	size_t priv_data_size,
@@ -1064,9 +1060,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function for cleaning up the resources of a ethdev port on it's
  * destruction.
  *
@@ -1078,7 +1071,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit);
 
lib/librte_ethdev/rte_ethdev_version.map +14 -16
index 8d9d6b1c67..6a84f3d76d 100644
@@ -1,8 +1,6 @@
 DPDK_21 {
 	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
 	rte_eth_add_first_rx_callback;
 	rte_eth_add_rx_callback;
 	rte_eth_add_tx_callback;
@@ -10,9 +8,6 @@ DPDK_21 {
 	rte_eth_allmulticast_enable;
 	rte_eth_allmulticast_get;
 	rte_eth_dev_adjust_nb_rx_tx_desc;
-	rte_eth_dev_allocate;
-	rte_eth_dev_allocated;
-	rte_eth_dev_attach_secondary;
 	rte_eth_dev_callback_register;
 	rte_eth_dev_callback_unregister;
 	rte_eth_dev_close;
@@ -44,8 +39,6 @@ DPDK_21 {
 	rte_eth_dev_mac_addr_remove;
 	rte_eth_dev_pool_ops_supported;
 	rte_eth_dev_priority_flow_ctrl_set;
-	rte_eth_dev_probing_finish;
-	rte_eth_dev_release_port;
 	rte_eth_dev_reset;
 	rte_eth_dev_rss_hash_conf_get;
 	rte_eth_dev_rss_hash_update;
@@ -81,7 +74,6 @@ DPDK_21 {
 	rte_eth_dev_udp_tunnel_port_delete;
 	rte_eth_dev_vlan_filter;
 	rte_eth_devices;
-	rte_eth_dma_zone_reserve;
 	rte_eth_find_next;
 	rte_eth_find_next_owned_by;
 	rte_eth_iterator_cleanup;
@@ -195,16 +187,8 @@ EXPERIMENTAL {
 	rte_eth_dev_owner_unset;
 
 	# added in 18.05
-	rte_eth_dev_create;
-	rte_eth_dev_destroy;
 	rte_eth_dev_get_module_eeprom;
 	rte_eth_dev_get_module_info;
-	rte_eth_devargs_parse;
-	rte_eth_switch_domain_alloc;
-	rte_eth_switch_domain_free;
-
-	# added in 18.08
-	rte_flow_expand_rss;
 
 	# added in 18.11
 	rte_eth_dev_rx_intr_ctl_q_get_fd;
@@ -246,5 +230,19 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
+	_rte_eth_dev_callback_process;
+	_rte_eth_dev_reset;
+	rte_eth_dev_allocate;
+	rte_eth_dev_allocated;
+	rte_eth_dev_attach_secondary;
+	rte_eth_dev_create;
+	rte_eth_dev_destroy;
+	rte_eth_dev_probing_finish;
+	rte_eth_dev_release_port;
+	rte_eth_devargs_parse;
 	rte_eth_dma_zone_free;
+	rte_eth_dma_zone_reserve;
+	rte_eth_switch_domain_alloc;
+	rte_eth_switch_domain_free;
+	rte_flow_expand_rss;
 };
lib/librte_ethdev/rte_flow_driver.h +1 -3
index 997598db11..3ee871d3eb 100644
@@ -161,8 +161,6 @@ struct rte_flow_expand_rss {
  * Expand RSS flows into several possible flows according to the RSS hash
  * fields requested and the driver capabilities.
  *
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * @param[out] buf
  *   Buffer to store the result expansion.
  * @param[in] size
@@ -183,7 +181,7 @@ struct rte_flow_expand_rss {
  *
  *   -E2BIG: graph-depth @p graph is too deep.
  */
-__rte_experimental
+__rte_internal
 int
 rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
 		    const struct rte_flow_item *pattern, uint64_t types,
Signature · 1 line
2.25.4
#20 lore raw

PATCH v2 5/7 ethdev: use hairpin helper functions

In reply to Ferruh Yigit

Hairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'

Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.

---
 drivers/net/mlx5/mlx5_rxq.c              | 4 ++--
 drivers/net/mlx5/mlx5_txq.c              | 4 ++--
 lib/librte_ethdev/rte_ethdev_driver.h    | 2 ++
 lib/librte_ethdev/rte_ethdev_version.map | 2 ++
 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +2 -2
index 946f7454f6..1b729f7ab2 100644
@@ -542,7 +542,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 	eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
 	int ret;
 
-	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be stopped");
 		rte_errno = EINVAL;
 		return -EINVAL;
@@ -653,7 +653,7 @@ mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be started");
 		rte_errno = EINVAL;
 		return -EINVAL;
drivers/net/mlx5/mlx5_txq.c +2 -2
index 66ad368e64..450d9641de 100644
@@ -244,7 +244,7 @@ mlx5_tx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->tx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_tx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be stopped");
 		rte_errno = EINVAL;
 		return -EINVAL;
@@ -371,7 +371,7 @@ mlx5_tx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->tx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_tx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be started");
 		rte_errno = EINVAL;
 		return -EINVAL;
lib/librte_ethdev/rte_ethdev_driver.h +2 -0
index 3d1bc33272..5dfe9fdf1a 100644
@@ -734,6 +734,7 @@ struct eth_dev_ops {
  * @return
  *   - (1) if the queue is hairpin queue, 0 otherwise.
  */
+__rte_internal
 int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
 
 /**
@@ -748,6 +749,7 @@ int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
  * @return
  *   - (1) if the queue is hairpin queue, 0 otherwise.
  */
+__rte_internal
 int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
 
 /**
lib/librte_ethdev/rte_ethdev_version.map +2 -0
index 6a84f3d76d..5db3fb156a 100644
@@ -237,6 +237,8 @@ INTERNAL {
 	rte_eth_dev_attach_secondary;
 	rte_eth_dev_create;
 	rte_eth_dev_destroy;
+	rte_eth_dev_is_rx_hairpin_queue;
+	rte_eth_dev_is_tx_hairpin_queue;
 	rte_eth_dev_probing_finish;
 	rte_eth_dev_release_port;
 	rte_eth_devargs_parse;
Signature · 1 line
2.25.4
#21 lore raw

PATCH v2 6/7 ethdev: remove invalid symbols from map file

In reply to Ferruh Yigit

These are sturct type names, not object names. Removing them from .map file.

Fixes 9d41beed24b0 ("lib: provide initial versioning")
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)
lib/librte_ethdev/rte_ethdev_version.map +0 -2
index 5db3fb156a..a85986a2a2 100644
@@ -81,7 +81,6 @@ DPDK_21 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -96,7 +95,6 @@ DPDK_21 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
Signature · 1 line
2.25.4
#22 lore raw

PATCH v2 7/7 ethdev: remove underscore prefix from internal API

In reply to Ferruh Yigit

'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.

For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.

---
 app/test/virtual_pmd.c                   |  4 ++--
 doc/guides/prog_guide/poll_mode_drv.rst  |  4 ++--
 drivers/net/atlantic/atl_ethdev.c        |  5 ++---
 drivers/net/bnxt/bnxt_ethdev.c           |  6 +++---
 drivers/net/bnxt/rte_pmd_bnxt.c          |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c   |  8 ++++----
 drivers/net/dpaa/dpaa_ethdev.c           |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c         |  3 +--
 drivers/net/e1000/em_ethdev.c            |  2 +-
 drivers/net/e1000/igb_ethdev.c           |  7 +++----
 drivers/net/ena/ena_ethdev.c             |  4 ++--
 drivers/net/enic/enic_main.c             |  2 +-
 drivers/net/failsafe/failsafe_ether.c    |  6 +++---
 drivers/net/fm10k/fm10k_ethdev.c         | 11 ++++-------
 drivers/net/hinic/base/hinic_pmd_hwdev.c |  6 +++---
 drivers/net/i40e/i40e_ethdev.c           |  2 +-
 drivers/net/i40e/i40e_ethdev_vf.c        |  4 ++--
 drivers/net/i40e/i40e_pf.c               |  2 +-
 drivers/net/iavf/iavf_vchnl.c            |  5 ++---
 drivers/net/ice/ice_ethdev.c             |  4 ++--
 drivers/net/igc/igc_ethdev.c             |  3 +--
 drivers/net/ixgbe/ixgbe_ethdev.c         | 10 ++++------
 drivers/net/ixgbe/ixgbe_pf.c             |  5 ++---
 drivers/net/mlx4/mlx4_intr.c             | 10 +++++-----
 drivers/net/mlx5/linux/mlx5_ethdev_os.c  |  4 ++--
 drivers/net/mlx5/mlx5_flow.c             |  2 +-
 drivers/net/netvsc/hn_rndis.c            |  2 +-
 drivers/net/nfp/nfp_net.c                |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c   |  6 +++---
 drivers/net/octeontx2/otx2_link.c        |  2 +-
 drivers/net/qede/qede_main.c             |  3 +--
 drivers/net/sfc/sfc_intr.c               | 12 ++++++------
 drivers/net/thunderx/nicvf_ethdev.c      |  6 +++---
 drivers/net/vhost/rte_eth_vhost.c        |  6 +++---
 drivers/net/virtio/virtio_ethdev.c       |  6 +++---
 drivers/net/vmxnet3/vmxnet3_ethdev.c     |  6 +++---
 lib/librte_ethdev/rte_ethdev.c           |  8 ++++----
 lib/librte_ethdev/rte_ethdev_driver.h    |  4 ++--
 lib/librte_ethdev/rte_ethdev_version.map |  4 ++--
 39 files changed, 90 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
index 79156cb85a..b49089a33c 100644
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id,
 
 	vrtl_eth_dev->data->dev_link.link_status = link_status;
 
-	_rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
-				      NULL);
+	rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
+				     NULL);
 }
 
 int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
index 6fae39f904..86e0a141e6 100644
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread.
 For example when PF is reset, the PF sends a message to notify VFs of
 this event and also trigger an interrupt to VFs. Then in the interrupt
 service routine the VFs detects this notification message and calls
-_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
+rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
 This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET
-event within VFs. The function _rte_eth_dev_callback_process() will
+event within VFs. The function rte_eth_dev_callback_process() will
 call the registered callback function. The callback function can trigger
 the application to handle all operations the VF reset requires including
 stopping Rx/Tx queues and calling rte_eth_dev_reset().
drivers/net/atlantic/atl_ethdev.c +2 -3
index 540b106045..2fca9140d7 100644
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 	/* Notify userapp if link status changed */
 	if (!atl_dev_link_update(dev, 0)) {
 		atl_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev,
-			RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	} else {
 		if (hw->aq_fw_ops->send_macsec_req == NULL)
 			goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 		    resp.stats.egress_expired ||
 		    resp.stats.ingress_expired) {
 			PMD_DRV_LOG(INFO, "RTE_ETH_EVENT_MACSEC");
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_MACSEC, NULL);
 		}
 	}
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 4d224bfa04..8c959ac913 100644
@@ -1528,9 +1528,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
 	new.link_speed != eth_dev->data->dev_link.link_speed) {
 		rte_eth_linkstatus_set(eth_dev, &new);
 
-		_rte_eth_dev_callback_process(eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 
 		bnxt_print_link_info(eth_dev);
 	}
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
index eafc1d3868..d67db46c65 100644
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 	ret_param.vf_id = vf_id;
 	ret_param.msg = msg;
 
-	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
+				     &ret_param);
 
 	/* Default to approve */
 	if (ret_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
index cdbd8151ed..4ffd2ca4bb 100644
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals,
 	internals->slave_count--;
 
 	/* force reconfiguration of slave interfaces */
-	_rte_eth_dev_reset(slave_eth_dev);
+	rte_eth_dev_internal_reset(slave_eth_dev);
 }
 
 static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
 	if (arg == NULL)
 		return;
 
-	_rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
+	rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
 			RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						bond_ethdev_delayed_lsc_propagation,
 						(void *)bonded_eth_dev);
 			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
 						RTE_ETH_EVENT_INTR_LSC,
 						NULL);
 
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						bond_ethdev_delayed_lsc_propagation,
 						(void *)bonded_eth_dev);
 			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
 						RTE_ETH_EVENT_INTR_LSC,
 						NULL);
 		}
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index bfc6504139..8d88a3badb 100644
@@ -323,7 +323,7 @@ static void dpaa_interrupt_handler(void *param)
 	if (bytes_read < 0)
 		DPAA_PMD_ERR("Error reading eventfd\n");
 	dpaa_eth_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int dpaa_eth_dev_start(struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
index 38cf0ab71c..0e9f836e55 100644
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param)
 		clear = DPNI_IRQ_EVENT_LINK_CHANGED;
 		dpaa2_dev_link_update(dev, 0);
 		/* calling all the apps registered for link status event */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 out:
 	ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
index 66c5022bb7..ee97877095 100644
@@ -1629,7 +1629,7 @@ eth_em_interrupt_handler(void *param)
 
 	eth_em_interrupt_get_status(dev);
 	eth_em_interrupt_action(dev, dev->intr_handle);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
drivers/net/e1000/igb_ethdev.c +3 -4
index 2db04fa88c..c74e2f4358 100644
@@ -2918,8 +2918,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev,
 			     pci_dev->addr.bus,
 			     pci_dev->addr.devid,
 			     pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	return 0;
@@ -2981,8 +2980,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)
 		/* dummy mbx read to ack pf */
 		if (mbx->ops.read(hw, &in_msg, 1, 0))
 			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 	}
 }
 
drivers/net/ena/ena_ethdev.c +2 -2
index da8c8ad922..8077519735 100644
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
 
 	if (unlikely(adapter->trigger_reset)) {
 		PMD_DRV_LOG(ERR, "Trigger reset is on\n");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 			NULL);
 	}
 }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data,
 	adapter->link_status = status;
 
 	ena_link_update(eth_dev, 0);
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
index 7942b0df6b..8b0441c5cd 100644
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)
 	vnic_intr_return_all_credits(&enic->intr[ENICPMD_LSC_INTR_OFFSET]);
 
 	enic_link_update(dev);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	enic_log_q_error(enic);
 	/* Re-enable irq in case of INTx */
 	rte_intr_ack(&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
index 70972d6717..7c68bbdec0 100644
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused,
 	ret = dev->dev_ops->link_update(dev, 0);
 	/* We must pass on the LSC event */
 	if (ret)
-		return _rte_eth_dev_callback_process(dev,
-						     RTE_ETH_EVENT_INTR_LSC,
-						     NULL);
+		return rte_eth_dev_callback_process(dev,
+						    RTE_ETH_EVENT_INTR_LSC,
+						    NULL);
 	else
 		return 0;
 }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
index 4f3439cbb2..e1198e0da9 100644
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
 					true);
 
 			dev_info->sm_down = 0;
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC,
 					NULL);
 		}
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
 	if (err == FM10K_ERR_RESET_REQUESTED) {
 		PMD_INIT_LOG(INFO, "INT: Switch is down");
 		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 
 		/* Setting reset flag */
 		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 		fm10k_vlan_filter_set(dev, hw->mac.default_vid, true);
 
 		dev_info->sm_down = 0;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
index ac2a72e388..41c99bdbf8 100644
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev,
 	ret = hinic_link_event_process(hwdev, rte_dev, status);
 	/* check if link has changed, notify callback */
 	if (ret == 0)
-		_rte_eth_dev_callback_process(rte_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(rte_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 }
 
 void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
index ad5a536d73..d1f07348ba 100644
@@ -6842,7 +6842,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
 		case i40e_aqc_opc_get_link_status:
 			ret = i40e_dev_link_update(dev, 0);
 			if (!ret)
-				_rte_eth_dev_callback_process(dev,
+				rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC, NULL);
 			break;
 		default:
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
index fd45243fb9..84ad528c98 100644
@@ -1377,7 +1377,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev,
+		rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_INTR_RESET, NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -1385,7 +1385,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 		vf->link_up = pf_msg->event_data.link_event.link_status;
 		vf->link_speed = pf_msg->event_data.link_event.link_speed;
 		i40evf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev,
+		rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
drivers/net/i40e/i40e_pf.c +1 -1
index 7bf1e79410..03c2070c3f 100644
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
 	 * do nothing and send not_supported to VF. As PF must send a response
 	 * to VF and ACK/NACK is not defined.
 	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 	if (ret_param.retval != RTE_PMD_I40E_MB_EVENT_PROCEED) {
 		PMD_DRV_LOG(WARNING, "VF to PF message(%d) is not permitted!",
 			    opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
index a163548645..791a92d565 100644
@@ -186,7 +186,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 					      NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -201,8 +201,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 			vf->link_speed = iavf_convert_link_speed(speed);
 		}
 		iavf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
drivers/net/ice/ice_ethdev.c +2 -2
index 2668219494..24a8bad543 100644
@@ -1314,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)
 		case ice_aqc_opc_get_link_status:
 			ret = ice_link_update(dev, 0);
 			if (!ret)
-				_rte_eth_dev_callback_process
+				rte_eth_dev_callback_process
 					(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 			break;
 		default:
@@ -1379,7 +1379,7 @@ ice_interrupt_handler(void *param)
 		PMD_DRV_LOG(INFO, "OICR: link state change event");
 		ret = ice_link_update(dev, 0);
 		if (!ret)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 #endif
drivers/net/igc/igc_ethdev.c +1 -2
index 1fdbfcb60d..4fbbee2dfe 100644
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev)
 				pci_dev->addr.bus,
 				pci_dev->addr.devid,
 				pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 }
 
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
index ac1dc7841d..693acd9ae9 100644
@@ -4661,13 +4661,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)
 		ixgbe_dev_link_update(dev, 0);
 		intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;
 		ixgbe_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	if (intr->flags & IXGBE_FLAG_MACSEC) {
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC, NULL);
 		intr->flags &= ~IXGBE_FLAG_MACSEC;
 	}
 
@@ -8676,8 +8674,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)
 		/* dummy mbx read to ack pf */
 		if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
 			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 	}
 }
 
drivers/net/ixgbe/ixgbe_pf.c +2 -3
index 67b5bef44f..ed5f96b1a4 100644
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 		vfinfo[vf].clear_to_send = true;
 
 		/* notify application about VF reset */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
 					      &ret_param);
 		return ret;
 	}
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 	 * if 0, do nothing and send ACK to VF
 	 * if ret_param.retval > 1, do nothing and send NAK to VF
 	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 
 	retval = ret_param.retval;
 
drivers/net/mlx4/mlx4_intr.c +5 -5
index 19af9359c9..6786b12ab5 100644
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)
 	MLX4_ASSERT(priv->intr_alarm == 1);
 	priv->intr_alarm = 0;
 	if (intr_conf->lsc && !mlx4_link_status_check(priv))
-		_rte_eth_dev_callback_process(ETH_DEV(priv),
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(ETH_DEV(priv),
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 }
 
 /**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv)
 	}
 	for (i = 0; i != RTE_DIM(caught); ++i)
 		if (caught[i])
-			_rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
-						      NULL);
+			rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
+						     NULL);
 }
 
 /**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
index 3d3dd2e862..7256c1bcfe 100644
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
 		dev = &rte_eth_devices[sh->port[i].ih_port_id];
 		MLX5_ASSERT(dev);
 		if (dev->data->dev_conf.intr_conf.rmv)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_RMV, NULL);
 	}
 }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)
 				usleep(0);
 				continue;
 			}
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 			continue;
 		}
drivers/net/mlx5/mlx5_flow.c +1 -1
index eb55bd7f99..55cdc37f00 100644
@@ -6085,7 +6085,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,
 		if (!MLX5_AGE_GET(age_info, MLX5_AGE_EVENT_NEW))
 			continue;
 		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER))
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(&rte_eth_devices[sh->port[i].devx_ih_port_id],
 				RTE_ETH_EVENT_FLOW_AGED, NULL);
 		age_info->flags = 0;
drivers/net/netvsc/hn_rndis.c +1 -1
index d186ddeabd..66d1966f29 100644
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
  */
 static void hn_rndis_link_alarm(void *arg)
 {
-	_rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 void hn_rndis_link_status(struct rte_eth_dev *dev, const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
index c556dedab6..4f03691989 100644
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 
 	nfp_net_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	nfp_net_dev_link_status_print(dev);
 
drivers/net/octeontx/octeontx_ethdev.c +3 -3
index 76c69294d0..808b761b96 100644
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)
 			octeontx_link_status_update(nic, &link);
 			octeontx_link_status_print(dev, &link);
 			rte_eth_linkstatus_set(dev, &link);
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 		}
 	}
 
drivers/net/octeontx2/otx2_link.c +1 -1
index 12bf6c3231..439ec4fa89 100644
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,
 	rte_eth_linkstatus_set(eth_dev, &eth_link);
 
 	/* Set the flag and execute application callbacks */
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
drivers/net/qede/qede_main.c +1 -2
index 987a6f1e13..aecb98261b 100644
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;
 
 	if (!qede_link_update(dev, 0))
-		_rte_eth_dev_callback_process(dev,
-					      RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int qed_drain(struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
index 80feab68f8..da32d393c2 100644
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)
 		sfc_notice(sa, "link status change event: link %s",
 			 sa->eth_dev->data->dev_link.link_status ?
 			 "UP" : "DOWN");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 	}
 }
 
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg)
 exit:
 	if (lsc_seq != sa->port.lsc_seq) {
 		sfc_notice(sa, "link status change event");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 	}
 }
 
drivers/net/thunderx/nicvf_ethdev.c +3 -3
index 959c8e4ddc..83d9488360 100644
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)
 			nicvf_link_status_update(nic, &link);
 			rte_eth_linkstatus_set(dev, &link);
 
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 		}
 	}
 
drivers/net/vhost/rte_eth_vhost.c +3 -3
index fa365605ef..ce32be9ce3 100644
@@ -832,7 +832,7 @@ new_device(int vid)
 
 	VHOST_LOG(INFO, "Vhost device %d created\n", vid);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	return 0;
 }
@@ -889,7 +889,7 @@ destroy_device(int vid)
 	VHOST_LOG(INFO, "Vhost device %d destroyed\n", vid);
 	eth_vhost_uninstall_intr(eth_dev);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
 
 	return 0;
 }
drivers/net/virtio/virtio_ethdev.c +3 -3
index 8658b6f2f0..4ce9ac5941 100644
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)
 
 	if (isr & VIRTIO_PCI_ISR_CONFIG) {
 		if (virtio_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 
 		if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
 			vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
index 815fba2f55..fa80e75a5b 100644
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)
 	if (events & VMXNET3_ECR_LINK) {
 		PMD_DRV_LOG(DEBUG, "Process events: VMXNET3_ECR_LINK event");
 		if (vmxnet3_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 	}
 
 	/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
index f8d63c7e17..066751f287 100644
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 	rte_eth_dev_shared_data_prepare();
 
 	if (eth_dev->state != RTE_ETH_DEV_UNUSED)
-		_rte_eth_dev_callback_process(eth_dev,
+		rte_eth_dev_callback_process(eth_dev,
 				RTE_ETH_EVENT_DESTROY, NULL);
 
 	rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 }
 
 void
-_rte_eth_dev_reset(struct rte_eth_dev *dev)
+rte_eth_dev_internal_reset(struct rte_eth_dev *dev)
 {
 	if (dev->data->dev_started) {
 		RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
 }
 
 int
-_rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 	enum rte_eth_event_type event, void *ret_param)
 {
 	struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)
 	if (dev == NULL)
 		return;
 
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
 
 	dev->state = RTE_ETH_DEV_ATTACHED;
 }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
index 5dfe9fdf1a..23cc1e0959 100644
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  *  void
  */
 __rte_internal
-void _rte_eth_dev_reset(struct rte_eth_dev *dev);
+void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);
 
 /**
  * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  *  int
  */
 __rte_internal
-int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+int rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 		enum rte_eth_event_type event, void *ret_param);
 
 /**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
index a85986a2a2..b6630dfabe 100644
@@ -228,17 +228,17 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
 	rte_eth_dev_allocate;
 	rte_eth_dev_allocated;
 	rte_eth_dev_attach_secondary;
+	rte_eth_dev_callback_process;
 	rte_eth_dev_create;
 	rte_eth_dev_destroy;
 	rte_eth_dev_is_rx_hairpin_queue;
 	rte_eth_dev_is_tx_hairpin_queue;
 	rte_eth_dev_probing_finish;
 	rte_eth_dev_release_port;
+	rte_eth_dev_internal_reset;
 	rte_eth_devargs_parse;
 	rte_eth_dma_zone_free;
 	rte_eth_dma_zone_reserve;
Signature · 1 line
2.25.4
#23 lore raw

PATCH v3 1/7 ethdev: deprecate descriptor status check API

In reply to Ferruh Yigit

Marking 'rte_eth_rx_descriptor_done()' API as deprecated. ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.

Plan is to remove the API on 21.11 release.

---

Cc: David Marchand <[email protected]>
v3:
* Just deprecating the 'rte_eth_rx_descriptor_done()' API without removing it to stick to the original plan.

---
 doc/guides/rel_notes/deprecation.rst   | 2 +-
 doc/guides/rel_notes/release_20_11.rst | 2 ++
 lib/librte_ethdev/rte_ethdev.h         | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
doc/guides/rel_notes/deprecation.rst +1 -1
index 279eccb04a..35c676e262 100644
@@ -214,7 +214,7 @@ Deprecation Notices
   https://mails.dpdk.org/archives/dev/2020-July/176135.html.
 
 * ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done``
-  will be deprecated in 20.11 and will be removed in 21.11.
+  will be removed in 21.11.
   Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status``
   APIs can be used as replacement.
 
doc/guides/rel_notes/release_20_11.rst +2 -0
index df227a1773..a7d57b001d 100644
@@ -84,6 +84,8 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* ``rte_eth_rx_descriptor_done()`` API has deprecated.
+
 
 ABI Changes
 -----------
lib/librte_ethdev/rte_ethdev.h +1 -0
index f30245b102..eb6cd01f8d 100644
@@ -4567,6 +4567,7 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
  *  - (-ENODEV) if *port_id* invalid.
  *  - (-ENOTSUP) if the device does not support this function
  */
+__rte_deprecated
 static inline int
 rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
 {
Signature · 1 line
2.26.2
#24 lore raw

PATCH v3 2/7 ethdev: move inline device operations

This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.

Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.

Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.

To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.

The list of dev_ops moved:
eth_rx_queue_count_t rx_queue_count;
eth_rx_descriptor_done_t rx_descriptor_done;
eth_rx_descriptor_status_t rx_descriptor_status;
eth_tx_descriptor_status_t tx_descriptor_status;

---
v2:
* Updated features.rst
* Tweak assignment order in sfc

Cc: David Marchand <[email protected]>
v3:
* ``rx_descriptor_done`` also moved
* release note updated

---
 doc/guides/nics/features.rst           |  6 +++---
 doc/guides/rel_notes/release_20_11.rst |  9 +++++++++
 drivers/net/ark/ark_ethdev.c           |  2 +-
 drivers/net/atlantic/atl_ethdev.c      |  9 +++++----
 drivers/net/axgbe/axgbe_ethdev.c       |  5 +++--
 drivers/net/bnxt/bnxt_ethdev.c         |  6 +++---
 drivers/net/dpaa/dpaa_ethdev.c         |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c       |  2 +-
 drivers/net/e1000/em_ethdev.c          |  8 ++++----
 drivers/net/e1000/igb_ethdev.c         | 14 +++++++-------
 drivers/net/enic/enic_ethdev.c         |  3 +--
 drivers/net/fm10k/fm10k_ethdev.c       |  8 ++++----
 drivers/net/i40e/i40e_ethdev.c         |  8 ++++----
 drivers/net/i40e/i40e_ethdev_vf.c      |  8 ++++----
 drivers/net/iavf/iavf_ethdev.c         |  6 +++---
 drivers/net/ice/ice_ethdev.c           |  6 +++---
 drivers/net/igc/igc_ethdev.c           |  8 ++++----
 drivers/net/ixgbe/ixgbe_ethdev.c       | 14 +++++++-------
 drivers/net/mlx5/linux/mlx5_os.c       | 12 +++++-------
 drivers/net/mlx5/mlx5_flow.c           |  4 ++++
 drivers/net/netvsc/hn_ethdev.c         |  6 +++---
 drivers/net/nfp/nfp_net.c              |  2 +-
 drivers/net/octeontx2/otx2_ethdev.c    |  8 ++++----
 drivers/net/qede/qede_ethdev.c         |  3 +--
 drivers/net/sfc/sfc_ethdev.c           | 16 ++++++++--------
 drivers/net/thunderx/nicvf_ethdev.c    |  2 +-
 drivers/net/vhost/rte_eth_vhost.c      |  2 +-
 drivers/net/virtio/virtio_ethdev.c     |  2 +-
 lib/librte_ethdev/rte_ethdev.h         | 17 ++++++++---------
 lib/librte_ethdev/rte_ethdev_core.h    | 13 ++++++-------
 30 files changed, 110 insertions(+), 101 deletions(-)
doc/guides/nics/features.rst +3 -3
index edd21c4d8e..dd8c9555b0 100644
@@ -646,9 +646,9 @@ used, status can be "Available", "Done" or "Unavailable". When
 ``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is
 not set".
 
-* **[implements] eth_dev_ops**: ``rx_descriptor_status``.
+* **[implements] rte_eth_dev**: ``rx_descriptor_status``.
 * **[related]    API**: ``rte_eth_rx_descriptor_status()``.
-* **[implements] eth_dev_ops**: ``rx_descriptor_done``.
+* **[implements] rte_eth_dev**: ``rx_descriptor_done``.
 * **[related]    API**: ``rte_eth_rx_descriptor_done()``.
 
 
@@ -660,7 +660,7 @@ Tx descriptor status
 Supports checking the status of a Tx descriptor. Status can be "Full", "Done"
 or "Unavailable."
 
-* **[implements] eth_dev_ops**: ``tx_descriptor_status``.
+* **[implements] rte_eth_dev**: ``tx_descriptor_status``.
 * **[related]    API**: ``rte_eth_tx_descriptor_status()``.
 
 
doc/guides/rel_notes/release_20_11.rst +9 -0
index a7d57b001d..ff7242012b 100644
@@ -102,6 +102,15 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* ``ethdev`` changes
+
+  * Following device operation function pointers moved from ``struct eth_dev_ops`` to ``struct rte_eth_dev``:
+
+    * ``eth_rx_queue_count_t       rx_queue_count;``
+    * ``eth_rx_descriptor_done_t   rx_descriptor_done;``
+    * ``eth_rx_descriptor_status_t rx_descriptor_status;``
+    * ``eth_tx_descriptor_status_t tx_descriptor_status;``
+
 
 Known Issues
 ------------
drivers/net/ark/ark_ethdev.c +1 -1
index b32ccd8677..ce7f6e4803 100644
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = {
 	.dev_infos_get = eth_ark_dev_info_get,
 
 	.rx_queue_setup = eth_ark_dev_rx_queue_setup,
-	.rx_queue_count = eth_ark_dev_rx_queue_count,
 	.tx_queue_setup = eth_ark_tx_queue_setup,
 
 	.link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		return -1;
 
 	dev->dev_ops = &ark_eth_dev_ops;
+	dev->rx_queue_count = eth_ark_dev_rx_queue_count;
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
index d3b00ab295..540b106045 100644
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = {
 	.rx_queue_intr_enable = atl_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = atl_dev_rx_queue_intr_disable,
 
-	.rx_queue_count       = atl_rx_queue_count,
-	.rx_descriptor_status = atl_dev_rx_descriptor_status,
-	.tx_descriptor_status = atl_dev_tx_descriptor_status,
-
 	/* EEPROM */
 	.get_eeprom_length    = atl_dev_get_eeprom_length,
 	.get_eeprom           = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &atl_eth_dev_ops;
+
+	eth_dev->rx_queue_count       = atl_rx_queue_count;
+	eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status;
+
 	eth_dev->rx_pkt_burst = &atl_recv_pkts;
 	eth_dev->tx_pkt_burst = &atl_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
index 0c25739f82..02ceb95754 100644
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
 	.rxq_info_get                 = axgbe_rxq_info_get,
 	.txq_info_get                 = axgbe_txq_info_get,
 	.dev_supported_ptypes_get     = axgbe_dev_supported_ptypes_get,
-	.rx_descriptor_status         = axgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status         = axgbe_dev_tx_descriptor_status,
 	.mtu_set		= axgb_mtu_set,
 };
 
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 	eth_dev->dev_ops = &axgbe_eth_dev_ops;
 
+	eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status;
+
 	/*
 	 * For secondary processes, we don't initialise any further as primary
 	 * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 75d055be00..4d224bfa04 100644
@@ -4246,9 +4246,6 @@ static const struct eth_dev_ops bnxt_dev_ops = {
 	.dev_led_off = bnxt_dev_led_off_op,
 	.xstats_get_by_id = bnxt_dev_xstats_get_by_id_op,
 	.xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op,
-	.rx_queue_count = bnxt_rx_queue_count_op,
-	.rx_descriptor_status = bnxt_rx_descriptor_status_op,
-	.tx_descriptor_status = bnxt_tx_descriptor_status_op,
 	.rx_queue_start = bnxt_rx_queue_start,
 	.rx_queue_stop = bnxt_rx_queue_stop,
 	.tx_queue_start = bnxt_tx_queue_start,
@@ -5681,6 +5678,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 		PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
 
 	eth_dev->dev_ops = &bnxt_dev_ops;
+	eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
+	eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op;
+	eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op;
 	eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
 	eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
 
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index b0f2023e60..e2c3fd0368 100644
@@ -1421,7 +1421,6 @@ static struct eth_dev_ops dpaa_devops = {
 	.tx_queue_setup		  = dpaa_eth_tx_queue_setup,
 	.rx_queue_release	  = dpaa_eth_rx_queue_release,
 	.tx_queue_release	  = dpaa_eth_tx_queue_release,
-	.rx_queue_count		  = dpaa_dev_rx_queue_count,
 	.rx_burst_mode_get	  = dpaa_dev_rx_burst_mode_get,
 	.tx_burst_mode_get	  = dpaa_dev_tx_burst_mode_get,
 	.rxq_info_get		  = dpaa_rxq_info_get,
@@ -1917,6 +1916,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* Populate ethdev structure */
 	eth_dev->dev_ops = &dpaa_devops;
+	eth_dev->rx_queue_count = dpaa_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
 	eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
 
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
index 02c254846c..38cf0ab71c 100644
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
 	.tx_queue_release  = dpaa2_dev_tx_queue_release,
 	.rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get,
 	.tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get,
-	.rx_queue_count       = dpaa2_dev_rx_queue_count,
 	.flow_ctrl_get	      = dpaa2_flow_ctrl_get,
 	.flow_ctrl_set	      = dpaa2_flow_ctrl_set,
 	.mac_addr_add         = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
 		 * plugged.
 		 */
 		eth_dev->dev_ops = &dpaa2_ethdev_ops;
+		eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;
 		if (dpaa2_get_devargs(dev->devargs, DRIVER_LOOPBACK_MODE))
 			eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx;
 		else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +4 -4
index 902b1cdca0..82766da882 100644
@@ -176,10 +176,6 @@ static const struct eth_dev_ops eth_em_ops = {
 	.vlan_offload_set     = eth_em_vlan_offload_set,
 	.rx_queue_setup       = eth_em_rx_queue_setup,
 	.rx_queue_release     = eth_em_rx_queue_release,
-	.rx_queue_count       = eth_em_rx_queue_count,
-	.rx_descriptor_done   = eth_em_rx_descriptor_done,
-	.rx_descriptor_status = eth_em_rx_descriptor_status,
-	.tx_descriptor_status = eth_em_tx_descriptor_status,
 	.tx_queue_setup       = eth_em_tx_queue_setup,
 	.tx_queue_release     = eth_em_tx_queue_release,
 	.rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -250,6 +246,10 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
 		E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
 
 	eth_dev->dev_ops = &eth_em_ops;
+	eth_dev->rx_queue_count = eth_em_rx_queue_count;
+	eth_dev->rx_descriptor_done   = eth_em_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;
 	eth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;
 	eth_dev->tx_pkt_prepare = (eth_tx_prep_t)&eth_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +7 -7
index a5551e8175..fe0cea88c2 100644
@@ -380,10 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = {
 	.rx_queue_intr_enable = eth_igb_rx_queue_intr_enable,
 	.rx_queue_intr_disable = eth_igb_rx_queue_intr_disable,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_queue_count       = eth_igb_rx_queue_count,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
 	.tx_queue_release     = eth_igb_tx_queue_release,
 	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -441,9 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {
 	.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
 	.rx_queue_setup       = eth_igb_rx_queue_setup,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
 	.tx_queue_release     = eth_igb_tx_queue_release,
 	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -754,6 +747,10 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 	uint32_t ctrl_ext;
 
 	eth_dev->dev_ops = &eth_igb_ops;
+	eth_dev->rx_queue_count = eth_igb_rx_queue_count;
+	eth_dev->rx_descriptor_done   = eth_igb_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
@@ -949,6 +946,9 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &igbvf_eth_dev_ops;
+	eth_dev->rx_descriptor_done   = eth_igb_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -2
index ca75919ee2..2cffa3aa2d 100644
@@ -1141,8 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
 	.tx_queue_stop        = enicpmd_dev_tx_queue_stop,
 	.rx_queue_setup       = enicpmd_dev_rx_queue_setup,
 	.rx_queue_release     = enicpmd_dev_rx_queue_release,
-	.rx_queue_count       = enicpmd_dev_rx_queue_count,
-	.rx_descriptor_done   = NULL,
 	.tx_queue_setup       = enicpmd_dev_tx_queue_setup,
 	.tx_queue_release     = enicpmd_dev_tx_queue_release,
 	.rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1279,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
 	ENICPMD_FUNC_TRACE();
 
 	eth_dev->dev_ops = &enicpmd_eth_dev_ops;
+	eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = &enic_recv_pkts;
 	eth_dev->tx_pkt_burst = &enic_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +4 -4
index fd927923da..e6043e1455 100644
@@ -2855,10 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = {
 	.rx_queue_release	= fm10k_rx_queue_release,
 	.tx_queue_setup		= fm10k_tx_queue_setup,
 	.tx_queue_release	= fm10k_tx_queue_release,
-	.rx_queue_count		= fm10k_dev_rx_queue_count,
-	.rx_descriptor_done	= fm10k_dev_rx_descriptor_done,
-	.rx_descriptor_status = fm10k_dev_rx_descriptor_status,
-	.tx_descriptor_status = fm10k_dev_tx_descriptor_status,
 	.rx_queue_intr_enable	= fm10k_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable	= fm10k_dev_rx_queue_intr_disable,
 	.reta_update		= fm10k_reta_update,
@@ -3055,6 +3051,10 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	dev->dev_ops = &fm10k_eth_dev_ops;
+	dev->rx_queue_count = fm10k_dev_rx_queue_count;
+	dev->rx_descriptor_done	= fm10k_dev_rx_descriptor_done;
+	dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status;
 	dev->rx_pkt_burst = &fm10k_recv_pkts;
 	dev->tx_pkt_burst = &fm10k_xmit_pkts;
 	dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +4 -4
index 841447228a..80efd06cd9 100644
@@ -474,10 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 	.rx_queue_intr_enable         = i40e_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable        = i40e_dev_rx_queue_intr_disable,
 	.rx_queue_release             = i40e_dev_rx_queue_release,
-	.rx_queue_count               = i40e_dev_rx_queue_count,
-	.rx_descriptor_done           = i40e_dev_rx_descriptor_done,
-	.rx_descriptor_status         = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status         = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup               = i40e_dev_tx_queue_setup,
 	.tx_queue_release             = i40e_dev_tx_queue_release,
 	.dev_led_on                   = i40e_dev_led_on,
@@ -1448,6 +1444,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	PMD_INIT_FUNC_TRACE();
 
 	dev->dev_ops = &i40e_eth_dev_ops;
+	dev->rx_queue_count = i40e_dev_rx_queue_count;
+	dev->rx_descriptor_done = i40e_dev_rx_descriptor_done;
+	dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
 	dev->rx_pkt_burst = i40e_recv_pkts;
 	dev->tx_pkt_burst = i40e_xmit_pkts;
 	dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +4 -4
index b755350cd2..be4b28fa45 100644
@@ -199,12 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = {
 	.rx_queue_release     = i40e_dev_rx_queue_release,
 	.rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable,
-	.rx_descriptor_done   = i40e_dev_rx_descriptor_done,
-	.rx_descriptor_status = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup       = i40e_dev_tx_queue_setup,
 	.tx_queue_release     = i40e_dev_tx_queue_release,
-	.rx_queue_count       = i40e_dev_rx_queue_count,
 	.rxq_info_get         = i40e_rxq_info_get,
 	.txq_info_get         = i40e_txq_info_get,
 	.mac_addr_add	      = i40evf_add_mac_addr,
@@ -1561,6 +1557,10 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* assign ops func pointer */
 	eth_dev->dev_ops = &i40evf_eth_dev_ops;
+	eth_dev->rx_queue_count       = i40e_dev_rx_queue_count;
+	eth_dev->rx_descriptor_done   = i40e_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &i40e_recv_pkts;
 	eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
 
drivers/net/iavf/iavf_ethdev.c +3 -3
index 8e1d8a8d3e..e1ff38e8be 100644
@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
 	.rss_hash_conf_get          = iavf_dev_rss_hash_conf_get,
 	.rxq_info_get               = iavf_dev_rxq_info_get,
 	.txq_info_get               = iavf_dev_txq_info_get,
-	.rx_queue_count             = iavf_dev_rxq_count,
-	.rx_descriptor_status       = iavf_dev_rx_desc_status,
-	.tx_descriptor_status       = iavf_dev_tx_desc_status,
 	.mtu_set                    = iavf_dev_mtu_set,
 	.rx_queue_intr_enable       = iavf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable      = iavf_dev_rx_queue_intr_disable,
@@ -1383,6 +1380,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* assign ops func pointer */
 	eth_dev->dev_ops = &iavf_eth_dev_ops;
+	eth_dev->rx_queue_count = iavf_dev_rxq_count;
+	eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status;
+	eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;
 	eth_dev->rx_pkt_burst = &iavf_recv_pkts;
 	eth_dev->tx_pkt_burst = &iavf_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
index c5dac2e328..c8b16c7f87 100644
@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
 	.tx_burst_mode_get            = ice_tx_burst_mode_get,
 	.get_eeprom_length            = ice_get_eeprom_length,
 	.get_eeprom                   = ice_get_eeprom,
-	.rx_queue_count               = ice_rx_queue_count,
-	.rx_descriptor_status         = ice_rx_descriptor_status,
-	.tx_descriptor_status         = ice_tx_descriptor_status,
 	.stats_get                    = ice_stats_get,
 	.stats_reset                  = ice_stats_reset,
 	.xstats_get                   = ice_xstats_get,
@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)
 	int ret;
 
 	dev->dev_ops = &ice_eth_dev_ops;
+	dev->rx_queue_count = ice_rx_queue_count;
+	dev->rx_descriptor_status = ice_rx_descriptor_status;
+	dev->tx_descriptor_status = ice_tx_descriptor_status;
 	dev->rx_pkt_burst = ice_recv_pkts;
 	dev->tx_pkt_burst = ice_xmit_pkts;
 	dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +4 -4
index 6ab3ee909d..aa37c11861 100644
@@ -272,10 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = {
 
 	.rx_queue_setup		= eth_igc_rx_queue_setup,
 	.rx_queue_release	= eth_igc_rx_queue_release,
-	.rx_queue_count		= eth_igc_rx_queue_count,
-	.rx_descriptor_done	= eth_igc_rx_descriptor_done,
-	.rx_descriptor_status	= eth_igc_rx_descriptor_status,
-	.tx_descriptor_status	= eth_igc_tx_descriptor_status,
 	.tx_queue_setup		= eth_igc_tx_queue_setup,
 	.tx_queue_release	= eth_igc_tx_queue_release,
 	.tx_done_cleanup	= eth_igc_tx_done_cleanup,
@@ -1227,6 +1223,10 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 	dev->dev_ops = &eth_igc_ops;
+	dev->rx_descriptor_done	= eth_igc_rx_descriptor_done;
+	dev->rx_queue_count = eth_igc_rx_queue_count;
+	dev->rx_descriptor_status = eth_igc_rx_descriptor_status;
+	dev->tx_descriptor_status = eth_igc_tx_descriptor_status;
 
 	/*
 	 * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +7 -7
index d9582473a4..337ce90fbf 100644
@@ -545,10 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
 	.rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_queue_count       = ixgbe_dev_rx_queue_count,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
 	.tx_queue_release     = ixgbe_dev_tx_queue_release,
 	.dev_led_on           = ixgbe_dev_led_on,
@@ -622,9 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
 	.vlan_offload_set     = ixgbevf_vlan_offload_set,
 	.rx_queue_setup       = ixgbe_dev_rx_queue_setup,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
 	.tx_queue_release     = ixgbe_dev_tx_queue_release,
 	.rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1091,6 +1084,10 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	ixgbe_dev_macsec_setting_reset(eth_dev);
 
 	eth_dev->dev_ops = &ixgbe_eth_dev_ops;
+	eth_dev->rx_queue_count       = ixgbe_dev_rx_queue_count;
+	eth_dev->rx_descriptor_done   = ixgbe_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
 	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1570,6 +1567,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &ixgbevf_eth_dev_ops;
+	eth_dev->rx_descriptor_done   = ixgbe_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
 	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 
drivers/net/mlx5/linux/mlx5_os.c +5 -7
index bf1f82ba67..ec3cc4000e 100644
@@ -601,6 +601,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		}
 		eth_dev->device = dpdk_dev;
 		eth_dev->dev_ops = &mlx5_os_dev_sec_ops;
+		eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+		eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
 		err = mlx5_proc_priv_init(eth_dev);
 		if (err)
 			return NULL;
@@ -1208,6 +1210,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	eth_dev->rx_pkt_burst = removed_rx_burst;
 	eth_dev->tx_pkt_burst = removed_tx_burst;
 	eth_dev->dev_ops = &mlx5_os_dev_ops;
+	eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+	eth_dev->rx_queue_count = mlx5_rx_queue_count;
 	/* Register MAC address. */
 	claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
 	if (config->vf && config->vf_nl_en)
@@ -2396,13 +2401,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = {
 	.rss_hash_update = mlx5_rss_hash_update,
 	.rss_hash_conf_get = mlx5_rss_hash_conf_get,
 	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
 	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
-	.rx_queue_count = mlx5_rx_queue_count,
 	.rx_queue_intr_enable = mlx5_rx_intr_enable,
 	.rx_queue_intr_disable = mlx5_rx_intr_disable,
 	.is_removed = mlx5_is_removed,
@@ -2427,8 +2429,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = {
 	.rx_queue_stop = mlx5_rx_queue_stop,
 	.tx_queue_start = mlx5_tx_queue_start,
 	.tx_queue_stop = mlx5_tx_queue_stop,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2480,8 +2480,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = {
 	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
 	.vlan_offload_set = mlx5_vlan_offload_set,
 	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
index 4c29898203..eb55bd7f99 100644
@@ -5138,6 +5138,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
 		dev->dev_ops = &mlx5_os_dev_ops_isolate;
 	else
 		dev->dev_ops = &mlx5_os_dev_ops;
+
+	dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+
 	return 0;
 }
 
drivers/net/netvsc/hn_ethdev.c +3 -3
index fd91c0e491..229c1b9149 100644
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = {
 	.tx_queue_setup		= hn_dev_tx_queue_setup,
 	.tx_queue_release	= hn_dev_tx_queue_release,
 	.tx_done_cleanup        = hn_dev_tx_done_cleanup,
-	.tx_descriptor_status	= hn_dev_tx_descriptor_status,
 	.rx_queue_setup		= hn_dev_rx_queue_setup,
 	.rx_queue_release	= hn_dev_rx_queue_release,
-	.rx_queue_count		= hn_dev_rx_queue_count,
-	.rx_descriptor_status   = hn_dev_rx_queue_status,
 	.link_update		= hn_dev_link_update,
 	.stats_get		= hn_dev_stats_get,
 	.stats_reset            = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 
 	vmbus = container_of(device, struct rte_vmbus_device, device);
 	eth_dev->dev_ops = &hn_eth_dev_ops;
+	eth_dev->rx_queue_count = hn_dev_rx_queue_count;
+	eth_dev->rx_descriptor_status = hn_dev_rx_queue_status;
+	eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status;
 	eth_dev->tx_pkt_burst = &hn_xmit_pkts;
 	eth_dev->rx_pkt_burst = &hn_recv_pkts;
 
drivers/net/nfp/nfp_net.c +1 -1
index 99946279db..c556dedab6 100644
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = {
 	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
 	.rx_queue_setup		= nfp_net_rx_queue_setup,
 	.rx_queue_release	= nfp_net_rx_queue_release,
-	.rx_queue_count		= nfp_net_rx_queue_count,
 	.tx_queue_setup		= nfp_net_tx_queue_setup,
 	.tx_queue_release	= nfp_net_tx_queue_release,
 	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	}
 
 	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
 	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
 
drivers/net/octeontx2/otx2_ethdev.c +4 -4
index 33b72bd4db..c06e32f26b 100644
@@ -2272,10 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = {
 	.txq_info_get             = otx2_nix_txq_info_get,
 	.rx_burst_mode_get        = otx2_rx_burst_mode_get,
 	.tx_burst_mode_get        = otx2_tx_burst_mode_get,
-	.rx_queue_count           = otx2_nix_rx_queue_count,
-	.rx_descriptor_done       = otx2_nix_rx_descriptor_done,
-	.rx_descriptor_status     = otx2_nix_rx_descriptor_status,
-	.tx_descriptor_status     = otx2_nix_tx_descriptor_status,
 	.tx_done_cleanup          = otx2_nix_tx_done_cleanup,
 	.set_queue_rate_limit     = otx2_nix_tm_set_queue_rate_limit,
 	.pool_ops_supported       = otx2_nix_pool_ops_supported,
@@ -2382,6 +2378,10 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
 	int rc, max_entries;
 
 	eth_dev->dev_ops = &otx2_eth_dev_ops;
+	eth_dev->rx_descriptor_done = otx2_nix_rx_descriptor_done;
+	eth_dev->rx_queue_count = otx2_nix_rx_queue_count;
+	eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/qede/qede_ethdev.c +1 -2
index 70d48e48ef..59f1746ee9 100644
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
 	.dev_infos_get = qede_dev_info_get,
 	.rx_queue_setup = qede_rx_queue_setup,
 	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
 	.tx_queue_setup = qede_tx_queue_setup,
 	.tx_queue_release = qede_tx_queue_release,
 	.dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
 	.dev_infos_get = qede_dev_info_get,
 	.rx_queue_setup = qede_rx_queue_setup,
 	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
 	.tx_queue_setup = qede_tx_queue_setup,
 	.tx_queue_release = qede_tx_queue_release,
 	.dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	}
 
 	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
+	eth_dev->rx_descriptor_status = qede_rx_descriptor_status;
 
 	adapter->num_tx_queues = 0;
 	adapter->num_rx_queues = 0;
drivers/net/sfc/sfc_ethdev.c +8 -8
index acee3e48e4..1a58e0df84 100644
@@ -1819,10 +1819,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = {
 	.tx_queue_stop			= sfc_tx_queue_stop,
 	.rx_queue_setup			= sfc_rx_queue_setup,
 	.rx_queue_release		= sfc_rx_queue_release,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.rx_queue_intr_enable		= sfc_rx_queue_intr_enable,
 	.rx_queue_intr_disable		= sfc_rx_queue_intr_disable,
 	.tx_queue_setup			= sfc_tx_queue_setup,
@@ -1977,6 +1973,10 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
 	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
 
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_done = sfc_rx_descriptor_done;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
 	dev->dev_ops = &sfc_eth_dev_ops;
 
 	return 0;
@@ -2017,10 +2017,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 
 static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.reta_query			= sfc_dev_rss_reta_query,
 	.rss_hash_conf_get		= sfc_dev_rss_hash_conf_get,
 	.rxq_info_get			= sfc_rx_queue_info_get,
@@ -2085,6 +2081,10 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
 	dev->rx_pkt_burst = dp_rx->pkt_burst;
 	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_done = sfc_rx_descriptor_done;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
 	dev->dev_ops = &sfc_eth_dev_secondary_ops;
 
 	return 0;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
index d955a7ee23..959c8e4ddc 100644
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = {
 	.tx_queue_stop            = nicvf_dev_tx_queue_stop,
 	.rx_queue_setup           = nicvf_dev_rx_queue_setup,
 	.rx_queue_release         = nicvf_dev_rx_queue_release,
-	.rx_queue_count           = nicvf_dev_rx_queue_count,
 	.tx_queue_setup           = nicvf_dev_tx_queue_setup,
 	.tx_queue_release         = nicvf_dev_tx_queue_release,
 	.dev_set_link_up          = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &nicvf_eth_dev_ops;
+	eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
index e55278af69..fa365605ef 100644
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = {
 	.rx_queue_release = eth_queue_release,
 	.tx_queue_release = eth_queue_release,
 	.tx_done_cleanup = eth_tx_done_cleanup,
-	.rx_queue_count = eth_rx_queue_count,
 	.link_update = eth_link_update,
 	.stats_get = eth_stats_get,
 	.stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 	data->all_multicast = 1;
 
 	eth_dev->dev_ops = &ops;
+	eth_dev->rx_queue_count = eth_rx_queue_count;
 
 	/* finally assign rx and tx ops */
 	eth_dev->rx_pkt_burst = eth_vhost_rx;
drivers/net/virtio/virtio_ethdev.c +1 -1
index dc0093bdf0..4f2fa0d943 100644
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
 	.rx_queue_intr_enable    = virtio_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable   = virtio_dev_rx_queue_intr_disable,
 	.rx_queue_release        = virtio_dev_queue_release,
-	.rx_descriptor_done      = virtio_dev_rx_queue_done,
 	.tx_queue_setup          = virtio_dev_tx_queue_setup,
 	.tx_queue_release        = virtio_dev_queue_release,
 	/* collect stats per queue */
@@ -1903,6 +1902,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	eth_dev->dev_ops = &virtio_eth_dev_ops;
+	eth_dev->rx_descriptor_done = virtio_dev_rx_queue_done;
 
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		if (!hw->virtio_user_dev) {
lib/librte_ethdev/rte_ethdev.h +8 -9
index eb6cd01f8d..b6f26a513b 100644
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
 	dev = &rte_eth_devices[port_id];
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_queue_count, -ENOTSUP);
 	if (queue_id >= dev->data->nb_rx_queues)
 		return -EINVAL;
 
-	return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
+	return (int)(*dev->rx_queue_count)(dev, queue_id);
 }
 
 /**
@@ -4573,9 +4573,8 @@ rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
-	return (*dev->dev_ops->rx_descriptor_done)( \
-		dev->data->rx_queues[queue_id], offset);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_done, -ENOTSUP);
+	return (*dev->rx_descriptor_done)(dev->data->rx_queues[queue_id], offset);
 }
 
 #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */
@@ -4630,10 +4629,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
 	if (queue_id >= dev->data->nb_rx_queues)
 		return -ENODEV;
 #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_status, -ENOTSUP);
 	rxq = dev->data->rx_queues[queue_id];
 
-	return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
+	return (*dev->rx_descriptor_status)(rxq, offset);
 }
 
 #define RTE_ETH_TX_DESC_FULL    0 /**< Desc filled for hw, waiting xmit. */
@@ -4687,10 +4686,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
 	if (queue_id >= dev->data->nb_tx_queues)
 		return -ENODEV;
 #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_descriptor_status, -ENOTSUP);
 	txq = dev->data->tx_queues[queue_id];
 
-	return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
+	return (*dev->tx_descriptor_status)(txq, offset);
 }
 
 /**
lib/librte_ethdev/rte_ethdev_core.h +6 -7
index 32407dd418..8ed827475f 100644
@@ -660,13 +660,6 @@ struct eth_dev_ops {
 	eth_queue_stop_t           tx_queue_stop; /**< Stop TX for a queue. */
 	eth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue. */
 	eth_queue_release_t        rx_queue_release; /**< Release RX queue. */
-	eth_rx_queue_count_t       rx_queue_count;
-	/**< Get the number of used RX descriptors. */
-	eth_rx_descriptor_done_t   rx_descriptor_done; /**< Check rxd DD bit. */
-	eth_rx_descriptor_status_t rx_descriptor_status;
-	/**< Check the status of a Rx descriptor. */
-	eth_tx_descriptor_status_t tx_descriptor_status;
-	/**< Check the status of a Tx descriptor. */
 	/*
 	 * Static inline functions use functions ABOVE this comment.
 	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -782,6 +775,12 @@ struct rte_eth_dev {
 	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
 	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
 	eth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */
+
+	eth_rx_queue_count_t       rx_queue_count; /**< Get the number of used RX descriptors. */
+	eth_rx_descriptor_done_t   rx_descriptor_done;   /**< Check rxd DD bit. */
+	eth_rx_descriptor_status_t rx_descriptor_status; /**< Check the status of a Rx descriptor. */
+	eth_tx_descriptor_status_t tx_descriptor_status; /**< Check the status of a Tx descriptor. */
+
 	/**
 	 * Next two fields are per-device data but *data is shared between
 	 * primary and secondary processes and *process_private is per-process
Signature · 1 line
2.26.2
#25 lore raw

PATCH v3 3/7 ethdev: make device operations struct private

In reply to Ferruh Yigit

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

---
Cc: David Marchand <[email protected]>
v3:
* release note updated

---
 doc/guides/rel_notes/deprecation.rst     |   9 -
 doc/guides/rel_notes/release_20_11.rst   |   2 +
 drivers/net/i40e/i40e_vf_representor.c   |   1 +
 drivers/net/ixgbe/ixgbe_vf_representor.c |   1 +
 lib/librte_ethdev/rte_ethdev_core.h      | 712 +----------------------
 lib/librte_ethdev/rte_ethdev_driver.h    | 694 ++++++++++++++++++++++
 lib/librte_ethdev/rte_flow_driver.h      |   1 +
 lib/librte_ethdev/rte_mtr_driver.h       |   1 +
 lib/librte_ethdev/rte_tm_driver.h        |   1 +
 9 files changed, 710 insertions(+), 712 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -9
index 35c676e262..8770c87006 100644
@@ -156,15 +156,6 @@ Deprecation Notices
   Due to adoption of C11 atomic builtins, the field ``refcnt_atomic``
   will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11.
 
-* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
-  will be done in 20.11.
-  Currently the ``struct eth_dev_ops`` struct is accessible by the application
-  because some inline functions, like ``rte_eth_tx_descriptor_status()``,
-  access the struct directly.
-  The struct will be separate in two, the ops used by inline functions will be
-  moved next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct
-  will be moved to header file for drivers to hide it from applications.
-
 * ethdev: the legacy filter API, including
   ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
   as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
doc/guides/rel_notes/release_20_11.rst +2 -0
index ff7242012b..bc4e8e412a 100644
@@ -111,6 +111,8 @@ ABI Changes
     * ``eth_rx_descriptor_status_t rx_descriptor_status;``
     * ``eth_tx_descriptor_status_t tx_descriptor_status;``
 
+  * ``struct eth_dev_ops`` is no more accessible by applications, which was already inline data structure.
+
 
 Known Issues
 ------------
drivers/net/i40e/i40e_vf_representor.c +1 -0
index 083bc1a5f3..f09d4d8798 100644
@@ -7,6 +7,7 @@
 #include <rte_pci.h>
 #include <rte_malloc.h>
 
+#include "rte_ethdev_driver.h"
 #include "base/i40e_type.h"
 #include "base/virtchnl.h"
 #include "i40e_ethdev.h"
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -0
index dbbef294ae..edb5d43846 100644
@@ -6,6 +6,7 @@
 #include <rte_pci.h>
 #include <rte_malloc.h>
 
+#include "rte_ethdev_driver.h"
 #include "base/ixgbe_type.h"
 #include "base/ixgbe_vf.h"
 #include "ixgbe_ethdev.h"
lib/librte_ethdev/rte_ethdev_core.h +9 -703

731 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev_driver.h +694 -0

700 lines not on this page · raw message

lib/librte_ethdev/rte_flow_driver.h +1 -0
index 881cc469b7..997598db11 100644
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
lib/librte_ethdev/rte_mtr_driver.h +1 -0
index 3ec7ffa2a5..3b39532935 100644
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
lib/librte_ethdev/rte_tm_driver.h +1 -0
index 90114ff53e..b86ed89c00 100644
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
Signature · 1 line
2.26.2
#26 lore raw

Re: [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private

Quoted 6 lines · Ferruh Yigit

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

<...>

doc/guides/rel_notes/release_20_11.rst ABI Changes · line 115

Quoted 8 lines
doc/guides/rel_notes/release_20_11.rst +1 -0
@@ -111,6 +111,8 @@ ABI Changes
     * ``eth_rx_descriptor_status_t rx_descriptor_status;``
     * ``eth_tx_descriptor_status_t tx_descriptor_status;``
 
+  * ``struct eth_dev_ops`` is no more accessible by applications, which was already inline data structure.
 

s/inline/internal, will send a v4

#27 lore raw

PATCH v3 4/7 ethdev: mark internal functions

In reply to Ferruh Yigit

Some ethdev functions are for drivers only, not for applications.

Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.

Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.

---
Cc: David Marchand <[email protected]>
v3:
* release note updated

---
 doc/guides/rel_notes/deprecation.rst     |  6 -----
 doc/guides/rel_notes/release_20_11.rst   |  2 ++
 lib/librte_ethdev/rte_ethdev.h           |  3 +--
 lib/librte_ethdev/rte_ethdev_driver.h    | 33 ++++++++++--------------
 lib/librte_ethdev/rte_ethdev_version.map | 30 ++++++++++-----------
 lib/librte_ethdev/rte_flow_driver.h      |  4 +--
 6 files changed, 31 insertions(+), 47 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -6
index 8770c87006..6c82db2961 100644
@@ -225,12 +225,6 @@ Deprecation Notices
   following the IPv6 header, as proposed in RFC
   https://mails.dpdk.org/archives/dev/2020-August/177257.html.
 
-* ethdev: Some internal APIs for driver usage are exported in the .map file.
-  Now DPDK has ``__rte_internal`` marker so we can mark internal APIs and move
-  them to the INTERNAL block in .map. Although these APIs are internal it will
-  break the ABI checks, that is why change is planned for 20.11.
-  The list of internal APIs are mainly ones listed in ``rte_ethdev_driver.h``.
-
 * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made
   ABI stable in the v19.11 release. The TM maintainer and other contributors have
   agreed to keep the TM APIs as experimental in expectation of additional spec
doc/guides/rel_notes/release_20_11.rst +2 -0
index bc4e8e412a..6d3c60390f 100644
@@ -113,6 +113,8 @@ ABI Changes
 
   * ``struct eth_dev_ops`` is no more accessible by applications, which was already inline data structure.
 
+  * ``ethdev`` internal functions are marked with ``__rte_internal`` tag.
+
 
 Known Issues
 ------------
lib/librte_ethdev/rte_ethdev.h +1 -2
index b6f26a513b..e7733d828b 100644
@@ -1724,8 +1724,7 @@ rte_eth_find_next_of(uint16_t port_id_start,
  */
 __rte_experimental
 uint16_t
-rte_eth_find_next_sibling(uint16_t port_id_start,
-		uint16_t ref_port_id);
+rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);
 
 /**
  * Macro to iterate over all ethdev ports sharing the same rte_device
lib/librte_ethdev/rte_ethdev_driver.h +13 -20
index b006cbbe92..3d1bc33272 100644
@@ -759,6 +759,7 @@ int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
  * @return
  *   - The pointer to the ethdev slot, on success. NULL on error
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
 
 /**
@@ -770,6 +771,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
 
 /**
@@ -783,6 +785,7 @@ struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
  *        device.
  *   - Error: Null pointer.
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
 
 /**
@@ -801,6 +804,7 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
  * @return
  *   - 0 on success, negative on error
  */
+__rte_internal
 int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
 
 /**
@@ -814,6 +818,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  * @return
  *  void
  */
+__rte_internal
 void _rte_eth_dev_reset(struct rte_eth_dev *dev);
 
 /**
@@ -833,6 +838,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  * @return
  *  int
  */
+__rte_internal
 int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 		enum rte_eth_event_type event, void *ret_param);
 
@@ -848,6 +854,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  * @param dev
  *  New ethdev port.
  */
+__rte_internal
 void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
 
 /**
@@ -869,6 +876,7 @@ void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
  * @param socket_id
  *   The *socket_id* argument is the socket identifier in case of NUMA.
  */
+__rte_internal
 const struct rte_memzone *
 rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,
 			 uint16_t queue_id, size_t size,
@@ -955,9 +963,6 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
 }
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Allocate an unique switch domain identifier.
  *
  * A pool of switch domain identifiers which can be allocated on request. This
@@ -971,14 +976,11 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_switch_domain_alloc(uint16_t *domain_id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Free switch domain.
  *
  * Return a switch domain identifier to the pool of free identifiers after it is
@@ -990,7 +992,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id);
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_switch_domain_free(uint16_t domain_id);
 
@@ -1007,9 +1009,6 @@ struct rte_eth_devargs {
 };
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function to parse ethdev arguments
  *
  * @param devargs
@@ -1020,7 +1019,7 @@ struct rte_eth_devargs {
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs);
 
@@ -1030,9 +1029,6 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
 	void *bus_specific_init_params);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function for the creation of a new ethdev ports.
  *
  * @param device
@@ -1053,7 +1049,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_dev_create(struct rte_device *device, const char *name,
 	size_t priv_data_size,
@@ -1064,9 +1060,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function for cleaning up the resources of a ethdev port on it's
  * destruction.
  *
@@ -1078,7 +1071,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit);
 
lib/librte_ethdev/rte_ethdev_version.map +14 -16
index 8d9d6b1c67..6a84f3d76d 100644
@@ -1,8 +1,6 @@
 DPDK_21 {
 	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
 	rte_eth_add_first_rx_callback;
 	rte_eth_add_rx_callback;
 	rte_eth_add_tx_callback;
@@ -10,9 +8,6 @@ DPDK_21 {
 	rte_eth_allmulticast_enable;
 	rte_eth_allmulticast_get;
 	rte_eth_dev_adjust_nb_rx_tx_desc;
-	rte_eth_dev_allocate;
-	rte_eth_dev_allocated;
-	rte_eth_dev_attach_secondary;
 	rte_eth_dev_callback_register;
 	rte_eth_dev_callback_unregister;
 	rte_eth_dev_close;
@@ -44,8 +39,6 @@ DPDK_21 {
 	rte_eth_dev_mac_addr_remove;
 	rte_eth_dev_pool_ops_supported;
 	rte_eth_dev_priority_flow_ctrl_set;
-	rte_eth_dev_probing_finish;
-	rte_eth_dev_release_port;
 	rte_eth_dev_reset;
 	rte_eth_dev_rss_hash_conf_get;
 	rte_eth_dev_rss_hash_update;
@@ -81,7 +74,6 @@ DPDK_21 {
 	rte_eth_dev_udp_tunnel_port_delete;
 	rte_eth_dev_vlan_filter;
 	rte_eth_devices;
-	rte_eth_dma_zone_reserve;
 	rte_eth_find_next;
 	rte_eth_find_next_owned_by;
 	rte_eth_iterator_cleanup;
@@ -195,16 +187,8 @@ EXPERIMENTAL {
 	rte_eth_dev_owner_unset;
 
 	# added in 18.05
-	rte_eth_dev_create;
-	rte_eth_dev_destroy;
 	rte_eth_dev_get_module_eeprom;
 	rte_eth_dev_get_module_info;
-	rte_eth_devargs_parse;
-	rte_eth_switch_domain_alloc;
-	rte_eth_switch_domain_free;
-
-	# added in 18.08
-	rte_flow_expand_rss;
 
 	# added in 18.11
 	rte_eth_dev_rx_intr_ctl_q_get_fd;
@@ -246,5 +230,19 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
+	_rte_eth_dev_callback_process;
+	_rte_eth_dev_reset;
+	rte_eth_dev_allocate;
+	rte_eth_dev_allocated;
+	rte_eth_dev_attach_secondary;
+	rte_eth_dev_create;
+	rte_eth_dev_destroy;
+	rte_eth_dev_probing_finish;
+	rte_eth_dev_release_port;
+	rte_eth_devargs_parse;
 	rte_eth_dma_zone_free;
+	rte_eth_dma_zone_reserve;
+	rte_eth_switch_domain_alloc;
+	rte_eth_switch_domain_free;
+	rte_flow_expand_rss;
 };
lib/librte_ethdev/rte_flow_driver.h +1 -3
index 997598db11..3ee871d3eb 100644
@@ -161,8 +161,6 @@ struct rte_flow_expand_rss {
  * Expand RSS flows into several possible flows according to the RSS hash
  * fields requested and the driver capabilities.
  *
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * @param[out] buf
  *   Buffer to store the result expansion.
  * @param[in] size
@@ -183,7 +181,7 @@ struct rte_flow_expand_rss {
  *
  *   -E2BIG: graph-depth @p graph is too deep.
  */
-__rte_experimental
+__rte_internal
 int
 rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
 		    const struct rte_flow_item *pattern, uint64_t types,
Signature · 1 line
2.26.2
#28 lore raw

PATCH v3 5/7 ethdev: use hairpin helper functions

In reply to Ferruh Yigit

Hairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'

Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.

---
 drivers/net/mlx5/mlx5_rxq.c              | 4 ++--
 drivers/net/mlx5/mlx5_txq.c              | 4 ++--
 lib/librte_ethdev/rte_ethdev_driver.h    | 2 ++
 lib/librte_ethdev/rte_ethdev_version.map | 2 ++
 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +2 -2
index 946f7454f6..1b729f7ab2 100644
@@ -542,7 +542,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 	eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
 	int ret;
 
-	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be stopped");
 		rte_errno = EINVAL;
 		return -EINVAL;
@@ -653,7 +653,7 @@ mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be started");
 		rte_errno = EINVAL;
 		return -EINVAL;
drivers/net/mlx5/mlx5_txq.c +2 -2
index 66ad368e64..450d9641de 100644
@@ -244,7 +244,7 @@ mlx5_tx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->tx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_tx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be stopped");
 		rte_errno = EINVAL;
 		return -EINVAL;
@@ -371,7 +371,7 @@ mlx5_tx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->tx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_tx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be started");
 		rte_errno = EINVAL;
 		return -EINVAL;
lib/librte_ethdev/rte_ethdev_driver.h +2 -0
index 3d1bc33272..5dfe9fdf1a 100644
@@ -734,6 +734,7 @@ struct eth_dev_ops {
  * @return
  *   - (1) if the queue is hairpin queue, 0 otherwise.
  */
+__rte_internal
 int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
 
 /**
@@ -748,6 +749,7 @@ int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
  * @return
  *   - (1) if the queue is hairpin queue, 0 otherwise.
  */
+__rte_internal
 int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
 
 /**
lib/librte_ethdev/rte_ethdev_version.map +2 -0
index 6a84f3d76d..5db3fb156a 100644
@@ -237,6 +237,8 @@ INTERNAL {
 	rte_eth_dev_attach_secondary;
 	rte_eth_dev_create;
 	rte_eth_dev_destroy;
+	rte_eth_dev_is_rx_hairpin_queue;
+	rte_eth_dev_is_tx_hairpin_queue;
 	rte_eth_dev_probing_finish;
 	rte_eth_dev_release_port;
 	rte_eth_devargs_parse;
Signature · 1 line
2.26.2
#29 lore raw

PATCH v3 6/7 ethdev: remove invalid symbols from map file

In reply to Ferruh Yigit

These are struct type names, not object names. Removing them from .map file.

Fixes 9d41beed24b0 ("lib: provide initial versioning")
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)
lib/librte_ethdev/rte_ethdev_version.map +0 -2
index 5db3fb156a..a85986a2a2 100644
@@ -81,7 +81,6 @@ DPDK_21 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -96,7 +95,6 @@ DPDK_21 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
Signature · 1 line
2.26.2
#30 lore raw

PATCH v3 7/7 ethdev: remove underscore prefix from internal API

In reply to Ferruh Yigit

'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.

For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.

---
v3:
* release note updated

---
 app/test/virtual_pmd.c                   |  4 ++--
 doc/guides/prog_guide/poll_mode_drv.rst  |  4 ++--
 doc/guides/rel_notes/release_20_11.rst   |  5 +++++
 drivers/net/atlantic/atl_ethdev.c        |  5 ++---
 drivers/net/bnxt/bnxt_ethdev.c           |  6 +++---
 drivers/net/bnxt/rte_pmd_bnxt.c          |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c   |  8 ++++----
 drivers/net/dpaa/dpaa_ethdev.c           |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c         |  3 +--
 drivers/net/e1000/em_ethdev.c            |  2 +-
 drivers/net/e1000/igb_ethdev.c           |  7 +++----
 drivers/net/ena/ena_ethdev.c             |  4 ++--
 drivers/net/enic/enic_main.c             |  2 +-
 drivers/net/failsafe/failsafe_ether.c    |  6 +++---
 drivers/net/fm10k/fm10k_ethdev.c         | 11 ++++-------
 drivers/net/hinic/base/hinic_pmd_hwdev.c |  6 +++---
 drivers/net/i40e/i40e_ethdev.c           |  2 +-
 drivers/net/i40e/i40e_ethdev_vf.c        |  4 ++--
 drivers/net/i40e/i40e_pf.c               |  2 +-
 drivers/net/iavf/iavf_vchnl.c            |  5 ++---
 drivers/net/ice/ice_ethdev.c             |  4 ++--
 drivers/net/igc/igc_ethdev.c             |  3 +--
 drivers/net/ixgbe/ixgbe_ethdev.c         | 10 ++++------
 drivers/net/ixgbe/ixgbe_pf.c             |  5 ++---
 drivers/net/mlx4/mlx4_intr.c             | 10 +++++-----
 drivers/net/mlx5/linux/mlx5_ethdev_os.c  |  4 ++--
 drivers/net/mlx5/mlx5_flow.c             |  2 +-
 drivers/net/netvsc/hn_rndis.c            |  2 +-
 drivers/net/nfp/nfp_net.c                |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c   |  6 +++---
 drivers/net/octeontx2/otx2_link.c        |  2 +-
 drivers/net/qede/qede_main.c             |  3 +--
 drivers/net/sfc/sfc_intr.c               | 12 ++++++------
 drivers/net/thunderx/nicvf_ethdev.c      |  6 +++---
 drivers/net/vhost/rte_eth_vhost.c        |  6 +++---
 drivers/net/virtio/virtio_ethdev.c       |  6 +++---
 drivers/net/vmxnet3/vmxnet3_ethdev.c     |  6 +++---
 lib/librte_ethdev/rte_ethdev.c           |  8 ++++----
 lib/librte_ethdev/rte_ethdev_driver.h    |  4 ++--
 lib/librte_ethdev/rte_ethdev_version.map |  4 ++--
 40 files changed, 95 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
index 79156cb85a..b49089a33c 100644
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id,
 
 	vrtl_eth_dev->data->dev_link.link_status = link_status;
 
-	_rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
-				      NULL);
+	rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
+				     NULL);
 }
 
 int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
index 6fae39f904..86e0a141e6 100644
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread.
 For example when PF is reset, the PF sends a message to notify VFs of
 this event and also trigger an interrupt to VFs. Then in the interrupt
 service routine the VFs detects this notification message and calls
-_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
+rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
 This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET
-event within VFs. The function _rte_eth_dev_callback_process() will
+event within VFs. The function rte_eth_dev_callback_process() will
 call the registered callback function. The callback function can trigger
 the application to handle all operations the VF reset requires including
 stopping Rx/Tx queues and calling rte_eth_dev_reset().
doc/guides/rel_notes/release_20_11.rst +5 -0
index 6d3c60390f..110b0517b4 100644
@@ -86,6 +86,11 @@ API Changes
 
 * ``rte_eth_rx_descriptor_done()`` API has deprecated.
 
+* Renamed internal ethdev APIs:
+
+  * ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_process()``
+  * ``_rte_eth_dev_reset`` -> ``rte_eth_dev_internal_reset()``
+
 
 ABI Changes
 -----------
drivers/net/atlantic/atl_ethdev.c +2 -3
index 540b106045..2fca9140d7 100644
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 	/* Notify userapp if link status changed */
 	if (!atl_dev_link_update(dev, 0)) {
 		atl_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev,
-			RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	} else {
 		if (hw->aq_fw_ops->send_macsec_req == NULL)
 			goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 		    resp.stats.egress_expired ||
 		    resp.stats.ingress_expired) {
 			PMD_DRV_LOG(INFO, "RTE_ETH_EVENT_MACSEC");
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_MACSEC, NULL);
 		}
 	}
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 4d224bfa04..8c959ac913 100644
@@ -1528,9 +1528,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
 	new.link_speed != eth_dev->data->dev_link.link_speed) {
 		rte_eth_linkstatus_set(eth_dev, &new);
 
-		_rte_eth_dev_callback_process(eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 
 		bnxt_print_link_info(eth_dev);
 	}
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
index eafc1d3868..d67db46c65 100644
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 	ret_param.vf_id = vf_id;
 	ret_param.msg = msg;
 
-	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
+				     &ret_param);
 
 	/* Default to approve */
 	if (ret_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
index cdbd8151ed..4ffd2ca4bb 100644
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals,
 	internals->slave_count--;
 
 	/* force reconfiguration of slave interfaces */
-	_rte_eth_dev_reset(slave_eth_dev);
+	rte_eth_dev_internal_reset(slave_eth_dev);
 }
 
 static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
 	if (arg == NULL)
 		return;
 
-	_rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
+	rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
 			RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						bond_ethdev_delayed_lsc_propagation,
 						(void *)bonded_eth_dev);
 			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
 						RTE_ETH_EVENT_INTR_LSC,
 						NULL);
 
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						bond_ethdev_delayed_lsc_propagation,
 						(void *)bonded_eth_dev);
 			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
 						RTE_ETH_EVENT_INTR_LSC,
 						NULL);
 		}
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index e2c3fd0368..a077b98c3e 100644
@@ -335,7 +335,7 @@ static void dpaa_interrupt_handler(void *param)
 	if (bytes_read < 0)
 		DPAA_PMD_ERR("Error reading eventfd\n");
 	dpaa_eth_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int dpaa_eth_dev_start(struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
index 38cf0ab71c..0e9f836e55 100644
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param)
 		clear = DPNI_IRQ_EVENT_LINK_CHANGED;
 		dpaa2_dev_link_update(dev, 0);
 		/* calling all the apps registered for link status event */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 out:
 	ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
index 82766da882..1dc360713a 100644
@@ -1630,7 +1630,7 @@ eth_em_interrupt_handler(void *param)
 
 	eth_em_interrupt_get_status(dev);
 	eth_em_interrupt_action(dev, dev->intr_handle);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
drivers/net/e1000/igb_ethdev.c +3 -4
index fe0cea88c2..5ab74840aa 100644
@@ -2920,8 +2920,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev,
 			     pci_dev->addr.bus,
 			     pci_dev->addr.devid,
 			     pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	return 0;
@@ -2983,8 +2982,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)
 		/* dummy mbx read to ack pf */
 		if (mbx->ops.read(hw, &in_msg, 1, 0))
 			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 	}
 }
 
drivers/net/ena/ena_ethdev.c +2 -2
index da8c8ad922..8077519735 100644
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
 
 	if (unlikely(adapter->trigger_reset)) {
 		PMD_DRV_LOG(ERR, "Trigger reset is on\n");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 			NULL);
 	}
 }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data,
 	adapter->link_status = status;
 
 	ena_link_update(eth_dev, 0);
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
index 7942b0df6b..8b0441c5cd 100644
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)
 	vnic_intr_return_all_credits(&enic->intr[ENICPMD_LSC_INTR_OFFSET]);
 
 	enic_link_update(dev);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	enic_log_q_error(enic);
 	/* Re-enable irq in case of INTx */
 	rte_intr_ack(&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
index 70972d6717..7c68bbdec0 100644
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused,
 	ret = dev->dev_ops->link_update(dev, 0);
 	/* We must pass on the LSC event */
 	if (ret)
-		return _rte_eth_dev_callback_process(dev,
-						     RTE_ETH_EVENT_INTR_LSC,
-						     NULL);
+		return rte_eth_dev_callback_process(dev,
+						    RTE_ETH_EVENT_INTR_LSC,
+						    NULL);
 	else
 		return 0;
 }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
index e6043e1455..5771d83b55 100644
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
 					true);
 
 			dev_info->sm_down = 0;
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC,
 					NULL);
 		}
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
 	if (err == FM10K_ERR_RESET_REQUESTED) {
 		PMD_INIT_LOG(INFO, "INT: Switch is down");
 		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 
 		/* Setting reset flag */
 		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 		fm10k_vlan_filter_set(dev, hw->mac.default_vid, true);
 
 		dev_info->sm_down = 0;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
index ac2a72e388..41c99bdbf8 100644
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev,
 	ret = hinic_link_event_process(hwdev, rte_dev, status);
 	/* check if link has changed, notify callback */
 	if (ret == 0)
-		_rte_eth_dev_callback_process(rte_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(rte_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 }
 
 void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
index 80efd06cd9..563f21d9df 100644
@@ -6846,7 +6846,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
 		case i40e_aqc_opc_get_link_status:
 			ret = i40e_dev_link_update(dev, 0);
 			if (!ret)
-				_rte_eth_dev_callback_process(dev,
+				rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC, NULL);
 			break;
 		default:
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
index be4b28fa45..8531cf6b12 100644
@@ -1378,7 +1378,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev,
+		rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_INTR_RESET, NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -1425,7 +1425,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 		}
 
 		i40evf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev,
+		rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
drivers/net/i40e/i40e_pf.c +1 -1
index 7bf1e79410..03c2070c3f 100644
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
 	 * do nothing and send not_supported to VF. As PF must send a response
 	 * to VF and ACK/NACK is not defined.
 	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 	if (ret_param.retval != RTE_PMD_I40E_MB_EVENT_PROCEED) {
 		PMD_DRV_LOG(WARNING, "VF to PF message(%d) is not permitted!",
 			    opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
index 34c31a153a..29e4cae10c 100644
@@ -187,7 +187,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 					      NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -202,8 +202,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 			vf->link_speed = iavf_convert_link_speed(speed);
 		}
 		iavf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
drivers/net/ice/ice_ethdev.c +2 -2
index c8b16c7f87..724b2ee26c 100644
@@ -1314,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)
 		case ice_aqc_opc_get_link_status:
 			ret = ice_link_update(dev, 0);
 			if (!ret)
-				_rte_eth_dev_callback_process
+				rte_eth_dev_callback_process
 					(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 			break;
 		default:
@@ -1379,7 +1379,7 @@ ice_interrupt_handler(void *param)
 		PMD_DRV_LOG(INFO, "OICR: link state change event");
 		ret = ice_link_update(dev, 0);
 		if (!ret)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 #endif
drivers/net/igc/igc_ethdev.c +1 -2
index aa37c11861..810568bc54 100644
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev)
 				pci_dev->addr.bus,
 				pci_dev->addr.devid,
 				pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 }
 
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
index 337ce90fbf..0f065bbc04 100644
@@ -4659,13 +4659,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)
 		ixgbe_dev_link_update(dev, 0);
 		intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;
 		ixgbe_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	if (intr->flags & IXGBE_FLAG_MACSEC) {
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC, NULL);
 		intr->flags &= ~IXGBE_FLAG_MACSEC;
 	}
 
@@ -8674,8 +8672,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)
 		/* dummy mbx read to ack pf */
 		if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
 			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 	}
 }
 
drivers/net/ixgbe/ixgbe_pf.c +2 -3
index 67b5bef44f..ed5f96b1a4 100644
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 		vfinfo[vf].clear_to_send = true;
 
 		/* notify application about VF reset */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
 					      &ret_param);
 		return ret;
 	}
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 	 * if 0, do nothing and send ACK to VF
 	 * if ret_param.retval > 1, do nothing and send NAK to VF
 	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 
 	retval = ret_param.retval;
 
drivers/net/mlx4/mlx4_intr.c +5 -5
index 19af9359c9..6786b12ab5 100644
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)
 	MLX4_ASSERT(priv->intr_alarm == 1);
 	priv->intr_alarm = 0;
 	if (intr_conf->lsc && !mlx4_link_status_check(priv))
-		_rte_eth_dev_callback_process(ETH_DEV(priv),
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(ETH_DEV(priv),
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 }
 
 /**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv)
 	}
 	for (i = 0; i != RTE_DIM(caught); ++i)
 		if (caught[i])
-			_rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
-						      NULL);
+			rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
+						     NULL);
 }
 
 /**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
index 3d3dd2e862..7256c1bcfe 100644
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
 		dev = &rte_eth_devices[sh->port[i].ih_port_id];
 		MLX5_ASSERT(dev);
 		if (dev->data->dev_conf.intr_conf.rmv)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_RMV, NULL);
 	}
 }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)
 				usleep(0);
 				continue;
 			}
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 			continue;
 		}
drivers/net/mlx5/mlx5_flow.c +1 -1
index eb55bd7f99..55cdc37f00 100644
@@ -6085,7 +6085,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,
 		if (!MLX5_AGE_GET(age_info, MLX5_AGE_EVENT_NEW))
 			continue;
 		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER))
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(&rte_eth_devices[sh->port[i].devx_ih_port_id],
 				RTE_ETH_EVENT_FLOW_AGED, NULL);
 		age_info->flags = 0;
drivers/net/netvsc/hn_rndis.c +1 -1
index d186ddeabd..66d1966f29 100644
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
  */
 static void hn_rndis_link_alarm(void *arg)
 {
-	_rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 void hn_rndis_link_status(struct rte_eth_dev *dev, const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
index c556dedab6..4f03691989 100644
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 
 	nfp_net_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	nfp_net_dev_link_status_print(dev);
 
drivers/net/octeontx/octeontx_ethdev.c +3 -3
index 76c69294d0..808b761b96 100644
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)
 			octeontx_link_status_update(nic, &link);
 			octeontx_link_status_print(dev, &link);
 			rte_eth_linkstatus_set(dev, &link);
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 		}
 	}
 
drivers/net/octeontx2/otx2_link.c +1 -1
index 12bf6c3231..439ec4fa89 100644
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,
 	rte_eth_linkstatus_set(eth_dev, &eth_link);
 
 	/* Set the flag and execute application callbacks */
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
drivers/net/qede/qede_main.c +1 -2
index 987a6f1e13..aecb98261b 100644
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;
 
 	if (!qede_link_update(dev, 0))
-		_rte_eth_dev_callback_process(dev,
-					      RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int qed_drain(struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
index 80feab68f8..da32d393c2 100644
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)
 		sfc_notice(sa, "link status change event: link %s",
 			 sa->eth_dev->data->dev_link.link_status ?
 			 "UP" : "DOWN");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 	}
 }
 
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg)
 exit:
 	if (lsc_seq != sa->port.lsc_seq) {
 		sfc_notice(sa, "link status change event");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 	}
 }
 
drivers/net/thunderx/nicvf_ethdev.c +3 -3
index 959c8e4ddc..83d9488360 100644
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)
 			nicvf_link_status_update(nic, &link);
 			rte_eth_linkstatus_set(dev, &link);
 
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 		}
 	}
 
drivers/net/vhost/rte_eth_vhost.c +3 -3
index fa365605ef..ce32be9ce3 100644
@@ -832,7 +832,7 @@ new_device(int vid)
 
 	VHOST_LOG(INFO, "Vhost device %d created\n", vid);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	return 0;
 }
@@ -889,7 +889,7 @@ destroy_device(int vid)
 	VHOST_LOG(INFO, "Vhost device %d destroyed\n", vid);
 	eth_vhost_uninstall_intr(eth_dev);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
 
 	return 0;
 }
drivers/net/virtio/virtio_ethdev.c +3 -3
index 4f2fa0d943..dac0f23052 100644
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)
 
 	if (isr & VIRTIO_PCI_ISR_CONFIG) {
 		if (virtio_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 
 		if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
 			vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
index 815fba2f55..fa80e75a5b 100644
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)
 	if (events & VMXNET3_ECR_LINK) {
 		PMD_DRV_LOG(DEBUG, "Process events: VMXNET3_ECR_LINK event");
 		if (vmxnet3_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 	}
 
 	/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
index f8d63c7e17..066751f287 100644
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 	rte_eth_dev_shared_data_prepare();
 
 	if (eth_dev->state != RTE_ETH_DEV_UNUSED)
-		_rte_eth_dev_callback_process(eth_dev,
+		rte_eth_dev_callback_process(eth_dev,
 				RTE_ETH_EVENT_DESTROY, NULL);
 
 	rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 }
 
 void
-_rte_eth_dev_reset(struct rte_eth_dev *dev)
+rte_eth_dev_internal_reset(struct rte_eth_dev *dev)
 {
 	if (dev->data->dev_started) {
 		RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
 }
 
 int
-_rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 	enum rte_eth_event_type event, void *ret_param)
 {
 	struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)
 	if (dev == NULL)
 		return;
 
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
 
 	dev->state = RTE_ETH_DEV_ATTACHED;
 }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
index 5dfe9fdf1a..23cc1e0959 100644
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  *  void
  */
 __rte_internal
-void _rte_eth_dev_reset(struct rte_eth_dev *dev);
+void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);
 
 /**
  * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  *  int
  */
 __rte_internal
-int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+int rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 		enum rte_eth_event_type event, void *ret_param);
 
 /**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
index a85986a2a2..b6630dfabe 100644
@@ -228,17 +228,17 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
 	rte_eth_dev_allocate;
 	rte_eth_dev_allocated;
 	rte_eth_dev_attach_secondary;
+	rte_eth_dev_callback_process;
 	rte_eth_dev_create;
 	rte_eth_dev_destroy;
 	rte_eth_dev_is_rx_hairpin_queue;
 	rte_eth_dev_is_tx_hairpin_queue;
 	rte_eth_dev_probing_finish;
 	rte_eth_dev_release_port;
+	rte_eth_dev_internal_reset;
 	rte_eth_devargs_parse;
 	rte_eth_dma_zone_free;
 	rte_eth_dma_zone_reserve;
Signature · 1 line
2.26.2
Acked-by on v3 1/7
#31 lore raw

Re: [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API

In reply to Ferruh Yigit
Quoted 7 lines · Ferruh Yigit

Marking 'rte_eth_rx_descriptor_done()' API as deprecated. ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.

Plan is to remove the API on 21.11 release.

Quoted 7 lines

---

Cc: David Marchand <[email protected]>
v3:
* Just deprecating the 'rte_eth_rx_descriptor_done()' API without removing it to stick to the original plan.

LGTM, thanks.

For the series,

Signature · 1 line
David Marchand
#32 lore raw

PATCH v4 1/7 ethdev: deprecate descriptor status check API

In reply to Ferruh Yigit

Marking 'rte_eth_rx_descriptor_done()' API as deprecated. ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.

Plan is to remove the API on 21.11 release.

---

Cc: David Marchand <[email protected]>
v3:
* Just deprecating the 'rte_eth_rx_descriptor_done()' API without removing it to stick to the original plan.

---
 doc/guides/rel_notes/deprecation.rst   | 2 +-
 doc/guides/rel_notes/release_20_11.rst | 2 ++
 lib/librte_ethdev/rte_ethdev.h         | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)
doc/guides/rel_notes/deprecation.rst +1 -1
index 279eccb04a..35c676e262 100644
@@ -214,7 +214,7 @@ Deprecation Notices
   https://mails.dpdk.org/archives/dev/2020-July/176135.html.
 
 * ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done``
-  will be deprecated in 20.11 and will be removed in 21.11.
+  will be removed in 21.11.
   Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status``
   APIs can be used as replacement.
 
doc/guides/rel_notes/release_20_11.rst +2 -0
index df227a1773..a7d57b001d 100644
@@ -84,6 +84,8 @@ API Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* ``rte_eth_rx_descriptor_done()`` API has deprecated.
+
 
 ABI Changes
 -----------
lib/librte_ethdev/rte_ethdev.h +1 -0
index f30245b102..eb6cd01f8d 100644
@@ -4567,6 +4567,7 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
  *  - (-ENODEV) if *port_id* invalid.
  *  - (-ENOTSUP) if the device does not support this function
  */
+__rte_deprecated
 static inline int
 rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
 {
Signature · 1 line
2.26.2
#33 lore raw

PATCH v4 2/7 ethdev: move inline device operations

This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.

Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.

Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.

To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.

The list of dev_ops moved:
eth_rx_queue_count_t rx_queue_count;
eth_rx_descriptor_done_t rx_descriptor_done;
eth_rx_descriptor_status_t rx_descriptor_status;
eth_tx_descriptor_status_t tx_descriptor_status;

---
v2:
* Updated features.rst
* Tweak assignment order in sfc

Cc: David Marchand <[email protected]>
v3:
* ``rx_descriptor_done`` also moved
* release note updated

---
 doc/guides/nics/features.rst           |  6 +++---
 doc/guides/rel_notes/release_20_11.rst |  9 +++++++++
 drivers/net/ark/ark_ethdev.c           |  2 +-
 drivers/net/atlantic/atl_ethdev.c      |  9 +++++----
 drivers/net/axgbe/axgbe_ethdev.c       |  5 +++--
 drivers/net/bnxt/bnxt_ethdev.c         |  6 +++---
 drivers/net/dpaa/dpaa_ethdev.c         |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c       |  2 +-
 drivers/net/e1000/em_ethdev.c          |  8 ++++----
 drivers/net/e1000/igb_ethdev.c         | 14 +++++++-------
 drivers/net/enic/enic_ethdev.c         |  3 +--
 drivers/net/fm10k/fm10k_ethdev.c       |  8 ++++----
 drivers/net/i40e/i40e_ethdev.c         |  8 ++++----
 drivers/net/i40e/i40e_ethdev_vf.c      |  8 ++++----
 drivers/net/iavf/iavf_ethdev.c         |  6 +++---
 drivers/net/ice/ice_ethdev.c           |  6 +++---
 drivers/net/igc/igc_ethdev.c           |  8 ++++----
 drivers/net/ixgbe/ixgbe_ethdev.c       | 14 +++++++-------
 drivers/net/mlx5/linux/mlx5_os.c       | 12 +++++-------
 drivers/net/mlx5/mlx5_flow.c           |  4 ++++
 drivers/net/netvsc/hn_ethdev.c         |  6 +++---
 drivers/net/nfp/nfp_net.c              |  2 +-
 drivers/net/octeontx2/otx2_ethdev.c    |  8 ++++----
 drivers/net/qede/qede_ethdev.c         |  3 +--
 drivers/net/sfc/sfc_ethdev.c           | 16 ++++++++--------
 drivers/net/thunderx/nicvf_ethdev.c    |  2 +-
 drivers/net/vhost/rte_eth_vhost.c      |  2 +-
 drivers/net/virtio/virtio_ethdev.c     |  2 +-
 lib/librte_ethdev/rte_ethdev.h         | 17 ++++++++---------
 lib/librte_ethdev/rte_ethdev_core.h    | 13 ++++++-------
 30 files changed, 110 insertions(+), 101 deletions(-)
doc/guides/nics/features.rst +3 -3
index edd21c4d8e..dd8c9555b0 100644
@@ -646,9 +646,9 @@ used, status can be "Available", "Done" or "Unavailable". When
 ``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is
 not set".
 
-* **[implements] eth_dev_ops**: ``rx_descriptor_status``.
+* **[implements] rte_eth_dev**: ``rx_descriptor_status``.
 * **[related]    API**: ``rte_eth_rx_descriptor_status()``.
-* **[implements] eth_dev_ops**: ``rx_descriptor_done``.
+* **[implements] rte_eth_dev**: ``rx_descriptor_done``.
 * **[related]    API**: ``rte_eth_rx_descriptor_done()``.
 
 
@@ -660,7 +660,7 @@ Tx descriptor status
 Supports checking the status of a Tx descriptor. Status can be "Full", "Done"
 or "Unavailable."
 
-* **[implements] eth_dev_ops**: ``tx_descriptor_status``.
+* **[implements] rte_eth_dev**: ``tx_descriptor_status``.
 * **[related]    API**: ``rte_eth_tx_descriptor_status()``.
 
 
doc/guides/rel_notes/release_20_11.rst +9 -0
index a7d57b001d..ff7242012b 100644
@@ -102,6 +102,15 @@ ABI Changes
    Also, make sure to start the actual text at the margin.
    =======================================================
 
+* ``ethdev`` changes
+
+  * Following device operation function pointers moved from ``struct eth_dev_ops`` to ``struct rte_eth_dev``:
+
+    * ``eth_rx_queue_count_t       rx_queue_count;``
+    * ``eth_rx_descriptor_done_t   rx_descriptor_done;``
+    * ``eth_rx_descriptor_status_t rx_descriptor_status;``
+    * ``eth_tx_descriptor_status_t tx_descriptor_status;``
+
 
 Known Issues
 ------------
drivers/net/ark/ark_ethdev.c +1 -1
index b32ccd8677..ce7f6e4803 100644
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = {
 	.dev_infos_get = eth_ark_dev_info_get,
 
 	.rx_queue_setup = eth_ark_dev_rx_queue_setup,
-	.rx_queue_count = eth_ark_dev_rx_queue_count,
 	.tx_queue_setup = eth_ark_tx_queue_setup,
 
 	.link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
 		return -1;
 
 	dev->dev_ops = &ark_eth_dev_ops;
+	dev->rx_queue_count = eth_ark_dev_rx_queue_count;
 
 	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
 	if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
index d3b00ab295..540b106045 100644
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = {
 	.rx_queue_intr_enable = atl_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = atl_dev_rx_queue_intr_disable,
 
-	.rx_queue_count       = atl_rx_queue_count,
-	.rx_descriptor_status = atl_dev_rx_descriptor_status,
-	.tx_descriptor_status = atl_dev_tx_descriptor_status,
-
 	/* EEPROM */
 	.get_eeprom_length    = atl_dev_get_eeprom_length,
 	.get_eeprom           = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &atl_eth_dev_ops;
+
+	eth_dev->rx_queue_count       = atl_rx_queue_count;
+	eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status;
+
 	eth_dev->rx_pkt_burst = &atl_recv_pkts;
 	eth_dev->tx_pkt_burst = &atl_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
index 0c25739f82..02ceb95754 100644
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
 	.rxq_info_get                 = axgbe_rxq_info_get,
 	.txq_info_get                 = axgbe_txq_info_get,
 	.dev_supported_ptypes_get     = axgbe_dev_supported_ptypes_get,
-	.rx_descriptor_status         = axgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status         = axgbe_dev_tx_descriptor_status,
 	.mtu_set		= axgb_mtu_set,
 };
 
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
 
 	eth_dev->dev_ops = &axgbe_eth_dev_ops;
 
+	eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status;
+
 	/*
 	 * For secondary processes, we don't initialise any further as primary
 	 * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 75d055be00..4d224bfa04 100644
@@ -4246,9 +4246,6 @@ static const struct eth_dev_ops bnxt_dev_ops = {
 	.dev_led_off = bnxt_dev_led_off_op,
 	.xstats_get_by_id = bnxt_dev_xstats_get_by_id_op,
 	.xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op,
-	.rx_queue_count = bnxt_rx_queue_count_op,
-	.rx_descriptor_status = bnxt_rx_descriptor_status_op,
-	.tx_descriptor_status = bnxt_tx_descriptor_status_op,
 	.rx_queue_start = bnxt_rx_queue_start,
 	.rx_queue_stop = bnxt_rx_queue_stop,
 	.tx_queue_start = bnxt_tx_queue_start,
@@ -5681,6 +5678,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
 		PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
 
 	eth_dev->dev_ops = &bnxt_dev_ops;
+	eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
+	eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op;
+	eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op;
 	eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
 	eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
 
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index b0f2023e60..e2c3fd0368 100644
@@ -1421,7 +1421,6 @@ static struct eth_dev_ops dpaa_devops = {
 	.tx_queue_setup		  = dpaa_eth_tx_queue_setup,
 	.rx_queue_release	  = dpaa_eth_rx_queue_release,
 	.tx_queue_release	  = dpaa_eth_tx_queue_release,
-	.rx_queue_count		  = dpaa_dev_rx_queue_count,
 	.rx_burst_mode_get	  = dpaa_dev_rx_burst_mode_get,
 	.tx_burst_mode_get	  = dpaa_dev_tx_burst_mode_get,
 	.rxq_info_get		  = dpaa_rxq_info_get,
@@ -1917,6 +1916,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* Populate ethdev structure */
 	eth_dev->dev_ops = &dpaa_devops;
+	eth_dev->rx_queue_count = dpaa_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
 	eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
 
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
index 02c254846c..38cf0ab71c 100644
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
 	.tx_queue_release  = dpaa2_dev_tx_queue_release,
 	.rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get,
 	.tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get,
-	.rx_queue_count       = dpaa2_dev_rx_queue_count,
 	.flow_ctrl_get	      = dpaa2_flow_ctrl_get,
 	.flow_ctrl_set	      = dpaa2_flow_ctrl_set,
 	.mac_addr_add         = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
 		 * plugged.
 		 */
 		eth_dev->dev_ops = &dpaa2_ethdev_ops;
+		eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;
 		if (dpaa2_get_devargs(dev->devargs, DRIVER_LOOPBACK_MODE))
 			eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx;
 		else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +4 -4
index 902b1cdca0..82766da882 100644
@@ -176,10 +176,6 @@ static const struct eth_dev_ops eth_em_ops = {
 	.vlan_offload_set     = eth_em_vlan_offload_set,
 	.rx_queue_setup       = eth_em_rx_queue_setup,
 	.rx_queue_release     = eth_em_rx_queue_release,
-	.rx_queue_count       = eth_em_rx_queue_count,
-	.rx_descriptor_done   = eth_em_rx_descriptor_done,
-	.rx_descriptor_status = eth_em_rx_descriptor_status,
-	.tx_descriptor_status = eth_em_tx_descriptor_status,
 	.tx_queue_setup       = eth_em_tx_queue_setup,
 	.tx_queue_release     = eth_em_tx_queue_release,
 	.rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -250,6 +246,10 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
 		E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
 
 	eth_dev->dev_ops = &eth_em_ops;
+	eth_dev->rx_queue_count = eth_em_rx_queue_count;
+	eth_dev->rx_descriptor_done   = eth_em_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;
 	eth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;
 	eth_dev->tx_pkt_prepare = (eth_tx_prep_t)&eth_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +7 -7
index a5551e8175..fe0cea88c2 100644
@@ -380,10 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = {
 	.rx_queue_intr_enable = eth_igb_rx_queue_intr_enable,
 	.rx_queue_intr_disable = eth_igb_rx_queue_intr_disable,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_queue_count       = eth_igb_rx_queue_count,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
 	.tx_queue_release     = eth_igb_tx_queue_release,
 	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -441,9 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {
 	.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
 	.rx_queue_setup       = eth_igb_rx_queue_setup,
 	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
 	.tx_queue_setup       = eth_igb_tx_queue_setup,
 	.tx_queue_release     = eth_igb_tx_queue_release,
 	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -754,6 +747,10 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 	uint32_t ctrl_ext;
 
 	eth_dev->dev_ops = &eth_igb_ops;
+	eth_dev->rx_queue_count = eth_igb_rx_queue_count;
+	eth_dev->rx_descriptor_done   = eth_igb_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
@@ -949,6 +946,9 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &igbvf_eth_dev_ops;
+	eth_dev->rx_descriptor_done   = eth_igb_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -2
index ca75919ee2..2cffa3aa2d 100644
@@ -1141,8 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
 	.tx_queue_stop        = enicpmd_dev_tx_queue_stop,
 	.rx_queue_setup       = enicpmd_dev_rx_queue_setup,
 	.rx_queue_release     = enicpmd_dev_rx_queue_release,
-	.rx_queue_count       = enicpmd_dev_rx_queue_count,
-	.rx_descriptor_done   = NULL,
 	.tx_queue_setup       = enicpmd_dev_tx_queue_setup,
 	.tx_queue_release     = enicpmd_dev_tx_queue_release,
 	.rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1279,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
 	ENICPMD_FUNC_TRACE();
 
 	eth_dev->dev_ops = &enicpmd_eth_dev_ops;
+	eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count;
 	eth_dev->rx_pkt_burst = &enic_recv_pkts;
 	eth_dev->tx_pkt_burst = &enic_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +4 -4
index fd927923da..e6043e1455 100644
@@ -2855,10 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = {
 	.rx_queue_release	= fm10k_rx_queue_release,
 	.tx_queue_setup		= fm10k_tx_queue_setup,
 	.tx_queue_release	= fm10k_tx_queue_release,
-	.rx_queue_count		= fm10k_dev_rx_queue_count,
-	.rx_descriptor_done	= fm10k_dev_rx_descriptor_done,
-	.rx_descriptor_status = fm10k_dev_rx_descriptor_status,
-	.tx_descriptor_status = fm10k_dev_tx_descriptor_status,
 	.rx_queue_intr_enable	= fm10k_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable	= fm10k_dev_rx_queue_intr_disable,
 	.reta_update		= fm10k_reta_update,
@@ -3055,6 +3051,10 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
 	PMD_INIT_FUNC_TRACE();
 
 	dev->dev_ops = &fm10k_eth_dev_ops;
+	dev->rx_queue_count = fm10k_dev_rx_queue_count;
+	dev->rx_descriptor_done	= fm10k_dev_rx_descriptor_done;
+	dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status;
 	dev->rx_pkt_burst = &fm10k_recv_pkts;
 	dev->tx_pkt_burst = &fm10k_xmit_pkts;
 	dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +4 -4
index 841447228a..80efd06cd9 100644
@@ -474,10 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
 	.rx_queue_intr_enable         = i40e_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable        = i40e_dev_rx_queue_intr_disable,
 	.rx_queue_release             = i40e_dev_rx_queue_release,
-	.rx_queue_count               = i40e_dev_rx_queue_count,
-	.rx_descriptor_done           = i40e_dev_rx_descriptor_done,
-	.rx_descriptor_status         = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status         = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup               = i40e_dev_tx_queue_setup,
 	.tx_queue_release             = i40e_dev_tx_queue_release,
 	.dev_led_on                   = i40e_dev_led_on,
@@ -1448,6 +1444,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
 	PMD_INIT_FUNC_TRACE();
 
 	dev->dev_ops = &i40e_eth_dev_ops;
+	dev->rx_queue_count = i40e_dev_rx_queue_count;
+	dev->rx_descriptor_done = i40e_dev_rx_descriptor_done;
+	dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
 	dev->rx_pkt_burst = i40e_recv_pkts;
 	dev->tx_pkt_burst = i40e_xmit_pkts;
 	dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +4 -4
index b755350cd2..be4b28fa45 100644
@@ -199,12 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = {
 	.rx_queue_release     = i40e_dev_rx_queue_release,
 	.rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable,
-	.rx_descriptor_done   = i40e_dev_rx_descriptor_done,
-	.rx_descriptor_status = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status = i40e_dev_tx_descriptor_status,
 	.tx_queue_setup       = i40e_dev_tx_queue_setup,
 	.tx_queue_release     = i40e_dev_tx_queue_release,
-	.rx_queue_count       = i40e_dev_rx_queue_count,
 	.rxq_info_get         = i40e_rxq_info_get,
 	.txq_info_get         = i40e_txq_info_get,
 	.mac_addr_add	      = i40evf_add_mac_addr,
@@ -1561,6 +1557,10 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* assign ops func pointer */
 	eth_dev->dev_ops = &i40evf_eth_dev_ops;
+	eth_dev->rx_queue_count       = i40e_dev_rx_queue_count;
+	eth_dev->rx_descriptor_done   = i40e_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &i40e_recv_pkts;
 	eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
 
drivers/net/iavf/iavf_ethdev.c +3 -3
index 8e1d8a8d3e..e1ff38e8be 100644
@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
 	.rss_hash_conf_get          = iavf_dev_rss_hash_conf_get,
 	.rxq_info_get               = iavf_dev_rxq_info_get,
 	.txq_info_get               = iavf_dev_txq_info_get,
-	.rx_queue_count             = iavf_dev_rxq_count,
-	.rx_descriptor_status       = iavf_dev_rx_desc_status,
-	.tx_descriptor_status       = iavf_dev_tx_desc_status,
 	.mtu_set                    = iavf_dev_mtu_set,
 	.rx_queue_intr_enable       = iavf_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable      = iavf_dev_rx_queue_intr_disable,
@@ -1383,6 +1380,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 
 	/* assign ops func pointer */
 	eth_dev->dev_ops = &iavf_eth_dev_ops;
+	eth_dev->rx_queue_count = iavf_dev_rxq_count;
+	eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status;
+	eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;
 	eth_dev->rx_pkt_burst = &iavf_recv_pkts;
 	eth_dev->tx_pkt_burst = &iavf_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
index c5dac2e328..c8b16c7f87 100644
@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
 	.tx_burst_mode_get            = ice_tx_burst_mode_get,
 	.get_eeprom_length            = ice_get_eeprom_length,
 	.get_eeprom                   = ice_get_eeprom,
-	.rx_queue_count               = ice_rx_queue_count,
-	.rx_descriptor_status         = ice_rx_descriptor_status,
-	.tx_descriptor_status         = ice_tx_descriptor_status,
 	.stats_get                    = ice_stats_get,
 	.stats_reset                  = ice_stats_reset,
 	.xstats_get                   = ice_xstats_get,
@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)
 	int ret;
 
 	dev->dev_ops = &ice_eth_dev_ops;
+	dev->rx_queue_count = ice_rx_queue_count;
+	dev->rx_descriptor_status = ice_rx_descriptor_status;
+	dev->tx_descriptor_status = ice_tx_descriptor_status;
 	dev->rx_pkt_burst = ice_recv_pkts;
 	dev->tx_pkt_burst = ice_xmit_pkts;
 	dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +4 -4
index 6ab3ee909d..aa37c11861 100644
@@ -272,10 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = {
 
 	.rx_queue_setup		= eth_igc_rx_queue_setup,
 	.rx_queue_release	= eth_igc_rx_queue_release,
-	.rx_queue_count		= eth_igc_rx_queue_count,
-	.rx_descriptor_done	= eth_igc_rx_descriptor_done,
-	.rx_descriptor_status	= eth_igc_rx_descriptor_status,
-	.tx_descriptor_status	= eth_igc_tx_descriptor_status,
 	.tx_queue_setup		= eth_igc_tx_queue_setup,
 	.tx_queue_release	= eth_igc_tx_queue_release,
 	.tx_done_cleanup	= eth_igc_tx_done_cleanup,
@@ -1227,6 +1223,10 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
 
 	PMD_INIT_FUNC_TRACE();
 	dev->dev_ops = &eth_igc_ops;
+	dev->rx_descriptor_done	= eth_igc_rx_descriptor_done;
+	dev->rx_queue_count = eth_igc_rx_queue_count;
+	dev->rx_descriptor_status = eth_igc_rx_descriptor_status;
+	dev->tx_descriptor_status = eth_igc_tx_descriptor_status;
 
 	/*
 	 * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +7 -7
index d9582473a4..337ce90fbf 100644
@@ -545,10 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
 	.rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_queue_count       = ixgbe_dev_rx_queue_count,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
 	.tx_queue_release     = ixgbe_dev_tx_queue_release,
 	.dev_led_on           = ixgbe_dev_led_on,
@@ -622,9 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
 	.vlan_offload_set     = ixgbevf_vlan_offload_set,
 	.rx_queue_setup       = ixgbe_dev_rx_queue_setup,
 	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
 	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
 	.tx_queue_release     = ixgbe_dev_tx_queue_release,
 	.rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1091,6 +1084,10 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
 	ixgbe_dev_macsec_setting_reset(eth_dev);
 
 	eth_dev->dev_ops = &ixgbe_eth_dev_ops;
+	eth_dev->rx_queue_count       = ixgbe_dev_rx_queue_count;
+	eth_dev->rx_descriptor_done   = ixgbe_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
 	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 	eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1570,6 +1567,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &ixgbevf_eth_dev_ops;
+	eth_dev->rx_descriptor_done   = ixgbe_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
 	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
 	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 
drivers/net/mlx5/linux/mlx5_os.c +5 -7
index bf1f82ba67..ec3cc4000e 100644
@@ -601,6 +601,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 		}
 		eth_dev->device = dpdk_dev;
 		eth_dev->dev_ops = &mlx5_os_dev_sec_ops;
+		eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+		eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
 		err = mlx5_proc_priv_init(eth_dev);
 		if (err)
 			return NULL;
@@ -1208,6 +1210,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	eth_dev->rx_pkt_burst = removed_rx_burst;
 	eth_dev->tx_pkt_burst = removed_tx_burst;
 	eth_dev->dev_ops = &mlx5_os_dev_ops;
+	eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+	eth_dev->rx_queue_count = mlx5_rx_queue_count;
 	/* Register MAC address. */
 	claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
 	if (config->vf && config->vf_nl_en)
@@ -2396,13 +2401,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = {
 	.rss_hash_update = mlx5_rss_hash_update,
 	.rss_hash_conf_get = mlx5_rss_hash_conf_get,
 	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
 	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
-	.rx_queue_count = mlx5_rx_queue_count,
 	.rx_queue_intr_enable = mlx5_rx_intr_enable,
 	.rx_queue_intr_disable = mlx5_rx_intr_disable,
 	.is_removed = mlx5_is_removed,
@@ -2427,8 +2429,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = {
 	.rx_queue_stop = mlx5_rx_queue_stop,
 	.tx_queue_start = mlx5_tx_queue_start,
 	.tx_queue_stop = mlx5_tx_queue_stop,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2480,8 +2480,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = {
 	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
 	.vlan_offload_set = mlx5_vlan_offload_set,
 	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
 	.rxq_info_get = mlx5_rxq_info_get,
 	.txq_info_get = mlx5_txq_info_get,
 	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
index 4c29898203..eb55bd7f99 100644
@@ -5138,6 +5138,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
 		dev->dev_ops = &mlx5_os_dev_ops_isolate;
 	else
 		dev->dev_ops = &mlx5_os_dev_ops;
+
+	dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+
 	return 0;
 }
 
drivers/net/netvsc/hn_ethdev.c +3 -3
index fd91c0e491..229c1b9149 100644
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = {
 	.tx_queue_setup		= hn_dev_tx_queue_setup,
 	.tx_queue_release	= hn_dev_tx_queue_release,
 	.tx_done_cleanup        = hn_dev_tx_done_cleanup,
-	.tx_descriptor_status	= hn_dev_tx_descriptor_status,
 	.rx_queue_setup		= hn_dev_rx_queue_setup,
 	.rx_queue_release	= hn_dev_rx_queue_release,
-	.rx_queue_count		= hn_dev_rx_queue_count,
-	.rx_descriptor_status   = hn_dev_rx_queue_status,
 	.link_update		= hn_dev_link_update,
 	.stats_get		= hn_dev_stats_get,
 	.stats_reset            = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 
 	vmbus = container_of(device, struct rte_vmbus_device, device);
 	eth_dev->dev_ops = &hn_eth_dev_ops;
+	eth_dev->rx_queue_count = hn_dev_rx_queue_count;
+	eth_dev->rx_descriptor_status = hn_dev_rx_queue_status;
+	eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status;
 	eth_dev->tx_pkt_burst = &hn_xmit_pkts;
 	eth_dev->rx_pkt_burst = &hn_recv_pkts;
 
drivers/net/nfp/nfp_net.c +1 -1
index 99946279db..c556dedab6 100644
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = {
 	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
 	.rx_queue_setup		= nfp_net_rx_queue_setup,
 	.rx_queue_release	= nfp_net_rx_queue_release,
-	.rx_queue_count		= nfp_net_rx_queue_count,
 	.tx_queue_setup		= nfp_net_tx_queue_setup,
 	.tx_queue_release	= nfp_net_tx_queue_release,
 	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 	}
 
 	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
 	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
 	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
 
drivers/net/octeontx2/otx2_ethdev.c +4 -4
index 33b72bd4db..c06e32f26b 100644
@@ -2272,10 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = {
 	.txq_info_get             = otx2_nix_txq_info_get,
 	.rx_burst_mode_get        = otx2_rx_burst_mode_get,
 	.tx_burst_mode_get        = otx2_tx_burst_mode_get,
-	.rx_queue_count           = otx2_nix_rx_queue_count,
-	.rx_descriptor_done       = otx2_nix_rx_descriptor_done,
-	.rx_descriptor_status     = otx2_nix_rx_descriptor_status,
-	.tx_descriptor_status     = otx2_nix_tx_descriptor_status,
 	.tx_done_cleanup          = otx2_nix_tx_done_cleanup,
 	.set_queue_rate_limit     = otx2_nix_tm_set_queue_rate_limit,
 	.pool_ops_supported       = otx2_nix_pool_ops_supported,
@@ -2382,6 +2378,10 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
 	int rc, max_entries;
 
 	eth_dev->dev_ops = &otx2_eth_dev_ops;
+	eth_dev->rx_descriptor_done = otx2_nix_rx_descriptor_done;
+	eth_dev->rx_queue_count = otx2_nix_rx_queue_count;
+	eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/qede/qede_ethdev.c +1 -2
index 70d48e48ef..59f1746ee9 100644
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
 	.dev_infos_get = qede_dev_info_get,
 	.rx_queue_setup = qede_rx_queue_setup,
 	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
 	.tx_queue_setup = qede_tx_queue_setup,
 	.tx_queue_release = qede_tx_queue_release,
 	.dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
 	.dev_infos_get = qede_dev_info_get,
 	.rx_queue_setup = qede_rx_queue_setup,
 	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
 	.tx_queue_setup = qede_tx_queue_setup,
 	.tx_queue_release = qede_tx_queue_release,
 	.dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	}
 
 	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
+	eth_dev->rx_descriptor_status = qede_rx_descriptor_status;
 
 	adapter->num_tx_queues = 0;
 	adapter->num_rx_queues = 0;
drivers/net/sfc/sfc_ethdev.c +8 -8
index acee3e48e4..1a58e0df84 100644
@@ -1819,10 +1819,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = {
 	.tx_queue_stop			= sfc_tx_queue_stop,
 	.rx_queue_setup			= sfc_rx_queue_setup,
 	.rx_queue_release		= sfc_rx_queue_release,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.rx_queue_intr_enable		= sfc_rx_queue_intr_enable,
 	.rx_queue_intr_disable		= sfc_rx_queue_intr_disable,
 	.tx_queue_setup			= sfc_tx_queue_setup,
@@ -1977,6 +1973,10 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
 	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
 
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_done = sfc_rx_descriptor_done;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
 	dev->dev_ops = &sfc_eth_dev_ops;
 
 	return 0;
@@ -2017,10 +2017,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 
 static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
 	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
 	.reta_query			= sfc_dev_rss_reta_query,
 	.rss_hash_conf_get		= sfc_dev_rss_hash_conf_get,
 	.rxq_info_get			= sfc_rx_queue_info_get,
@@ -2085,6 +2081,10 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
 	dev->rx_pkt_burst = dp_rx->pkt_burst;
 	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
 	dev->tx_pkt_burst = dp_tx->pkt_burst;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_done = sfc_rx_descriptor_done;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
 	dev->dev_ops = &sfc_eth_dev_secondary_ops;
 
 	return 0;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
index d955a7ee23..959c8e4ddc 100644
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = {
 	.tx_queue_stop            = nicvf_dev_tx_queue_stop,
 	.rx_queue_setup           = nicvf_dev_rx_queue_setup,
 	.rx_queue_release         = nicvf_dev_rx_queue_release,
-	.rx_queue_count           = nicvf_dev_rx_queue_count,
 	.tx_queue_setup           = nicvf_dev_tx_queue_setup,
 	.tx_queue_release         = nicvf_dev_tx_queue_release,
 	.dev_set_link_up          = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
 	PMD_INIT_FUNC_TRACE();
 
 	eth_dev->dev_ops = &nicvf_eth_dev_ops;
+	eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;
 
 	/* For secondary processes, the primary has done all the work */
 	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
index e55278af69..fa365605ef 100644
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = {
 	.rx_queue_release = eth_queue_release,
 	.tx_queue_release = eth_queue_release,
 	.tx_done_cleanup = eth_tx_done_cleanup,
-	.rx_queue_count = eth_rx_queue_count,
 	.link_update = eth_link_update,
 	.stats_get = eth_stats_get,
 	.stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
 	data->all_multicast = 1;
 
 	eth_dev->dev_ops = &ops;
+	eth_dev->rx_queue_count = eth_rx_queue_count;
 
 	/* finally assign rx and tx ops */
 	eth_dev->rx_pkt_burst = eth_vhost_rx;
drivers/net/virtio/virtio_ethdev.c +1 -1
index dc0093bdf0..4f2fa0d943 100644
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
 	.rx_queue_intr_enable    = virtio_dev_rx_queue_intr_enable,
 	.rx_queue_intr_disable   = virtio_dev_rx_queue_intr_disable,
 	.rx_queue_release        = virtio_dev_queue_release,
-	.rx_descriptor_done      = virtio_dev_rx_queue_done,
 	.tx_queue_setup          = virtio_dev_tx_queue_setup,
 	.tx_queue_release        = virtio_dev_queue_release,
 	/* collect stats per queue */
@@ -1903,6 +1902,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
 	}
 
 	eth_dev->dev_ops = &virtio_eth_dev_ops;
+	eth_dev->rx_descriptor_done = virtio_dev_rx_queue_done;
 
 	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
 		if (!hw->virtio_user_dev) {
lib/librte_ethdev/rte_ethdev.h +8 -9
index eb6cd01f8d..b6f26a513b 100644
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
 	dev = &rte_eth_devices[port_id];
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_queue_count, -ENOTSUP);
 	if (queue_id >= dev->data->nb_rx_queues)
 		return -EINVAL;
 
-	return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
+	return (int)(*dev->rx_queue_count)(dev, queue_id);
 }
 
 /**
@@ -4573,9 +4573,8 @@ rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
 {
 	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
 	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
-	return (*dev->dev_ops->rx_descriptor_done)( \
-		dev->data->rx_queues[queue_id], offset);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_done, -ENOTSUP);
+	return (*dev->rx_descriptor_done)(dev->data->rx_queues[queue_id], offset);
 }
 
 #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */
@@ -4630,10 +4629,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
 	if (queue_id >= dev->data->nb_rx_queues)
 		return -ENODEV;
 #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_status, -ENOTSUP);
 	rxq = dev->data->rx_queues[queue_id];
 
-	return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
+	return (*dev->rx_descriptor_status)(rxq, offset);
 }
 
 #define RTE_ETH_TX_DESC_FULL    0 /**< Desc filled for hw, waiting xmit. */
@@ -4687,10 +4686,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
 	if (queue_id >= dev->data->nb_tx_queues)
 		return -ENODEV;
 #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_descriptor_status, -ENOTSUP);
 	txq = dev->data->tx_queues[queue_id];
 
-	return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
+	return (*dev->tx_descriptor_status)(txq, offset);
 }
 
 /**
lib/librte_ethdev/rte_ethdev_core.h +6 -7
index 32407dd418..8ed827475f 100644
@@ -660,13 +660,6 @@ struct eth_dev_ops {
 	eth_queue_stop_t           tx_queue_stop; /**< Stop TX for a queue. */
 	eth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue. */
 	eth_queue_release_t        rx_queue_release; /**< Release RX queue. */
-	eth_rx_queue_count_t       rx_queue_count;
-	/**< Get the number of used RX descriptors. */
-	eth_rx_descriptor_done_t   rx_descriptor_done; /**< Check rxd DD bit. */
-	eth_rx_descriptor_status_t rx_descriptor_status;
-	/**< Check the status of a Rx descriptor. */
-	eth_tx_descriptor_status_t tx_descriptor_status;
-	/**< Check the status of a Tx descriptor. */
 	/*
 	 * Static inline functions use functions ABOVE this comment.
 	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -782,6 +775,12 @@ struct rte_eth_dev {
 	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
 	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
 	eth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */
+
+	eth_rx_queue_count_t       rx_queue_count; /**< Get the number of used RX descriptors. */
+	eth_rx_descriptor_done_t   rx_descriptor_done;   /**< Check rxd DD bit. */
+	eth_rx_descriptor_status_t rx_descriptor_status; /**< Check the status of a Rx descriptor. */
+	eth_tx_descriptor_status_t tx_descriptor_status; /**< Check the status of a Tx descriptor. */
+
 	/**
 	 * Next two fields are per-device data but *data is shared between
 	 * primary and secondary processes and *process_private is per-process
Signature · 1 line
2.26.2
Acked-by on v4 2/7
#34 lore raw

Re: [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations

Quoted 904 lines · Ferruh Yigit

This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.

Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.

Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.

To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.

The list of dev_ops moved:
eth_rx_queue_count_t rx_queue_count;
eth_rx_descriptor_done_t rx_descriptor_done;
eth_rx_descriptor_status_t rx_descriptor_status;
eth_tx_descriptor_status_t tx_descriptor_status;

---
v2:
* Updated features.rst
* Tweak assignment order in sfc

Cc: David Marchand <[email protected]>
v3:
* ``rx_descriptor_done`` also moved
* release note updated

---
  doc/guides/nics/features.rst           |  6 +++---
  doc/guides/rel_notes/release_20_11.rst |  9 +++++++++
  drivers/net/ark/ark_ethdev.c           |  2 +-
  drivers/net/atlantic/atl_ethdev.c      |  9 +++++----
  drivers/net/axgbe/axgbe_ethdev.c       |  5 +++--
  drivers/net/bnxt/bnxt_ethdev.c         |  6 +++---
  drivers/net/dpaa/dpaa_ethdev.c         |  2 +-
  drivers/net/dpaa2/dpaa2_ethdev.c       |  2 +-
  drivers/net/e1000/em_ethdev.c          |  8 ++++----
  drivers/net/e1000/igb_ethdev.c         | 14 +++++++-------
  drivers/net/enic/enic_ethdev.c         |  3 +--
  drivers/net/fm10k/fm10k_ethdev.c       |  8 ++++----
  drivers/net/i40e/i40e_ethdev.c         |  8 ++++----
  drivers/net/i40e/i40e_ethdev_vf.c      |  8 ++++----
  drivers/net/iavf/iavf_ethdev.c         |  6 +++---
  drivers/net/ice/ice_ethdev.c           |  6 +++---
  drivers/net/igc/igc_ethdev.c           |  8 ++++----
  drivers/net/ixgbe/ixgbe_ethdev.c       | 14 +++++++-------
  drivers/net/mlx5/linux/mlx5_os.c       | 12 +++++-------
  drivers/net/mlx5/mlx5_flow.c           |  4 ++++
  drivers/net/netvsc/hn_ethdev.c         |  6 +++---
  drivers/net/nfp/nfp_net.c              |  2 +-
  drivers/net/octeontx2/otx2_ethdev.c    |  8 ++++----
  drivers/net/qede/qede_ethdev.c         |  3 +--
  drivers/net/sfc/sfc_ethdev.c           | 16 ++++++++--------
  drivers/net/thunderx/nicvf_ethdev.c    |  2 +-
  drivers/net/vhost/rte_eth_vhost.c      |  2 +-
  drivers/net/virtio/virtio_ethdev.c     |  2 +-
  lib/librte_ethdev/rte_ethdev.h         | 17 ++++++++---------
  lib/librte_ethdev/rte_ethdev_core.h    | 13 ++++++-------
  30 files changed, 110 insertions(+), 101 deletions(-)
doc/guides/nics/features.rst +3 -3
index edd21c4d8e..dd8c9555b0 100644
@@ -646,9 +646,9 @@ used, status can be "Available", "Done" or "Unavailable". When
  ``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is
  not set".
 
-* **[implements] eth_dev_ops**: ``rx_descriptor_status``.
+* **[implements] rte_eth_dev**: ``rx_descriptor_status``.
  * **[related]    API**: ``rte_eth_rx_descriptor_status()``.
-* **[implements] eth_dev_ops**: ``rx_descriptor_done``.
+* **[implements] rte_eth_dev**: ``rx_descriptor_done``.
  * **[related]    API**: ``rte_eth_rx_descriptor_done()``.
 
 
@@ -660,7 +660,7 @@ Tx descriptor status
  Supports checking the status of a Tx descriptor. Status can be "Full", "Done"
  or "Unavailable."
 
-* **[implements] eth_dev_ops**: ``tx_descriptor_status``.
+* **[implements] rte_eth_dev**: ``tx_descriptor_status``.
  * **[related]    API**: ``rte_eth_tx_descriptor_status()``.
 
 
doc/guides/rel_notes/release_20_11.rst +9 -0
index a7d57b001d..ff7242012b 100644
@@ -102,6 +102,15 @@ ABI Changes
     Also, make sure to start the actual text at the margin.
     =======================================================
 
+* ``ethdev`` changes
+
+  * Following device operation function pointers moved from ``struct eth_dev_ops`` to ``struct rte_eth_dev``:
+
+    * ``eth_rx_queue_count_t       rx_queue_count;``
+    * ``eth_rx_descriptor_done_t   rx_descriptor_done;``
+    * ``eth_rx_descriptor_status_t rx_descriptor_status;``
+    * ``eth_tx_descriptor_status_t tx_descriptor_status;``
+
 
  Known Issues
  ------------
drivers/net/ark/ark_ethdev.c +1 -1
index b32ccd8677..ce7f6e4803 100644
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = {
  	.dev_infos_get = eth_ark_dev_info_get,
 
  	.rx_queue_setup = eth_ark_dev_rx_queue_setup,
-	.rx_queue_count = eth_ark_dev_rx_queue_count,
  	.tx_queue_setup = eth_ark_tx_queue_setup,
 
  	.link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)
  		return -1;
 
  	dev->dev_ops = &ark_eth_dev_ops;
+	dev->rx_queue_count = eth_ark_dev_rx_queue_count;
 
  	dev->data->mac_addrs = rte_zmalloc("ark", RTE_ETHER_ADDR_LEN, 0);
  	if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
index d3b00ab295..540b106045 100644
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = {
  	.rx_queue_intr_enable = atl_dev_rx_queue_intr_enable,
  	.rx_queue_intr_disable = atl_dev_rx_queue_intr_disable,
 
-	.rx_queue_count       = atl_rx_queue_count,
-	.rx_descriptor_status = atl_dev_rx_descriptor_status,
-	.tx_descriptor_status = atl_dev_tx_descriptor_status,
-
  	/* EEPROM */
  	.get_eeprom_length    = atl_dev_get_eeprom_length,
  	.get_eeprom           = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)
  	PMD_INIT_FUNC_TRACE();
 
  	eth_dev->dev_ops = &atl_eth_dev_ops;
+
+	eth_dev->rx_queue_count       = atl_rx_queue_count;
+	eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status;
+
  	eth_dev->rx_pkt_burst = &atl_recv_pkts;
  	eth_dev->tx_pkt_burst = &atl_xmit_pkts;
  	eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
index 0c25739f82..02ceb95754 100644
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = {
  	.rxq_info_get                 = axgbe_rxq_info_get,
  	.txq_info_get                 = axgbe_txq_info_get,
  	.dev_supported_ptypes_get     = axgbe_dev_supported_ptypes_get,
-	.rx_descriptor_status         = axgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status         = axgbe_dev_tx_descriptor_status,
  	.mtu_set		= axgb_mtu_set,
  };
 
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev)
 
  	eth_dev->dev_ops = &axgbe_eth_dev_ops;
 
+	eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status;
+
  	/*
  	 * For secondary processes, we don't initialise any further as primary
  	 * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 75d055be00..4d224bfa04 100644
@@ -4246,9 +4246,6 @@ static const struct eth_dev_ops bnxt_dev_ops = {
  	.dev_led_off = bnxt_dev_led_off_op,
  	.xstats_get_by_id = bnxt_dev_xstats_get_by_id_op,
  	.xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op,
-	.rx_queue_count = bnxt_rx_queue_count_op,
-	.rx_descriptor_status = bnxt_rx_descriptor_status_op,
-	.tx_descriptor_status = bnxt_tx_descriptor_status_op,
  	.rx_queue_start = bnxt_rx_queue_start,
  	.rx_queue_stop = bnxt_rx_queue_stop,
  	.tx_queue_start = bnxt_tx_queue_start,
@@ -5681,6 +5678,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)
  		PMD_DRV_LOG(INFO, "%s\n", bnxt_version);
 
  	eth_dev->dev_ops = &bnxt_dev_ops;
+	eth_dev->rx_queue_count = bnxt_rx_queue_count_op;
+	eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op;
+	eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op;
  	eth_dev->rx_pkt_burst = &bnxt_recv_pkts;
  	eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
 
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index b0f2023e60..e2c3fd0368 100644
@@ -1421,7 +1421,6 @@ static struct eth_dev_ops dpaa_devops = {
  	.tx_queue_setup		  = dpaa_eth_tx_queue_setup,
  	.rx_queue_release	  = dpaa_eth_rx_queue_release,
  	.tx_queue_release	  = dpaa_eth_tx_queue_release,
-	.rx_queue_count		  = dpaa_dev_rx_queue_count,
  	.rx_burst_mode_get	  = dpaa_dev_rx_burst_mode_get,
  	.tx_burst_mode_get	  = dpaa_dev_tx_burst_mode_get,
  	.rxq_info_get		  = dpaa_rxq_info_get,
@@ -1917,6 +1916,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 
  	/* Populate ethdev structure */
  	eth_dev->dev_ops = &dpaa_devops;
+	eth_dev->rx_queue_count = dpaa_dev_rx_queue_count;
  	eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
  	eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
 
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
index 02c254846c..38cf0ab71c 100644
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = {
  	.tx_queue_release  = dpaa2_dev_tx_queue_release,
  	.rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get,
  	.tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get,
-	.rx_queue_count       = dpaa2_dev_rx_queue_count,
  	.flow_ctrl_get	      = dpaa2_flow_ctrl_get,
  	.flow_ctrl_set	      = dpaa2_flow_ctrl_set,
  	.mac_addr_add         = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)
  		 * plugged.
  		 */
  		eth_dev->dev_ops = &dpaa2_ethdev_ops;
+		eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;
  		if (dpaa2_get_devargs(dev->devargs, DRIVER_LOOPBACK_MODE))
  			eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx;
  		else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +4 -4
index 902b1cdca0..82766da882 100644
@@ -176,10 +176,6 @@ static const struct eth_dev_ops eth_em_ops = {
  	.vlan_offload_set     = eth_em_vlan_offload_set,
  	.rx_queue_setup       = eth_em_rx_queue_setup,
  	.rx_queue_release     = eth_em_rx_queue_release,
-	.rx_queue_count       = eth_em_rx_queue_count,
-	.rx_descriptor_done   = eth_em_rx_descriptor_done,
-	.rx_descriptor_status = eth_em_rx_descriptor_status,
-	.tx_descriptor_status = eth_em_tx_descriptor_status,
  	.tx_queue_setup       = eth_em_tx_queue_setup,
  	.tx_queue_release     = eth_em_tx_queue_release,
  	.rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -250,6 +246,10 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)
  		E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
 
  	eth_dev->dev_ops = &eth_em_ops;
+	eth_dev->rx_queue_count = eth_em_rx_queue_count;
+	eth_dev->rx_descriptor_done   = eth_em_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status;
  	eth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;
  	eth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;
  	eth_dev->tx_pkt_prepare = (eth_tx_prep_t)&eth_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +7 -7
index a5551e8175..fe0cea88c2 100644
@@ -380,10 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = {
  	.rx_queue_intr_enable = eth_igb_rx_queue_intr_enable,
  	.rx_queue_intr_disable = eth_igb_rx_queue_intr_disable,
  	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_queue_count       = eth_igb_rx_queue_count,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
  	.tx_queue_setup       = eth_igb_tx_queue_setup,
  	.tx_queue_release     = eth_igb_tx_queue_release,
  	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -441,9 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = {
  	.dev_supported_ptypes_get = eth_igb_supported_ptypes_get,
  	.rx_queue_setup       = eth_igb_rx_queue_setup,
  	.rx_queue_release     = eth_igb_rx_queue_release,
-	.rx_descriptor_done   = eth_igb_rx_descriptor_done,
-	.rx_descriptor_status = eth_igb_rx_descriptor_status,
-	.tx_descriptor_status = eth_igb_tx_descriptor_status,
  	.tx_queue_setup       = eth_igb_tx_queue_setup,
  	.tx_queue_release     = eth_igb_tx_queue_release,
  	.tx_done_cleanup      = eth_igb_tx_done_cleanup,
@@ -754,6 +747,10 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)
  	uint32_t ctrl_ext;
 
  	eth_dev->dev_ops = &eth_igb_ops;
+	eth_dev->rx_queue_count = eth_igb_rx_queue_count;
+	eth_dev->rx_descriptor_done   = eth_igb_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
  	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
  	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
  	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
@@ -949,6 +946,9 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
  	PMD_INIT_FUNC_TRACE();
 
  	eth_dev->dev_ops = &igbvf_eth_dev_ops;
+	eth_dev->rx_descriptor_done   = eth_igb_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status;
  	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
  	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
  	eth_dev->tx_pkt_prepare = &eth_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -2
index ca75919ee2..2cffa3aa2d 100644
@@ -1141,8 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = {
  	.tx_queue_stop        = enicpmd_dev_tx_queue_stop,
  	.rx_queue_setup       = enicpmd_dev_rx_queue_setup,
  	.rx_queue_release     = enicpmd_dev_rx_queue_release,
-	.rx_queue_count       = enicpmd_dev_rx_queue_count,
-	.rx_descriptor_done   = NULL,
  	.tx_queue_setup       = enicpmd_dev_tx_queue_setup,
  	.tx_queue_release     = enicpmd_dev_tx_queue_release,
  	.rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1279,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)
  	ENICPMD_FUNC_TRACE();
 
  	eth_dev->dev_ops = &enicpmd_eth_dev_ops;
+	eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count;
  	eth_dev->rx_pkt_burst = &enic_recv_pkts;
  	eth_dev->tx_pkt_burst = &enic_xmit_pkts;
  	eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +4 -4
index fd927923da..e6043e1455 100644
@@ -2855,10 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = {
  	.rx_queue_release	= fm10k_rx_queue_release,
  	.tx_queue_setup		= fm10k_tx_queue_setup,
  	.tx_queue_release	= fm10k_tx_queue_release,
-	.rx_queue_count		= fm10k_dev_rx_queue_count,
-	.rx_descriptor_done	= fm10k_dev_rx_descriptor_done,
-	.rx_descriptor_status = fm10k_dev_rx_descriptor_status,
-	.tx_descriptor_status = fm10k_dev_tx_descriptor_status,
  	.rx_queue_intr_enable	= fm10k_dev_rx_queue_intr_enable,
  	.rx_queue_intr_disable	= fm10k_dev_rx_queue_intr_disable,
  	.reta_update		= fm10k_reta_update,
@@ -3055,6 +3051,10 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)
  	PMD_INIT_FUNC_TRACE();
 
  	dev->dev_ops = &fm10k_eth_dev_ops;
+	dev->rx_queue_count = fm10k_dev_rx_queue_count;
+	dev->rx_descriptor_done	= fm10k_dev_rx_descriptor_done;
+	dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status;
  	dev->rx_pkt_burst = &fm10k_recv_pkts;
  	dev->tx_pkt_burst = &fm10k_xmit_pkts;
  	dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +4 -4
index 841447228a..80efd06cd9 100644
@@ -474,10 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = {
  	.rx_queue_intr_enable         = i40e_dev_rx_queue_intr_enable,
  	.rx_queue_intr_disable        = i40e_dev_rx_queue_intr_disable,
  	.rx_queue_release             = i40e_dev_rx_queue_release,
-	.rx_queue_count               = i40e_dev_rx_queue_count,
-	.rx_descriptor_done           = i40e_dev_rx_descriptor_done,
-	.rx_descriptor_status         = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status         = i40e_dev_tx_descriptor_status,
  	.tx_queue_setup               = i40e_dev_tx_queue_setup,
  	.tx_queue_release             = i40e_dev_tx_queue_release,
  	.dev_led_on                   = i40e_dev_led_on,
@@ -1448,6 +1444,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)
  	PMD_INIT_FUNC_TRACE();
 
  	dev->dev_ops = &i40e_eth_dev_ops;
+	dev->rx_queue_count = i40e_dev_rx_queue_count;
+	dev->rx_descriptor_done = i40e_dev_rx_descriptor_done;
+	dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
  	dev->rx_pkt_burst = i40e_recv_pkts;
  	dev->tx_pkt_burst = i40e_xmit_pkts;
  	dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +4 -4
index b755350cd2..be4b28fa45 100644
@@ -199,12 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = {
  	.rx_queue_release     = i40e_dev_rx_queue_release,
  	.rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable,
  	.rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable,
-	.rx_descriptor_done   = i40e_dev_rx_descriptor_done,
-	.rx_descriptor_status = i40e_dev_rx_descriptor_status,
-	.tx_descriptor_status = i40e_dev_tx_descriptor_status,
  	.tx_queue_setup       = i40e_dev_tx_queue_setup,
  	.tx_queue_release     = i40e_dev_tx_queue_release,
-	.rx_queue_count       = i40e_dev_rx_queue_count,
  	.rxq_info_get         = i40e_rxq_info_get,
  	.txq_info_get         = i40e_txq_info_get,
  	.mac_addr_add	      = i40evf_add_mac_addr,
@@ -1561,6 +1557,10 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)
 
  	/* assign ops func pointer */
  	eth_dev->dev_ops = &i40evf_eth_dev_ops;
+	eth_dev->rx_queue_count       = i40e_dev_rx_queue_count;
+	eth_dev->rx_descriptor_done   = i40e_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status;
  	eth_dev->rx_pkt_burst = &i40e_recv_pkts;
  	eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
 
drivers/net/iavf/iavf_ethdev.c +3 -3
index 8e1d8a8d3e..e1ff38e8be 100644
@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = {
  	.rss_hash_conf_get          = iavf_dev_rss_hash_conf_get,
  	.rxq_info_get               = iavf_dev_rxq_info_get,
  	.txq_info_get               = iavf_dev_txq_info_get,
-	.rx_queue_count             = iavf_dev_rxq_count,
-	.rx_descriptor_status       = iavf_dev_rx_desc_status,
-	.tx_descriptor_status       = iavf_dev_tx_desc_status,
  	.mtu_set                    = iavf_dev_mtu_set,
  	.rx_queue_intr_enable       = iavf_dev_rx_queue_intr_enable,
  	.rx_queue_intr_disable      = iavf_dev_rx_queue_intr_disable,
@@ -1383,6 +1380,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)
 
  	/* assign ops func pointer */
  	eth_dev->dev_ops = &iavf_eth_dev_ops;
+	eth_dev->rx_queue_count = iavf_dev_rxq_count;
+	eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status;
+	eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status;
  	eth_dev->rx_pkt_burst = &iavf_recv_pkts;
  	eth_dev->tx_pkt_burst = &iavf_xmit_pkts;
  	eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
index c5dac2e328..c8b16c7f87 100644
@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = {
  	.tx_burst_mode_get            = ice_tx_burst_mode_get,
  	.get_eeprom_length            = ice_get_eeprom_length,
  	.get_eeprom                   = ice_get_eeprom,
-	.rx_queue_count               = ice_rx_queue_count,
-	.rx_descriptor_status         = ice_rx_descriptor_status,
-	.tx_descriptor_status         = ice_tx_descriptor_status,
  	.stats_get                    = ice_stats_get,
  	.stats_reset                  = ice_stats_reset,
  	.xstats_get                   = ice_xstats_get,
@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)
  	int ret;
 
  	dev->dev_ops = &ice_eth_dev_ops;
+	dev->rx_queue_count = ice_rx_queue_count;
+	dev->rx_descriptor_status = ice_rx_descriptor_status;
+	dev->tx_descriptor_status = ice_tx_descriptor_status;
  	dev->rx_pkt_burst = ice_recv_pkts;
  	dev->tx_pkt_burst = ice_xmit_pkts;
  	dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +4 -4
index 6ab3ee909d..aa37c11861 100644
@@ -272,10 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = {
 
  	.rx_queue_setup		= eth_igc_rx_queue_setup,
  	.rx_queue_release	= eth_igc_rx_queue_release,
-	.rx_queue_count		= eth_igc_rx_queue_count,
-	.rx_descriptor_done	= eth_igc_rx_descriptor_done,
-	.rx_descriptor_status	= eth_igc_rx_descriptor_status,
-	.tx_descriptor_status	= eth_igc_tx_descriptor_status,
  	.tx_queue_setup		= eth_igc_tx_queue_setup,
  	.tx_queue_release	= eth_igc_tx_queue_release,
  	.tx_done_cleanup	= eth_igc_tx_done_cleanup,
@@ -1227,6 +1223,10 @@ eth_igc_dev_init(struct rte_eth_dev *dev)
 
  	PMD_INIT_FUNC_TRACE();
  	dev->dev_ops = &eth_igc_ops;
+	dev->rx_descriptor_done	= eth_igc_rx_descriptor_done;
+	dev->rx_queue_count = eth_igc_rx_queue_count;
+	dev->rx_descriptor_status = eth_igc_rx_descriptor_status;
+	dev->tx_descriptor_status = eth_igc_tx_descriptor_status;
 
  	/*
  	 * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +7 -7
index d9582473a4..337ce90fbf 100644
@@ -545,10 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
  	.rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable,
  	.rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable,
  	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_queue_count       = ixgbe_dev_rx_queue_count,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
  	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
  	.tx_queue_release     = ixgbe_dev_tx_queue_release,
  	.dev_led_on           = ixgbe_dev_led_on,
@@ -622,9 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
  	.vlan_offload_set     = ixgbevf_vlan_offload_set,
  	.rx_queue_setup       = ixgbe_dev_rx_queue_setup,
  	.rx_queue_release     = ixgbe_dev_rx_queue_release,
-	.rx_descriptor_done   = ixgbe_dev_rx_descriptor_done,
-	.rx_descriptor_status = ixgbe_dev_rx_descriptor_status,
-	.tx_descriptor_status = ixgbe_dev_tx_descriptor_status,
  	.tx_queue_setup       = ixgbe_dev_tx_queue_setup,
  	.tx_queue_release     = ixgbe_dev_tx_queue_release,
  	.rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1091,6 +1084,10 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)
  	ixgbe_dev_macsec_setting_reset(eth_dev);
 
  	eth_dev->dev_ops = &ixgbe_eth_dev_ops;
+	eth_dev->rx_queue_count       = ixgbe_dev_rx_queue_count;
+	eth_dev->rx_descriptor_done   = ixgbe_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
  	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
  	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
  	eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1570,6 +1567,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)
  	PMD_INIT_FUNC_TRACE();
 
  	eth_dev->dev_ops = &ixgbevf_eth_dev_ops;
+	eth_dev->rx_descriptor_done   = ixgbe_dev_rx_descriptor_done;
+	eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status;
  	eth_dev->rx_pkt_burst = &ixgbe_recv_pkts;
  	eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
 
drivers/net/mlx5/linux/mlx5_os.c +5 -7
index bf1f82ba67..ec3cc4000e 100644
@@ -601,6 +601,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
  		}
  		eth_dev->device = dpdk_dev;
  		eth_dev->dev_ops = &mlx5_os_dev_sec_ops;
+		eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+		eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
  		err = mlx5_proc_priv_init(eth_dev);
  		if (err)
  			return NULL;
@@ -1208,6 +1210,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
  	eth_dev->rx_pkt_burst = removed_rx_burst;
  	eth_dev->tx_pkt_burst = removed_tx_burst;
  	eth_dev->dev_ops = &mlx5_os_dev_ops;
+	eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+	eth_dev->rx_queue_count = mlx5_rx_queue_count;
  	/* Register MAC address. */
  	claim_zero(mlx5_mac_addr_add(eth_dev, &mac, 0, 0));
  	if (config->vf && config->vf_nl_en)
@@ -2396,13 +2401,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = {
  	.rss_hash_update = mlx5_rss_hash_update,
  	.rss_hash_conf_get = mlx5_rss_hash_conf_get,
  	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
  	.rxq_info_get = mlx5_rxq_info_get,
  	.txq_info_get = mlx5_txq_info_get,
  	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
  	.tx_burst_mode_get = mlx5_tx_burst_mode_get,
-	.rx_queue_count = mlx5_rx_queue_count,
  	.rx_queue_intr_enable = mlx5_rx_intr_enable,
  	.rx_queue_intr_disable = mlx5_rx_intr_disable,
  	.is_removed = mlx5_is_removed,
@@ -2427,8 +2429,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = {
  	.rx_queue_stop = mlx5_rx_queue_stop,
  	.tx_queue_start = mlx5_tx_queue_start,
  	.tx_queue_stop = mlx5_tx_queue_stop,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
  	.rxq_info_get = mlx5_rxq_info_get,
  	.txq_info_get = mlx5_txq_info_get,
  	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2480,8 +2480,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = {
  	.vlan_strip_queue_set = mlx5_vlan_strip_queue_set,
  	.vlan_offload_set = mlx5_vlan_offload_set,
  	.filter_ctrl = mlx5_dev_filter_ctrl,
-	.rx_descriptor_status = mlx5_rx_descriptor_status,
-	.tx_descriptor_status = mlx5_tx_descriptor_status,
  	.rxq_info_get = mlx5_rxq_info_get,
  	.txq_info_get = mlx5_txq_info_get,
  	.rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
index 4c29898203..eb55bd7f99 100644
@@ -5138,6 +5138,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev,
  		dev->dev_ops = &mlx5_os_dev_ops_isolate;
  	else
  		dev->dev_ops = &mlx5_os_dev_ops;
+
+	dev->rx_descriptor_status = mlx5_rx_descriptor_status;
+	dev->tx_descriptor_status = mlx5_tx_descriptor_status;
+
  	return 0;
  }
 
drivers/net/netvsc/hn_ethdev.c +3 -3
index fd91c0e491..229c1b9149 100644
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = {
  	.tx_queue_setup		= hn_dev_tx_queue_setup,
  	.tx_queue_release	= hn_dev_tx_queue_release,
  	.tx_done_cleanup        = hn_dev_tx_done_cleanup,
-	.tx_descriptor_status	= hn_dev_tx_descriptor_status,
  	.rx_queue_setup		= hn_dev_rx_queue_setup,
  	.rx_queue_release	= hn_dev_rx_queue_release,
-	.rx_queue_count		= hn_dev_rx_queue_count,
-	.rx_descriptor_status   = hn_dev_rx_queue_status,
  	.link_update		= hn_dev_link_update,
  	.stats_get		= hn_dev_stats_get,
  	.stats_reset            = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev)
 
  	vmbus = container_of(device, struct rte_vmbus_device, device);
  	eth_dev->dev_ops = &hn_eth_dev_ops;
+	eth_dev->rx_queue_count = hn_dev_rx_queue_count;
+	eth_dev->rx_descriptor_status = hn_dev_rx_queue_status;
+	eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status;
  	eth_dev->tx_pkt_burst = &hn_xmit_pkts;
  	eth_dev->rx_pkt_burst = &hn_recv_pkts;
 
drivers/net/nfp/nfp_net.c +1 -1
index 99946279db..c556dedab6 100644
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = {
  	.rss_hash_conf_get	= nfp_net_rss_hash_conf_get,
  	.rx_queue_setup		= nfp_net_rx_queue_setup,
  	.rx_queue_release	= nfp_net_rx_queue_release,
-	.rx_queue_count		= nfp_net_rx_queue_count,
  	.tx_queue_setup		= nfp_net_tx_queue_setup,
  	.tx_queue_release	= nfp_net_tx_queue_release,
  	.rx_queue_intr_enable   = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
  	}
 
  	eth_dev->dev_ops = &nfp_net_eth_dev_ops;
+	eth_dev->rx_queue_count = nfp_net_rx_queue_count;
  	eth_dev->rx_pkt_burst = &nfp_net_recv_pkts;
  	eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
 
drivers/net/octeontx2/otx2_ethdev.c +4 -4
index 33b72bd4db..c06e32f26b 100644
@@ -2272,10 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = {
  	.txq_info_get             = otx2_nix_txq_info_get,
  	.rx_burst_mode_get        = otx2_rx_burst_mode_get,
  	.tx_burst_mode_get        = otx2_tx_burst_mode_get,
-	.rx_queue_count           = otx2_nix_rx_queue_count,
-	.rx_descriptor_done       = otx2_nix_rx_descriptor_done,
-	.rx_descriptor_status     = otx2_nix_rx_descriptor_status,
-	.tx_descriptor_status     = otx2_nix_tx_descriptor_status,
  	.tx_done_cleanup          = otx2_nix_tx_done_cleanup,
  	.set_queue_rate_limit     = otx2_nix_tm_set_queue_rate_limit,
  	.pool_ops_supported       = otx2_nix_pool_ops_supported,
@@ -2382,6 +2378,10 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)
  	int rc, max_entries;
 
  	eth_dev->dev_ops = &otx2_eth_dev_ops;
+	eth_dev->rx_descriptor_done = otx2_nix_rx_descriptor_done;
+	eth_dev->rx_queue_count = otx2_nix_rx_queue_count;
+	eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status;
+	eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;
 
  	/* For secondary processes, the primary has done all the work */
  	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/qede/qede_ethdev.c +1 -2
index 70d48e48ef..59f1746ee9 100644
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
  	.dev_infos_get = qede_dev_info_get,
  	.rx_queue_setup = qede_rx_queue_setup,
  	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
  	.tx_queue_setup = qede_tx_queue_setup,
  	.tx_queue_release = qede_tx_queue_release,
  	.dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
  	.dev_infos_get = qede_dev_info_get,
  	.rx_queue_setup = qede_rx_queue_setup,
  	.rx_queue_release = qede_rx_queue_release,
-	.rx_descriptor_status = qede_rx_descriptor_status,
  	.tx_queue_setup = qede_tx_queue_setup,
  	.tx_queue_release = qede_tx_queue_release,
  	.dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
  	}
 
  	eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops;
+	eth_dev->rx_descriptor_status = qede_rx_descriptor_status;
 
  	adapter->num_tx_queues = 0;
  	adapter->num_rx_queues = 0;
drivers/net/sfc/sfc_ethdev.c +8 -8
index acee3e48e4..1a58e0df84 100644
@@ -1819,10 +1819,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = {
  	.tx_queue_stop			= sfc_tx_queue_stop,
  	.rx_queue_setup			= sfc_rx_queue_setup,
  	.rx_queue_release		= sfc_rx_queue_release,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
  	.rx_queue_intr_enable		= sfc_rx_queue_intr_enable,
  	.rx_queue_intr_disable		= sfc_rx_queue_intr_disable,
  	.tx_queue_setup			= sfc_tx_queue_setup,
@@ -1977,6 +1973,10 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev)
  	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
  	dev->tx_pkt_burst = dp_tx->pkt_burst;
 
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_done = sfc_rx_descriptor_done;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
  	dev->dev_ops = &sfc_eth_dev_ops;
 
  	return 0;
@@ -2017,10 +2017,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)
 
  static const struct eth_dev_ops sfc_eth_dev_secondary_ops = {
  	.dev_supported_ptypes_get	= sfc_dev_supported_ptypes_get,
-	.rx_queue_count			= sfc_rx_queue_count,
-	.rx_descriptor_done		= sfc_rx_descriptor_done,
-	.rx_descriptor_status		= sfc_rx_descriptor_status,
-	.tx_descriptor_status		= sfc_tx_descriptor_status,
  	.reta_query			= sfc_dev_rss_reta_query,
  	.rss_hash_conf_get		= sfc_dev_rss_hash_conf_get,
  	.rxq_info_get			= sfc_rx_queue_info_get,
@@ -2085,6 +2081,10 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
  	dev->rx_pkt_burst = dp_rx->pkt_burst;
  	dev->tx_pkt_prepare = dp_tx->pkt_prepare;
  	dev->tx_pkt_burst = dp_tx->pkt_burst;
+	dev->rx_queue_count = sfc_rx_queue_count;
+	dev->rx_descriptor_done = sfc_rx_descriptor_done;
+	dev->rx_descriptor_status = sfc_rx_descriptor_status;
+	dev->tx_descriptor_status = sfc_tx_descriptor_status;
  	dev->dev_ops = &sfc_eth_dev_secondary_ops;
 
  	return 0;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
index d955a7ee23..959c8e4ddc 100644
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = {
  	.tx_queue_stop            = nicvf_dev_tx_queue_stop,
  	.rx_queue_setup           = nicvf_dev_rx_queue_setup,
  	.rx_queue_release         = nicvf_dev_rx_queue_release,
-	.rx_queue_count           = nicvf_dev_rx_queue_count,
  	.tx_queue_setup           = nicvf_dev_tx_queue_setup,
  	.tx_queue_release         = nicvf_dev_tx_queue_release,
  	.dev_set_link_up          = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)
  	PMD_INIT_FUNC_TRACE();
 
  	eth_dev->dev_ops = &nicvf_eth_dev_ops;
+	eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;
 
  	/* For secondary processes, the primary has done all the work */
  	if (rte_eal_process_type() != RTE_PROC_PRIMARY) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
index e55278af69..fa365605ef 100644
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = {
  	.rx_queue_release = eth_queue_release,
  	.tx_queue_release = eth_queue_release,
  	.tx_done_cleanup = eth_tx_done_cleanup,
-	.rx_queue_count = eth_rx_queue_count,
  	.link_update = eth_link_update,
  	.stats_get = eth_stats_get,
  	.stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name,
  	data->all_multicast = 1;
 
  	eth_dev->dev_ops = &ops;
+	eth_dev->rx_queue_count = eth_rx_queue_count;
 
  	/* finally assign rx and tx ops */
  	eth_dev->rx_pkt_burst = eth_vhost_rx;
drivers/net/virtio/virtio_ethdev.c +1 -1
index dc0093bdf0..4f2fa0d943 100644
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = {
  	.rx_queue_intr_enable    = virtio_dev_rx_queue_intr_enable,
  	.rx_queue_intr_disable   = virtio_dev_rx_queue_intr_disable,
  	.rx_queue_release        = virtio_dev_queue_release,
-	.rx_descriptor_done      = virtio_dev_rx_queue_done,
  	.tx_queue_setup          = virtio_dev_tx_queue_setup,
  	.tx_queue_release        = virtio_dev_queue_release,
  	/* collect stats per queue */
@@ -1903,6 +1902,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev)
  	}
 
  	eth_dev->dev_ops = &virtio_eth_dev_ops;
+	eth_dev->rx_descriptor_done = virtio_dev_rx_queue_done;
 
  	if (rte_eal_process_type() == RTE_PROC_SECONDARY) {
  		if (!hw->virtio_user_dev) {
lib/librte_ethdev/rte_ethdev.h +8 -9
index eb6cd01f8d..b6f26a513b 100644
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 
  	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -EINVAL);
  	dev = &rte_eth_devices[port_id];
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_queue_count, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_queue_count, -ENOTSUP);
  	if (queue_id >= dev->data->nb_rx_queues)
  		return -EINVAL;
 
-	return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id);
+	return (int)(*dev->rx_queue_count)(dev, queue_id);
  }
 
  /**
@@ -4573,9 +4573,8 @@ rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset)
  {
  	struct rte_eth_dev *dev = &rte_eth_devices[port_id];
  	RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP);
-	return (*dev->dev_ops->rx_descriptor_done)( \
-		dev->data->rx_queues[queue_id], offset);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_done, -ENOTSUP);
+	return (*dev->rx_descriptor_done)(dev->data->rx_queues[queue_id], offset);
  }
 
  #define RTE_ETH_RX_DESC_AVAIL    0 /**< Desc available for hw. */
@@ -4630,10 +4629,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
  	if (queue_id >= dev->data->nb_rx_queues)
  		return -ENODEV;
  #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_status, -ENOTSUP);
  	rxq = dev->data->rx_queues[queue_id];
 
-	return (*dev->dev_ops->rx_descriptor_status)(rxq, offset);
+	return (*dev->rx_descriptor_status)(rxq, offset);
  }
 
  #define RTE_ETH_TX_DESC_FULL    0 /**< Desc filled for hw, waiting xmit. */
@@ -4687,10 +4686,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
  	if (queue_id >= dev->data->nb_tx_queues)
  		return -ENODEV;
  #endif
-	RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->tx_descriptor_status, -ENOTSUP);
+	RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_descriptor_status, -ENOTSUP);
  	txq = dev->data->tx_queues[queue_id];
 
-	return (*dev->dev_ops->tx_descriptor_status)(txq, offset);
+	return (*dev->tx_descriptor_status)(txq, offset);
  }
 
  /**
lib/librte_ethdev/rte_ethdev_core.h +6 -7
index 32407dd418..8ed827475f 100644
@@ -660,13 +660,6 @@ struct eth_dev_ops {
  	eth_queue_stop_t           tx_queue_stop; /**< Stop TX for a queue. */
  	eth_rx_queue_setup_t       rx_queue_setup;/**< Set up device RX queue. */
  	eth_queue_release_t        rx_queue_release; /**< Release RX queue. */
-	eth_rx_queue_count_t       rx_queue_count;
-	/**< Get the number of used RX descriptors. */
-	eth_rx_descriptor_done_t   rx_descriptor_done; /**< Check rxd DD bit. */
-	eth_rx_descriptor_status_t rx_descriptor_status;
-	/**< Check the status of a Rx descriptor. */
-	eth_tx_descriptor_status_t tx_descriptor_status;
-	/**< Check the status of a Tx descriptor. */
  	/*
  	 * Static inline functions use functions ABOVE this comment.
  	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -782,6 +775,12 @@ struct rte_eth_dev {
  	eth_rx_burst_t rx_pkt_burst; /**< Pointer to PMD receive function. */
  	eth_tx_burst_t tx_pkt_burst; /**< Pointer to PMD transmit function. */
  	eth_tx_prep_t tx_pkt_prepare; /**< Pointer to PMD transmit prepare function. */
+
+	eth_rx_queue_count_t       rx_queue_count; /**< Get the number of used RX descriptors. */
+	eth_rx_descriptor_done_t   rx_descriptor_done;   /**< Check rxd DD bit. */
+	eth_rx_descriptor_status_t rx_descriptor_status; /**< Check the status of a Rx descriptor. */
+	eth_tx_descriptor_status_t tx_descriptor_status; /**< Check the status of a Tx descriptor. */
+
  	/**
  	 * Next two fields are per-device data but *data is shared between
  	 * primary and secondary processes and *process_private is per-process
#35 lore raw

PATCH v4 3/7 ethdev: make device operations struct private

In reply to Ferruh Yigit

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

---
Cc: David Marchand <[email protected]>
v3:
* release note updated

v4:
* Fix wording in release notes, s/inline/internal

---
 doc/guides/rel_notes/deprecation.rst     |   9 -
 doc/guides/rel_notes/release_20_11.rst   |   2 +
 drivers/net/i40e/i40e_vf_representor.c   |   1 +
 drivers/net/ixgbe/ixgbe_vf_representor.c |   1 +
 lib/librte_ethdev/rte_ethdev_core.h      | 712 +----------------------
 lib/librte_ethdev/rte_ethdev_driver.h    | 694 ++++++++++++++++++++++
 lib/librte_ethdev/rte_flow_driver.h      |   1 +
 lib/librte_ethdev/rte_mtr_driver.h       |   1 +
 lib/librte_ethdev/rte_tm_driver.h        |   1 +
 9 files changed, 710 insertions(+), 712 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -9
index 35c676e262..8770c87006 100644
@@ -156,15 +156,6 @@ Deprecation Notices
   Due to adoption of C11 atomic builtins, the field ``refcnt_atomic``
   will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11.
 
-* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible
-  will be done in 20.11.
-  Currently the ``struct eth_dev_ops`` struct is accessible by the application
-  because some inline functions, like ``rte_eth_tx_descriptor_status()``,
-  access the struct directly.
-  The struct will be separate in two, the ops used by inline functions will be
-  moved next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct
-  will be moved to header file for drivers to hide it from applications.
-
 * ethdev: the legacy filter API, including
   ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well
   as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
doc/guides/rel_notes/release_20_11.rst +2 -0
index ff7242012b..9b5bfcfae8 100644
@@ -111,6 +111,8 @@ ABI Changes
     * ``eth_rx_descriptor_status_t rx_descriptor_status;``
     * ``eth_tx_descriptor_status_t tx_descriptor_status;``
 
+  * ``struct eth_dev_ops`` is no more accessible by applications, which was already internal data structure.
+
 
 Known Issues
 ------------
drivers/net/i40e/i40e_vf_representor.c +1 -0
index 083bc1a5f3..f09d4d8798 100644
@@ -7,6 +7,7 @@
 #include <rte_pci.h>
 #include <rte_malloc.h>
 
+#include "rte_ethdev_driver.h"
 #include "base/i40e_type.h"
 #include "base/virtchnl.h"
 #include "i40e_ethdev.h"
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -0
index dbbef294ae..edb5d43846 100644
@@ -6,6 +6,7 @@
 #include <rte_pci.h>
 #include <rte_malloc.h>
 
+#include "rte_ethdev_driver.h"
 #include "base/ixgbe_type.h"
 #include "base/ixgbe_vf.h"
 #include "ixgbe_ethdev.h"
lib/librte_ethdev/rte_ethdev_core.h +9 -703

731 lines not on this page · raw message

lib/librte_ethdev/rte_ethdev_driver.h +694 -0

700 lines not on this page · raw message

lib/librte_ethdev/rte_flow_driver.h +1 -0
index 881cc469b7..997598db11 100644
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
lib/librte_ethdev/rte_mtr_driver.h +1 -0
index 3ec7ffa2a5..3b39532935 100644
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
lib/librte_ethdev/rte_tm_driver.h +1 -0
index 90114ff53e..b86ed89c00 100644
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
Signature · 1 line
2.26.2
#36 lore raw

PATCH v4 4/7 ethdev: mark internal functions

In reply to Ferruh Yigit

Some ethdev functions are for drivers only, not for applications.

Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.

Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.

---
Cc: David Marchand <[email protected]>
v3:
* release note updated

---
 doc/guides/rel_notes/deprecation.rst     |  6 -----
 doc/guides/rel_notes/release_20_11.rst   |  2 ++
 lib/librte_ethdev/rte_ethdev.h           |  3 +--
 lib/librte_ethdev/rte_ethdev_driver.h    | 33 ++++++++++--------------
 lib/librte_ethdev/rte_ethdev_version.map | 30 ++++++++++-----------
 lib/librte_ethdev/rte_flow_driver.h      |  4 +--
 6 files changed, 31 insertions(+), 47 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -6
index 8770c87006..6c82db2961 100644
@@ -225,12 +225,6 @@ Deprecation Notices
   following the IPv6 header, as proposed in RFC
   https://mails.dpdk.org/archives/dev/2020-August/177257.html.
 
-* ethdev: Some internal APIs for driver usage are exported in the .map file.
-  Now DPDK has ``__rte_internal`` marker so we can mark internal APIs and move
-  them to the INTERNAL block in .map. Although these APIs are internal it will
-  break the ABI checks, that is why change is planned for 20.11.
-  The list of internal APIs are mainly ones listed in ``rte_ethdev_driver.h``.
-
 * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made
   ABI stable in the v19.11 release. The TM maintainer and other contributors have
   agreed to keep the TM APIs as experimental in expectation of additional spec
doc/guides/rel_notes/release_20_11.rst +2 -0
index 9b5bfcfae8..f8c3521b3f 100644
@@ -113,6 +113,8 @@ ABI Changes
 
   * ``struct eth_dev_ops`` is no more accessible by applications, which was already internal data structure.
 
+  * ``ethdev`` internal functions are marked with ``__rte_internal`` tag.
+
 
 Known Issues
 ------------
lib/librte_ethdev/rte_ethdev.h +1 -2
index b6f26a513b..e7733d828b 100644
@@ -1724,8 +1724,7 @@ rte_eth_find_next_of(uint16_t port_id_start,
  */
 __rte_experimental
 uint16_t
-rte_eth_find_next_sibling(uint16_t port_id_start,
-		uint16_t ref_port_id);
+rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);
 
 /**
  * Macro to iterate over all ethdev ports sharing the same rte_device
lib/librte_ethdev/rte_ethdev_driver.h +13 -20
index b006cbbe92..3d1bc33272 100644
@@ -759,6 +759,7 @@ int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
  * @return
  *   - The pointer to the ethdev slot, on success. NULL on error
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
 
 /**
@@ -770,6 +771,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name);
  * @return
  *   - Slot in the rte_dev_devices array for a new device;
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
 
 /**
@@ -783,6 +785,7 @@ struct rte_eth_dev *rte_eth_dev_allocate(const char *name);
  *        device.
  *   - Error: Null pointer.
  */
+__rte_internal
 struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
 
 /**
@@ -801,6 +804,7 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);
  * @return
  *   - 0 on success, negative on error
  */
+__rte_internal
 int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
 
 /**
@@ -814,6 +818,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  * @return
  *  void
  */
+__rte_internal
 void _rte_eth_dev_reset(struct rte_eth_dev *dev);
 
 /**
@@ -833,6 +838,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  * @return
  *  int
  */
+__rte_internal
 int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 		enum rte_eth_event_type event, void *ret_param);
 
@@ -848,6 +854,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  * @param dev
  *  New ethdev port.
  */
+__rte_internal
 void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
 
 /**
@@ -869,6 +876,7 @@ void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);
  * @param socket_id
  *   The *socket_id* argument is the socket identifier in case of NUMA.
  */
+__rte_internal
 const struct rte_memzone *
 rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name,
 			 uint16_t queue_id, size_t size,
@@ -955,9 +963,6 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
 }
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Allocate an unique switch domain identifier.
  *
  * A pool of switch domain identifiers which can be allocated on request. This
@@ -971,14 +976,11 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_switch_domain_alloc(uint16_t *domain_id);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * Free switch domain.
  *
  * Return a switch domain identifier to the pool of free identifiers after it is
@@ -990,7 +992,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id);
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_switch_domain_free(uint16_t domain_id);
 
@@ -1007,9 +1009,6 @@ struct rte_eth_devargs {
 };
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function to parse ethdev arguments
  *
  * @param devargs
@@ -1020,7 +1019,7 @@ struct rte_eth_devargs {
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_devargs_parse(const char *devargs, struct rte_eth_devargs *eth_devargs);
 
@@ -1030,9 +1029,6 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
 	void *bus_specific_init_params);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function for the creation of a new ethdev ports.
  *
  * @param device
@@ -1053,7 +1049,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_dev_create(struct rte_device *device, const char *name,
 	size_t priv_data_size,
@@ -1064,9 +1060,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,
 typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
 
 /**
- * @warning
- * @b EXPERIMENTAL: this API may change without prior notice.
- *
  * PMD helper function for cleaning up the resources of a ethdev port on it's
  * destruction.
  *
@@ -1078,7 +1071,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);
  * @return
  *   Negative errno value on error, 0 on success.
  */
-__rte_experimental
+__rte_internal
 int
 rte_eth_dev_destroy(struct rte_eth_dev *ethdev, ethdev_uninit_t ethdev_uninit);
 
lib/librte_ethdev/rte_ethdev_version.map +14 -16
index 8d9d6b1c67..6a84f3d76d 100644
@@ -1,8 +1,6 @@
 DPDK_21 {
 	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
 	rte_eth_add_first_rx_callback;
 	rte_eth_add_rx_callback;
 	rte_eth_add_tx_callback;
@@ -10,9 +8,6 @@ DPDK_21 {
 	rte_eth_allmulticast_enable;
 	rte_eth_allmulticast_get;
 	rte_eth_dev_adjust_nb_rx_tx_desc;
-	rte_eth_dev_allocate;
-	rte_eth_dev_allocated;
-	rte_eth_dev_attach_secondary;
 	rte_eth_dev_callback_register;
 	rte_eth_dev_callback_unregister;
 	rte_eth_dev_close;
@@ -44,8 +39,6 @@ DPDK_21 {
 	rte_eth_dev_mac_addr_remove;
 	rte_eth_dev_pool_ops_supported;
 	rte_eth_dev_priority_flow_ctrl_set;
-	rte_eth_dev_probing_finish;
-	rte_eth_dev_release_port;
 	rte_eth_dev_reset;
 	rte_eth_dev_rss_hash_conf_get;
 	rte_eth_dev_rss_hash_update;
@@ -81,7 +74,6 @@ DPDK_21 {
 	rte_eth_dev_udp_tunnel_port_delete;
 	rte_eth_dev_vlan_filter;
 	rte_eth_devices;
-	rte_eth_dma_zone_reserve;
 	rte_eth_find_next;
 	rte_eth_find_next_owned_by;
 	rte_eth_iterator_cleanup;
@@ -195,16 +187,8 @@ EXPERIMENTAL {
 	rte_eth_dev_owner_unset;
 
 	# added in 18.05
-	rte_eth_dev_create;
-	rte_eth_dev_destroy;
 	rte_eth_dev_get_module_eeprom;
 	rte_eth_dev_get_module_info;
-	rte_eth_devargs_parse;
-	rte_eth_switch_domain_alloc;
-	rte_eth_switch_domain_free;
-
-	# added in 18.08
-	rte_flow_expand_rss;
 
 	# added in 18.11
 	rte_eth_dev_rx_intr_ctl_q_get_fd;
@@ -246,5 +230,19 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
+	_rte_eth_dev_callback_process;
+	_rte_eth_dev_reset;
+	rte_eth_dev_allocate;
+	rte_eth_dev_allocated;
+	rte_eth_dev_attach_secondary;
+	rte_eth_dev_create;
+	rte_eth_dev_destroy;
+	rte_eth_dev_probing_finish;
+	rte_eth_dev_release_port;
+	rte_eth_devargs_parse;
 	rte_eth_dma_zone_free;
+	rte_eth_dma_zone_reserve;
+	rte_eth_switch_domain_alloc;
+	rte_eth_switch_domain_free;
+	rte_flow_expand_rss;
 };
lib/librte_ethdev/rte_flow_driver.h +1 -3
index 997598db11..3ee871d3eb 100644
@@ -161,8 +161,6 @@ struct rte_flow_expand_rss {
  * Expand RSS flows into several possible flows according to the RSS hash
  * fields requested and the driver capabilities.
  *
- * @b EXPERIMENTAL: this API may change without prior notice
- *
  * @param[out] buf
  *   Buffer to store the result expansion.
  * @param[in] size
@@ -183,7 +181,7 @@ struct rte_flow_expand_rss {
  *
  *   -E2BIG: graph-depth @p graph is too deep.
  */
-__rte_experimental
+__rte_internal
 int
 rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size,
 		    const struct rte_flow_item *pattern, uint64_t types,
Signature · 1 line
2.26.2
#37 lore raw

PATCH v4 5/7 ethdev: use hairpin helper functions

In reply to Ferruh Yigit

Hairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'

Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.

---
 drivers/net/mlx5/mlx5_rxq.c              | 4 ++--
 drivers/net/mlx5/mlx5_txq.c              | 4 ++--
 lib/librte_ethdev/rte_ethdev_driver.h    | 2 ++
 lib/librte_ethdev/rte_ethdev_version.map | 2 ++
 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +2 -2
index 946f7454f6..1b729f7ab2 100644
@@ -542,7 +542,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 	eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;
 	int ret;
 
-	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be stopped");
 		rte_errno = EINVAL;
 		return -EINVAL;
@@ -653,7 +653,7 @@ mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->rx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_rx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be started");
 		rte_errno = EINVAL;
 		return -EINVAL;
drivers/net/mlx5/mlx5_txq.c +2 -2
index 66ad368e64..450d9641de 100644
@@ -244,7 +244,7 @@ mlx5_tx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->tx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_tx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be stopped");
 		rte_errno = EINVAL;
 		return -EINVAL;
@@ -371,7 +371,7 @@ mlx5_tx_queue_start(struct rte_eth_dev *dev, uint16_t idx)
 {
 	int ret;
 
-	if (dev->data->tx_queue_state[idx] == RTE_ETH_QUEUE_STATE_HAIRPIN) {
+	if (rte_eth_dev_is_tx_hairpin_queue(dev, idx)) {
 		DRV_LOG(ERR, "Hairpin queue can't be started");
 		rte_errno = EINVAL;
 		return -EINVAL;
lib/librte_ethdev/rte_ethdev_driver.h +2 -0
index 3d1bc33272..5dfe9fdf1a 100644
@@ -734,6 +734,7 @@ struct eth_dev_ops {
  * @return
  *   - (1) if the queue is hairpin queue, 0 otherwise.
  */
+__rte_internal
 int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
 
 /**
@@ -748,6 +749,7 @@ int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
  * @return
  *   - (1) if the queue is hairpin queue, 0 otherwise.
  */
+__rte_internal
 int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
 
 /**
lib/librte_ethdev/rte_ethdev_version.map +2 -0
index 6a84f3d76d..5db3fb156a 100644
@@ -237,6 +237,8 @@ INTERNAL {
 	rte_eth_dev_attach_secondary;
 	rte_eth_dev_create;
 	rte_eth_dev_destroy;
+	rte_eth_dev_is_rx_hairpin_queue;
+	rte_eth_dev_is_tx_hairpin_queue;
 	rte_eth_dev_probing_finish;
 	rte_eth_dev_release_port;
 	rte_eth_devargs_parse;
Signature · 1 line
2.26.2
#38 lore raw

PATCH v4 6/7 ethdev: remove invalid symbols from map file

In reply to Ferruh Yigit

These are struct type names, not object names. Removing them from .map file.

Fixes 9d41beed24b0 ("lib: provide initial versioning")
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)
lib/librte_ethdev/rte_ethdev_version.map +0 -2
index 5db3fb156a..a85986a2a2 100644
@@ -81,7 +81,6 @@ DPDK_21 {
 	rte_eth_iterator_next;
 	rte_eth_led_off;
 	rte_eth_led_on;
-	rte_eth_link;
 	rte_eth_link_get;
 	rte_eth_link_get_nowait;
 	rte_eth_macaddr_get;
@@ -96,7 +95,6 @@ DPDK_21 {
 	rte_eth_rx_queue_setup;
 	rte_eth_set_queue_rate_limit;
 	rte_eth_speed_bitflag;
-	rte_eth_stats;
 	rte_eth_stats_get;
 	rte_eth_stats_reset;
 	rte_eth_timesync_adjust_time;
Signature · 1 line
2.26.2
#39 lore raw

PATCH v4 7/7 ethdev: remove underscore prefix from internal API

In reply to Ferruh Yigit

'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.

For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.

---
v3:
* release note updated

---
 app/test/virtual_pmd.c                   |  4 ++--
 doc/guides/prog_guide/poll_mode_drv.rst  |  4 ++--
 doc/guides/rel_notes/release_20_11.rst   |  5 +++++
 drivers/net/atlantic/atl_ethdev.c        |  5 ++---
 drivers/net/bnxt/bnxt_ethdev.c           |  6 +++---
 drivers/net/bnxt/rte_pmd_bnxt.c          |  4 ++--
 drivers/net/bonding/rte_eth_bond_pmd.c   |  8 ++++----
 drivers/net/dpaa/dpaa_ethdev.c           |  2 +-
 drivers/net/dpaa2/dpaa2_ethdev.c         |  3 +--
 drivers/net/e1000/em_ethdev.c            |  2 +-
 drivers/net/e1000/igb_ethdev.c           |  7 +++----
 drivers/net/ena/ena_ethdev.c             |  4 ++--
 drivers/net/enic/enic_main.c             |  2 +-
 drivers/net/failsafe/failsafe_ether.c    |  6 +++---
 drivers/net/fm10k/fm10k_ethdev.c         | 11 ++++-------
 drivers/net/hinic/base/hinic_pmd_hwdev.c |  6 +++---
 drivers/net/i40e/i40e_ethdev.c           |  2 +-
 drivers/net/i40e/i40e_ethdev_vf.c        |  4 ++--
 drivers/net/i40e/i40e_pf.c               |  2 +-
 drivers/net/iavf/iavf_vchnl.c            |  5 ++---
 drivers/net/ice/ice_ethdev.c             |  4 ++--
 drivers/net/igc/igc_ethdev.c             |  3 +--
 drivers/net/ixgbe/ixgbe_ethdev.c         | 10 ++++------
 drivers/net/ixgbe/ixgbe_pf.c             |  5 ++---
 drivers/net/mlx4/mlx4_intr.c             | 10 +++++-----
 drivers/net/mlx5/linux/mlx5_ethdev_os.c  |  4 ++--
 drivers/net/mlx5/mlx5_flow.c             |  2 +-
 drivers/net/netvsc/hn_rndis.c            |  2 +-
 drivers/net/nfp/nfp_net.c                |  2 +-
 drivers/net/octeontx/octeontx_ethdev.c   |  6 +++---
 drivers/net/octeontx2/otx2_link.c        |  2 +-
 drivers/net/qede/qede_main.c             |  3 +--
 drivers/net/sfc/sfc_intr.c               | 12 ++++++------
 drivers/net/thunderx/nicvf_ethdev.c      |  6 +++---
 drivers/net/vhost/rte_eth_vhost.c        |  6 +++---
 drivers/net/virtio/virtio_ethdev.c       |  6 +++---
 drivers/net/vmxnet3/vmxnet3_ethdev.c     |  6 +++---
 lib/librte_ethdev/rte_ethdev.c           |  8 ++++----
 lib/librte_ethdev/rte_ethdev_driver.h    |  4 ++--
 lib/librte_ethdev/rte_ethdev_version.map |  4 ++--
 40 files changed, 95 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
index 79156cb85a..b49089a33c 100644
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id,
 
 	vrtl_eth_dev->data->dev_link.link_status = link_status;
 
-	_rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
-				      NULL);
+	rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
+				     NULL);
 }
 
 int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
index 6fae39f904..86e0a141e6 100644
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread.
 For example when PF is reset, the PF sends a message to notify VFs of
 this event and also trigger an interrupt to VFs. Then in the interrupt
 service routine the VFs detects this notification message and calls
-_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
+rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
 This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET
-event within VFs. The function _rte_eth_dev_callback_process() will
+event within VFs. The function rte_eth_dev_callback_process() will
 call the registered callback function. The callback function can trigger
 the application to handle all operations the VF reset requires including
 stopping Rx/Tx queues and calling rte_eth_dev_reset().
doc/guides/rel_notes/release_20_11.rst +5 -0
index f8c3521b3f..7ff6ac23b6 100644
@@ -86,6 +86,11 @@ API Changes
 
 * ``rte_eth_rx_descriptor_done()`` API has deprecated.
 
+* Renamed internal ethdev APIs:
+
+  * ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_process()``
+  * ``_rte_eth_dev_reset`` -> ``rte_eth_dev_internal_reset()``
+
 
 ABI Changes
 -----------
drivers/net/atlantic/atl_ethdev.c +2 -3
index 540b106045..2fca9140d7 100644
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 	/* Notify userapp if link status changed */
 	if (!atl_dev_link_update(dev, 0)) {
 		atl_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev,
-			RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	} else {
 		if (hw->aq_fw_ops->send_macsec_req == NULL)
 			goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
 		    resp.stats.egress_expired ||
 		    resp.stats.ingress_expired) {
 			PMD_DRV_LOG(INFO, "RTE_ETH_EVENT_MACSEC");
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_MACSEC, NULL);
 		}
 	}
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 4d224bfa04..8c959ac913 100644
@@ -1528,9 +1528,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
 	new.link_speed != eth_dev->data->dev_link.link_speed) {
 		rte_eth_linkstatus_set(eth_dev, &new);
 
-		_rte_eth_dev_callback_process(eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 
 		bnxt_print_link_info(eth_dev);
 	}
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
index eafc1d3868..d67db46c65 100644
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
 	ret_param.vf_id = vf_id;
 	ret_param.msg = msg;
 
-	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
+				     &ret_param);
 
 	/* Default to approve */
 	if (ret_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
index cdbd8151ed..4ffd2ca4bb 100644
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals,
 	internals->slave_count--;
 
 	/* force reconfiguration of slave interfaces */
-	_rte_eth_dev_reset(slave_eth_dev);
+	rte_eth_dev_internal_reset(slave_eth_dev);
 }
 
 static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
 	if (arg == NULL)
 		return;
 
-	_rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
+	rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
 			RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						bond_ethdev_delayed_lsc_propagation,
 						(void *)bonded_eth_dev);
 			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
 						RTE_ETH_EVENT_INTR_LSC,
 						NULL);
 
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
 						bond_ethdev_delayed_lsc_propagation,
 						(void *)bonded_eth_dev);
 			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
 						RTE_ETH_EVENT_INTR_LSC,
 						NULL);
 		}
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index e2c3fd0368..a077b98c3e 100644
@@ -335,7 +335,7 @@ static void dpaa_interrupt_handler(void *param)
 	if (bytes_read < 0)
 		DPAA_PMD_ERR("Error reading eventfd\n");
 	dpaa_eth_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int dpaa_eth_dev_start(struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
index 38cf0ab71c..0e9f836e55 100644
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param)
 		clear = DPNI_IRQ_EVENT_LINK_CHANGED;
 		dpaa2_dev_link_update(dev, 0);
 		/* calling all the apps registered for link status event */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 out:
 	ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
index 82766da882..1dc360713a 100644
@@ -1630,7 +1630,7 @@ eth_em_interrupt_handler(void *param)
 
 	eth_em_interrupt_get_status(dev);
 	eth_em_interrupt_action(dev, dev->intr_handle);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
drivers/net/e1000/igb_ethdev.c +3 -4
index fe0cea88c2..5ab74840aa 100644
@@ -2920,8 +2920,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev,
 			     pci_dev->addr.bus,
 			     pci_dev->addr.devid,
 			     pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	return 0;
@@ -2983,8 +2982,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)
 		/* dummy mbx read to ack pf */
 		if (mbx->ops.read(hw, &in_msg, 1, 0))
 			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 	}
 }
 
drivers/net/ena/ena_ethdev.c +2 -2
index da8c8ad922..8077519735 100644
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
 
 	if (unlikely(adapter->trigger_reset)) {
 		PMD_DRV_LOG(ERR, "Trigger reset is on\n");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 			NULL);
 	}
 }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data,
 	adapter->link_status = status;
 
 	ena_link_update(eth_dev, 0);
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
index 7942b0df6b..8b0441c5cd 100644
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)
 	vnic_intr_return_all_credits(&enic->intr[ENICPMD_LSC_INTR_OFFSET]);
 
 	enic_link_update(dev);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	enic_log_q_error(enic);
 	/* Re-enable irq in case of INTx */
 	rte_intr_ack(&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
index 70972d6717..7c68bbdec0 100644
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused,
 	ret = dev->dev_ops->link_update(dev, 0);
 	/* We must pass on the LSC event */
 	if (ret)
-		return _rte_eth_dev_callback_process(dev,
-						     RTE_ETH_EVENT_INTR_LSC,
-						     NULL);
+		return rte_eth_dev_callback_process(dev,
+						    RTE_ETH_EVENT_INTR_LSC,
+						    NULL);
 	else
 		return 0;
 }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
index e6043e1455..5771d83b55 100644
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
 					true);
 
 			dev_info->sm_down = 0;
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC,
 					NULL);
 		}
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
 	if (err == FM10K_ERR_RESET_REQUESTED) {
 		PMD_INIT_LOG(INFO, "INT: Switch is down");
 		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 
 		/* Setting reset flag */
 		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 		fm10k_vlan_filter_set(dev, hw->mac.default_vid, true);
 
 		dev_info->sm_down = 0;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
index ac2a72e388..41c99bdbf8 100644
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev,
 	ret = hinic_link_event_process(hwdev, rte_dev, status);
 	/* check if link has changed, notify callback */
 	if (ret == 0)
-		_rte_eth_dev_callback_process(rte_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(rte_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 }
 
 void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
index 80efd06cd9..563f21d9df 100644
@@ -6846,7 +6846,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
 		case i40e_aqc_opc_get_link_status:
 			ret = i40e_dev_link_update(dev, 0);
 			if (!ret)
-				_rte_eth_dev_callback_process(dev,
+				rte_eth_dev_callback_process(dev,
 					RTE_ETH_EVENT_INTR_LSC, NULL);
 			break;
 		default:
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
index be4b28fa45..8531cf6b12 100644
@@ -1378,7 +1378,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev,
+		rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_INTR_RESET, NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -1425,7 +1425,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
 		}
 
 		i40evf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev,
+		rte_eth_dev_callback_process(dev,
 				RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
drivers/net/i40e/i40e_pf.c +1 -1
index 7bf1e79410..03c2070c3f 100644
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
 	 * do nothing and send not_supported to VF. As PF must send a response
 	 * to VF and ACK/NACK is not defined.
 	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 	if (ret_param.retval != RTE_PMD_I40E_MB_EVENT_PROCEED) {
 		PMD_DRV_LOG(WARNING, "VF to PF message(%d) is not permitted!",
 			    opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
index 34c31a153a..29e4cae10c 100644
@@ -187,7 +187,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 	switch (pf_msg->event) {
 	case VIRTCHNL_EVENT_RESET_IMPENDING:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
 					      NULL);
 		break;
 	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -202,8 +202,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
 			vf->link_speed = iavf_convert_link_speed(speed);
 		}
 		iavf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 		break;
 	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
 		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
drivers/net/ice/ice_ethdev.c +2 -2
index c8b16c7f87..724b2ee26c 100644
@@ -1314,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)
 		case ice_aqc_opc_get_link_status:
 			ret = ice_link_update(dev, 0);
 			if (!ret)
-				_rte_eth_dev_callback_process
+				rte_eth_dev_callback_process
 					(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 			break;
 		default:
@@ -1379,7 +1379,7 @@ ice_interrupt_handler(void *param)
 		PMD_DRV_LOG(INFO, "OICR: link state change event");
 		ret = ice_link_update(dev, 0);
 		if (!ret)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 #endif
drivers/net/igc/igc_ethdev.c +1 -2
index aa37c11861..810568bc54 100644
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev)
 				pci_dev->addr.bus,
 				pci_dev->addr.devid,
 				pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 }
 
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
index 337ce90fbf..0f065bbc04 100644
@@ -4659,13 +4659,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)
 		ixgbe_dev_link_update(dev, 0);
 		intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;
 		ixgbe_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 	}
 
 	if (intr->flags & IXGBE_FLAG_MACSEC) {
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC, NULL);
 		intr->flags &= ~IXGBE_FLAG_MACSEC;
 	}
 
@@ -8674,8 +8672,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)
 		/* dummy mbx read to ack pf */
 		if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
 			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
 	}
 }
 
drivers/net/ixgbe/ixgbe_pf.c +2 -3
index 67b5bef44f..ed5f96b1a4 100644
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 		vfinfo[vf].clear_to_send = true;
 
 		/* notify application about VF reset */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
 					      &ret_param);
 		return ret;
 	}
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
 	 * if 0, do nothing and send ACK to VF
 	 * if ret_param.retval > 1, do nothing and send NAK to VF
 	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 
 	retval = ret_param.retval;
 
drivers/net/mlx4/mlx4_intr.c +5 -5
index 19af9359c9..6786b12ab5 100644
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)
 	MLX4_ASSERT(priv->intr_alarm == 1);
 	priv->intr_alarm = 0;
 	if (intr_conf->lsc && !mlx4_link_status_check(priv))
-		_rte_eth_dev_callback_process(ETH_DEV(priv),
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(ETH_DEV(priv),
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 }
 
 /**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv)
 	}
 	for (i = 0; i != RTE_DIM(caught); ++i)
 		if (caught[i])
-			_rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
-						      NULL);
+			rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
+						     NULL);
 }
 
 /**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
index 3d3dd2e862..7256c1bcfe 100644
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
 		dev = &rte_eth_devices[sh->port[i].ih_port_id];
 		MLX5_ASSERT(dev);
 		if (dev->data->dev_conf.intr_conf.rmv)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_RMV, NULL);
 	}
 }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)
 				usleep(0);
 				continue;
 			}
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 			continue;
 		}
drivers/net/mlx5/mlx5_flow.c +1 -1
index eb55bd7f99..55cdc37f00 100644
@@ -6085,7 +6085,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,
 		if (!MLX5_AGE_GET(age_info, MLX5_AGE_EVENT_NEW))
 			continue;
 		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER))
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
 				(&rte_eth_devices[sh->port[i].devx_ih_port_id],
 				RTE_ETH_EVENT_FLOW_AGED, NULL);
 		age_info->flags = 0;
drivers/net/netvsc/hn_rndis.c +1 -1
index d186ddeabd..66d1966f29 100644
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
  */
 static void hn_rndis_link_alarm(void *arg)
 {
-	_rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 void hn_rndis_link_status(struct rte_eth_dev *dev, const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
index c556dedab6..4f03691989 100644
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 
 	nfp_net_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	nfp_net_dev_link_status_print(dev);
 
drivers/net/octeontx/octeontx_ethdev.c +3 -3
index 76c69294d0..808b761b96 100644
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)
 			octeontx_link_status_update(nic, &link);
 			octeontx_link_status_print(dev, &link);
 			rte_eth_linkstatus_set(dev, &link);
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 		}
 	}
 
drivers/net/octeontx2/otx2_link.c +1 -1
index 12bf6c3231..439ec4fa89 100644
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,
 	rte_eth_linkstatus_set(eth_dev, &eth_link);
 
 	/* Set the flag and execute application callbacks */
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
drivers/net/qede/qede_main.c +1 -2
index 987a6f1e13..aecb98261b 100644
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)
 	struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;
 
 	if (!qede_link_update(dev, 0))
-		_rte_eth_dev_callback_process(dev,
-					      RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int qed_drain(struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
index 80feab68f8..da32d393c2 100644
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)
 		sfc_notice(sa, "link status change event: link %s",
 			 sa->eth_dev->data->dev_link.link_status ?
 			 "UP" : "DOWN");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 	}
 }
 
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg)
 exit:
 	if (lsc_seq != sa->port.lsc_seq) {
 		sfc_notice(sa, "link status change event");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 	}
 }
 
drivers/net/thunderx/nicvf_ethdev.c +3 -3
index 959c8e4ddc..83d9488360 100644
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)
 			nicvf_link_status_update(nic, &link);
 			rte_eth_linkstatus_set(dev, &link);
 
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 		}
 	}
 
drivers/net/vhost/rte_eth_vhost.c +3 -3
index fa365605ef..ce32be9ce3 100644
@@ -832,7 +832,7 @@ new_device(int vid)
 
 	VHOST_LOG(INFO, "Vhost device %d created\n", vid);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
 	return 0;
 }
@@ -889,7 +889,7 @@ destroy_device(int vid)
 	VHOST_LOG(INFO, "Vhost device %d destroyed\n", vid);
 	eth_vhost_uninstall_intr(eth_dev);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
 	VHOST_LOG(INFO, "vring%u is %s\n",
 			vring, enable ? "enabled" : "disabled");
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
 
 	return 0;
 }
drivers/net/virtio/virtio_ethdev.c +3 -3
index 4f2fa0d943..dac0f23052 100644
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)
 
 	if (isr & VIRTIO_PCI_ISR_CONFIG) {
 		if (virtio_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 
 		if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
 			vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
index 815fba2f55..fa80e75a5b 100644
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)
 	if (events & VMXNET3_ECR_LINK) {
 		PMD_DRV_LOG(DEBUG, "Process events: VMXNET3_ECR_LINK event");
 		if (vmxnet3_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 	}
 
 	/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
index f8d63c7e17..066751f287 100644
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
 	rte_eth_dev_shared_data_prepare();
 
 	if (eth_dev->state != RTE_ETH_DEV_UNUSED)
-		_rte_eth_dev_callback_process(eth_dev,
+		rte_eth_dev_callback_process(eth_dev,
 				RTE_ETH_EVENT_DESTROY, NULL);
 
 	rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
 }
 
 void
-_rte_eth_dev_reset(struct rte_eth_dev *dev)
+rte_eth_dev_internal_reset(struct rte_eth_dev *dev)
 {
 	if (dev->data->dev_started) {
 		RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
 }
 
 int
-_rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 	enum rte_eth_event_type event, void *ret_param)
 {
 	struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)
 	if (dev == NULL)
 		return;
 
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
 
 	dev->state = RTE_ETH_DEV_ATTACHED;
 }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
index 5dfe9fdf1a..23cc1e0959 100644
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
  *  void
  */
 __rte_internal
-void _rte_eth_dev_reset(struct rte_eth_dev *dev);
+void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);
 
 /**
  * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
  *  int
  */
 __rte_internal
-int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+int rte_eth_dev_callback_process(struct rte_eth_dev *dev,
 		enum rte_eth_event_type event, void *ret_param);
 
 /**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
index a85986a2a2..b6630dfabe 100644
@@ -228,17 +228,17 @@ EXPERIMENTAL {
 INTERNAL {
 	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
 	rte_eth_dev_allocate;
 	rte_eth_dev_allocated;
 	rte_eth_dev_attach_secondary;
+	rte_eth_dev_callback_process;
 	rte_eth_dev_create;
 	rte_eth_dev_destroy;
 	rte_eth_dev_is_rx_hairpin_queue;
 	rte_eth_dev_is_tx_hairpin_queue;
 	rte_eth_dev_probing_finish;
 	rte_eth_dev_release_port;
+	rte_eth_dev_internal_reset;
 	rte_eth_devargs_parse;
 	rte_eth_dma_zone_free;
 	rte_eth_dma_zone_reserve;
Signature · 1 line
2.26.2
Acked-by on v4 7/7
#40 lore raw

Re: [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API

Quoted 870 lines · Ferruh Yigit

'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.

For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.

---
v3:
* release note updated

---
  app/test/virtual_pmd.c                   |  4 ++--
  doc/guides/prog_guide/poll_mode_drv.rst  |  4 ++--
  doc/guides/rel_notes/release_20_11.rst   |  5 +++++
  drivers/net/atlantic/atl_ethdev.c        |  5 ++---
  drivers/net/bnxt/bnxt_ethdev.c           |  6 +++---
  drivers/net/bnxt/rte_pmd_bnxt.c          |  4 ++--
  drivers/net/bonding/rte_eth_bond_pmd.c   |  8 ++++----
  drivers/net/dpaa/dpaa_ethdev.c           |  2 +-
  drivers/net/dpaa2/dpaa2_ethdev.c         |  3 +--
  drivers/net/e1000/em_ethdev.c            |  2 +-
  drivers/net/e1000/igb_ethdev.c           |  7 +++----
  drivers/net/ena/ena_ethdev.c             |  4 ++--
  drivers/net/enic/enic_main.c             |  2 +-
  drivers/net/failsafe/failsafe_ether.c    |  6 +++---
  drivers/net/fm10k/fm10k_ethdev.c         | 11 ++++-------
  drivers/net/hinic/base/hinic_pmd_hwdev.c |  6 +++---
  drivers/net/i40e/i40e_ethdev.c           |  2 +-
  drivers/net/i40e/i40e_ethdev_vf.c        |  4 ++--
  drivers/net/i40e/i40e_pf.c               |  2 +-
  drivers/net/iavf/iavf_vchnl.c            |  5 ++---
  drivers/net/ice/ice_ethdev.c             |  4 ++--
  drivers/net/igc/igc_ethdev.c             |  3 +--
  drivers/net/ixgbe/ixgbe_ethdev.c         | 10 ++++------
  drivers/net/ixgbe/ixgbe_pf.c             |  5 ++---
  drivers/net/mlx4/mlx4_intr.c             | 10 +++++-----
  drivers/net/mlx5/linux/mlx5_ethdev_os.c  |  4 ++--
  drivers/net/mlx5/mlx5_flow.c             |  2 +-
  drivers/net/netvsc/hn_rndis.c            |  2 +-
  drivers/net/nfp/nfp_net.c                |  2 +-
  drivers/net/octeontx/octeontx_ethdev.c   |  6 +++---
  drivers/net/octeontx2/otx2_link.c        |  2 +-
  drivers/net/qede/qede_main.c             |  3 +--
  drivers/net/sfc/sfc_intr.c               | 12 ++++++------
  drivers/net/thunderx/nicvf_ethdev.c      |  6 +++---
  drivers/net/vhost/rte_eth_vhost.c        |  6 +++---
  drivers/net/virtio/virtio_ethdev.c       |  6 +++---
  drivers/net/vmxnet3/vmxnet3_ethdev.c     |  6 +++---
  lib/librte_ethdev/rte_ethdev.c           |  8 ++++----
  lib/librte_ethdev/rte_ethdev_driver.h    |  4 ++--
  lib/librte_ethdev/rte_ethdev_version.map |  4 ++--
  40 files changed, 95 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
index 79156cb85a..b49089a33c 100644
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id,
 
  	vrtl_eth_dev->data->dev_link.link_status = link_status;
 
-	_rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
-				      NULL);
+	rte_eth_dev_callback_process(vrtl_eth_dev, RTE_ETH_EVENT_INTR_LSC,
+				     NULL);
  }
 
  int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
index 6fae39f904..86e0a141e6 100644
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread.
  For example when PF is reset, the PF sends a message to notify VFs of
  this event and also trigger an interrupt to VFs. Then in the interrupt
  service routine the VFs detects this notification message and calls
-_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
+rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL).
  This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET
-event within VFs. The function _rte_eth_dev_callback_process() will
+event within VFs. The function rte_eth_dev_callback_process() will
  call the registered callback function. The callback function can trigger
  the application to handle all operations the VF reset requires including
  stopping Rx/Tx queues and calling rte_eth_dev_reset().
doc/guides/rel_notes/release_20_11.rst +5 -0
index f8c3521b3f..7ff6ac23b6 100644
@@ -86,6 +86,11 @@ API Changes
 
  * ``rte_eth_rx_descriptor_done()`` API has deprecated.
 
+* Renamed internal ethdev APIs:
+
+  * ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_process()``
+  * ``_rte_eth_dev_reset`` -> ``rte_eth_dev_internal_reset()``
+
 
  ABI Changes
  -----------
drivers/net/atlantic/atl_ethdev.c +2 -3
index 540b106045..2fca9140d7 100644
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
  	/* Notify userapp if link status changed */
  	if (!atl_dev_link_update(dev, 0)) {
  		atl_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev,
-			RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	} else {
  		if (hw->aq_fw_ops->send_macsec_req == NULL)
  			goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,
  		    resp.stats.egress_expired ||
  		    resp.stats.ingress_expired) {
  			PMD_DRV_LOG(INFO, "RTE_ETH_EVENT_MACSEC");
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
  				RTE_ETH_EVENT_MACSEC, NULL);
  		}
  	}
drivers/net/bnxt/bnxt_ethdev.c +3 -3
index 4d224bfa04..8c959ac913 100644
@@ -1528,9 +1528,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete,
  	new.link_speed != eth_dev->data->dev_link.link_speed) {
  		rte_eth_linkstatus_set(eth_dev, &new);
 
-		_rte_eth_dev_callback_process(eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
 
  		bnxt_print_link_info(eth_dev);
  	}
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
index eafc1d3868..d67db46c65 100644
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg)
  	ret_param.vf_id = vf_id;
  	ret_param.msg = msg;
 
-	_rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(bp->eth_dev, RTE_ETH_EVENT_VF_MBOX,
+				     &ret_param);
 
  	/* Default to approve */
  	if (ret_param.retval == RTE_PMD_BNXT_MB_EVENT_PROCEED)
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
index cdbd8151ed..4ffd2ca4bb 100644
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals,
  	internals->slave_count--;
 
  	/* force reconfiguration of slave interfaces */
-	_rte_eth_dev_reset(slave_eth_dev);
+	rte_eth_dev_internal_reset(slave_eth_dev);
  }
 
  static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)
  	if (arg == NULL)
  		return;
 
-	_rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
+	rte_eth_dev_callback_process((struct rte_eth_dev *)arg,
  			RTE_ETH_EVENT_INTR_LSC, NULL);
  }
 
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
  						bond_ethdev_delayed_lsc_propagation,
  						(void *)bonded_eth_dev);
  			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
  						RTE_ETH_EVENT_INTR_LSC,
  						NULL);
 
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type,
  						bond_ethdev_delayed_lsc_propagation,
  						(void *)bonded_eth_dev);
  			else
-				_rte_eth_dev_callback_process(bonded_eth_dev,
+				rte_eth_dev_callback_process(bonded_eth_dev,
  						RTE_ETH_EVENT_INTR_LSC,
  						NULL);
  		}
drivers/net/dpaa/dpaa_ethdev.c +1 -1
index e2c3fd0368..a077b98c3e 100644
@@ -335,7 +335,7 @@ static void dpaa_interrupt_handler(void *param)
  	if (bytes_read < 0)
  		DPAA_PMD_ERR("Error reading eventfd\n");
  	dpaa_eth_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  }
 
  static int dpaa_eth_dev_start(struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
index 38cf0ab71c..0e9f836e55 100644
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param)
  		clear = DPNI_IRQ_EVENT_LINK_CHANGED;
  		dpaa2_dev_link_update(dev, 0);
  		/* calling all the apps registered for link status event */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	}
  out:
  	ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
index 82766da882..1dc360713a 100644
@@ -1630,7 +1630,7 @@ eth_em_interrupt_handler(void *param)
 
  	eth_em_interrupt_get_status(dev);
  	eth_em_interrupt_action(dev, dev->intr_handle);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  }
 
  static int
drivers/net/e1000/igb_ethdev.c +3 -4
index fe0cea88c2..5ab74840aa 100644
@@ -2920,8 +2920,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev,
  			     pci_dev->addr.bus,
  			     pci_dev->addr.devid,
  			     pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	}
 
  	return 0;
@@ -2983,8 +2982,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)
  		/* dummy mbx read to ack pf */
  		if (mbx->ops.read(hw, &in_msg, 1, 0))
  			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
  	}
  }
 
drivers/net/ena/ena_ethdev.c +2 -2
index da8c8ad922..8077519735 100644
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,
 
  	if (unlikely(adapter->trigger_reset)) {
  		PMD_DRV_LOG(ERR, "Trigger reset is on\n");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
  			NULL);
  	}
  }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data,
  	adapter->link_status = status;
 
  	ena_link_update(eth_dev, 0);
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  }
 
  static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
index 7942b0df6b..8b0441c5cd 100644
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)
  	vnic_intr_return_all_credits(&enic->intr[ENICPMD_LSC_INTR_OFFSET]);
 
  	enic_link_update(dev);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	enic_log_q_error(enic);
  	/* Re-enable irq in case of INTx */
  	rte_intr_ack(&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
index 70972d6717..7c68bbdec0 100644
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused,
  	ret = dev->dev_ops->link_update(dev, 0);
  	/* We must pass on the LSC event */
  	if (ret)
-		return _rte_eth_dev_callback_process(dev,
-						     RTE_ETH_EVENT_INTR_LSC,
-						     NULL);
+		return rte_eth_dev_callback_process(dev,
+						    RTE_ETH_EVENT_INTR_LSC,
+						    NULL);
  	else
  		return 0;
  }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
index e6043e1455..5771d83b55 100644
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
  					true);
 
  			dev_info->sm_down = 0;
-			_rte_eth_dev_callback_process(dev,
+			rte_eth_dev_callback_process(dev,
  					RTE_ETH_EVENT_INTR_LSC,
  					NULL);
  		}
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)
  	if (err == FM10K_ERR_RESET_REQUESTED) {
  		PMD_INIT_LOG(INFO, "INT: Switch is down");
  		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	}
 
  	/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
 
  		/* Setting reset flag */
  		dev_info->sm_down = 1;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	}
 
  	if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)
  		fm10k_vlan_filter_set(dev, hw->mac.default_vid, true);
 
  		dev_info->sm_down = 0;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	}
 
  	/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
index ac2a72e388..41c99bdbf8 100644
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev,
  	ret = hinic_link_event_process(hwdev, rte_dev, status);
  	/* check if link has changed, notify callback */
  	if (ret == 0)
-		_rte_eth_dev_callback_process(rte_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(rte_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
  }
 
  void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
index 80efd06cd9..563f21d9df 100644
@@ -6846,7 +6846,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)
  		case i40e_aqc_opc_get_link_status:
  			ret = i40e_dev_link_update(dev, 0);
  			if (!ret)
-				_rte_eth_dev_callback_process(dev,
+				rte_eth_dev_callback_process(dev,
  					RTE_ETH_EVENT_INTR_LSC, NULL);
  			break;
  		default:
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
index be4b28fa45..8531cf6b12 100644
@@ -1378,7 +1378,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
  	switch (pf_msg->event) {
  	case VIRTCHNL_EVENT_RESET_IMPENDING:
  		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev,
+		rte_eth_dev_callback_process(dev,
  				RTE_ETH_EVENT_INTR_RESET, NULL);
  		break;
  	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -1425,7 +1425,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,
  		}
 
  		i40evf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev,
+		rte_eth_dev_callback_process(dev,
  				RTE_ETH_EVENT_INTR_LSC, NULL);
  		break;
  	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
drivers/net/i40e/i40e_pf.c +1 -1
index 7bf1e79410..03c2070c3f 100644
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,
  	 * do nothing and send not_supported to VF. As PF must send a response
  	 * to VF and ACK/NACK is not defined.
  	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
  	if (ret_param.retval != RTE_PMD_I40E_MB_EVENT_PROCEED) {
  		PMD_DRV_LOG(WARNING, "VF to PF message(%d) is not permitted!",
  			    opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
index 34c31a153a..29e4cae10c 100644
@@ -187,7 +187,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
  	switch (pf_msg->event) {
  	case VIRTCHNL_EVENT_RESET_IMPENDING:
  		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_RESET_IMPENDING event");
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
  					      NULL);
  		break;
  	case VIRTCHNL_EVENT_LINK_CHANGE:
@@ -202,8 +202,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,
  			vf->link_speed = iavf_convert_link_speed(speed);
  		}
  		iavf_dev_link_update(dev, 0);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  		break;
  	case VIRTCHNL_EVENT_PF_DRIVER_CLOSE:
  		PMD_DRV_LOG(DEBUG, "VIRTCHNL_EVENT_PF_DRIVER_CLOSE event");
drivers/net/ice/ice_ethdev.c +2 -2
index c8b16c7f87..724b2ee26c 100644
@@ -1314,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)
  		case ice_aqc_opc_get_link_status:
  			ret = ice_link_update(dev, 0);
  			if (!ret)
-				_rte_eth_dev_callback_process
+				rte_eth_dev_callback_process
  					(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  			break;
  		default:
@@ -1379,7 +1379,7 @@ ice_interrupt_handler(void *param)
  		PMD_DRV_LOG(INFO, "OICR: link state change event");
  		ret = ice_link_update(dev, 0);
  		if (!ret)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
  				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	}
  #endif
drivers/net/igc/igc_ethdev.c +1 -2
index aa37c11861..810568bc54 100644
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev)
  				pci_dev->addr.bus,
  				pci_dev->addr.devid,
  				pci_dev->addr.function);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-				NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	}
  }
 
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
index 337ce90fbf..0f065bbc04 100644
@@ -4659,13 +4659,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)
  		ixgbe_dev_link_update(dev, 0);
  		intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE;
  		ixgbe_dev_link_status_print(dev);
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  	}
 
  	if (intr->flags & IXGBE_FLAG_MACSEC) {
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_MACSEC, NULL);
  		intr->flags &= ~IXGBE_FLAG_MACSEC;
  	}
 
@@ -8674,8 +8672,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)
  		/* dummy mbx read to ack pf */
  		if (ixgbe_read_mbx(hw, &in_msg, 1, 0))
  			return;
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
-					      NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET,
+					     NULL);
  	}
  }
 
drivers/net/ixgbe/ixgbe_pf.c +2 -3
index 67b5bef44f..ed5f96b1a4 100644
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
  		vfinfo[vf].clear_to_send = true;
 
  		/* notify application about VF reset */
-		_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
  					      &ret_param);
  		return ret;
  	}
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)
  	 * if 0, do nothing and send ACK to VF
  	 * if ret_param.retval > 1, do nothing and send NAK to VF
  	 */
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX,
-				      &ret_param);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_VF_MBOX, &ret_param);
 
  	retval = ret_param.retval;
 
drivers/net/mlx4/mlx4_intr.c +5 -5
index 19af9359c9..6786b12ab5 100644
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)
  	MLX4_ASSERT(priv->intr_alarm == 1);
  	priv->intr_alarm = 0;
  	if (intr_conf->lsc && !mlx4_link_status_check(priv))
-		_rte_eth_dev_callback_process(ETH_DEV(priv),
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(ETH_DEV(priv),
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
  }
 
  /**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv)
  	}
  	for (i = 0; i != RTE_DIM(caught); ++i)
  		if (caught[i])
-			_rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
-						      NULL);
+			rte_eth_dev_callback_process(ETH_DEV(priv), type[i],
+						     NULL);
  }
 
  /**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
index 3d3dd2e862..7256c1bcfe 100644
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh)
  		dev = &rte_eth_devices[sh->port[i].ih_port_id];
  		MLX5_ASSERT(dev);
  		if (dev->data->dev_conf.intr_conf.rmv)
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
  				(dev, RTE_ETH_EVENT_INTR_RMV, NULL);
  	}
  }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)
  				usleep(0);
  				continue;
  			}
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
  				(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  			continue;
  		}
drivers/net/mlx5/mlx5_flow.c +1 -1
index eb55bd7f99..55cdc37f00 100644
@@ -6085,7 +6085,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,
  		if (!MLX5_AGE_GET(age_info, MLX5_AGE_EVENT_NEW))
  			continue;
  		if (MLX5_AGE_GET(age_info, MLX5_AGE_TRIGGER))
-			_rte_eth_dev_callback_process
+			rte_eth_dev_callback_process
  				(&rte_eth_devices[sh->port[i].devx_ih_port_id],
  				RTE_ETH_EVENT_FLOW_AGED, NULL);
  		age_info->flags = 0;
drivers/net/netvsc/hn_rndis.c +1 -1
index d186ddeabd..66d1966f29 100644
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,
   */
  static void hn_rndis_link_alarm(void *arg)
  {
-	_rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(arg, RTE_ETH_EVENT_INTR_LSC, NULL);
  }
 
  void hn_rndis_link_status(struct rte_eth_dev *dev, const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
index c556dedab6..4f03691989 100644
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)
  	struct rte_eth_dev *dev = (struct rte_eth_dev *)param;
 
  	nfp_net_link_update(dev, 0);
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
  	nfp_net_dev_link_status_print(dev);
 
drivers/net/octeontx/octeontx_ethdev.c +3 -3
index 76c69294d0..808b761b96 100644
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)
  			octeontx_link_status_update(nic, &link);
  			octeontx_link_status_print(dev, &link);
  			rte_eth_linkstatus_set(dev, &link);
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
  		}
  	}
 
drivers/net/octeontx2/otx2_link.c +1 -1
index 12bf6c3231..439ec4fa89 100644
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,
  	rte_eth_linkstatus_set(eth_dev, &eth_link);
 
  	/* Set the flag and execute application callbacks */
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  }
 
  static int
drivers/net/qede/qede_main.c +1 -2
index 987a6f1e13..aecb98261b 100644
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)
  	struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;
 
  	if (!qede_link_update(dev, 0))
-		_rte_eth_dev_callback_process(dev,
-					      RTE_ETH_EVENT_INTR_LSC, NULL);
+		rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  }
 
  static int qed_drain(struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
index 80feab68f8..da32d393c2 100644
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)
  		sfc_notice(sa, "link status change event: link %s",
  			 sa->eth_dev->data->dev_link.link_status ?
  			 "UP" : "DOWN");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
  	}
  }
 
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg)
  exit:
  	if (lsc_seq != sa->port.lsc_seq) {
  		sfc_notice(sa, "link status change event");
-		_rte_eth_dev_callback_process(sa->eth_dev,
-					      RTE_ETH_EVENT_INTR_LSC,
-					      NULL);
+		rte_eth_dev_callback_process(sa->eth_dev,
+					     RTE_ETH_EVENT_INTR_LSC,
+					     NULL);
  	}
  }
 
drivers/net/thunderx/nicvf_ethdev.c +3 -3
index 959c8e4ddc..83d9488360 100644
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)
  			nicvf_link_status_update(nic, &link);
  			rte_eth_linkstatus_set(dev, &link);
 
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
  		}
  	}
 
drivers/net/vhost/rte_eth_vhost.c +3 -3
index fa365605ef..ce32be9ce3 100644
@@ -832,7 +832,7 @@ new_device(int vid)
 
  	VHOST_LOG(INFO, "Vhost device %d created\n", vid);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 
  	return 0;
  }
@@ -889,7 +889,7 @@ destroy_device(int vid)
  	VHOST_LOG(INFO, "Vhost device %d destroyed\n", vid);
  	eth_vhost_uninstall_intr(eth_dev);
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_INTR_LSC, NULL);
  }
 
  static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)
  	VHOST_LOG(INFO, "vring%u is %s\n",
  			vring, enable ? "enabled" : "disabled");
 
-	_rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
+	rte_eth_dev_callback_process(eth_dev, RTE_ETH_EVENT_QUEUE_STATE, NULL);
 
  	return 0;
  }
drivers/net/virtio/virtio_ethdev.c +3 -3
index 4f2fa0d943..dac0f23052 100644
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)
 
  	if (isr & VIRTIO_PCI_ISR_CONFIG) {
  		if (virtio_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
 
  		if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) {
  			vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
index 815fba2f55..fa80e75a5b 100644
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)
  	if (events & VMXNET3_ECR_LINK) {
  		PMD_DRV_LOG(DEBUG, "Process events: VMXNET3_ECR_LINK event");
  		if (vmxnet3_dev_link_update(dev, 0) == 0)
-			_rte_eth_dev_callback_process(dev,
-						      RTE_ETH_EVENT_INTR_LSC,
-						      NULL);
+			rte_eth_dev_callback_process(dev,
+						     RTE_ETH_EVENT_INTR_LSC,
+						     NULL);
  	}
 
  	/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
index f8d63c7e17..066751f287 100644
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)
  	rte_eth_dev_shared_data_prepare();
 
  	if (eth_dev->state != RTE_ETH_DEV_UNUSED)
-		_rte_eth_dev_callback_process(eth_dev,
+		rte_eth_dev_callback_process(eth_dev,
  				RTE_ETH_EVENT_DESTROY, NULL);
 
  	rte_spinlock_lock(&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q,
  }
 
  void
-_rte_eth_dev_reset(struct rte_eth_dev *dev)
+rte_eth_dev_internal_reset(struct rte_eth_dev *dev)
  {
  	if (dev->data->dev_started) {
  		RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id,
  }
 
  int
-_rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  	enum rte_eth_event_type event, void *ret_param)
  {
  	struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)
  	if (dev == NULL)
  		return;
 
-	_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
+	rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_NEW, NULL);
 
  	dev->state = RTE_ETH_DEV_ATTACHED;
  }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
index 5dfe9fdf1a..23cc1e0959 100644
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);
   *  void
   */
  __rte_internal
-void _rte_eth_dev_reset(struct rte_eth_dev *dev);
+void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);
 
  /**
   * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);
   *  int
   */
  __rte_internal
-int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,
+int rte_eth_dev_callback_process(struct rte_eth_dev *dev,
  		enum rte_eth_event_type event, void *ret_param);
 
  /**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
index a85986a2a2..b6630dfabe 100644
@@ -228,17 +228,17 @@ EXPERIMENTAL {
  INTERNAL {
  	global:
 
-	_rte_eth_dev_callback_process;
-	_rte_eth_dev_reset;
  	rte_eth_dev_allocate;
  	rte_eth_dev_allocated;
  	rte_eth_dev_attach_secondary;
+	rte_eth_dev_callback_process;
  	rte_eth_dev_create;
  	rte_eth_dev_destroy;
  	rte_eth_dev_is_rx_hairpin_queue;
  	rte_eth_dev_is_tx_hairpin_queue;
  	rte_eth_dev_probing_finish;
  	rte_eth_dev_release_port;
+	rte_eth_dev_internal_reset;
  	rte_eth_devargs_parse;
  	rte_eth_dma_zone_free;
  	rte_eth_dma_zone_reserve;
#41 lore raw

Re: [dpdk-dev] [PATCH v4 1/7] ethdev: deprecate descriptor status check API

In reply to Ferruh Yigit
Quoted 9 lines · Ferruh Yigit

Marking 'rte_eth_rx_descriptor_done()' API as deprecated. ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.

Plan is to remove the API on 21.11 release.

Series applied to dpdk-next-net/main, thanks.

#42 lore raw

v3 cover cppcheck

In reply to Ferruh Yigit

Fix a few of issues identified by cppcheck. There are more to address, cppcheck can be run as:
"cppcheck --enable=all --force ."

These are very trivial issues, I think can be postponed to next release.

Ferruh Yigit (10):
app/procinfo: fix redundant condition app/procinfo: fix negative check on unsigned variable app/procinfo: remove suspicious sizeof app/procinfo: remove useless assignment net/pcap: remove local variable shadowing outer one net/bonding: remove local variable shadowing outer one net/af_xdp: remove useless assignment net/bnxt: fix redundant return app/crypto-perf: remove always true condition net/avp: remove always true condition

 app/proc-info/main.c                      | 16 +++++-----------
 app/test-crypto-perf/main.c               |  4 ++--
 drivers/net/af_xdp/rte_eth_af_xdp.c       |  1 -
 drivers/net/avp/avp_ethdev.c              |  2 +-
 drivers/net/bnxt/tf_core/tf_em_common.c   |  1 -
 drivers/net/bonding/rte_eth_bond_8023ad.c |  6 ++----
 drivers/net/pcap/rte_eth_pcap.c           |  5 ++---
 7 files changed, 12 insertions(+), 23 deletions(-)
Signature · 1 line
2.26.2