DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API
@ 2020-08-24  9:40 Ferruh Yigit
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations Ferruh Yigit
                   ` (10 more replies)
  0 siblings, 11 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-08-24  9:40 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Ray Kinsella, Neil Horman,
	Wei Zhao, Jeff Guo, John Daley, Hyong Youb Kim, Qi Zhang,
	Xiao Wang, Beilei Xing, Jerin Jacob, Nithin Dabilpuram,
	Kiran Kumar K, Andrew Rybchenko, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Thomas Monjalon
  Cc: 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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 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(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index edd21c4d8e..701c592b26 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -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:
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 345c38d5b6..811eaad6ce 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h
index 1e41ae9de1..dce365226b 100644
--- a/drivers/net/e1000/e1000_ethdev.h
+++ b/drivers/net/e1000/e1000_ethdev.h
@@ -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);
 
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 902b1cdca0..32872db9c2 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 67a271e8ce..2ffc31b41d 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index a5551e8175..aec79c6ceb 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index dd520cd82c..d313893c3a 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index ca75919ee2..1316c5c739 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -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,
diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h
index 916b856acc..2e47ada829 100644
--- a/drivers/net/fm10k/fm10k.h
+++ b/drivers/net/fm10k/fm10k.h
@@ -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);
 
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index b574693bca..092eade547 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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,
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 4accaa2cd6..399bb3da19 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 11c02b1888..f8ed4a0b36 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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,
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 69cab8e739..a3d19fc1d7 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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,
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index fe7f9200c1..645fbf401c 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 57d7b4160b..925f3d853d 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -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);
 
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 6ab3ee909d..ace6b3fb3d 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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,
diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c
index 4654ec41f0..f3962533d5 100644
--- a/drivers/net/igc/igc_txrx.c
+++ b/drivers/net/igc/igc_txrx.c
@@ -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;
diff --git a/drivers/net/igc/igc_txrx.h b/drivers/net/igc/igc_txrx.h
index f2b2d75bbc..d6f3799639 100644
--- a/drivers/net/igc/igc_txrx.h
+++ b/drivers/net/igc/igc_txrx.h
@@ -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);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fd0cb9b0e2..f536ca61cf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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,
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 9bdef87fbd..b0e2b2452f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -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);
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 977ecf5137..5254fe3738 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 33b72bd4db..b5d25fe68e 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -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,
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index e9efe52bb0..10bcd1b6a4 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -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);
 
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index faecf216c1..6c6a4f35e9 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -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)
 {
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index acee3e48e4..65e0ff7d48 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -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,
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index dc0093bdf0..8658b6f2f0 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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 */
diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index b7d52d497f..c93f320f83 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -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,
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index f915b8a2c9..043788876e 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -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)
 {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 70295d7ab7..b52b04f7e0 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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. */
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 32407dd418..292a6423c4 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -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;
-- 
2.25.4


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

* [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
@ 2020-08-24  9:40 ` Ferruh Yigit
  2020-08-29 11:57   ` Andrew Rybchenko
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 3/7] ethdev: make device operations struct private Ferruh Yigit
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-08-24  9:40 UTC (permalink / raw)
  To: dev, Shepard Siegel, Ed Czeck, John Miller, Igor Russkikh,
	Pavel Belous, Somalapuram Amaranath, Ajit Khaparde,
	Somnath Kotur, Hemant Agrawal, Sachin Saxena, Wei Zhao, Jeff Guo,
	John Daley, Hyong Youb Kim, Qi Zhang, Xiao Wang, Beilei Xing,
	Jingjing Wu, Qiming Yang, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Long Li, Heinrich Kuhn, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Thomas Monjalon
  Cc: 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;

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 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(-)

diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd8677..ce7f6e4803 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -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) {
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index d3b00ab295..540b106045 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -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;
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 0c25739f82..02ceb95754 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -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.
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 510a0d9e0a..f94dd88b8c 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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;
 
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index c15e2b5462..bfc6504139 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -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;
 
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 02c254846c..38cf0ab71c 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 32872db9c2..66c5022bb7 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index aec79c6ceb..2db04fa88c 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 1316c5c739..2cffa3aa2d 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -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;
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 092eade547..20d48c30ea 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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;
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f8ed4a0b36..ad5a536d73 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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;
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index a3d19fc1d7..1b4ffaa383 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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;
 
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index c3aa4cd725..e7e8cccd85 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 8d435e8892..613b6638ad 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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;
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index ace6b3fb3d..1fdbfcb60d 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f536ca61cf..ac1dc7841d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
 
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 69123e12c3..d07f55cb49 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -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,
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 71501730b5..226b7bfd23 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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;
 }
 
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index fd91c0e491..229c1b9149 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -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;
 
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 99946279db..c556dedab6 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -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;
 
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index b5d25fe68e..98f360f1b4 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -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) {
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 70d48e48ef..59f1746ee9 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -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;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 65e0ff7d48..0b06bf91a0 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -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;
 
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index d955a7ee23..959c8e4ddc 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -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) {
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index e55278af69..fa365605ef 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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;
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index b52b04f7e0..2ce186610b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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);
 }
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 292a6423c4..275d51006b 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -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
-- 
2.25.4


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

* [dpdk-dev] [PATCH 3/7] ethdev: make device operations struct private
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations Ferruh Yigit
@ 2020-08-24  9:40 ` Ferruh Yigit
  2020-08-29 12:03   ` Andrew Rybchenko
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions Ferruh Yigit
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-08-24  9:40 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Beilei Xing, Jeff Guo, Wei Zhao, Thomas Monjalon,
	Andrew Rybchenko, Ori Kam, Cristian Dumitrescu
  Cc: Ferruh Yigit

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 811eaad6ce..d40b95bfa9 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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,
diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 083bc1a5f3..f09d4d8798 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -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"
diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c
index dbbef294ae..edb5d43846 100644
--- a/drivers/net/ixgbe/ixgbe_vf_representor.c
+++ b/drivers/net/ixgbe/ixgbe_vf_representor.c
@@ -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"
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 275d51006b..0a2a43803f 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -21,319 +21,8 @@ struct rte_eth_dev_callback;
 /** @internal Structure to keep track of registered callbacks */
 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
 
-/*
- * Definitions of all functions exported by an Ethernet driver through the
- * the generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
- * structure associated with an Ethernet device.
- */
 struct rte_eth_dev;
 
-typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);
-/**< @internal Ethernet device configuration. */
-
-typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to start a configured Ethernet device. */
-
-typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to stop a configured Ethernet device. */
-
-typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to link up a configured Ethernet device. */
-
-typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to link down a configured Ethernet device. */
-
-typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to close a configured Ethernet device. */
-
-typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
-/** <@internal Function used to reset a configured Ethernet device. */
-
-typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to detect an Ethernet device removal. */
-
-/**
- * @internal
- * Function used to enable the Rx promiscuous mode of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, promiscuous mode is enabled.
- * @retval -ENOTSUP
- *   Promiscuous mode is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to enable promiscuos mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to enable promiscuous mode.
- */
-typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Function used to disable the Rx promiscuous mode of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, promiscuous mode is disabled.
- * @retval -ENOTSUP
- *   Promiscuous mode disabling is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to disable promiscuos mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to disable promiscuous mode.
- */
-typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Enable the receipt of all multicast packets by an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, all-multicast mode is enabled.
- * @retval -ENOTSUP
- *   All-multicast mode is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to enable all-multicast mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to enable all-multicast mode.
- */
-typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Disable the receipt of all multicast packets by an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, all-multicast mode is disabled.
- * @retval -ENOTSUP
- *   All-multicast mode disabling is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to disable all-multicast mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to disable all-multicast mode.
- */
-typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
-				int wait_to_complete);
-/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
-
-typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
-				struct rte_eth_stats *igb_stats);
-/**< @internal Get global I/O statistics of an Ethernet device. */
-
-/**
- * @internal
- * Reset global I/O statistics of an Ethernet device to 0.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, statistics has been reset.
- * @retval -ENOTSUP
- *   Resetting statistics is not supported.
- * @retval -EINVAL
- *   Resetting statistics is not valid.
- * @retval -ENOMEM
- *   Not enough memory to get the stats.
- */
-typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat *stats, unsigned n);
-/**< @internal Get extended stats of an Ethernet device. */
-
-typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
-				      const uint64_t *ids,
-				      uint64_t *values,
-				      unsigned int n);
-/**< @internal Get extended stats of an Ethernet device. */
-
-/**
- * @internal
- * Reset extended stats of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, statistics has been reset.
- * @retval -ENOTSUP
- *   Resetting statistics is not supported.
- * @retval -EINVAL
- *   Resetting statistics is not valid.
- * @retval -ENOMEM
- *   Not enough memory to get the stats.
- */
-typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat_name *xstats_names, unsigned size);
-/**< @internal Get names of extended stats of an Ethernet device. */
-
-typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
-	unsigned int size);
-/**< @internal Get names of extended stats of an Ethernet device. */
-
-typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
-					     uint16_t queue_id,
-					     uint8_t stat_idx,
-					     uint8_t is_rx);
-/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
-
-typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
-				   struct rte_eth_dev_info *dev_info);
-/**< @internal Get specific information of an Ethernet device. */
-
-typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
-/**< @internal Get supported ptypes of an Ethernet device. */
-
-/**
- * @internal
- * Inform Ethernet device about reduced range of packet types to handle.
- *
- * @param dev
- *   The Ethernet device identifier.
- * @param ptype_mask
- *   The ptype family that application is interested in should be bitwise OR of
- *   RTE_PTYPE_*_MASK or 0.
- * @return
- *   - (0) if Success.
- */
-typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
-				     uint32_t ptype_mask);
-
-typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
-				    uint16_t queue_id);
-/**< @internal Start rx and tx of a queue of an Ethernet device. */
-
-typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
-				    uint16_t queue_id);
-/**< @internal Stop rx and tx of a queue of an Ethernet device. */
-
-typedef int (*eth_rx_queue_setup_t)(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,
-				    struct rte_mempool *mb_pool);
-/**< @internal Set up a receive queue of an Ethernet device. */
-
-typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
-				    uint16_t tx_queue_id,
-				    uint16_t nb_tx_desc,
-				    unsigned int socket_id,
-				    const struct rte_eth_txconf *tx_conf);
-/**< @internal Setup a transmit queue of an Ethernet device. */
-
-typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
-				    uint16_t rx_queue_id);
-/**< @internal Enable interrupt of a receive queue of an Ethernet device. */
-
-typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
-				    uint16_t rx_queue_id);
-/**< @internal Disable interrupt of a receive queue of an Ethernet device. */
-
-typedef void (*eth_queue_release_t)(void *queue);
-/**< @internal Release memory resources allocated by given RX/TX queue. */
-
-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_status_t)(void *rxq, uint16_t offset);
-/**< @internal Check the status of a Rx descriptor */
-
-typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
-/**< @internal Check the status of a Tx descriptor */
-
-typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
-				     char *fw_version, size_t fw_size);
-/**< @internal Get firmware information of an Ethernet device. */
-
-typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
-/**< @internal Force mbufs to be from TX ring. */
-
-typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
-	uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
-
-typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
-	uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
-
-typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
-	uint16_t queue_id, struct rte_eth_burst_mode *mode);
-
-typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
-/**< @internal Set MTU. */
-
-typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
-				  uint16_t vlan_id,
-				  int on);
-/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
-
-typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
-			       enum rte_vlan_type type, uint16_t tpid);
-/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
-
-typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
-/**< @internal set VLAN offload function by an Ethernet device. */
-
-typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
-			       uint16_t vlan_id,
-			       int on);
-/**< @internal set port based TX VLAN insertion by an Ethernet device. */
-
-typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
-				  uint16_t rx_queue_id,
-				  int on);
-/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
-
 typedef uint16_t (*eth_rx_burst_t)(void *rxq,
 				   struct rte_mbuf **rx_pkts,
 				   uint16_t nb_pkts);
@@ -349,400 +38,17 @@ typedef uint16_t (*eth_tx_prep_t)(void *txq,
 				   uint16_t nb_pkts);
 /**< @internal Prepare output packets on a transmit queue of an Ethernet device. */
 
-typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
-			       struct rte_eth_fc_conf *fc_conf);
-/**< @internal Get current flow control parameter on an Ethernet device */
 
-typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
-			       struct rte_eth_fc_conf *fc_conf);
-/**< @internal Setup flow control parameter on an Ethernet device */
-
-typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
-				struct rte_eth_pfc_conf *pfc_conf);
-/**< @internal Setup priority flow control parameter on an Ethernet device */
-
-typedef int (*reta_update_t)(struct rte_eth_dev *dev,
-			     struct rte_eth_rss_reta_entry64 *reta_conf,
-			     uint16_t reta_size);
-/**< @internal Update RSS redirection table on an Ethernet device */
-
-typedef int (*reta_query_t)(struct rte_eth_dev *dev,
-			    struct rte_eth_rss_reta_entry64 *reta_conf,
-			    uint16_t reta_size);
-/**< @internal Query RSS redirection table on an Ethernet device */
-
-typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
-				 struct rte_eth_rss_conf *rss_conf);
-/**< @internal Update RSS hash configuration of an Ethernet device */
-
-typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
-				   struct rte_eth_rss_conf *rss_conf);
-/**< @internal Get current RSS hash configuration of an Ethernet device */
-
-typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
-/**< @internal Turn on SW controllable LED on an Ethernet device */
-
-typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
-/**< @internal Turn off SW controllable LED on an Ethernet device */
-
-typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
-/**< @internal Remove MAC address from receive address register */
-
-typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr,
-				  uint32_t index,
-				  uint32_t vmdq);
-/**< @internal Set a MAC address into Receive Address Address Register */
-
-typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr);
-/**< @internal Set a MAC address into Receive Address Address Register */
-
-typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr,
-				  uint8_t on);
-/**< @internal Set a Unicast Hash bitmap */
-
-typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
-				  uint8_t on);
-/**< @internal Set all Unicast Hash bitmap */
-
-typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
-				uint16_t queue_idx,
-				uint16_t tx_rate);
-/**< @internal Set queue TX rate */
-
-typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
-				  struct rte_eth_mirror_conf *mirror_conf,
-				  uint8_t rule_id,
-				  uint8_t on);
-/**< @internal Add a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
-				  uint8_t rule_id);
-/**< @internal Remove a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
-					 struct rte_eth_udp_tunnel *tunnel_udp);
-/**< @internal Add tunneling UDP port */
-
-typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
-					 struct rte_eth_udp_tunnel *tunnel_udp);
-/**< @internal Delete tunneling UDP port */
-
-typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
-				      struct rte_ether_addr *mc_addr_set,
-				      uint32_t nb_mc_addr);
-/**< @internal set the list of multicast addresses on an Ethernet device */
-
-typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
-
-typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
-
-typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
-						struct timespec *timestamp,
-						uint32_t flags);
-/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
-
-typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
-						struct timespec *timestamp);
-/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
-
-typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
-/**< @internal Function used to adjust the device clock */
-
-typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
-				      struct timespec *timestamp);
-/**< @internal Function used to get time from the device clock. */
-
-typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
-				       const struct timespec *timestamp);
-/**< @internal Function used to get time from the device clock */
-
-typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
-				      uint64_t *timestamp);
-/**< @internal Function used to get the current value of the device clock. */
-
-typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
-				struct rte_dev_reg_info *info);
-/**< @internal Retrieve registers  */
-
-typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
-/**< @internal Retrieve eeprom size  */
-
-typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
-				struct rte_dev_eeprom_info *info);
-/**< @internal Retrieve eeprom data  */
-
-typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
-				struct rte_dev_eeprom_info *info);
-/**< @internal Program eeprom data  */
-
-typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
-				     struct rte_eth_dev_module_info *modinfo);
-/**< @internal Retrieve type and size of plugin module eeprom */
-
-typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
-				       struct rte_dev_eeprom_info *info);
-/**< @internal Retrieve plugin module eeprom data */
-
-typedef int (*eth_l2_tunnel_eth_type_conf_t)
-	(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
-/**< @internal config l2 tunnel ether type */
-
-typedef int (*eth_l2_tunnel_offload_set_t)
-	(struct rte_eth_dev *dev,
-	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
-	 uint32_t mask,
-	 uint8_t en);
-/**< @internal enable/disable the l2 tunnel offload functions */
-
-
-typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
-				 enum rte_filter_type filter_type,
-				 enum rte_filter_op filter_op,
-				 void *arg);
-/**< @internal Take operations to assigned filter type on an Ethernet device */
-
-typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
-/**< @internal Get Traffic Management (TM) operations on an Ethernet device */
-
-typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
-/**< @internal Get Traffic Metering and Policing (MTR) operations */
-
-typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
-				 struct rte_eth_dcb_info *dcb_info);
-/**< @internal Get dcb information on an Ethernet device */
-
-typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
-						const char *pool);
-/**< @internal Test if a port supports specific mempool ops */
-
-/**
- * @internal
- * Get the hairpin capabilities.
- *
- * @param dev
- *   ethdev handle of port.
- * @param cap
- *   returns the hairpin capabilities from the device.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- */
-typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
-				     struct rte_eth_hairpin_cap *cap);
-
-/**
- * @internal
- * Setup RX hairpin queue.
- *
- * @param dev
- *   ethdev handle of port.
- * @param rx_queue_id
- *   the selected RX queue index.
- * @param nb_rx_desc
- *   the requested number of descriptors for this queue. 0 - use PMD default.
- * @param conf
- *   the RX hairpin configuration structure.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- * @retval -EINVAL
- *   One of the parameters is invalid.
- * @retval -ENOMEM
- *   Unable to allocate resources.
- */
-typedef int (*eth_rx_hairpin_queue_setup_t)
-	(struct rte_eth_dev *dev, uint16_t rx_queue_id,
-	 uint16_t nb_rx_desc,
-	 const struct rte_eth_hairpin_conf *conf);
-
-/**
- * @internal
- * Setup TX hairpin queue.
- *
- * @param dev
- *   ethdev handle of port.
- * @param tx_queue_id
- *   the selected TX queue index.
- * @param nb_tx_desc
- *   the requested number of descriptors for this queue. 0 - use PMD default.
- * @param conf
- *   the TX hairpin configuration structure.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- * @retval -EINVAL
- *   One of the parameters is invalid.
- * @retval -ENOMEM
- *   Unable to allocate resources.
- */
-typedef int (*eth_tx_hairpin_queue_setup_t)
-	(struct rte_eth_dev *dev, uint16_t tx_queue_id,
-	 uint16_t nb_tx_desc,
-	 const struct rte_eth_hairpin_conf *hairpin_conf);
-
-/**
- * @internal A structure containing the functions exported by an Ethernet driver.
- */
-struct eth_dev_ops {
-	eth_dev_configure_t        dev_configure; /**< Configure device. */
-	eth_dev_start_t            dev_start;     /**< Start device. */
-	eth_dev_stop_t             dev_stop;      /**< Stop device. */
-	eth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */
-	eth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */
-	eth_dev_close_t            dev_close;     /**< Close device. */
-	eth_dev_reset_t		   dev_reset;	  /**< Reset device. */
-	eth_link_update_t          link_update;   /**< Get device link state. */
-	eth_is_removed_t           is_removed;
-	/**< Check if the device was physically removed. */
-
-	eth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */
-	eth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */
-	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
-	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
-	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
-	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
-	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
-	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
-	mtu_set_t                  mtu_set;       /**< Set MTU. */
-
-	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
-	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
-	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
-	eth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */
-	eth_xstats_get_names_t     xstats_get_names;
-	/**< Get names of extended statistics. */
-	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
-	/**< Configure per queue stat counter mapping. */
-
-	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
-	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
-	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
-	eth_burst_mode_get_t       rx_burst_mode_get; /**< Get RX burst mode */
-	eth_burst_mode_get_t       tx_burst_mode_get; /**< Get TX burst mode */
-	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
-	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
-	/**< Get packet types supported and identified by device. */
-	eth_dev_ptypes_set_t dev_ptypes_set;
-	/**< Inform Ethernet device about reduced range of packet types to handle. */
-
-	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
-	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
-	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
-	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
-	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
-
-	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
-	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
-	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
-	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. */
-	/*
-	 * Static inline functions use functions ABOVE this comment.
-	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
-	 */
-	eth_rx_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
-	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
-	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
-	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
-	eth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */
-
-	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
-	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
-
-	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
-	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
-	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
-
-	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
-	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
-
-	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
-	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
-
-	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
-	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
-	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
-	/** Config ether type of l2 tunnel. */
-	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
-	/** Enable/disable l2 tunnel offload functions. */
-
-	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
-
-	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
-	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
-	reta_update_t              reta_update;   /** Update redirection table. */
-	reta_query_t               reta_query;    /** Query redirection table. */
-
-	eth_get_reg_t              get_reg;           /**< Get registers. */
-	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
-	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
-	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
-
-	eth_get_module_info_t      get_module_info;
-	/** Get plugin module eeprom attribute. */
-	eth_get_module_eeprom_t    get_module_eeprom;
-	/** Get plugin module eeprom data. */
-
-	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
-
-	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
-
-	eth_timesync_enable_t      timesync_enable;
-	/** Turn IEEE1588/802.1AS timestamping on. */
-	eth_timesync_disable_t     timesync_disable;
-	/** Turn IEEE1588/802.1AS timestamping off. */
-	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
-	/** Read the IEEE1588/802.1AS RX timestamp. */
-	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
-	/** Read the IEEE1588/802.1AS TX timestamp. */
-	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
-	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
-	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
-
-	eth_read_clock             read_clock;
-
-	eth_xstats_get_by_id_t     xstats_get_by_id;
-	/**< Get extended device statistic values by ID. */
-	eth_xstats_get_names_by_id_t xstats_get_names_by_id;
-	/**< Get name of extended device statistics by ID. */
-
-	eth_tm_ops_get_t tm_ops_get;
-	/**< Get Traffic Management (TM) operations. */
+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. */
 
-	eth_mtr_ops_get_t mtr_ops_get;
-	/**< Get Traffic Metering and Policing (MTR) operations. */
+typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
+/**< @internal Check the status of a Rx descriptor */
 
-	eth_pool_ops_supported_t pool_ops_supported;
-	/**< Test if a port supports specific mempool ops */
+typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
+/**< @internal Check the status of a Tx descriptor */
 
-	eth_hairpin_cap_get_t hairpin_cap_get;
-	/**< Returns the hairpin capabilities. */
-	eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
-	/**< Set up device RX hairpin queue. */
-	eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
-	/**< Set up device TX hairpin queue. */
-};
 
 /**
  * @internal
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 13fd049c0d..b006cbbe92 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -21,6 +21,700 @@
 extern "C" {
 #endif
 
+/*
+ * Definitions of all functions exported by an Ethernet driver through the
+ * generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
+ * structure associated with an Ethernet device.
+ */
+
+typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);
+/**< @internal Ethernet device configuration. */
+
+typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to start a configured Ethernet device. */
+
+typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to stop a configured Ethernet device. */
+
+typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to link up a configured Ethernet device. */
+
+typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to link down a configured Ethernet device. */
+
+typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to close a configured Ethernet device. */
+
+typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
+/** <@internal Function used to reset a configured Ethernet device. */
+
+typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to detect an Ethernet device removal. */
+
+/**
+ * @internal
+ * Function used to enable the Rx promiscuous mode of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, promiscuous mode is enabled.
+ * @retval -ENOTSUP
+ *   Promiscuous mode is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to enable promiscuos mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to enable promiscuous mode.
+ */
+typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Function used to disable the Rx promiscuous mode of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, promiscuous mode is disabled.
+ * @retval -ENOTSUP
+ *   Promiscuous mode disabling is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to disable promiscuos mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to disable promiscuous mode.
+ */
+typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Enable the receipt of all multicast packets by an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, all-multicast mode is enabled.
+ * @retval -ENOTSUP
+ *   All-multicast mode is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to enable all-multicast mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to enable all-multicast mode.
+ */
+typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Disable the receipt of all multicast packets by an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, all-multicast mode is disabled.
+ * @retval -ENOTSUP
+ *   All-multicast mode disabling is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to disable all-multicast mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to disable all-multicast mode.
+ */
+typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
+				int wait_to_complete);
+/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
+
+typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
+				struct rte_eth_stats *igb_stats);
+/**< @internal Get global I/O statistics of an Ethernet device. */
+
+/**
+ * @internal
+ * Reset global I/O statistics of an Ethernet device to 0.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, statistics has been reset.
+ * @retval -ENOTSUP
+ *   Resetting statistics is not supported.
+ * @retval -EINVAL
+ *   Resetting statistics is not valid.
+ * @retval -ENOMEM
+ *   Not enough memory to get the stats.
+ */
+typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat *stats, unsigned int n);
+/**< @internal Get extended stats of an Ethernet device. */
+
+typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
+				      const uint64_t *ids,
+				      uint64_t *values,
+				      unsigned int n);
+/**< @internal Get extended stats of an Ethernet device. */
+
+/**
+ * @internal
+ * Reset extended stats of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, statistics has been reset.
+ * @retval -ENOTSUP
+ *   Resetting statistics is not supported.
+ * @retval -EINVAL
+ *   Resetting statistics is not valid.
+ * @retval -ENOMEM
+ *   Not enough memory to get the stats.
+ */
+typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat_name *xstats_names, unsigned int size);
+/**< @internal Get names of extended stats of an Ethernet device. */
+
+typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+	unsigned int size);
+/**< @internal Get names of extended stats of an Ethernet device. */
+
+typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
+					     uint16_t queue_id,
+					     uint8_t stat_idx,
+					     uint8_t is_rx);
+/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
+
+typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
+				   struct rte_eth_dev_info *dev_info);
+/**< @internal Get specific information of an Ethernet device. */
+
+typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
+/**< @internal Get supported ptypes of an Ethernet device. */
+
+/**
+ * @internal
+ * Inform Ethernet device about reduced range of packet types to handle.
+ *
+ * @param dev
+ *   The Ethernet device identifier.
+ * @param ptype_mask
+ *   The ptype family that application is interested in should be bitwise OR of
+ *   RTE_PTYPE_*_MASK or 0.
+ * @return
+ *   - (0) if Success.
+ */
+typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
+				     uint32_t ptype_mask);
+
+typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
+				    uint16_t queue_id);
+/**< @internal Start rx and tx of a queue of an Ethernet device. */
+
+typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
+				    uint16_t queue_id);
+/**< @internal Stop rx and tx of a queue of an Ethernet device. */
+
+typedef int (*eth_rx_queue_setup_t)(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,
+				    struct rte_mempool *mb_pool);
+/**< @internal Set up a receive queue of an Ethernet device. */
+
+typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
+				    uint16_t tx_queue_id,
+				    uint16_t nb_tx_desc,
+				    unsigned int socket_id,
+				    const struct rte_eth_txconf *tx_conf);
+/**< @internal Setup a transmit queue of an Ethernet device. */
+
+typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
+				    uint16_t rx_queue_id);
+/**< @internal Enable interrupt of a receive queue of an Ethernet device. */
+
+typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
+				    uint16_t rx_queue_id);
+/**< @internal Disable interrupt of a receive queue of an Ethernet device. */
+
+typedef void (*eth_queue_release_t)(void *queue);
+/**< @internal Release memory resources allocated by given RX/TX queue. */
+
+typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
+				     char *fw_version, size_t fw_size);
+/**< @internal Get firmware information of an Ethernet device. */
+
+typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
+/**< @internal Force mbufs to be from TX ring. */
+
+typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
+	uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
+
+typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
+	uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
+
+typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
+	uint16_t queue_id, struct rte_eth_burst_mode *mode);
+
+typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
+/**< @internal Set MTU. */
+
+typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
+				  uint16_t vlan_id,
+				  int on);
+/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
+
+typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
+			       enum rte_vlan_type type, uint16_t tpid);
+/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
+
+typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
+/**< @internal set VLAN offload function by an Ethernet device. */
+
+typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
+			       uint16_t vlan_id,
+			       int on);
+/**< @internal set port based TX VLAN insertion by an Ethernet device. */
+
+typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
+				  uint16_t rx_queue_id,
+				  int on);
+/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
+
+typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
+			       struct rte_eth_fc_conf *fc_conf);
+/**< @internal Get current flow control parameter on an Ethernet device */
+
+typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
+			       struct rte_eth_fc_conf *fc_conf);
+/**< @internal Setup flow control parameter on an Ethernet device */
+
+typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
+				struct rte_eth_pfc_conf *pfc_conf);
+/**< @internal Setup priority flow control parameter on an Ethernet device */
+
+typedef int (*reta_update_t)(struct rte_eth_dev *dev,
+			     struct rte_eth_rss_reta_entry64 *reta_conf,
+			     uint16_t reta_size);
+/**< @internal Update RSS redirection table on an Ethernet device */
+
+typedef int (*reta_query_t)(struct rte_eth_dev *dev,
+			    struct rte_eth_rss_reta_entry64 *reta_conf,
+			    uint16_t reta_size);
+/**< @internal Query RSS redirection table on an Ethernet device */
+
+typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
+				 struct rte_eth_rss_conf *rss_conf);
+/**< @internal Update RSS hash configuration of an Ethernet device */
+
+typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
+				   struct rte_eth_rss_conf *rss_conf);
+/**< @internal Get current RSS hash configuration of an Ethernet device */
+
+typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
+/**< @internal Turn on SW controllable LED on an Ethernet device */
+
+typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
+/**< @internal Turn off SW controllable LED on an Ethernet device */
+
+typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
+/**< @internal Remove MAC address from receive address register */
+
+typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr,
+				  uint32_t index,
+				  uint32_t vmdq);
+/**< @internal Set a MAC address into Receive Address Register */
+
+typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr);
+/**< @internal Set a MAC address into Receive Address Register */
+
+typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr,
+				  uint8_t on);
+/**< @internal Set a Unicast Hash bitmap */
+
+typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
+				  uint8_t on);
+/**< @internal Set all Unicast Hash bitmap */
+
+typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
+				uint16_t queue_idx,
+				uint16_t tx_rate);
+/**< @internal Set queue TX rate */
+
+typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
+				  struct rte_eth_mirror_conf *mirror_conf,
+				  uint8_t rule_id,
+				  uint8_t on);
+/**< @internal Add a traffic mirroring rule on an Ethernet device */
+
+typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
+				  uint8_t rule_id);
+/**< @internal Remove a traffic mirroring rule on an Ethernet device */
+
+typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
+					 struct rte_eth_udp_tunnel *tunnel_udp);
+/**< @internal Add tunneling UDP port */
+
+typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
+					 struct rte_eth_udp_tunnel *tunnel_udp);
+/**< @internal Delete tunneling UDP port */
+
+typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
+				      struct rte_ether_addr *mc_addr_set,
+				      uint32_t nb_mc_addr);
+/**< @internal set the list of multicast addresses on an Ethernet device */
+
+typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
+
+typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
+
+typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
+						struct timespec *timestamp,
+						uint32_t flags);
+/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
+
+typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
+						struct timespec *timestamp);
+/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
+
+typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
+/**< @internal Function used to adjust the device clock */
+
+typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
+				      struct timespec *timestamp);
+/**< @internal Function used to get time from the device clock. */
+
+typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
+				       const struct timespec *timestamp);
+/**< @internal Function used to get time from the device clock */
+
+typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
+				      uint64_t *timestamp);
+/**< @internal Function used to get the current value of the device clock. */
+
+typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
+				struct rte_dev_reg_info *info);
+/**< @internal Retrieve registers  */
+
+typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
+/**< @internal Retrieve eeprom size  */
+
+typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
+				struct rte_dev_eeprom_info *info);
+/**< @internal Retrieve eeprom data  */
+
+typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
+				struct rte_dev_eeprom_info *info);
+/**< @internal Program eeprom data  */
+
+typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
+				     struct rte_eth_dev_module_info *modinfo);
+/**< @internal Retrieve type and size of plugin module eeprom */
+
+typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
+				       struct rte_dev_eeprom_info *info);
+/**< @internal Retrieve plugin module eeprom data */
+
+typedef int (*eth_l2_tunnel_eth_type_conf_t)
+	(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
+/**< @internal config l2 tunnel ether type */
+
+typedef int (*eth_l2_tunnel_offload_set_t)
+	(struct rte_eth_dev *dev,
+	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
+	 uint32_t mask,
+	 uint8_t en);
+/**< @internal enable/disable the l2 tunnel offload functions */
+
+
+typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
+				 enum rte_filter_type filter_type,
+				 enum rte_filter_op filter_op,
+				 void *arg);
+/**< @internal Take operations to assigned filter type on an Ethernet device */
+
+typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
+/**< @internal Get Traffic Management (TM) operations on an Ethernet device */
+
+typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
+/**< @internal Get Traffic Metering and Policing (MTR) operations */
+
+typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
+				 struct rte_eth_dcb_info *dcb_info);
+/**< @internal Get dcb information on an Ethernet device */
+
+typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
+						const char *pool);
+/**< @internal Test if a port supports specific mempool ops */
+
+/**
+ * @internal
+ * Get the hairpin capabilities.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param cap
+ *   returns the hairpin capabilities from the device.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ */
+typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
+				     struct rte_eth_hairpin_cap *cap);
+
+/**
+ * @internal
+ * Setup RX hairpin queue.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param rx_queue_id
+ *   the selected RX queue index.
+ * @param nb_rx_desc
+ *   the requested number of descriptors for this queue. 0 - use PMD default.
+ * @param conf
+ *   the RX hairpin configuration structure.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ * @retval -EINVAL
+ *   One of the parameters is invalid.
+ * @retval -ENOMEM
+ *   Unable to allocate resources.
+ */
+typedef int (*eth_rx_hairpin_queue_setup_t)
+	(struct rte_eth_dev *dev, uint16_t rx_queue_id,
+	 uint16_t nb_rx_desc,
+	 const struct rte_eth_hairpin_conf *conf);
+
+/**
+ * @internal
+ * Setup TX hairpin queue.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param tx_queue_id
+ *   the selected TX queue index.
+ * @param nb_tx_desc
+ *   the requested number of descriptors for this queue. 0 - use PMD default.
+ * @param conf
+ *   the TX hairpin configuration structure.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ * @retval -EINVAL
+ *   One of the parameters is invalid.
+ * @retval -ENOMEM
+ *   Unable to allocate resources.
+ */
+typedef int (*eth_tx_hairpin_queue_setup_t)
+	(struct rte_eth_dev *dev, uint16_t tx_queue_id,
+	 uint16_t nb_tx_desc,
+	 const struct rte_eth_hairpin_conf *hairpin_conf);
+
+/**
+ * @internal A structure containing the functions exported by an Ethernet driver.
+ */
+struct eth_dev_ops {
+	eth_dev_configure_t        dev_configure; /**< Configure device. */
+	eth_dev_start_t            dev_start;     /**< Start device. */
+	eth_dev_stop_t             dev_stop;      /**< Stop device. */
+	eth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */
+	eth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */
+	eth_dev_close_t            dev_close;     /**< Close device. */
+	eth_dev_reset_t		   dev_reset;	  /**< Reset device. */
+	eth_link_update_t          link_update;   /**< Get device link state. */
+	eth_is_removed_t           is_removed;
+	/**< Check if the device was physically removed. */
+
+	eth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */
+	eth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */
+	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
+	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
+	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
+	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
+	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
+	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
+	mtu_set_t                  mtu_set;       /**< Set MTU. */
+
+	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
+	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
+	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
+	eth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */
+	eth_xstats_get_names_t     xstats_get_names;
+	/**< Get names of extended statistics. */
+	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
+	/**< Configure per queue stat counter mapping. */
+
+	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
+	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
+	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
+	eth_burst_mode_get_t       rx_burst_mode_get; /**< Get RX burst mode */
+	eth_burst_mode_get_t       tx_burst_mode_get; /**< Get TX burst mode */
+	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
+	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
+	/**< Get packet types supported and identified by device. */
+	eth_dev_ptypes_set_t dev_ptypes_set;
+	/**< Inform Ethernet device about reduced range of packet types to handle. */
+
+	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
+	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
+	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
+	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
+	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
+
+	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
+	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
+	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
+	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_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
+	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
+	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
+	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
+	eth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */
+
+	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
+	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
+
+	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
+	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
+	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
+
+	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
+	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
+
+	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
+	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
+
+	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
+	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
+	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
+	/** Config ether type of l2 tunnel. */
+	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
+	/** Enable/disable l2 tunnel offload functions. */
+
+	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
+
+	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
+	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
+	reta_update_t              reta_update;   /** Update redirection table. */
+	reta_query_t               reta_query;    /** Query redirection table. */
+
+	eth_get_reg_t              get_reg;           /**< Get registers. */
+	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
+	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
+	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
+
+	eth_get_module_info_t      get_module_info;
+	/** Get plugin module eeprom attribute. */
+	eth_get_module_eeprom_t    get_module_eeprom;
+	/** Get plugin module eeprom data. */
+
+	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
+
+	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
+
+	eth_timesync_enable_t      timesync_enable;
+	/** Turn IEEE1588/802.1AS timestamping on. */
+	eth_timesync_disable_t     timesync_disable;
+	/** Turn IEEE1588/802.1AS timestamping off. */
+	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
+	/** Read the IEEE1588/802.1AS RX timestamp. */
+	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
+	/** Read the IEEE1588/802.1AS TX timestamp. */
+	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
+	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
+	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
+
+	eth_read_clock             read_clock;
+
+	eth_xstats_get_by_id_t     xstats_get_by_id;
+	/**< Get extended device statistic values by ID. */
+	eth_xstats_get_names_by_id_t xstats_get_names_by_id;
+	/**< Get name of extended device statistics by ID. */
+
+	eth_tm_ops_get_t tm_ops_get;
+	/**< Get Traffic Management (TM) operations. */
+
+	eth_mtr_ops_get_t mtr_ops_get;
+	/**< Get Traffic Metering and Policing (MTR) operations. */
+
+	eth_pool_ops_supported_t pool_ops_supported;
+	/**< Test if a port supports specific mempool ops */
+
+	eth_hairpin_cap_get_t hairpin_cap_get;
+	/**< Returns the hairpin capabilities. */
+	eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
+	/**< Set up device RX hairpin queue. */
+	eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
+	/**< Set up device TX hairpin queue. */
+};
+
 /**
  * RX/TX queue states
  */
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 881cc469b7..997598db11 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h
index 3ec7ffa2a5..3b39532935 100644
--- a/lib/librte_ethdev/rte_mtr_driver.h
+++ b/lib/librte_ethdev/rte_mtr_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h
index 90114ff53e..b86ed89c00 100644
--- a/lib/librte_ethdev/rte_tm_driver.h
+++ b/lib/librte_ethdev/rte_tm_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
-- 
2.25.4


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

* [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations Ferruh Yigit
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 3/7] ethdev: make device operations struct private Ferruh Yigit
@ 2020-08-24  9:40 ` Ferruh Yigit
  2020-08-29 12:07   ` Andrew Rybchenko
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions Ferruh Yigit
                   ` (7 subsequent siblings)
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-08-24  9:40 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Andrew Rybchenko, Ori Kam
  Cc: 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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d40b95bfa9..35c06d30ef 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 2ce186610b..ce2e0ec0e4 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index b006cbbe92..3d1bc33272 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 8d9d6b1c67..6a84f3d76d 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
 };
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 997598db11..3ee871d3eb 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -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,
-- 
2.25.4


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

* [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
                   ` (2 preceding siblings ...)
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions Ferruh Yigit
@ 2020-08-24  9:40 ` Ferruh Yigit
  2020-08-29 12:13   ` Andrew Rybchenko
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-08-24  9:40 UTC (permalink / raw)
  To: dev, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko,
	Thomas Monjalon, Andrew Rybchenko, Ray Kinsella, Neil Horman
  Cc: 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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 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(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 79eb8f8d72..4b200579dd 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -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;
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 21fe16b7ed..9d5f4d35b2 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -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;
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 3d1bc33272..5dfe9fdf1a 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6a84f3d76d..5db3fb156a 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.25.4


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

* [dpdk-dev] [PATCH 6/7] ethdev: remove invalid symbols from map file
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
                   ` (3 preceding siblings ...)
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions Ferruh Yigit
@ 2020-08-24  9:40 ` Ferruh Yigit
  2020-08-29 12:14   ` Andrew Rybchenko
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
                   ` (5 subsequent siblings)
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-08-24  9:40 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, Thomas Monjalon,
	Andrew Rybchenko, Sergio Gonzalez Monroy
  Cc: Ferruh Yigit, stable

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

Fixes: 9d41beed24b0 ("lib: provide initial versioning")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 5db3fb156a..a85986a2a2 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.25.4


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

* [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
                   ` (4 preceding siblings ...)
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
@ 2020-08-24  9:40 ` Ferruh Yigit
  2020-08-29 12:16   ` Andrew Rybchenko
  2020-08-29 11:47 ` [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Andrew Rybchenko
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-08-24  9:40 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Igor Russkikh, Pavel Belous,
	Ajit Khaparde, Somnath Kotur, Chas Williams, Wei Hu (Xavier),
	Hemant Agrawal, Sachin Saxena, Wei Zhao, Jeff Guo, Marcin Wojtas,
	Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin,
	John Daley, Hyong Youb Kim, Gaetan Rivet, Qi Zhang, Xiao Wang,
	Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Beilei Xing,
	Jingjing Wu, Qiming Yang, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Long Li, Heinrich Kuhn, Harman Kalra, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Yong Wang, Thomas Monjalon, Ray Kinsella,
	Neil Horman
  Cc: 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'.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 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(-)

diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index 79156cb85a..b49089a33c 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -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
diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst
index 6fae39f904..86e0a141e6 100644
--- a/doc/guides/prog_guide/poll_mode_drv.rst
+++ b/doc/guides/prog_guide/poll_mode_drv.rst
@@ -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().
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 540b106045..2fca9140d7 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -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);
 		}
 	}
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index f94dd88b8c..ec177f8226 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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);
 	}
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index eafc1d3868..d67db46c65 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -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)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index cdbd8151ed..4ffd2ca4bb 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -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);
 		}
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index bfc6504139..8d88a3badb 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -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)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 38cf0ab71c..0e9f836e55 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 66c5022bb7..ee97877095 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 2db04fa88c..c74e2f4358 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index da8c8ad922..8077519735 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -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,
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 7942b0df6b..8b0441c5cd 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -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);
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 70972d6717..7c68bbdec0 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -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;
 }
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 20d48c30ea..1f4fa76e4d 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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 */
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index ac2a72e388..41c99bdbf8 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -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,
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ad5a536d73..d1f07348ba 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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:
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 1b4ffaa383..833045b564 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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");
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 7bf1e79410..03c2070c3f 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -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);
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 33acea54a5..67d6a63f9f 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -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");
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 613b6638ad..e1f706e514 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 1fdbfcb60d..4fbbee2dfe 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ac1dc7841d..693acd9ae9 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 67b5bef44f..ed5f96b1a4 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -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;
 
diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c
index 19af9359c9..6786b12ab5 100644
--- a/drivers/net/mlx4/mlx4_intr.c
+++ b/drivers/net/mlx4/mlx4_intr.c
@@ -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);
 }
 
 /**
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 3d3dd2e862..7256c1bcfe 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -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;
 		}
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 226b7bfd23..808c01ac71 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index d186ddeabd..66d1966f29 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -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)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index c556dedab6..4f03691989 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -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);
 
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 76c69294d0..808b761b96 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -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);
 		}
 	}
 
diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c
index 12bf6c3231..439ec4fa89 100644
--- a/drivers/net/octeontx2/otx2_link.c
+++ b/drivers/net/octeontx2/otx2_link.c
@@ -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
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index 987a6f1e13..aecb98261b 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -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)
diff --git a/drivers/net/sfc/sfc_intr.c b/drivers/net/sfc/sfc_intr.c
index 80feab68f8..da32d393c2 100644
--- a/drivers/net/sfc/sfc_intr.c
+++ b/drivers/net/sfc/sfc_intr.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 959c8e4ddc..83d9488360 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -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);
 		}
 	}
 
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index fa365605ef..ce32be9ce3 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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;
 }
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 8658b6f2f0..4ce9ac5941 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 815fba2f55..fa80e75a5b 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -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 */
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index 7858ad5f11..bf9bd76f94 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -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;
 }
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 5dfe9fdf1a..23cc1e0959 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index a85986a2a2..b6630dfabe 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.25.4


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

* Re: [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
                   ` (5 preceding siblings ...)
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
@ 2020-08-29 11:47 ` Andrew Rybchenko
  2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 60+ messages in thread
From: Andrew Rybchenko @ 2020-08-29 11:47 UTC (permalink / raw)
  To: Ferruh Yigit, dev, John McNamara, Marko Kovacevic, Ray Kinsella,
	Neil Horman, Wei Zhao, Jeff Guo, John Daley, Hyong Youb Kim,
	Qi Zhang, Xiao Wang, Beilei Xing, Jerin Jacob, Nithin Dabilpuram,
	Kiran Kumar K, Maxime Coquelin, Chenbo Xia, Zhihong Wang,
	Thomas Monjalon

On 8/24/20 12:40 PM, Ferruh Yigit wrote:
> 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.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

Thanks for working on it.


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

* Re: [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations Ferruh Yigit
@ 2020-08-29 11:57   ` Andrew Rybchenko
  2020-08-31 12:25     ` Ferruh Yigit
  0 siblings, 1 reply; 60+ messages in thread
From: Andrew Rybchenko @ 2020-08-29 11:57 UTC (permalink / raw)
  To: Ferruh Yigit, dev, Shepard Siegel, Ed Czeck, John Miller,
	Igor Russkikh, Pavel Belous, Somalapuram Amaranath,
	Ajit Khaparde, Somnath Kotur, Hemant Agrawal, Sachin Saxena,
	Wei Zhao, Jeff Guo, John Daley, Hyong Youb Kim, Qi Zhang,
	Xiao Wang, Beilei Xing, Jingjing Wu, Qiming Yang, Matan Azrad,
	Shahaf Shuler, Viacheslav Ovsiienko, Stephen Hemminger,
	K. Y. Srinivasan, Haiyang Zhang, Long Li, Heinrich Kuhn,
	Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody,
	Shahed Shaikh, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Thomas Monjalon

On 8/24/20 12:40 PM, Ferruh Yigit wrote:
> 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;
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>

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]

> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
> index 65e0ff7d48..0b06bf91a0 100644
> --- a/drivers/net/sfc/sfc_ethdev.c
> +++ b/drivers/net/sfc/sfc_ethdev.c

[snip]

> @@ -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.

>  
>  	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;

Same here.

[snip]

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

* Re: [dpdk-dev] [PATCH 3/7] ethdev: make device operations struct private
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 3/7] ethdev: make device operations struct private Ferruh Yigit
@ 2020-08-29 12:03   ` Andrew Rybchenko
  0 siblings, 0 replies; 60+ messages in thread
From: Andrew Rybchenko @ 2020-08-29 12:03 UTC (permalink / raw)
  To: Ferruh Yigit, dev, Ray Kinsella, Neil Horman, John McNamara,
	Marko Kovacevic, Beilei Xing, Jeff Guo, Wei Zhao,
	Thomas Monjalon, Ori Kam, Cristian Dumitrescu

On 8/24/20 12:40 PM, Ferruh Yigit wrote:
> Hiding the 'struct eth_dev_ops' from applications.
> 
> Removing relevant deprecation notice.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>


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

* Re: [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions Ferruh Yigit
@ 2020-08-29 12:07   ` Andrew Rybchenko
  0 siblings, 0 replies; 60+ messages in thread
From: Andrew Rybchenko @ 2020-08-29 12:07 UTC (permalink / raw)
  To: Ferruh Yigit, dev, Ray Kinsella, Neil Horman, John McNamara,
	Marko Kovacevic, Thomas Monjalon, Ori Kam

On 8/24/20 12:40 PM, Ferruh Yigit wrote:
> 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.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

with a nit below

[snip]

> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 2ce186610b..ce2e0ec0e4 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -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]

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

* Re: [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions Ferruh Yigit
@ 2020-08-29 12:13   ` Andrew Rybchenko
  0 siblings, 0 replies; 60+ messages in thread
From: Andrew Rybchenko @ 2020-08-29 12:13 UTC (permalink / raw)
  To: Ferruh Yigit, dev, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Thomas Monjalon, Ray Kinsella, Neil Horman

On 8/24/20 12:40 PM, Ferruh Yigit wrote:
> 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.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>


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

* Re: [dpdk-dev] [PATCH 6/7] ethdev: remove invalid symbols from map file
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
@ 2020-08-29 12:14   ` Andrew Rybchenko
  0 siblings, 0 replies; 60+ messages in thread
From: Andrew Rybchenko @ 2020-08-29 12:14 UTC (permalink / raw)
  To: Ferruh Yigit, dev, Ray Kinsella, Neil Horman, Thomas Monjalon,
	Sergio Gonzalez Monroy
  Cc: stable

On 8/24/20 12:40 PM, Ferruh Yigit wrote:
> These are sturct type names, not object names. Removing them from .map
> file.
> 
> Fixes: 9d41beed24b0 ("lib: provide initial versioning")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>


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

* Re: [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API
  2020-08-24  9:40 ` [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
@ 2020-08-29 12:16   ` Andrew Rybchenko
  0 siblings, 0 replies; 60+ messages in thread
From: Andrew Rybchenko @ 2020-08-29 12:16 UTC (permalink / raw)
  To: Ferruh Yigit, dev, John McNamara, Marko Kovacevic, Igor Russkikh,
	Pavel Belous, Ajit Khaparde, Somnath Kotur, Chas Williams,
	Wei Hu (Xavier),
	Hemant Agrawal, Sachin Saxena, Wei Zhao, Jeff Guo, Marcin Wojtas,
	Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin,
	John Daley, Hyong Youb Kim, Gaetan Rivet, Qi Zhang, Xiao Wang,
	Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Beilei Xing,
	Jingjing Wu, Qiming Yang, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Long Li, Heinrich Kuhn, Harman Kalra, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Maciej Czekaj, Maxime Coquelin, Chenbo Xia, Zhihong Wang,
	Yong Wang, Thomas Monjalon, Ray Kinsella, Neil Horman

On 8/24/20 12:40 PM, Ferruh Yigit wrote:
> '_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'.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

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

* Re: [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations
  2020-08-29 11:57   ` Andrew Rybchenko
@ 2020-08-31 12:25     ` Ferruh Yigit
  0 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-08-31 12:25 UTC (permalink / raw)
  To: Andrew Rybchenko, dev, Shepard Siegel, Ed Czeck, John Miller,
	Igor Russkikh, Pavel Belous, Somalapuram Amaranath,
	Ajit Khaparde, Somnath Kotur, Hemant Agrawal, Sachin Saxena,
	Wei Zhao, Jeff Guo, John Daley, Hyong Youb Kim, Qi Zhang,
	Xiao Wang, Beilei Xing, Jingjing Wu, Qiming Yang, Matan Azrad,
	Shahaf Shuler, Viacheslav Ovsiienko, Stephen Hemminger,
	K. Y. Srinivasan, Haiyang Zhang, Long Li, Heinrich Kuhn,
	Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody,
	Shahed Shaikh, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Thomas Monjalon

On 8/29/2020 12:57 PM, Andrew Rybchenko wrote:
> On 8/24/20 12:40 PM, Ferruh Yigit wrote:
>> 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;
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
> 
> 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.

> plus an net/sfc-related nit below:
> 
> [snip]
> 
>> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
>> index 65e0ff7d48..0b06bf91a0 100644
>> --- a/drivers/net/sfc/sfc_ethdev.c
>> +++ b/drivers/net/sfc/sfc_ethdev.c
> 
> [snip]
> 
>> @@ -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.
> 

ok

>>   
>>   	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;
> 
> Same here.
> 

ok


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

* [dpdk-dev] [PATCH v2 1/7] ethdev: remove legacy descriptor status check API
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
                   ` (6 preceding siblings ...)
  2020-08-29 11:47 ` [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Andrew Rybchenko
@ 2020-09-03 21:09 ` Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 2/7] ethdev: move inline device operations Ferruh Yigit
                     ` (5 more replies)
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
                   ` (2 subsequent siblings)
  10 siblings, 6 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-03 21:09 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Ray Kinsella, Neil Horman,
	Wei Zhao, Jeff Guo, John Daley, Hyong Youb Kim, Qi Zhang,
	Xiao Wang, Beilei Xing, Jerin Jacob, Nithin Dabilpuram,
	Kiran Kumar K, Andrew Rybchenko, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Thomas Monjalon
  Cc: 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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 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(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index edd21c4d8e..701c592b26 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -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:
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 345c38d5b6..811eaad6ce 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h
index 1e41ae9de1..dce365226b 100644
--- a/drivers/net/e1000/e1000_ethdev.h
+++ b/drivers/net/e1000/e1000_ethdev.h
@@ -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);
 
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 902b1cdca0..32872db9c2 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
index 67a271e8ce..2ffc31b41d 100644
--- a/drivers/net/e1000/em_rxtx.c
+++ b/drivers/net/e1000/em_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index a5551e8175..aec79c6ceb 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c
index dd520cd82c..d313893c3a 100644
--- a/drivers/net/e1000/igb_rxtx.c
+++ b/drivers/net/e1000/igb_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index ca75919ee2..1316c5c739 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -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,
diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h
index 916b856acc..2e47ada829 100644
--- a/drivers/net/fm10k/fm10k.h
+++ b/drivers/net/fm10k/fm10k.h
@@ -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);
 
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index fd927923da..56e2425e47 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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,
diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c
index 4accaa2cd6..399bb3da19 100644
--- a/drivers/net/fm10k/fm10k_rxtx.c
+++ b/drivers/net/fm10k/fm10k_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 11c02b1888..f8ed4a0b36 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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,
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index b4e42939e6..d32e655d90 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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,
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
index fe7f9200c1..645fbf401c 100644
--- a/drivers/net/i40e/i40e_rxtx.c
+++ b/drivers/net/i40e/i40e_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h
index 57d7b4160b..925f3d853d 100644
--- a/drivers/net/i40e/i40e_rxtx.h
+++ b/drivers/net/i40e/i40e_rxtx.h
@@ -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);
 
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 6ab3ee909d..ace6b3fb3d 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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,
diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c
index 4654ec41f0..f3962533d5 100644
--- a/drivers/net/igc/igc_txrx.c
+++ b/drivers/net/igc/igc_txrx.c
@@ -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;
diff --git a/drivers/net/igc/igc_txrx.h b/drivers/net/igc/igc_txrx.h
index f2b2d75bbc..d6f3799639 100644
--- a/drivers/net/igc/igc_txrx.h
+++ b/drivers/net/igc/igc_txrx.h
@@ -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);
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index fd0cb9b0e2..f536ca61cf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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,
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index 9bdef87fbd..b0e2b2452f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -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);
 
diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c
index 977ecf5137..5254fe3738 100644
--- a/drivers/net/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/ixgbe/ixgbe_rxtx.c
@@ -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)
 {
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 33b72bd4db..b5d25fe68e 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -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,
diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h
index e9efe52bb0..10bcd1b6a4 100644
--- a/drivers/net/octeontx2/otx2_ethdev.h
+++ b/drivers/net/octeontx2/otx2_ethdev.h
@@ -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);
 
diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c
index faecf216c1..6c6a4f35e9 100644
--- a/drivers/net/octeontx2/otx2_ethdev_ops.c
+++ b/drivers/net/octeontx2/otx2_ethdev_ops.c
@@ -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)
 {
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index acee3e48e4..65e0ff7d48 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -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,
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index dc0093bdf0..8658b6f2f0 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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 */
diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h
index b7d52d497f..c93f320f83 100644
--- a/drivers/net/virtio/virtio_ethdev.h
+++ b/drivers/net/virtio/virtio_ethdev.h
@@ -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,
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index f915b8a2c9..043788876e 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -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)
 {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 70295d7ab7..b52b04f7e0 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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. */
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 32407dd418..292a6423c4 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -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;
-- 
2.25.4


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

* [dpdk-dev] [PATCH v2 2/7] ethdev: move inline device operations
  2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
@ 2020-09-03 21:09   ` Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private Ferruh Yigit
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-03 21:09 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Shepard Siegel, Ed Czeck,
	John Miller, Igor Russkikh, Pavel Belous, Somalapuram Amaranath,
	Ajit Khaparde, Somnath Kotur, Hemant Agrawal, Sachin Saxena,
	Wei Zhao, Jeff Guo, John Daley, Hyong Youb Kim, Qi Zhang,
	Xiao Wang, Beilei Xing, Jingjing Wu, Qiming Yang, Matan Azrad,
	Shahaf Shuler, Viacheslav Ovsiienko, Stephen Hemminger,
	K. Y. Srinivasan, Haiyang Zhang, Long Li, Heinrich Kuhn,
	Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody,
	Shahed Shaikh, Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin,
	Chenbo Xia, Zhihong Wang, Thomas Monjalon
  Cc: 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;

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
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(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index 701c592b26..60a8e95993 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -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()``.
 
 
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd8677..ce7f6e4803 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -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) {
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index d3b00ab295..540b106045 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -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;
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 0c25739f82..02ceb95754 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -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.
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 75d055be00..4d224bfa04 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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;
 
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index c15e2b5462..bfc6504139 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -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;
 
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 02c254846c..38cf0ab71c 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 32872db9c2..66c5022bb7 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index aec79c6ceb..2db04fa88c 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 1316c5c739..2cffa3aa2d 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -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;
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 56e2425e47..4f3439cbb2 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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;
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index f8ed4a0b36..ad5a536d73 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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;
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index d32e655d90..fd45243fb9 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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;
 
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 28ca3fa8f7..a6f8e3366f 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 4a161ae8a7..2668219494 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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;
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index ace6b3fb3d..1fdbfcb60d 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index f536ca61cf..ac1dc7841d 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
 
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index bf1f82ba67..ec3cc4000e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -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,
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 4c29898203..eb55bd7f99 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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;
 }
 
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index fd91c0e491..229c1b9149 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -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;
 
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 99946279db..c556dedab6 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -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;
 
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index b5d25fe68e..98f360f1b4 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -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) {
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 70d48e48ef..59f1746ee9 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -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;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 65e0ff7d48..ffad32a123 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -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;
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index d955a7ee23..959c8e4ddc 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -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) {
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index e55278af69..fa365605ef 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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;
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index b52b04f7e0..2ce186610b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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);
 }
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 292a6423c4..275d51006b 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -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
-- 
2.25.4


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

* [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private
  2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 2/7] ethdev: move inline device operations Ferruh Yigit
@ 2020-09-03 21:09   ` Ferruh Yigit
  2020-09-08 12:19     ` Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 4/7] ethdev: mark internal functions Ferruh Yigit
                     ` (3 subsequent siblings)
  5 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-03 21:09 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Beilei Xing, Jeff Guo, Wei Zhao, Thomas Monjalon,
	Andrew Rybchenko, Ori Kam, Cristian Dumitrescu
  Cc: Ferruh Yigit

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 811eaad6ce..d40b95bfa9 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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,
diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 083bc1a5f3..f09d4d8798 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -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"
diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c
index dbbef294ae..edb5d43846 100644
--- a/drivers/net/ixgbe/ixgbe_vf_representor.c
+++ b/drivers/net/ixgbe/ixgbe_vf_representor.c
@@ -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"
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 275d51006b..0a2a43803f 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -21,319 +21,8 @@ struct rte_eth_dev_callback;
 /** @internal Structure to keep track of registered callbacks */
 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
 
-/*
- * Definitions of all functions exported by an Ethernet driver through the
- * the generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
- * structure associated with an Ethernet device.
- */
 struct rte_eth_dev;
 
-typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);
-/**< @internal Ethernet device configuration. */
-
-typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to start a configured Ethernet device. */
-
-typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to stop a configured Ethernet device. */
-
-typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to link up a configured Ethernet device. */
-
-typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to link down a configured Ethernet device. */
-
-typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to close a configured Ethernet device. */
-
-typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
-/** <@internal Function used to reset a configured Ethernet device. */
-
-typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to detect an Ethernet device removal. */
-
-/**
- * @internal
- * Function used to enable the Rx promiscuous mode of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, promiscuous mode is enabled.
- * @retval -ENOTSUP
- *   Promiscuous mode is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to enable promiscuos mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to enable promiscuous mode.
- */
-typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Function used to disable the Rx promiscuous mode of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, promiscuous mode is disabled.
- * @retval -ENOTSUP
- *   Promiscuous mode disabling is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to disable promiscuos mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to disable promiscuous mode.
- */
-typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Enable the receipt of all multicast packets by an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, all-multicast mode is enabled.
- * @retval -ENOTSUP
- *   All-multicast mode is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to enable all-multicast mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to enable all-multicast mode.
- */
-typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Disable the receipt of all multicast packets by an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, all-multicast mode is disabled.
- * @retval -ENOTSUP
- *   All-multicast mode disabling is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to disable all-multicast mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to disable all-multicast mode.
- */
-typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
-				int wait_to_complete);
-/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
-
-typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
-				struct rte_eth_stats *igb_stats);
-/**< @internal Get global I/O statistics of an Ethernet device. */
-
-/**
- * @internal
- * Reset global I/O statistics of an Ethernet device to 0.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, statistics has been reset.
- * @retval -ENOTSUP
- *   Resetting statistics is not supported.
- * @retval -EINVAL
- *   Resetting statistics is not valid.
- * @retval -ENOMEM
- *   Not enough memory to get the stats.
- */
-typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat *stats, unsigned n);
-/**< @internal Get extended stats of an Ethernet device. */
-
-typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
-				      const uint64_t *ids,
-				      uint64_t *values,
-				      unsigned int n);
-/**< @internal Get extended stats of an Ethernet device. */
-
-/**
- * @internal
- * Reset extended stats of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, statistics has been reset.
- * @retval -ENOTSUP
- *   Resetting statistics is not supported.
- * @retval -EINVAL
- *   Resetting statistics is not valid.
- * @retval -ENOMEM
- *   Not enough memory to get the stats.
- */
-typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat_name *xstats_names, unsigned size);
-/**< @internal Get names of extended stats of an Ethernet device. */
-
-typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
-	unsigned int size);
-/**< @internal Get names of extended stats of an Ethernet device. */
-
-typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
-					     uint16_t queue_id,
-					     uint8_t stat_idx,
-					     uint8_t is_rx);
-/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
-
-typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
-				   struct rte_eth_dev_info *dev_info);
-/**< @internal Get specific information of an Ethernet device. */
-
-typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
-/**< @internal Get supported ptypes of an Ethernet device. */
-
-/**
- * @internal
- * Inform Ethernet device about reduced range of packet types to handle.
- *
- * @param dev
- *   The Ethernet device identifier.
- * @param ptype_mask
- *   The ptype family that application is interested in should be bitwise OR of
- *   RTE_PTYPE_*_MASK or 0.
- * @return
- *   - (0) if Success.
- */
-typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
-				     uint32_t ptype_mask);
-
-typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
-				    uint16_t queue_id);
-/**< @internal Start rx and tx of a queue of an Ethernet device. */
-
-typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
-				    uint16_t queue_id);
-/**< @internal Stop rx and tx of a queue of an Ethernet device. */
-
-typedef int (*eth_rx_queue_setup_t)(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,
-				    struct rte_mempool *mb_pool);
-/**< @internal Set up a receive queue of an Ethernet device. */
-
-typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
-				    uint16_t tx_queue_id,
-				    uint16_t nb_tx_desc,
-				    unsigned int socket_id,
-				    const struct rte_eth_txconf *tx_conf);
-/**< @internal Setup a transmit queue of an Ethernet device. */
-
-typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
-				    uint16_t rx_queue_id);
-/**< @internal Enable interrupt of a receive queue of an Ethernet device. */
-
-typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
-				    uint16_t rx_queue_id);
-/**< @internal Disable interrupt of a receive queue of an Ethernet device. */
-
-typedef void (*eth_queue_release_t)(void *queue);
-/**< @internal Release memory resources allocated by given RX/TX queue. */
-
-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_status_t)(void *rxq, uint16_t offset);
-/**< @internal Check the status of a Rx descriptor */
-
-typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
-/**< @internal Check the status of a Tx descriptor */
-
-typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
-				     char *fw_version, size_t fw_size);
-/**< @internal Get firmware information of an Ethernet device. */
-
-typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
-/**< @internal Force mbufs to be from TX ring. */
-
-typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
-	uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
-
-typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
-	uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
-
-typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
-	uint16_t queue_id, struct rte_eth_burst_mode *mode);
-
-typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
-/**< @internal Set MTU. */
-
-typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
-				  uint16_t vlan_id,
-				  int on);
-/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
-
-typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
-			       enum rte_vlan_type type, uint16_t tpid);
-/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
-
-typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
-/**< @internal set VLAN offload function by an Ethernet device. */
-
-typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
-			       uint16_t vlan_id,
-			       int on);
-/**< @internal set port based TX VLAN insertion by an Ethernet device. */
-
-typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
-				  uint16_t rx_queue_id,
-				  int on);
-/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
-
 typedef uint16_t (*eth_rx_burst_t)(void *rxq,
 				   struct rte_mbuf **rx_pkts,
 				   uint16_t nb_pkts);
@@ -349,400 +38,17 @@ typedef uint16_t (*eth_tx_prep_t)(void *txq,
 				   uint16_t nb_pkts);
 /**< @internal Prepare output packets on a transmit queue of an Ethernet device. */
 
-typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
-			       struct rte_eth_fc_conf *fc_conf);
-/**< @internal Get current flow control parameter on an Ethernet device */
 
-typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
-			       struct rte_eth_fc_conf *fc_conf);
-/**< @internal Setup flow control parameter on an Ethernet device */
-
-typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
-				struct rte_eth_pfc_conf *pfc_conf);
-/**< @internal Setup priority flow control parameter on an Ethernet device */
-
-typedef int (*reta_update_t)(struct rte_eth_dev *dev,
-			     struct rte_eth_rss_reta_entry64 *reta_conf,
-			     uint16_t reta_size);
-/**< @internal Update RSS redirection table on an Ethernet device */
-
-typedef int (*reta_query_t)(struct rte_eth_dev *dev,
-			    struct rte_eth_rss_reta_entry64 *reta_conf,
-			    uint16_t reta_size);
-/**< @internal Query RSS redirection table on an Ethernet device */
-
-typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
-				 struct rte_eth_rss_conf *rss_conf);
-/**< @internal Update RSS hash configuration of an Ethernet device */
-
-typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
-				   struct rte_eth_rss_conf *rss_conf);
-/**< @internal Get current RSS hash configuration of an Ethernet device */
-
-typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
-/**< @internal Turn on SW controllable LED on an Ethernet device */
-
-typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
-/**< @internal Turn off SW controllable LED on an Ethernet device */
-
-typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
-/**< @internal Remove MAC address from receive address register */
-
-typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr,
-				  uint32_t index,
-				  uint32_t vmdq);
-/**< @internal Set a MAC address into Receive Address Address Register */
-
-typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr);
-/**< @internal Set a MAC address into Receive Address Address Register */
-
-typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr,
-				  uint8_t on);
-/**< @internal Set a Unicast Hash bitmap */
-
-typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
-				  uint8_t on);
-/**< @internal Set all Unicast Hash bitmap */
-
-typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
-				uint16_t queue_idx,
-				uint16_t tx_rate);
-/**< @internal Set queue TX rate */
-
-typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
-				  struct rte_eth_mirror_conf *mirror_conf,
-				  uint8_t rule_id,
-				  uint8_t on);
-/**< @internal Add a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
-				  uint8_t rule_id);
-/**< @internal Remove a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
-					 struct rte_eth_udp_tunnel *tunnel_udp);
-/**< @internal Add tunneling UDP port */
-
-typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
-					 struct rte_eth_udp_tunnel *tunnel_udp);
-/**< @internal Delete tunneling UDP port */
-
-typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
-				      struct rte_ether_addr *mc_addr_set,
-				      uint32_t nb_mc_addr);
-/**< @internal set the list of multicast addresses on an Ethernet device */
-
-typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
-
-typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
-
-typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
-						struct timespec *timestamp,
-						uint32_t flags);
-/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
-
-typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
-						struct timespec *timestamp);
-/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
-
-typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
-/**< @internal Function used to adjust the device clock */
-
-typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
-				      struct timespec *timestamp);
-/**< @internal Function used to get time from the device clock. */
-
-typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
-				       const struct timespec *timestamp);
-/**< @internal Function used to get time from the device clock */
-
-typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
-				      uint64_t *timestamp);
-/**< @internal Function used to get the current value of the device clock. */
-
-typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
-				struct rte_dev_reg_info *info);
-/**< @internal Retrieve registers  */
-
-typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
-/**< @internal Retrieve eeprom size  */
-
-typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
-				struct rte_dev_eeprom_info *info);
-/**< @internal Retrieve eeprom data  */
-
-typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
-				struct rte_dev_eeprom_info *info);
-/**< @internal Program eeprom data  */
-
-typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
-				     struct rte_eth_dev_module_info *modinfo);
-/**< @internal Retrieve type and size of plugin module eeprom */
-
-typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
-				       struct rte_dev_eeprom_info *info);
-/**< @internal Retrieve plugin module eeprom data */
-
-typedef int (*eth_l2_tunnel_eth_type_conf_t)
-	(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
-/**< @internal config l2 tunnel ether type */
-
-typedef int (*eth_l2_tunnel_offload_set_t)
-	(struct rte_eth_dev *dev,
-	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
-	 uint32_t mask,
-	 uint8_t en);
-/**< @internal enable/disable the l2 tunnel offload functions */
-
-
-typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
-				 enum rte_filter_type filter_type,
-				 enum rte_filter_op filter_op,
-				 void *arg);
-/**< @internal Take operations to assigned filter type on an Ethernet device */
-
-typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
-/**< @internal Get Traffic Management (TM) operations on an Ethernet device */
-
-typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
-/**< @internal Get Traffic Metering and Policing (MTR) operations */
-
-typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
-				 struct rte_eth_dcb_info *dcb_info);
-/**< @internal Get dcb information on an Ethernet device */
-
-typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
-						const char *pool);
-/**< @internal Test if a port supports specific mempool ops */
-
-/**
- * @internal
- * Get the hairpin capabilities.
- *
- * @param dev
- *   ethdev handle of port.
- * @param cap
- *   returns the hairpin capabilities from the device.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- */
-typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
-				     struct rte_eth_hairpin_cap *cap);
-
-/**
- * @internal
- * Setup RX hairpin queue.
- *
- * @param dev
- *   ethdev handle of port.
- * @param rx_queue_id
- *   the selected RX queue index.
- * @param nb_rx_desc
- *   the requested number of descriptors for this queue. 0 - use PMD default.
- * @param conf
- *   the RX hairpin configuration structure.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- * @retval -EINVAL
- *   One of the parameters is invalid.
- * @retval -ENOMEM
- *   Unable to allocate resources.
- */
-typedef int (*eth_rx_hairpin_queue_setup_t)
-	(struct rte_eth_dev *dev, uint16_t rx_queue_id,
-	 uint16_t nb_rx_desc,
-	 const struct rte_eth_hairpin_conf *conf);
-
-/**
- * @internal
- * Setup TX hairpin queue.
- *
- * @param dev
- *   ethdev handle of port.
- * @param tx_queue_id
- *   the selected TX queue index.
- * @param nb_tx_desc
- *   the requested number of descriptors for this queue. 0 - use PMD default.
- * @param conf
- *   the TX hairpin configuration structure.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- * @retval -EINVAL
- *   One of the parameters is invalid.
- * @retval -ENOMEM
- *   Unable to allocate resources.
- */
-typedef int (*eth_tx_hairpin_queue_setup_t)
-	(struct rte_eth_dev *dev, uint16_t tx_queue_id,
-	 uint16_t nb_tx_desc,
-	 const struct rte_eth_hairpin_conf *hairpin_conf);
-
-/**
- * @internal A structure containing the functions exported by an Ethernet driver.
- */
-struct eth_dev_ops {
-	eth_dev_configure_t        dev_configure; /**< Configure device. */
-	eth_dev_start_t            dev_start;     /**< Start device. */
-	eth_dev_stop_t             dev_stop;      /**< Stop device. */
-	eth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */
-	eth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */
-	eth_dev_close_t            dev_close;     /**< Close device. */
-	eth_dev_reset_t		   dev_reset;	  /**< Reset device. */
-	eth_link_update_t          link_update;   /**< Get device link state. */
-	eth_is_removed_t           is_removed;
-	/**< Check if the device was physically removed. */
-
-	eth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */
-	eth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */
-	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
-	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
-	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
-	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
-	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
-	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
-	mtu_set_t                  mtu_set;       /**< Set MTU. */
-
-	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
-	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
-	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
-	eth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */
-	eth_xstats_get_names_t     xstats_get_names;
-	/**< Get names of extended statistics. */
-	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
-	/**< Configure per queue stat counter mapping. */
-
-	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
-	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
-	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
-	eth_burst_mode_get_t       rx_burst_mode_get; /**< Get RX burst mode */
-	eth_burst_mode_get_t       tx_burst_mode_get; /**< Get TX burst mode */
-	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
-	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
-	/**< Get packet types supported and identified by device. */
-	eth_dev_ptypes_set_t dev_ptypes_set;
-	/**< Inform Ethernet device about reduced range of packet types to handle. */
-
-	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
-	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
-	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
-	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
-	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
-
-	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
-	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
-	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
-	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. */
-	/*
-	 * Static inline functions use functions ABOVE this comment.
-	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
-	 */
-	eth_rx_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
-	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
-	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
-	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
-	eth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */
-
-	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
-	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
-
-	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
-	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
-	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
-
-	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
-	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
-
-	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
-	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
-
-	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
-	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
-	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
-	/** Config ether type of l2 tunnel. */
-	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
-	/** Enable/disable l2 tunnel offload functions. */
-
-	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
-
-	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
-	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
-	reta_update_t              reta_update;   /** Update redirection table. */
-	reta_query_t               reta_query;    /** Query redirection table. */
-
-	eth_get_reg_t              get_reg;           /**< Get registers. */
-	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
-	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
-	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
-
-	eth_get_module_info_t      get_module_info;
-	/** Get plugin module eeprom attribute. */
-	eth_get_module_eeprom_t    get_module_eeprom;
-	/** Get plugin module eeprom data. */
-
-	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
-
-	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
-
-	eth_timesync_enable_t      timesync_enable;
-	/** Turn IEEE1588/802.1AS timestamping on. */
-	eth_timesync_disable_t     timesync_disable;
-	/** Turn IEEE1588/802.1AS timestamping off. */
-	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
-	/** Read the IEEE1588/802.1AS RX timestamp. */
-	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
-	/** Read the IEEE1588/802.1AS TX timestamp. */
-	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
-	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
-	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
-
-	eth_read_clock             read_clock;
-
-	eth_xstats_get_by_id_t     xstats_get_by_id;
-	/**< Get extended device statistic values by ID. */
-	eth_xstats_get_names_by_id_t xstats_get_names_by_id;
-	/**< Get name of extended device statistics by ID. */
-
-	eth_tm_ops_get_t tm_ops_get;
-	/**< Get Traffic Management (TM) operations. */
+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. */
 
-	eth_mtr_ops_get_t mtr_ops_get;
-	/**< Get Traffic Metering and Policing (MTR) operations. */
+typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
+/**< @internal Check the status of a Rx descriptor */
 
-	eth_pool_ops_supported_t pool_ops_supported;
-	/**< Test if a port supports specific mempool ops */
+typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
+/**< @internal Check the status of a Tx descriptor */
 
-	eth_hairpin_cap_get_t hairpin_cap_get;
-	/**< Returns the hairpin capabilities. */
-	eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
-	/**< Set up device RX hairpin queue. */
-	eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
-	/**< Set up device TX hairpin queue. */
-};
 
 /**
  * @internal
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 13fd049c0d..b006cbbe92 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -21,6 +21,700 @@
 extern "C" {
 #endif
 
+/*
+ * Definitions of all functions exported by an Ethernet driver through the
+ * generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
+ * structure associated with an Ethernet device.
+ */
+
+typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);
+/**< @internal Ethernet device configuration. */
+
+typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to start a configured Ethernet device. */
+
+typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to stop a configured Ethernet device. */
+
+typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to link up a configured Ethernet device. */
+
+typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to link down a configured Ethernet device. */
+
+typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to close a configured Ethernet device. */
+
+typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
+/** <@internal Function used to reset a configured Ethernet device. */
+
+typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to detect an Ethernet device removal. */
+
+/**
+ * @internal
+ * Function used to enable the Rx promiscuous mode of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, promiscuous mode is enabled.
+ * @retval -ENOTSUP
+ *   Promiscuous mode is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to enable promiscuos mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to enable promiscuous mode.
+ */
+typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Function used to disable the Rx promiscuous mode of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, promiscuous mode is disabled.
+ * @retval -ENOTSUP
+ *   Promiscuous mode disabling is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to disable promiscuos mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to disable promiscuous mode.
+ */
+typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Enable the receipt of all multicast packets by an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, all-multicast mode is enabled.
+ * @retval -ENOTSUP
+ *   All-multicast mode is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to enable all-multicast mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to enable all-multicast mode.
+ */
+typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Disable the receipt of all multicast packets by an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, all-multicast mode is disabled.
+ * @retval -ENOTSUP
+ *   All-multicast mode disabling is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to disable all-multicast mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to disable all-multicast mode.
+ */
+typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
+				int wait_to_complete);
+/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
+
+typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
+				struct rte_eth_stats *igb_stats);
+/**< @internal Get global I/O statistics of an Ethernet device. */
+
+/**
+ * @internal
+ * Reset global I/O statistics of an Ethernet device to 0.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, statistics has been reset.
+ * @retval -ENOTSUP
+ *   Resetting statistics is not supported.
+ * @retval -EINVAL
+ *   Resetting statistics is not valid.
+ * @retval -ENOMEM
+ *   Not enough memory to get the stats.
+ */
+typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat *stats, unsigned int n);
+/**< @internal Get extended stats of an Ethernet device. */
+
+typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
+				      const uint64_t *ids,
+				      uint64_t *values,
+				      unsigned int n);
+/**< @internal Get extended stats of an Ethernet device. */
+
+/**
+ * @internal
+ * Reset extended stats of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, statistics has been reset.
+ * @retval -ENOTSUP
+ *   Resetting statistics is not supported.
+ * @retval -EINVAL
+ *   Resetting statistics is not valid.
+ * @retval -ENOMEM
+ *   Not enough memory to get the stats.
+ */
+typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat_name *xstats_names, unsigned int size);
+/**< @internal Get names of extended stats of an Ethernet device. */
+
+typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+	unsigned int size);
+/**< @internal Get names of extended stats of an Ethernet device. */
+
+typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
+					     uint16_t queue_id,
+					     uint8_t stat_idx,
+					     uint8_t is_rx);
+/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
+
+typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
+				   struct rte_eth_dev_info *dev_info);
+/**< @internal Get specific information of an Ethernet device. */
+
+typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
+/**< @internal Get supported ptypes of an Ethernet device. */
+
+/**
+ * @internal
+ * Inform Ethernet device about reduced range of packet types to handle.
+ *
+ * @param dev
+ *   The Ethernet device identifier.
+ * @param ptype_mask
+ *   The ptype family that application is interested in should be bitwise OR of
+ *   RTE_PTYPE_*_MASK or 0.
+ * @return
+ *   - (0) if Success.
+ */
+typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
+				     uint32_t ptype_mask);
+
+typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
+				    uint16_t queue_id);
+/**< @internal Start rx and tx of a queue of an Ethernet device. */
+
+typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
+				    uint16_t queue_id);
+/**< @internal Stop rx and tx of a queue of an Ethernet device. */
+
+typedef int (*eth_rx_queue_setup_t)(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,
+				    struct rte_mempool *mb_pool);
+/**< @internal Set up a receive queue of an Ethernet device. */
+
+typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
+				    uint16_t tx_queue_id,
+				    uint16_t nb_tx_desc,
+				    unsigned int socket_id,
+				    const struct rte_eth_txconf *tx_conf);
+/**< @internal Setup a transmit queue of an Ethernet device. */
+
+typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
+				    uint16_t rx_queue_id);
+/**< @internal Enable interrupt of a receive queue of an Ethernet device. */
+
+typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
+				    uint16_t rx_queue_id);
+/**< @internal Disable interrupt of a receive queue of an Ethernet device. */
+
+typedef void (*eth_queue_release_t)(void *queue);
+/**< @internal Release memory resources allocated by given RX/TX queue. */
+
+typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
+				     char *fw_version, size_t fw_size);
+/**< @internal Get firmware information of an Ethernet device. */
+
+typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
+/**< @internal Force mbufs to be from TX ring. */
+
+typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
+	uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
+
+typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
+	uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
+
+typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
+	uint16_t queue_id, struct rte_eth_burst_mode *mode);
+
+typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
+/**< @internal Set MTU. */
+
+typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
+				  uint16_t vlan_id,
+				  int on);
+/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
+
+typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
+			       enum rte_vlan_type type, uint16_t tpid);
+/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
+
+typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
+/**< @internal set VLAN offload function by an Ethernet device. */
+
+typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
+			       uint16_t vlan_id,
+			       int on);
+/**< @internal set port based TX VLAN insertion by an Ethernet device. */
+
+typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
+				  uint16_t rx_queue_id,
+				  int on);
+/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
+
+typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
+			       struct rte_eth_fc_conf *fc_conf);
+/**< @internal Get current flow control parameter on an Ethernet device */
+
+typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
+			       struct rte_eth_fc_conf *fc_conf);
+/**< @internal Setup flow control parameter on an Ethernet device */
+
+typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
+				struct rte_eth_pfc_conf *pfc_conf);
+/**< @internal Setup priority flow control parameter on an Ethernet device */
+
+typedef int (*reta_update_t)(struct rte_eth_dev *dev,
+			     struct rte_eth_rss_reta_entry64 *reta_conf,
+			     uint16_t reta_size);
+/**< @internal Update RSS redirection table on an Ethernet device */
+
+typedef int (*reta_query_t)(struct rte_eth_dev *dev,
+			    struct rte_eth_rss_reta_entry64 *reta_conf,
+			    uint16_t reta_size);
+/**< @internal Query RSS redirection table on an Ethernet device */
+
+typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
+				 struct rte_eth_rss_conf *rss_conf);
+/**< @internal Update RSS hash configuration of an Ethernet device */
+
+typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
+				   struct rte_eth_rss_conf *rss_conf);
+/**< @internal Get current RSS hash configuration of an Ethernet device */
+
+typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
+/**< @internal Turn on SW controllable LED on an Ethernet device */
+
+typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
+/**< @internal Turn off SW controllable LED on an Ethernet device */
+
+typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
+/**< @internal Remove MAC address from receive address register */
+
+typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr,
+				  uint32_t index,
+				  uint32_t vmdq);
+/**< @internal Set a MAC address into Receive Address Register */
+
+typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr);
+/**< @internal Set a MAC address into Receive Address Register */
+
+typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr,
+				  uint8_t on);
+/**< @internal Set a Unicast Hash bitmap */
+
+typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
+				  uint8_t on);
+/**< @internal Set all Unicast Hash bitmap */
+
+typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
+				uint16_t queue_idx,
+				uint16_t tx_rate);
+/**< @internal Set queue TX rate */
+
+typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
+				  struct rte_eth_mirror_conf *mirror_conf,
+				  uint8_t rule_id,
+				  uint8_t on);
+/**< @internal Add a traffic mirroring rule on an Ethernet device */
+
+typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
+				  uint8_t rule_id);
+/**< @internal Remove a traffic mirroring rule on an Ethernet device */
+
+typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
+					 struct rte_eth_udp_tunnel *tunnel_udp);
+/**< @internal Add tunneling UDP port */
+
+typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
+					 struct rte_eth_udp_tunnel *tunnel_udp);
+/**< @internal Delete tunneling UDP port */
+
+typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
+				      struct rte_ether_addr *mc_addr_set,
+				      uint32_t nb_mc_addr);
+/**< @internal set the list of multicast addresses on an Ethernet device */
+
+typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
+
+typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
+
+typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
+						struct timespec *timestamp,
+						uint32_t flags);
+/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
+
+typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
+						struct timespec *timestamp);
+/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
+
+typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
+/**< @internal Function used to adjust the device clock */
+
+typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
+				      struct timespec *timestamp);
+/**< @internal Function used to get time from the device clock. */
+
+typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
+				       const struct timespec *timestamp);
+/**< @internal Function used to get time from the device clock */
+
+typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
+				      uint64_t *timestamp);
+/**< @internal Function used to get the current value of the device clock. */
+
+typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
+				struct rte_dev_reg_info *info);
+/**< @internal Retrieve registers  */
+
+typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
+/**< @internal Retrieve eeprom size  */
+
+typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
+				struct rte_dev_eeprom_info *info);
+/**< @internal Retrieve eeprom data  */
+
+typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
+				struct rte_dev_eeprom_info *info);
+/**< @internal Program eeprom data  */
+
+typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
+				     struct rte_eth_dev_module_info *modinfo);
+/**< @internal Retrieve type and size of plugin module eeprom */
+
+typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
+				       struct rte_dev_eeprom_info *info);
+/**< @internal Retrieve plugin module eeprom data */
+
+typedef int (*eth_l2_tunnel_eth_type_conf_t)
+	(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
+/**< @internal config l2 tunnel ether type */
+
+typedef int (*eth_l2_tunnel_offload_set_t)
+	(struct rte_eth_dev *dev,
+	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
+	 uint32_t mask,
+	 uint8_t en);
+/**< @internal enable/disable the l2 tunnel offload functions */
+
+
+typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
+				 enum rte_filter_type filter_type,
+				 enum rte_filter_op filter_op,
+				 void *arg);
+/**< @internal Take operations to assigned filter type on an Ethernet device */
+
+typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
+/**< @internal Get Traffic Management (TM) operations on an Ethernet device */
+
+typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
+/**< @internal Get Traffic Metering and Policing (MTR) operations */
+
+typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
+				 struct rte_eth_dcb_info *dcb_info);
+/**< @internal Get dcb information on an Ethernet device */
+
+typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
+						const char *pool);
+/**< @internal Test if a port supports specific mempool ops */
+
+/**
+ * @internal
+ * Get the hairpin capabilities.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param cap
+ *   returns the hairpin capabilities from the device.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ */
+typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
+				     struct rte_eth_hairpin_cap *cap);
+
+/**
+ * @internal
+ * Setup RX hairpin queue.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param rx_queue_id
+ *   the selected RX queue index.
+ * @param nb_rx_desc
+ *   the requested number of descriptors for this queue. 0 - use PMD default.
+ * @param conf
+ *   the RX hairpin configuration structure.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ * @retval -EINVAL
+ *   One of the parameters is invalid.
+ * @retval -ENOMEM
+ *   Unable to allocate resources.
+ */
+typedef int (*eth_rx_hairpin_queue_setup_t)
+	(struct rte_eth_dev *dev, uint16_t rx_queue_id,
+	 uint16_t nb_rx_desc,
+	 const struct rte_eth_hairpin_conf *conf);
+
+/**
+ * @internal
+ * Setup TX hairpin queue.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param tx_queue_id
+ *   the selected TX queue index.
+ * @param nb_tx_desc
+ *   the requested number of descriptors for this queue. 0 - use PMD default.
+ * @param conf
+ *   the TX hairpin configuration structure.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ * @retval -EINVAL
+ *   One of the parameters is invalid.
+ * @retval -ENOMEM
+ *   Unable to allocate resources.
+ */
+typedef int (*eth_tx_hairpin_queue_setup_t)
+	(struct rte_eth_dev *dev, uint16_t tx_queue_id,
+	 uint16_t nb_tx_desc,
+	 const struct rte_eth_hairpin_conf *hairpin_conf);
+
+/**
+ * @internal A structure containing the functions exported by an Ethernet driver.
+ */
+struct eth_dev_ops {
+	eth_dev_configure_t        dev_configure; /**< Configure device. */
+	eth_dev_start_t            dev_start;     /**< Start device. */
+	eth_dev_stop_t             dev_stop;      /**< Stop device. */
+	eth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */
+	eth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */
+	eth_dev_close_t            dev_close;     /**< Close device. */
+	eth_dev_reset_t		   dev_reset;	  /**< Reset device. */
+	eth_link_update_t          link_update;   /**< Get device link state. */
+	eth_is_removed_t           is_removed;
+	/**< Check if the device was physically removed. */
+
+	eth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */
+	eth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */
+	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
+	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
+	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
+	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
+	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
+	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
+	mtu_set_t                  mtu_set;       /**< Set MTU. */
+
+	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
+	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
+	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
+	eth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */
+	eth_xstats_get_names_t     xstats_get_names;
+	/**< Get names of extended statistics. */
+	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
+	/**< Configure per queue stat counter mapping. */
+
+	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
+	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
+	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
+	eth_burst_mode_get_t       rx_burst_mode_get; /**< Get RX burst mode */
+	eth_burst_mode_get_t       tx_burst_mode_get; /**< Get TX burst mode */
+	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
+	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
+	/**< Get packet types supported and identified by device. */
+	eth_dev_ptypes_set_t dev_ptypes_set;
+	/**< Inform Ethernet device about reduced range of packet types to handle. */
+
+	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
+	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
+	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
+	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
+	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
+
+	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
+	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
+	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
+	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_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
+	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
+	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
+	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
+	eth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */
+
+	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
+	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
+
+	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
+	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
+	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
+
+	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
+	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
+
+	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
+	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
+
+	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
+	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
+	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
+	/** Config ether type of l2 tunnel. */
+	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
+	/** Enable/disable l2 tunnel offload functions. */
+
+	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
+
+	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
+	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
+	reta_update_t              reta_update;   /** Update redirection table. */
+	reta_query_t               reta_query;    /** Query redirection table. */
+
+	eth_get_reg_t              get_reg;           /**< Get registers. */
+	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
+	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
+	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
+
+	eth_get_module_info_t      get_module_info;
+	/** Get plugin module eeprom attribute. */
+	eth_get_module_eeprom_t    get_module_eeprom;
+	/** Get plugin module eeprom data. */
+
+	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
+
+	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
+
+	eth_timesync_enable_t      timesync_enable;
+	/** Turn IEEE1588/802.1AS timestamping on. */
+	eth_timesync_disable_t     timesync_disable;
+	/** Turn IEEE1588/802.1AS timestamping off. */
+	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
+	/** Read the IEEE1588/802.1AS RX timestamp. */
+	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
+	/** Read the IEEE1588/802.1AS TX timestamp. */
+	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
+	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
+	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
+
+	eth_read_clock             read_clock;
+
+	eth_xstats_get_by_id_t     xstats_get_by_id;
+	/**< Get extended device statistic values by ID. */
+	eth_xstats_get_names_by_id_t xstats_get_names_by_id;
+	/**< Get name of extended device statistics by ID. */
+
+	eth_tm_ops_get_t tm_ops_get;
+	/**< Get Traffic Management (TM) operations. */
+
+	eth_mtr_ops_get_t mtr_ops_get;
+	/**< Get Traffic Metering and Policing (MTR) operations. */
+
+	eth_pool_ops_supported_t pool_ops_supported;
+	/**< Test if a port supports specific mempool ops */
+
+	eth_hairpin_cap_get_t hairpin_cap_get;
+	/**< Returns the hairpin capabilities. */
+	eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
+	/**< Set up device RX hairpin queue. */
+	eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
+	/**< Set up device TX hairpin queue. */
+};
+
 /**
  * RX/TX queue states
  */
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 881cc469b7..997598db11 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h
index 3ec7ffa2a5..3b39532935 100644
--- a/lib/librte_ethdev/rte_mtr_driver.h
+++ b/lib/librte_ethdev/rte_mtr_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h
index 90114ff53e..b86ed89c00 100644
--- a/lib/librte_ethdev/rte_tm_driver.h
+++ b/lib/librte_ethdev/rte_tm_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
-- 
2.25.4


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

* [dpdk-dev] [PATCH v2 4/7] ethdev: mark internal functions
  2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 2/7] ethdev: move inline device operations Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private Ferruh Yigit
@ 2020-09-03 21:09   ` Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 5/7] ethdev: use hairpin helper functions Ferruh Yigit
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-03 21:09 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Andrew Rybchenko, Ori Kam
  Cc: 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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index d40b95bfa9..35c06d30ef 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 2ce186610b..ce2e0ec0e4 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index b006cbbe92..3d1bc33272 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 8d9d6b1c67..6a84f3d76d 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
 };
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 997598db11..3ee871d3eb 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -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,
-- 
2.25.4


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

* [dpdk-dev] [PATCH v2 5/7] ethdev: use hairpin helper functions
  2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
                     ` (2 preceding siblings ...)
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 4/7] ethdev: mark internal functions Ferruh Yigit
@ 2020-09-03 21:09   ` Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
  5 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-03 21:09 UTC (permalink / raw)
  To: dev, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko,
	Thomas Monjalon, Andrew Rybchenko, Ray Kinsella, Neil Horman
  Cc: 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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 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(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 946f7454f6..1b729f7ab2 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -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;
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 66ad368e64..450d9641de 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -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;
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 3d1bc33272..5dfe9fdf1a 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6a84f3d76d..5db3fb156a 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.25.4


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

* [dpdk-dev] [PATCH v2 6/7] ethdev: remove invalid symbols from map file
  2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
                     ` (3 preceding siblings ...)
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 5/7] ethdev: use hairpin helper functions Ferruh Yigit
@ 2020-09-03 21:09   ` Ferruh Yigit
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
  5 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-03 21:09 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, Thomas Monjalon,
	Andrew Rybchenko, Sergio Gonzalez Monroy
  Cc: Ferruh Yigit, stable

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

Fixes: 9d41beed24b0 ("lib: provide initial versioning")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 5db3fb156a..a85986a2a2 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.25.4


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

* [dpdk-dev] [PATCH v2 7/7] ethdev: remove underscore prefix from internal API
  2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
                     ` (4 preceding siblings ...)
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
@ 2020-09-03 21:09   ` Ferruh Yigit
  5 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-03 21:09 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Igor Russkikh, Pavel Belous,
	Ajit Khaparde, Somnath Kotur, Chas Williams, Wei Hu (Xavier),
	Hemant Agrawal, Sachin Saxena, Wei Zhao, Jeff Guo, Marcin Wojtas,
	Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin,
	John Daley, Hyong Youb Kim, Gaetan Rivet, Qi Zhang, Xiao Wang,
	Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Beilei Xing,
	Jingjing Wu, Qiming Yang, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Long Li, Heinrich Kuhn, Harman Kalra, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Yong Wang, Thomas Monjalon, Ray Kinsella,
	Neil Horman
  Cc: 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'.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 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(-)

diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index 79156cb85a..b49089a33c 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -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
diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst
index 6fae39f904..86e0a141e6 100644
--- a/doc/guides/prog_guide/poll_mode_drv.rst
+++ b/doc/guides/prog_guide/poll_mode_drv.rst
@@ -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().
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 540b106045..2fca9140d7 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -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);
 		}
 	}
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 4d224bfa04..8c959ac913 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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);
 	}
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index eafc1d3868..d67db46c65 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -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)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index cdbd8151ed..4ffd2ca4bb 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -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);
 		}
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index bfc6504139..8d88a3badb 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -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)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 38cf0ab71c..0e9f836e55 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 66c5022bb7..ee97877095 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 2db04fa88c..c74e2f4358 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index da8c8ad922..8077519735 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -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,
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 7942b0df6b..8b0441c5cd 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -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);
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 70972d6717..7c68bbdec0 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -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;
 }
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index 4f3439cbb2..e1198e0da9 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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 */
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index ac2a72e388..41c99bdbf8 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -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,
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index ad5a536d73..d1f07348ba 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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:
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index fd45243fb9..84ad528c98 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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:
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 7bf1e79410..03c2070c3f 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -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);
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index a163548645..791a92d565 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -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");
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 2668219494..24a8bad543 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 1fdbfcb60d..4fbbee2dfe 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index ac1dc7841d..693acd9ae9 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 67b5bef44f..ed5f96b1a4 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -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;
 
diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c
index 19af9359c9..6786b12ab5 100644
--- a/drivers/net/mlx4/mlx4_intr.c
+++ b/drivers/net/mlx4/mlx4_intr.c
@@ -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);
 }
 
 /**
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 3d3dd2e862..7256c1bcfe 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -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;
 		}
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index eb55bd7f99..55cdc37f00 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index d186ddeabd..66d1966f29 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -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)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index c556dedab6..4f03691989 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -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);
 
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 76c69294d0..808b761b96 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -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);
 		}
 	}
 
diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c
index 12bf6c3231..439ec4fa89 100644
--- a/drivers/net/octeontx2/otx2_link.c
+++ b/drivers/net/octeontx2/otx2_link.c
@@ -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
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index 987a6f1e13..aecb98261b 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -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)
diff --git a/drivers/net/sfc/sfc_intr.c b/drivers/net/sfc/sfc_intr.c
index 80feab68f8..da32d393c2 100644
--- a/drivers/net/sfc/sfc_intr.c
+++ b/drivers/net/sfc/sfc_intr.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 959c8e4ddc..83d9488360 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -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);
 		}
 	}
 
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index fa365605ef..ce32be9ce3 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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;
 }
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 8658b6f2f0..4ce9ac5941 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 815fba2f55..fa80e75a5b 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -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 */
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index f8d63c7e17..066751f287 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -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;
 }
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 5dfe9fdf1a..23cc1e0959 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index a85986a2a2..b6630dfabe 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.25.4


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

* Re: [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private
  2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private Ferruh Yigit
@ 2020-09-08 12:19     ` Ferruh Yigit
  0 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-08 12:19 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Beilei Xing, Jeff Guo, Wei Zhao, Thomas Monjalon,
	Andrew Rybchenko, Ori Kam, Cristian Dumitrescu

On 9/3/2020 10:09 PM, Ferruh Yigit wrote:
> Hiding the 'struct eth_dev_ops' from applications.
> 
> Removing relevant deprecation notice.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

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


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

* [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
                   ` (7 preceding siblings ...)
  2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
@ 2020-09-09 11:12 ` Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 2/7] ethdev: move inline device operations Ferruh Yigit
                     ` (6 more replies)
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
  10 siblings, 7 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 11:12 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Andrew Rybchenko
  Cc: Ferruh Yigit, David Marchand

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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---

Cc: David Marchand <david.marchand@redhat.com>
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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 279eccb04a..35c676e262 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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.
 
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index df227a1773..a7d57b001d 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 -----------
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index f30245b102..eb6cd01f8d 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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)
 {
-- 
2.26.2


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

* [dpdk-dev] [PATCH v3 2/7] ethdev: move inline device operations
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
@ 2020-09-09 11:12   ` Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private Ferruh Yigit
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 11:12 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Shepard Siegel, Ed Czeck,
	John Miller, Igor Russkikh, Pavel Belous, Somalapuram Amaranath,
	Ajit Khaparde, Somnath Kotur, Hemant Agrawal, Sachin Saxena,
	Wei Zhao, Jeff Guo, John Daley, Hyong Youb Kim, Qi Zhang,
	Xiao Wang, Beilei Xing, Jingjing Wu, Qiming Yang, Matan Azrad,
	Shahaf Shuler, Viacheslav Ovsiienko, Stephen Hemminger,
	K. Y. Srinivasan, Haiyang Zhang, Long Li, Heinrich Kuhn,
	Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody,
	Shahed Shaikh, Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin,
	Chenbo Xia, Zhihong Wang, Thomas Monjalon
  Cc: Ferruh Yigit, David Marchand

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;

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
v2:
* Updated features.rst
* Tweak assignment order in sfc

Cc: David Marchand <david.marchand@redhat.com>
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(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index edd21c4d8e..dd8c9555b0 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -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()``.
 
 
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index a7d57b001d..ff7242012b 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 ------------
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd8677..ce7f6e4803 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -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) {
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index d3b00ab295..540b106045 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -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;
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 0c25739f82..02ceb95754 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -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.
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 75d055be00..4d224bfa04 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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;
 
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index b0f2023e60..e2c3fd0368 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -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;
 
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 02c254846c..38cf0ab71c 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 902b1cdca0..82766da882 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index a5551e8175..fe0cea88c2 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index ca75919ee2..2cffa3aa2d 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -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;
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index fd927923da..e6043e1455 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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;
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 841447228a..80efd06cd9 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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;
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index b755350cd2..be4b28fa45 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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;
 
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8e1d8a8d3e..e1ff38e8be 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c5dac2e328..c8b16c7f87 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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;
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 6ab3ee909d..aa37c11861 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d9582473a4..337ce90fbf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
 
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index bf1f82ba67..ec3cc4000e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -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,
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 4c29898203..eb55bd7f99 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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;
 }
 
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index fd91c0e491..229c1b9149 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -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;
 
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 99946279db..c556dedab6 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -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;
 
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 33b72bd4db..c06e32f26b 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -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) {
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 70d48e48ef..59f1746ee9 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -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;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index acee3e48e4..1a58e0df84 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -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;
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index d955a7ee23..959c8e4ddc 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -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) {
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index e55278af69..fa365605ef 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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;
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index dc0093bdf0..4f2fa0d943 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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) {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index eb6cd01f8d..b6f26a513b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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);
 }
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 32407dd418..8ed827475f 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -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
-- 
2.26.2


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

* [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 2/7] ethdev: move inline device operations Ferruh Yigit
@ 2020-09-09 11:12   ` Ferruh Yigit
  2020-09-09 12:57     ` Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 4/7] ethdev: mark internal functions Ferruh Yigit
                     ` (4 subsequent siblings)
  6 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 11:12 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Beilei Xing, Jeff Guo, Wei Zhao, Thomas Monjalon,
	Andrew Rybchenko, Ori Kam, Cristian Dumitrescu
  Cc: Ferruh Yigit, David Marchand

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
Cc: David Marchand <david.marchand@redhat.com>
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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 35c676e262..8770c87006 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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,
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index ff7242012b..bc4e8e412a 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 ------------
diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 083bc1a5f3..f09d4d8798 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -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"
diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c
index dbbef294ae..edb5d43846 100644
--- a/drivers/net/ixgbe/ixgbe_vf_representor.c
+++ b/drivers/net/ixgbe/ixgbe_vf_representor.c
@@ -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"
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 8ed827475f..bedd69acbd 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -21,322 +21,8 @@ struct rte_eth_dev_callback;
 /** @internal Structure to keep track of registered callbacks */
 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
 
-/*
- * Definitions of all functions exported by an Ethernet driver through the
- * the generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
- * structure associated with an Ethernet device.
- */
 struct rte_eth_dev;
 
-typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);
-/**< @internal Ethernet device configuration. */
-
-typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to start a configured Ethernet device. */
-
-typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to stop a configured Ethernet device. */
-
-typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to link up a configured Ethernet device. */
-
-typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to link down a configured Ethernet device. */
-
-typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to close a configured Ethernet device. */
-
-typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
-/** <@internal Function used to reset a configured Ethernet device. */
-
-typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to detect an Ethernet device removal. */
-
-/**
- * @internal
- * Function used to enable the Rx promiscuous mode of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, promiscuous mode is enabled.
- * @retval -ENOTSUP
- *   Promiscuous mode is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to enable promiscuos mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to enable promiscuous mode.
- */
-typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Function used to disable the Rx promiscuous mode of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, promiscuous mode is disabled.
- * @retval -ENOTSUP
- *   Promiscuous mode disabling is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to disable promiscuos mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to disable promiscuous mode.
- */
-typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Enable the receipt of all multicast packets by an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, all-multicast mode is enabled.
- * @retval -ENOTSUP
- *   All-multicast mode is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to enable all-multicast mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to enable all-multicast mode.
- */
-typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Disable the receipt of all multicast packets by an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, all-multicast mode is disabled.
- * @retval -ENOTSUP
- *   All-multicast mode disabling is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to disable all-multicast mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to disable all-multicast mode.
- */
-typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
-				int wait_to_complete);
-/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
-
-typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
-				struct rte_eth_stats *igb_stats);
-/**< @internal Get global I/O statistics of an Ethernet device. */
-
-/**
- * @internal
- * Reset global I/O statistics of an Ethernet device to 0.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, statistics has been reset.
- * @retval -ENOTSUP
- *   Resetting statistics is not supported.
- * @retval -EINVAL
- *   Resetting statistics is not valid.
- * @retval -ENOMEM
- *   Not enough memory to get the stats.
- */
-typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat *stats, unsigned n);
-/**< @internal Get extended stats of an Ethernet device. */
-
-typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
-				      const uint64_t *ids,
-				      uint64_t *values,
-				      unsigned int n);
-/**< @internal Get extended stats of an Ethernet device. */
-
-/**
- * @internal
- * Reset extended stats of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, statistics has been reset.
- * @retval -ENOTSUP
- *   Resetting statistics is not supported.
- * @retval -EINVAL
- *   Resetting statistics is not valid.
- * @retval -ENOMEM
- *   Not enough memory to get the stats.
- */
-typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat_name *xstats_names, unsigned size);
-/**< @internal Get names of extended stats of an Ethernet device. */
-
-typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
-	unsigned int size);
-/**< @internal Get names of extended stats of an Ethernet device. */
-
-typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
-					     uint16_t queue_id,
-					     uint8_t stat_idx,
-					     uint8_t is_rx);
-/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
-
-typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
-				   struct rte_eth_dev_info *dev_info);
-/**< @internal Get specific information of an Ethernet device. */
-
-typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
-/**< @internal Get supported ptypes of an Ethernet device. */
-
-/**
- * @internal
- * Inform Ethernet device about reduced range of packet types to handle.
- *
- * @param dev
- *   The Ethernet device identifier.
- * @param ptype_mask
- *   The ptype family that application is interested in should be bitwise OR of
- *   RTE_PTYPE_*_MASK or 0.
- * @return
- *   - (0) if Success.
- */
-typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
-				     uint32_t ptype_mask);
-
-typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
-				    uint16_t queue_id);
-/**< @internal Start rx and tx of a queue of an Ethernet device. */
-
-typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
-				    uint16_t queue_id);
-/**< @internal Stop rx and tx of a queue of an Ethernet device. */
-
-typedef int (*eth_rx_queue_setup_t)(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,
-				    struct rte_mempool *mb_pool);
-/**< @internal Set up a receive queue of an Ethernet device. */
-
-typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
-				    uint16_t tx_queue_id,
-				    uint16_t nb_tx_desc,
-				    unsigned int socket_id,
-				    const struct rte_eth_txconf *tx_conf);
-/**< @internal Setup a transmit queue of an Ethernet device. */
-
-typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
-				    uint16_t rx_queue_id);
-/**< @internal Enable interrupt of a receive queue of an Ethernet device. */
-
-typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
-				    uint16_t rx_queue_id);
-/**< @internal Disable interrupt of a receive queue of an Ethernet device. */
-
-typedef void (*eth_queue_release_t)(void *queue);
-/**< @internal Release memory resources allocated by given RX/TX queue. */
-
-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 */
-
-typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
-/**< @internal Check the status of a Tx descriptor */
-
-typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
-				     char *fw_version, size_t fw_size);
-/**< @internal Get firmware information of an Ethernet device. */
-
-typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
-/**< @internal Force mbufs to be from TX ring. */
-
-typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
-	uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
-
-typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
-	uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
-
-typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
-	uint16_t queue_id, struct rte_eth_burst_mode *mode);
-
-typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
-/**< @internal Set MTU. */
-
-typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
-				  uint16_t vlan_id,
-				  int on);
-/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
-
-typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
-			       enum rte_vlan_type type, uint16_t tpid);
-/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
-
-typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
-/**< @internal set VLAN offload function by an Ethernet device. */
-
-typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
-			       uint16_t vlan_id,
-			       int on);
-/**< @internal set port based TX VLAN insertion by an Ethernet device. */
-
-typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
-				  uint16_t rx_queue_id,
-				  int on);
-/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
-
 typedef uint16_t (*eth_rx_burst_t)(void *rxq,
 				   struct rte_mbuf **rx_pkts,
 				   uint16_t nb_pkts);
@@ -352,400 +38,20 @@ typedef uint16_t (*eth_tx_prep_t)(void *txq,
 				   uint16_t nb_pkts);
 /**< @internal Prepare output packets on a transmit queue of an Ethernet device. */
 
-typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
-			       struct rte_eth_fc_conf *fc_conf);
-/**< @internal Get current flow control parameter on an Ethernet device */
-
-typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
-			       struct rte_eth_fc_conf *fc_conf);
-/**< @internal Setup flow control parameter on an Ethernet device */
-
-typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
-				struct rte_eth_pfc_conf *pfc_conf);
-/**< @internal Setup priority flow control parameter on an Ethernet device */
-
-typedef int (*reta_update_t)(struct rte_eth_dev *dev,
-			     struct rte_eth_rss_reta_entry64 *reta_conf,
-			     uint16_t reta_size);
-/**< @internal Update RSS redirection table on an Ethernet device */
-
-typedef int (*reta_query_t)(struct rte_eth_dev *dev,
-			    struct rte_eth_rss_reta_entry64 *reta_conf,
-			    uint16_t reta_size);
-/**< @internal Query RSS redirection table on an Ethernet device */
-
-typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
-				 struct rte_eth_rss_conf *rss_conf);
-/**< @internal Update RSS hash configuration of an Ethernet device */
-
-typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
-				   struct rte_eth_rss_conf *rss_conf);
-/**< @internal Get current RSS hash configuration of an Ethernet device */
-
-typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
-/**< @internal Turn on SW controllable LED on an Ethernet device */
-
-typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
-/**< @internal Turn off SW controllable LED on an Ethernet device */
-
-typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
-/**< @internal Remove MAC address from receive address register */
-
-typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr,
-				  uint32_t index,
-				  uint32_t vmdq);
-/**< @internal Set a MAC address into Receive Address Address Register */
-
-typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr);
-/**< @internal Set a MAC address into Receive Address Address Register */
-
-typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr,
-				  uint8_t on);
-/**< @internal Set a Unicast Hash bitmap */
-
-typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
-				  uint8_t on);
-/**< @internal Set all Unicast Hash bitmap */
-
-typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
-				uint16_t queue_idx,
-				uint16_t tx_rate);
-/**< @internal Set queue TX rate */
-
-typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
-				  struct rte_eth_mirror_conf *mirror_conf,
-				  uint8_t rule_id,
-				  uint8_t on);
-/**< @internal Add a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
-				  uint8_t rule_id);
-/**< @internal Remove a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
-					 struct rte_eth_udp_tunnel *tunnel_udp);
-/**< @internal Add tunneling UDP port */
-
-typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
-					 struct rte_eth_udp_tunnel *tunnel_udp);
-/**< @internal Delete tunneling UDP port */
-
-typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
-				      struct rte_ether_addr *mc_addr_set,
-				      uint32_t nb_mc_addr);
-/**< @internal set the list of multicast addresses on an Ethernet device */
-
-typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
-
-typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
-
-typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
-						struct timespec *timestamp,
-						uint32_t flags);
-/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
-
-typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
-						struct timespec *timestamp);
-/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
 
-typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
-/**< @internal Function used to adjust the device clock */
-
-typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
-				      struct timespec *timestamp);
-/**< @internal Function used to get time from the device clock. */
-
-typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
-				       const struct timespec *timestamp);
-/**< @internal Function used to get time from the device clock */
-
-typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
-				      uint64_t *timestamp);
-/**< @internal Function used to get the current value of the device clock. */
-
-typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
-				struct rte_dev_reg_info *info);
-/**< @internal Retrieve registers  */
-
-typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
-/**< @internal Retrieve eeprom size  */
-
-typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
-				struct rte_dev_eeprom_info *info);
-/**< @internal Retrieve eeprom data  */
-
-typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
-				struct rte_dev_eeprom_info *info);
-/**< @internal Program eeprom data  */
-
-typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
-				     struct rte_eth_dev_module_info *modinfo);
-/**< @internal Retrieve type and size of plugin module eeprom */
-
-typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
-				       struct rte_dev_eeprom_info *info);
-/**< @internal Retrieve plugin module eeprom data */
-
-typedef int (*eth_l2_tunnel_eth_type_conf_t)
-	(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
-/**< @internal config l2 tunnel ether type */
-
-typedef int (*eth_l2_tunnel_offload_set_t)
-	(struct rte_eth_dev *dev,
-	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
-	 uint32_t mask,
-	 uint8_t en);
-/**< @internal enable/disable the l2 tunnel offload functions */
-
-
-typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
-				 enum rte_filter_type filter_type,
-				 enum rte_filter_op filter_op,
-				 void *arg);
-/**< @internal Take operations to assigned filter type on an Ethernet device */
-
-typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
-/**< @internal Get Traffic Management (TM) operations on an Ethernet device */
-
-typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
-/**< @internal Get Traffic Metering and Policing (MTR) operations */
-
-typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
-				 struct rte_eth_dcb_info *dcb_info);
-/**< @internal Get dcb information on an Ethernet device */
-
-typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
-						const char *pool);
-/**< @internal Test if a port supports specific mempool ops */
-
-/**
- * @internal
- * Get the hairpin capabilities.
- *
- * @param dev
- *   ethdev handle of port.
- * @param cap
- *   returns the hairpin capabilities from the device.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- */
-typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
-				     struct rte_eth_hairpin_cap *cap);
-
-/**
- * @internal
- * Setup RX hairpin queue.
- *
- * @param dev
- *   ethdev handle of port.
- * @param rx_queue_id
- *   the selected RX queue index.
- * @param nb_rx_desc
- *   the requested number of descriptors for this queue. 0 - use PMD default.
- * @param conf
- *   the RX hairpin configuration structure.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- * @retval -EINVAL
- *   One of the parameters is invalid.
- * @retval -ENOMEM
- *   Unable to allocate resources.
- */
-typedef int (*eth_rx_hairpin_queue_setup_t)
-	(struct rte_eth_dev *dev, uint16_t rx_queue_id,
-	 uint16_t nb_rx_desc,
-	 const struct rte_eth_hairpin_conf *conf);
-
-/**
- * @internal
- * Setup TX hairpin queue.
- *
- * @param dev
- *   ethdev handle of port.
- * @param tx_queue_id
- *   the selected TX queue index.
- * @param nb_tx_desc
- *   the requested number of descriptors for this queue. 0 - use PMD default.
- * @param conf
- *   the TX hairpin configuration structure.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- * @retval -EINVAL
- *   One of the parameters is invalid.
- * @retval -ENOMEM
- *   Unable to allocate resources.
- */
-typedef int (*eth_tx_hairpin_queue_setup_t)
-	(struct rte_eth_dev *dev, uint16_t tx_queue_id,
-	 uint16_t nb_tx_desc,
-	 const struct rte_eth_hairpin_conf *hairpin_conf);
-
-/**
- * @internal A structure containing the functions exported by an Ethernet driver.
- */
-struct eth_dev_ops {
-	eth_dev_configure_t        dev_configure; /**< Configure device. */
-	eth_dev_start_t            dev_start;     /**< Start device. */
-	eth_dev_stop_t             dev_stop;      /**< Stop device. */
-	eth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */
-	eth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */
-	eth_dev_close_t            dev_close;     /**< Close device. */
-	eth_dev_reset_t		   dev_reset;	  /**< Reset device. */
-	eth_link_update_t          link_update;   /**< Get device link state. */
-	eth_is_removed_t           is_removed;
-	/**< Check if the device was physically removed. */
-
-	eth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */
-	eth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */
-	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
-	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
-	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
-	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
-	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
-	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
-	mtu_set_t                  mtu_set;       /**< Set MTU. */
-
-	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
-	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
-	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
-	eth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */
-	eth_xstats_get_names_t     xstats_get_names;
-	/**< Get names of extended statistics. */
-	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
-	/**< Configure per queue stat counter mapping. */
-
-	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
-	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
-	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
-	eth_burst_mode_get_t       rx_burst_mode_get; /**< Get RX burst mode */
-	eth_burst_mode_get_t       tx_burst_mode_get; /**< Get TX burst mode */
-	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
-	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
-	/**< Get packet types supported and identified by device. */
-	eth_dev_ptypes_set_t dev_ptypes_set;
-	/**< Inform Ethernet device about reduced range of packet types to handle. */
-
-	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
-	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
-	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
-	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
-	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
-
-	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
-	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
-	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
-	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. */
-	/*
-	 * Static inline functions use functions ABOVE this comment.
-	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
-	 */
-	eth_rx_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
-	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
-	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
-	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
-	eth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */
-
-	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
-	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
-
-	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
-	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
-	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
-
-	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
-	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
-
-	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
-	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
-
-	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
-	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
-	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
-	/** Config ether type of l2 tunnel. */
-	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
-	/** Enable/disable l2 tunnel offload functions. */
-
-	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
-
-	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
-	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
-	reta_update_t              reta_update;   /** Update redirection table. */
-	reta_query_t               reta_query;    /** Query redirection table. */
-
-	eth_get_reg_t              get_reg;           /**< Get registers. */
-	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
-	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
-	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
-
-	eth_get_module_info_t      get_module_info;
-	/** Get plugin module eeprom attribute. */
-	eth_get_module_eeprom_t    get_module_eeprom;
-	/** Get plugin module eeprom data. */
-
-	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
-
-	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
-
-	eth_timesync_enable_t      timesync_enable;
-	/** Turn IEEE1588/802.1AS timestamping on. */
-	eth_timesync_disable_t     timesync_disable;
-	/** Turn IEEE1588/802.1AS timestamping off. */
-	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
-	/** Read the IEEE1588/802.1AS RX timestamp. */
-	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
-	/** Read the IEEE1588/802.1AS TX timestamp. */
-	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
-	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
-	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
-
-	eth_read_clock             read_clock;
-
-	eth_xstats_get_by_id_t     xstats_get_by_id;
-	/**< Get extended device statistic values by ID. */
-	eth_xstats_get_names_by_id_t xstats_get_names_by_id;
-	/**< Get name of extended device statistics by ID. */
+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. */
 
-	eth_tm_ops_get_t tm_ops_get;
-	/**< Get Traffic Management (TM) operations. */
+typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);
+/**< @internal Check DD bit of specific RX descriptor */
 
-	eth_mtr_ops_get_t mtr_ops_get;
-	/**< Get Traffic Metering and Policing (MTR) operations. */
+typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
+/**< @internal Check the status of a Rx descriptor */
 
-	eth_pool_ops_supported_t pool_ops_supported;
-	/**< Test if a port supports specific mempool ops */
+typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
+/**< @internal Check the status of a Tx descriptor */
 
-	eth_hairpin_cap_get_t hairpin_cap_get;
-	/**< Returns the hairpin capabilities. */
-	eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
-	/**< Set up device RX hairpin queue. */
-	eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
-	/**< Set up device TX hairpin queue. */
-};
 
 /**
  * @internal
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 13fd049c0d..b006cbbe92 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -21,6 +21,700 @@
 extern "C" {
 #endif
 
+/*
+ * Definitions of all functions exported by an Ethernet driver through the
+ * generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
+ * structure associated with an Ethernet device.
+ */
+
+typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);
+/**< @internal Ethernet device configuration. */
+
+typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to start a configured Ethernet device. */
+
+typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to stop a configured Ethernet device. */
+
+typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to link up a configured Ethernet device. */
+
+typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to link down a configured Ethernet device. */
+
+typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to close a configured Ethernet device. */
+
+typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
+/** <@internal Function used to reset a configured Ethernet device. */
+
+typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to detect an Ethernet device removal. */
+
+/**
+ * @internal
+ * Function used to enable the Rx promiscuous mode of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, promiscuous mode is enabled.
+ * @retval -ENOTSUP
+ *   Promiscuous mode is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to enable promiscuos mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to enable promiscuous mode.
+ */
+typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Function used to disable the Rx promiscuous mode of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, promiscuous mode is disabled.
+ * @retval -ENOTSUP
+ *   Promiscuous mode disabling is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to disable promiscuos mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to disable promiscuous mode.
+ */
+typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Enable the receipt of all multicast packets by an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, all-multicast mode is enabled.
+ * @retval -ENOTSUP
+ *   All-multicast mode is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to enable all-multicast mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to enable all-multicast mode.
+ */
+typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Disable the receipt of all multicast packets by an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, all-multicast mode is disabled.
+ * @retval -ENOTSUP
+ *   All-multicast mode disabling is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to disable all-multicast mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to disable all-multicast mode.
+ */
+typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
+				int wait_to_complete);
+/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
+
+typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
+				struct rte_eth_stats *igb_stats);
+/**< @internal Get global I/O statistics of an Ethernet device. */
+
+/**
+ * @internal
+ * Reset global I/O statistics of an Ethernet device to 0.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, statistics has been reset.
+ * @retval -ENOTSUP
+ *   Resetting statistics is not supported.
+ * @retval -EINVAL
+ *   Resetting statistics is not valid.
+ * @retval -ENOMEM
+ *   Not enough memory to get the stats.
+ */
+typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat *stats, unsigned int n);
+/**< @internal Get extended stats of an Ethernet device. */
+
+typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
+				      const uint64_t *ids,
+				      uint64_t *values,
+				      unsigned int n);
+/**< @internal Get extended stats of an Ethernet device. */
+
+/**
+ * @internal
+ * Reset extended stats of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, statistics has been reset.
+ * @retval -ENOTSUP
+ *   Resetting statistics is not supported.
+ * @retval -EINVAL
+ *   Resetting statistics is not valid.
+ * @retval -ENOMEM
+ *   Not enough memory to get the stats.
+ */
+typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat_name *xstats_names, unsigned int size);
+/**< @internal Get names of extended stats of an Ethernet device. */
+
+typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+	unsigned int size);
+/**< @internal Get names of extended stats of an Ethernet device. */
+
+typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
+					     uint16_t queue_id,
+					     uint8_t stat_idx,
+					     uint8_t is_rx);
+/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
+
+typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
+				   struct rte_eth_dev_info *dev_info);
+/**< @internal Get specific information of an Ethernet device. */
+
+typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
+/**< @internal Get supported ptypes of an Ethernet device. */
+
+/**
+ * @internal
+ * Inform Ethernet device about reduced range of packet types to handle.
+ *
+ * @param dev
+ *   The Ethernet device identifier.
+ * @param ptype_mask
+ *   The ptype family that application is interested in should be bitwise OR of
+ *   RTE_PTYPE_*_MASK or 0.
+ * @return
+ *   - (0) if Success.
+ */
+typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
+				     uint32_t ptype_mask);
+
+typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
+				    uint16_t queue_id);
+/**< @internal Start rx and tx of a queue of an Ethernet device. */
+
+typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
+				    uint16_t queue_id);
+/**< @internal Stop rx and tx of a queue of an Ethernet device. */
+
+typedef int (*eth_rx_queue_setup_t)(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,
+				    struct rte_mempool *mb_pool);
+/**< @internal Set up a receive queue of an Ethernet device. */
+
+typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
+				    uint16_t tx_queue_id,
+				    uint16_t nb_tx_desc,
+				    unsigned int socket_id,
+				    const struct rte_eth_txconf *tx_conf);
+/**< @internal Setup a transmit queue of an Ethernet device. */
+
+typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
+				    uint16_t rx_queue_id);
+/**< @internal Enable interrupt of a receive queue of an Ethernet device. */
+
+typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
+				    uint16_t rx_queue_id);
+/**< @internal Disable interrupt of a receive queue of an Ethernet device. */
+
+typedef void (*eth_queue_release_t)(void *queue);
+/**< @internal Release memory resources allocated by given RX/TX queue. */
+
+typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
+				     char *fw_version, size_t fw_size);
+/**< @internal Get firmware information of an Ethernet device. */
+
+typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
+/**< @internal Force mbufs to be from TX ring. */
+
+typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
+	uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
+
+typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
+	uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
+
+typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
+	uint16_t queue_id, struct rte_eth_burst_mode *mode);
+
+typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
+/**< @internal Set MTU. */
+
+typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
+				  uint16_t vlan_id,
+				  int on);
+/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
+
+typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
+			       enum rte_vlan_type type, uint16_t tpid);
+/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
+
+typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
+/**< @internal set VLAN offload function by an Ethernet device. */
+
+typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
+			       uint16_t vlan_id,
+			       int on);
+/**< @internal set port based TX VLAN insertion by an Ethernet device. */
+
+typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
+				  uint16_t rx_queue_id,
+				  int on);
+/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
+
+typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
+			       struct rte_eth_fc_conf *fc_conf);
+/**< @internal Get current flow control parameter on an Ethernet device */
+
+typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
+			       struct rte_eth_fc_conf *fc_conf);
+/**< @internal Setup flow control parameter on an Ethernet device */
+
+typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
+				struct rte_eth_pfc_conf *pfc_conf);
+/**< @internal Setup priority flow control parameter on an Ethernet device */
+
+typedef int (*reta_update_t)(struct rte_eth_dev *dev,
+			     struct rte_eth_rss_reta_entry64 *reta_conf,
+			     uint16_t reta_size);
+/**< @internal Update RSS redirection table on an Ethernet device */
+
+typedef int (*reta_query_t)(struct rte_eth_dev *dev,
+			    struct rte_eth_rss_reta_entry64 *reta_conf,
+			    uint16_t reta_size);
+/**< @internal Query RSS redirection table on an Ethernet device */
+
+typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
+				 struct rte_eth_rss_conf *rss_conf);
+/**< @internal Update RSS hash configuration of an Ethernet device */
+
+typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
+				   struct rte_eth_rss_conf *rss_conf);
+/**< @internal Get current RSS hash configuration of an Ethernet device */
+
+typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
+/**< @internal Turn on SW controllable LED on an Ethernet device */
+
+typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
+/**< @internal Turn off SW controllable LED on an Ethernet device */
+
+typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
+/**< @internal Remove MAC address from receive address register */
+
+typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr,
+				  uint32_t index,
+				  uint32_t vmdq);
+/**< @internal Set a MAC address into Receive Address Register */
+
+typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr);
+/**< @internal Set a MAC address into Receive Address Register */
+
+typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr,
+				  uint8_t on);
+/**< @internal Set a Unicast Hash bitmap */
+
+typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
+				  uint8_t on);
+/**< @internal Set all Unicast Hash bitmap */
+
+typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
+				uint16_t queue_idx,
+				uint16_t tx_rate);
+/**< @internal Set queue TX rate */
+
+typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
+				  struct rte_eth_mirror_conf *mirror_conf,
+				  uint8_t rule_id,
+				  uint8_t on);
+/**< @internal Add a traffic mirroring rule on an Ethernet device */
+
+typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
+				  uint8_t rule_id);
+/**< @internal Remove a traffic mirroring rule on an Ethernet device */
+
+typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
+					 struct rte_eth_udp_tunnel *tunnel_udp);
+/**< @internal Add tunneling UDP port */
+
+typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
+					 struct rte_eth_udp_tunnel *tunnel_udp);
+/**< @internal Delete tunneling UDP port */
+
+typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
+				      struct rte_ether_addr *mc_addr_set,
+				      uint32_t nb_mc_addr);
+/**< @internal set the list of multicast addresses on an Ethernet device */
+
+typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
+
+typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
+
+typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
+						struct timespec *timestamp,
+						uint32_t flags);
+/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
+
+typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
+						struct timespec *timestamp);
+/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
+
+typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
+/**< @internal Function used to adjust the device clock */
+
+typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
+				      struct timespec *timestamp);
+/**< @internal Function used to get time from the device clock. */
+
+typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
+				       const struct timespec *timestamp);
+/**< @internal Function used to get time from the device clock */
+
+typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
+				      uint64_t *timestamp);
+/**< @internal Function used to get the current value of the device clock. */
+
+typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
+				struct rte_dev_reg_info *info);
+/**< @internal Retrieve registers  */
+
+typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
+/**< @internal Retrieve eeprom size  */
+
+typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
+				struct rte_dev_eeprom_info *info);
+/**< @internal Retrieve eeprom data  */
+
+typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
+				struct rte_dev_eeprom_info *info);
+/**< @internal Program eeprom data  */
+
+typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
+				     struct rte_eth_dev_module_info *modinfo);
+/**< @internal Retrieve type and size of plugin module eeprom */
+
+typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
+				       struct rte_dev_eeprom_info *info);
+/**< @internal Retrieve plugin module eeprom data */
+
+typedef int (*eth_l2_tunnel_eth_type_conf_t)
+	(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
+/**< @internal config l2 tunnel ether type */
+
+typedef int (*eth_l2_tunnel_offload_set_t)
+	(struct rte_eth_dev *dev,
+	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
+	 uint32_t mask,
+	 uint8_t en);
+/**< @internal enable/disable the l2 tunnel offload functions */
+
+
+typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
+				 enum rte_filter_type filter_type,
+				 enum rte_filter_op filter_op,
+				 void *arg);
+/**< @internal Take operations to assigned filter type on an Ethernet device */
+
+typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
+/**< @internal Get Traffic Management (TM) operations on an Ethernet device */
+
+typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
+/**< @internal Get Traffic Metering and Policing (MTR) operations */
+
+typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
+				 struct rte_eth_dcb_info *dcb_info);
+/**< @internal Get dcb information on an Ethernet device */
+
+typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
+						const char *pool);
+/**< @internal Test if a port supports specific mempool ops */
+
+/**
+ * @internal
+ * Get the hairpin capabilities.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param cap
+ *   returns the hairpin capabilities from the device.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ */
+typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
+				     struct rte_eth_hairpin_cap *cap);
+
+/**
+ * @internal
+ * Setup RX hairpin queue.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param rx_queue_id
+ *   the selected RX queue index.
+ * @param nb_rx_desc
+ *   the requested number of descriptors for this queue. 0 - use PMD default.
+ * @param conf
+ *   the RX hairpin configuration structure.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ * @retval -EINVAL
+ *   One of the parameters is invalid.
+ * @retval -ENOMEM
+ *   Unable to allocate resources.
+ */
+typedef int (*eth_rx_hairpin_queue_setup_t)
+	(struct rte_eth_dev *dev, uint16_t rx_queue_id,
+	 uint16_t nb_rx_desc,
+	 const struct rte_eth_hairpin_conf *conf);
+
+/**
+ * @internal
+ * Setup TX hairpin queue.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param tx_queue_id
+ *   the selected TX queue index.
+ * @param nb_tx_desc
+ *   the requested number of descriptors for this queue. 0 - use PMD default.
+ * @param conf
+ *   the TX hairpin configuration structure.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ * @retval -EINVAL
+ *   One of the parameters is invalid.
+ * @retval -ENOMEM
+ *   Unable to allocate resources.
+ */
+typedef int (*eth_tx_hairpin_queue_setup_t)
+	(struct rte_eth_dev *dev, uint16_t tx_queue_id,
+	 uint16_t nb_tx_desc,
+	 const struct rte_eth_hairpin_conf *hairpin_conf);
+
+/**
+ * @internal A structure containing the functions exported by an Ethernet driver.
+ */
+struct eth_dev_ops {
+	eth_dev_configure_t        dev_configure; /**< Configure device. */
+	eth_dev_start_t            dev_start;     /**< Start device. */
+	eth_dev_stop_t             dev_stop;      /**< Stop device. */
+	eth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */
+	eth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */
+	eth_dev_close_t            dev_close;     /**< Close device. */
+	eth_dev_reset_t		   dev_reset;	  /**< Reset device. */
+	eth_link_update_t          link_update;   /**< Get device link state. */
+	eth_is_removed_t           is_removed;
+	/**< Check if the device was physically removed. */
+
+	eth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */
+	eth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */
+	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
+	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
+	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
+	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
+	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
+	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
+	mtu_set_t                  mtu_set;       /**< Set MTU. */
+
+	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
+	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
+	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
+	eth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */
+	eth_xstats_get_names_t     xstats_get_names;
+	/**< Get names of extended statistics. */
+	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
+	/**< Configure per queue stat counter mapping. */
+
+	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
+	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
+	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
+	eth_burst_mode_get_t       rx_burst_mode_get; /**< Get RX burst mode */
+	eth_burst_mode_get_t       tx_burst_mode_get; /**< Get TX burst mode */
+	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
+	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
+	/**< Get packet types supported and identified by device. */
+	eth_dev_ptypes_set_t dev_ptypes_set;
+	/**< Inform Ethernet device about reduced range of packet types to handle. */
+
+	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
+	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
+	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
+	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
+	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
+
+	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
+	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
+	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
+	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_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
+	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
+	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
+	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
+	eth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */
+
+	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
+	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
+
+	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
+	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
+	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
+
+	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
+	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
+
+	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
+	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
+
+	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
+	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
+	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
+	/** Config ether type of l2 tunnel. */
+	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
+	/** Enable/disable l2 tunnel offload functions. */
+
+	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
+
+	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
+	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
+	reta_update_t              reta_update;   /** Update redirection table. */
+	reta_query_t               reta_query;    /** Query redirection table. */
+
+	eth_get_reg_t              get_reg;           /**< Get registers. */
+	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
+	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
+	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
+
+	eth_get_module_info_t      get_module_info;
+	/** Get plugin module eeprom attribute. */
+	eth_get_module_eeprom_t    get_module_eeprom;
+	/** Get plugin module eeprom data. */
+
+	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
+
+	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
+
+	eth_timesync_enable_t      timesync_enable;
+	/** Turn IEEE1588/802.1AS timestamping on. */
+	eth_timesync_disable_t     timesync_disable;
+	/** Turn IEEE1588/802.1AS timestamping off. */
+	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
+	/** Read the IEEE1588/802.1AS RX timestamp. */
+	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
+	/** Read the IEEE1588/802.1AS TX timestamp. */
+	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
+	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
+	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
+
+	eth_read_clock             read_clock;
+
+	eth_xstats_get_by_id_t     xstats_get_by_id;
+	/**< Get extended device statistic values by ID. */
+	eth_xstats_get_names_by_id_t xstats_get_names_by_id;
+	/**< Get name of extended device statistics by ID. */
+
+	eth_tm_ops_get_t tm_ops_get;
+	/**< Get Traffic Management (TM) operations. */
+
+	eth_mtr_ops_get_t mtr_ops_get;
+	/**< Get Traffic Metering and Policing (MTR) operations. */
+
+	eth_pool_ops_supported_t pool_ops_supported;
+	/**< Test if a port supports specific mempool ops */
+
+	eth_hairpin_cap_get_t hairpin_cap_get;
+	/**< Returns the hairpin capabilities. */
+	eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
+	/**< Set up device RX hairpin queue. */
+	eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
+	/**< Set up device TX hairpin queue. */
+};
+
 /**
  * RX/TX queue states
  */
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 881cc469b7..997598db11 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h
index 3ec7ffa2a5..3b39532935 100644
--- a/lib/librte_ethdev/rte_mtr_driver.h
+++ b/lib/librte_ethdev/rte_mtr_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h
index 90114ff53e..b86ed89c00 100644
--- a/lib/librte_ethdev/rte_tm_driver.h
+++ b/lib/librte_ethdev/rte_tm_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
-- 
2.26.2


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

* [dpdk-dev] [PATCH v3 4/7] ethdev: mark internal functions
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 2/7] ethdev: move inline device operations Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private Ferruh Yigit
@ 2020-09-09 11:12   ` Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 5/7] ethdev: use hairpin helper functions Ferruh Yigit
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 11:12 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Andrew Rybchenko, Ori Kam
  Cc: Ferruh Yigit, David Marchand

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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
Cc: David Marchand <david.marchand@redhat.com>
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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 8770c87006..6c82db2961 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index bc4e8e412a..6d3c60390f 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 ------------
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index b6f26a513b..e7733d828b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index b006cbbe92..3d1bc33272 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 8d9d6b1c67..6a84f3d76d 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
 };
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 997598db11..3ee871d3eb 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -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,
-- 
2.26.2


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

* [dpdk-dev] [PATCH v3 5/7] ethdev: use hairpin helper functions
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
                     ` (2 preceding siblings ...)
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 4/7] ethdev: mark internal functions Ferruh Yigit
@ 2020-09-09 11:12   ` Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 11:12 UTC (permalink / raw)
  To: dev, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko,
	Thomas Monjalon, Andrew Rybchenko, Ray Kinsella, Neil Horman
  Cc: 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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 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(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 946f7454f6..1b729f7ab2 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -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;
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 66ad368e64..450d9641de 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -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;
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 3d1bc33272..5dfe9fdf1a 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6a84f3d76d..5db3fb156a 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.26.2


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

* [dpdk-dev] [PATCH v3 6/7] ethdev: remove invalid symbols from map file
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
                     ` (3 preceding siblings ...)
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 5/7] ethdev: use hairpin helper functions Ferruh Yigit
@ 2020-09-09 11:12   ` Ferruh Yigit
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
  2020-09-09 12:07   ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API David Marchand
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 11:12 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, Thomas Monjalon,
	Andrew Rybchenko, Sergio Gonzalez Monroy
  Cc: Ferruh Yigit, stable

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

Fixes: 9d41beed24b0 ("lib: provide initial versioning")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 5db3fb156a..a85986a2a2 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.26.2


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

* [dpdk-dev] [PATCH v3 7/7] ethdev: remove underscore prefix from internal API
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
                     ` (4 preceding siblings ...)
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
@ 2020-09-09 11:12   ` Ferruh Yigit
  2020-09-09 12:07   ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API David Marchand
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 11:12 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Igor Russkikh, Pavel Belous,
	Ajit Khaparde, Somnath Kotur, Chas Williams, Wei Hu (Xavier),
	Hemant Agrawal, Sachin Saxena, Wei Zhao, Jeff Guo, Marcin Wojtas,
	Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin,
	John Daley, Hyong Youb Kim, Gaetan Rivet, Qi Zhang, Xiao Wang,
	Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Beilei Xing,
	Jingjing Wu, Qiming Yang, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Long Li, Heinrich Kuhn, Harman Kalra, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Yong Wang, Thomas Monjalon, Ray Kinsella,
	Neil Horman
  Cc: 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'.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
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(-)

diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index 79156cb85a..b49089a33c 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -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
diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst
index 6fae39f904..86e0a141e6 100644
--- a/doc/guides/prog_guide/poll_mode_drv.rst
+++ b/doc/guides/prog_guide/poll_mode_drv.rst
@@ -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().
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 6d3c60390f..110b0517b4 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 -----------
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 540b106045..2fca9140d7 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -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);
 		}
 	}
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 4d224bfa04..8c959ac913 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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);
 	}
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index eafc1d3868..d67db46c65 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -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)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index cdbd8151ed..4ffd2ca4bb 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -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);
 		}
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index e2c3fd0368..a077b98c3e 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -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)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 38cf0ab71c..0e9f836e55 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 82766da882..1dc360713a 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index fe0cea88c2..5ab74840aa 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index da8c8ad922..8077519735 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -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,
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 7942b0df6b..8b0441c5cd 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -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);
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 70972d6717..7c68bbdec0 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -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;
 }
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index e6043e1455..5771d83b55 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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 */
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index ac2a72e388..41c99bdbf8 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -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,
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 80efd06cd9..563f21d9df 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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:
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index be4b28fa45..8531cf6b12 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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:
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 7bf1e79410..03c2070c3f 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -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);
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 34c31a153a..29e4cae10c 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -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");
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c8b16c7f87..724b2ee26c 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index aa37c11861..810568bc54 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 337ce90fbf..0f065bbc04 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 67b5bef44f..ed5f96b1a4 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -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;
 
diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c
index 19af9359c9..6786b12ab5 100644
--- a/drivers/net/mlx4/mlx4_intr.c
+++ b/drivers/net/mlx4/mlx4_intr.c
@@ -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);
 }
 
 /**
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 3d3dd2e862..7256c1bcfe 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -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;
 		}
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index eb55bd7f99..55cdc37f00 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index d186ddeabd..66d1966f29 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -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)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index c556dedab6..4f03691989 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -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);
 
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 76c69294d0..808b761b96 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -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);
 		}
 	}
 
diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c
index 12bf6c3231..439ec4fa89 100644
--- a/drivers/net/octeontx2/otx2_link.c
+++ b/drivers/net/octeontx2/otx2_link.c
@@ -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
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index 987a6f1e13..aecb98261b 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -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)
diff --git a/drivers/net/sfc/sfc_intr.c b/drivers/net/sfc/sfc_intr.c
index 80feab68f8..da32d393c2 100644
--- a/drivers/net/sfc/sfc_intr.c
+++ b/drivers/net/sfc/sfc_intr.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 959c8e4ddc..83d9488360 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -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);
 		}
 	}
 
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index fa365605ef..ce32be9ce3 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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;
 }
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 4f2fa0d943..dac0f23052 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 815fba2f55..fa80e75a5b 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -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 */
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index f8d63c7e17..066751f287 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -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;
 }
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 5dfe9fdf1a..23cc1e0959 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index a85986a2a2..b6630dfabe 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.26.2


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

* Re: [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
                     ` (5 preceding siblings ...)
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
@ 2020-09-09 12:07   ` David Marchand
  6 siblings, 0 replies; 60+ messages in thread
From: David Marchand @ 2020-09-09 12:07 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Andrew Rybchenko

On Wed, Sep 9, 2020 at 1:12 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> 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.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>
> Cc: David Marchand <david.marchand@redhat.com>
> v3:
> * Just deprecating the 'rte_eth_rx_descriptor_done()' API without
>   removing it to stick to the original plan.

LGTM, thanks.

For the series,
Acked-by: David Marchand <david.marchand@redhat.com>


-- 
David Marchand


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

* Re: [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private
  2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private Ferruh Yigit
@ 2020-09-09 12:57     ` Ferruh Yigit
  0 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 12:57 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Beilei Xing, Jeff Guo, Wei Zhao, Thomas Monjalon,
	Andrew Rybchenko, Ori Kam, Cristian Dumitrescu
  Cc: David Marchand

On 9/9/2020 12:12 PM, Ferruh Yigit wrote:
> Hiding the 'struct eth_dev_ops' from applications.
> 
> Removing relevant deprecation notice.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>

<...>

> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
> @@ -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


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

* [dpdk-dev] [PATCH v4 1/7] ethdev: deprecate descriptor status check API
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
                   ` (8 preceding siblings ...)
  2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
@ 2020-09-09 13:01 ` Ferruh Yigit
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations Ferruh Yigit
                     ` (6 more replies)
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
  10 siblings, 7 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 13:01 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Andrew Rybchenko
  Cc: Ferruh Yigit, David Marchand

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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---

Cc: David Marchand <david.marchand@redhat.com>
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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 279eccb04a..35c676e262 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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.
 
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index df227a1773..a7d57b001d 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 -----------
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index f30245b102..eb6cd01f8d 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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)
 {
-- 
2.26.2


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

* [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
@ 2020-09-09 13:01   ` Ferruh Yigit
  2020-09-10  1:56     ` Sachin Saxena (OSS)
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 3/7] ethdev: make device operations struct private Ferruh Yigit
                     ` (5 subsequent siblings)
  6 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 13:01 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Shepard Siegel, Ed Czeck,
	John Miller, Igor Russkikh, Pavel Belous, Somalapuram Amaranath,
	Ajit Khaparde, Somnath Kotur, Hemant Agrawal, Sachin Saxena,
	Wei Zhao, Jeff Guo, John Daley, Hyong Youb Kim, Qi Zhang,
	Xiao Wang, Beilei Xing, Jingjing Wu, Qiming Yang, Matan Azrad,
	Shahaf Shuler, Viacheslav Ovsiienko, Stephen Hemminger,
	K. Y. Srinivasan, Haiyang Zhang, Long Li, Heinrich Kuhn,
	Jerin Jacob, Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody,
	Shahed Shaikh, Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin,
	Chenbo Xia, Zhihong Wang, Thomas Monjalon
  Cc: Ferruh Yigit, David Marchand

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;

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
v2:
* Updated features.rst
* Tweak assignment order in sfc

Cc: David Marchand <david.marchand@redhat.com>
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(-)

diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
index edd21c4d8e..dd8c9555b0 100644
--- a/doc/guides/nics/features.rst
+++ b/doc/guides/nics/features.rst
@@ -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()``.
 
 
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index a7d57b001d..ff7242012b 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 ------------
diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
index b32ccd8677..ce7f6e4803 100644
--- a/drivers/net/ark/ark_ethdev.c
+++ b/drivers/net/ark/ark_ethdev.c
@@ -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) {
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index d3b00ab295..540b106045 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -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;
diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
index 0c25739f82..02ceb95754 100644
--- a/drivers/net/axgbe/axgbe_ethdev.c
+++ b/drivers/net/axgbe/axgbe_ethdev.c
@@ -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.
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 75d055be00..4d224bfa04 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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;
 
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index b0f2023e60..e2c3fd0368 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -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;
 
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 02c254846c..38cf0ab71c 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 902b1cdca0..82766da882 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index a5551e8175..fe0cea88c2 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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;
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index ca75919ee2..2cffa3aa2d 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -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;
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index fd927923da..e6043e1455 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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;
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 841447228a..80efd06cd9 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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;
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index b755350cd2..be4b28fa45 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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;
 
diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
index 8e1d8a8d3e..e1ff38e8be 100644
--- a/drivers/net/iavf/iavf_ethdev.c
+++ b/drivers/net/iavf/iavf_ethdev.c
@@ -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;
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c5dac2e328..c8b16c7f87 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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;
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index 6ab3ee909d..aa37c11861 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d9582473a4..337ce90fbf 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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;
 
diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index bf1f82ba67..ec3cc4000e 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -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,
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 4c29898203..eb55bd7f99 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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;
 }
 
diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index fd91c0e491..229c1b9149 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -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;
 
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 99946279db..c556dedab6 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -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;
 
diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
index 33b72bd4db..c06e32f26b 100644
--- a/drivers/net/octeontx2/otx2_ethdev.c
+++ b/drivers/net/octeontx2/otx2_ethdev.c
@@ -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) {
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 70d48e48ef..59f1746ee9 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -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;
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index acee3e48e4..1a58e0df84 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -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;
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index d955a7ee23..959c8e4ddc 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -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) {
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index e55278af69..fa365605ef 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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;
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index dc0093bdf0..4f2fa0d943 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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) {
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index eb6cd01f8d..b6f26a513b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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);
 }
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 32407dd418..8ed827475f 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -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
-- 
2.26.2


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

* [dpdk-dev] [PATCH v4 3/7] ethdev: make device operations struct private
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations Ferruh Yigit
@ 2020-09-09 13:01   ` Ferruh Yigit
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 4/7] ethdev: mark internal functions Ferruh Yigit
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 13:01 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Beilei Xing, Jeff Guo, Wei Zhao, Thomas Monjalon,
	Andrew Rybchenko, Ori Kam, Cristian Dumitrescu
  Cc: Ferruh Yigit, David Marchand

Hiding the 'struct eth_dev_ops' from applications.

Removing relevant deprecation notice.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
Cc: David Marchand <david.marchand@redhat.com>
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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 35c676e262..8770c87006 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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,
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index ff7242012b..9b5bfcfae8 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 ------------
diff --git a/drivers/net/i40e/i40e_vf_representor.c b/drivers/net/i40e/i40e_vf_representor.c
index 083bc1a5f3..f09d4d8798 100644
--- a/drivers/net/i40e/i40e_vf_representor.c
+++ b/drivers/net/i40e/i40e_vf_representor.c
@@ -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"
diff --git a/drivers/net/ixgbe/ixgbe_vf_representor.c b/drivers/net/ixgbe/ixgbe_vf_representor.c
index dbbef294ae..edb5d43846 100644
--- a/drivers/net/ixgbe/ixgbe_vf_representor.c
+++ b/drivers/net/ixgbe/ixgbe_vf_representor.c
@@ -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"
diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
index 8ed827475f..bedd69acbd 100644
--- a/lib/librte_ethdev/rte_ethdev_core.h
+++ b/lib/librte_ethdev/rte_ethdev_core.h
@@ -21,322 +21,8 @@ struct rte_eth_dev_callback;
 /** @internal Structure to keep track of registered callbacks */
 TAILQ_HEAD(rte_eth_dev_cb_list, rte_eth_dev_callback);
 
-/*
- * Definitions of all functions exported by an Ethernet driver through the
- * the generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
- * structure associated with an Ethernet device.
- */
 struct rte_eth_dev;
 
-typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);
-/**< @internal Ethernet device configuration. */
-
-typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to start a configured Ethernet device. */
-
-typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to stop a configured Ethernet device. */
-
-typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to link up a configured Ethernet device. */
-
-typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to link down a configured Ethernet device. */
-
-typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to close a configured Ethernet device. */
-
-typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
-/** <@internal Function used to reset a configured Ethernet device. */
-
-typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to detect an Ethernet device removal. */
-
-/**
- * @internal
- * Function used to enable the Rx promiscuous mode of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, promiscuous mode is enabled.
- * @retval -ENOTSUP
- *   Promiscuous mode is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to enable promiscuos mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to enable promiscuous mode.
- */
-typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Function used to disable the Rx promiscuous mode of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, promiscuous mode is disabled.
- * @retval -ENOTSUP
- *   Promiscuous mode disabling is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to disable promiscuos mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to disable promiscuous mode.
- */
-typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Enable the receipt of all multicast packets by an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, all-multicast mode is enabled.
- * @retval -ENOTSUP
- *   All-multicast mode is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to enable all-multicast mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to enable all-multicast mode.
- */
-typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
-
-/**
- * @internal
- * Disable the receipt of all multicast packets by an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, all-multicast mode is disabled.
- * @retval -ENOTSUP
- *   All-multicast mode disabling is not supported.
- * @retval -ENODEV
- *   Device is gone.
- * @retval -E_RTE_SECONDARY
- *   Function was called from a secondary process instance and not supported.
- * @retval -ETIMEDOUT
- *   Attempt to disable all-multicast mode failed because of timeout.
- * @retval -EAGAIN
- *   Failed to disable all-multicast mode.
- */
-typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
-				int wait_to_complete);
-/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
-
-typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
-				struct rte_eth_stats *igb_stats);
-/**< @internal Get global I/O statistics of an Ethernet device. */
-
-/**
- * @internal
- * Reset global I/O statistics of an Ethernet device to 0.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, statistics has been reset.
- * @retval -ENOTSUP
- *   Resetting statistics is not supported.
- * @retval -EINVAL
- *   Resetting statistics is not valid.
- * @retval -ENOMEM
- *   Not enough memory to get the stats.
- */
-typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat *stats, unsigned n);
-/**< @internal Get extended stats of an Ethernet device. */
-
-typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
-				      const uint64_t *ids,
-				      uint64_t *values,
-				      unsigned int n);
-/**< @internal Get extended stats of an Ethernet device. */
-
-/**
- * @internal
- * Reset extended stats of an Ethernet device.
- *
- * @param dev
- *   ethdev handle of port.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, statistics has been reset.
- * @retval -ENOTSUP
- *   Resetting statistics is not supported.
- * @retval -EINVAL
- *   Resetting statistics is not valid.
- * @retval -ENOMEM
- *   Not enough memory to get the stats.
- */
-typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
-
-typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat_name *xstats_names, unsigned size);
-/**< @internal Get names of extended stats of an Ethernet device. */
-
-typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
-	struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
-	unsigned int size);
-/**< @internal Get names of extended stats of an Ethernet device. */
-
-typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
-					     uint16_t queue_id,
-					     uint8_t stat_idx,
-					     uint8_t is_rx);
-/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
-
-typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
-				   struct rte_eth_dev_info *dev_info);
-/**< @internal Get specific information of an Ethernet device. */
-
-typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
-/**< @internal Get supported ptypes of an Ethernet device. */
-
-/**
- * @internal
- * Inform Ethernet device about reduced range of packet types to handle.
- *
- * @param dev
- *   The Ethernet device identifier.
- * @param ptype_mask
- *   The ptype family that application is interested in should be bitwise OR of
- *   RTE_PTYPE_*_MASK or 0.
- * @return
- *   - (0) if Success.
- */
-typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
-				     uint32_t ptype_mask);
-
-typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
-				    uint16_t queue_id);
-/**< @internal Start rx and tx of a queue of an Ethernet device. */
-
-typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
-				    uint16_t queue_id);
-/**< @internal Stop rx and tx of a queue of an Ethernet device. */
-
-typedef int (*eth_rx_queue_setup_t)(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,
-				    struct rte_mempool *mb_pool);
-/**< @internal Set up a receive queue of an Ethernet device. */
-
-typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
-				    uint16_t tx_queue_id,
-				    uint16_t nb_tx_desc,
-				    unsigned int socket_id,
-				    const struct rte_eth_txconf *tx_conf);
-/**< @internal Setup a transmit queue of an Ethernet device. */
-
-typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
-				    uint16_t rx_queue_id);
-/**< @internal Enable interrupt of a receive queue of an Ethernet device. */
-
-typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
-				    uint16_t rx_queue_id);
-/**< @internal Disable interrupt of a receive queue of an Ethernet device. */
-
-typedef void (*eth_queue_release_t)(void *queue);
-/**< @internal Release memory resources allocated by given RX/TX queue. */
-
-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 */
-
-typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
-/**< @internal Check the status of a Tx descriptor */
-
-typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
-				     char *fw_version, size_t fw_size);
-/**< @internal Get firmware information of an Ethernet device. */
-
-typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
-/**< @internal Force mbufs to be from TX ring. */
-
-typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
-	uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
-
-typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
-	uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
-
-typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
-	uint16_t queue_id, struct rte_eth_burst_mode *mode);
-
-typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
-/**< @internal Set MTU. */
-
-typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
-				  uint16_t vlan_id,
-				  int on);
-/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
-
-typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
-			       enum rte_vlan_type type, uint16_t tpid);
-/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
-
-typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
-/**< @internal set VLAN offload function by an Ethernet device. */
-
-typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
-			       uint16_t vlan_id,
-			       int on);
-/**< @internal set port based TX VLAN insertion by an Ethernet device. */
-
-typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
-				  uint16_t rx_queue_id,
-				  int on);
-/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
-
 typedef uint16_t (*eth_rx_burst_t)(void *rxq,
 				   struct rte_mbuf **rx_pkts,
 				   uint16_t nb_pkts);
@@ -352,400 +38,20 @@ typedef uint16_t (*eth_tx_prep_t)(void *txq,
 				   uint16_t nb_pkts);
 /**< @internal Prepare output packets on a transmit queue of an Ethernet device. */
 
-typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
-			       struct rte_eth_fc_conf *fc_conf);
-/**< @internal Get current flow control parameter on an Ethernet device */
-
-typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
-			       struct rte_eth_fc_conf *fc_conf);
-/**< @internal Setup flow control parameter on an Ethernet device */
-
-typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
-				struct rte_eth_pfc_conf *pfc_conf);
-/**< @internal Setup priority flow control parameter on an Ethernet device */
-
-typedef int (*reta_update_t)(struct rte_eth_dev *dev,
-			     struct rte_eth_rss_reta_entry64 *reta_conf,
-			     uint16_t reta_size);
-/**< @internal Update RSS redirection table on an Ethernet device */
-
-typedef int (*reta_query_t)(struct rte_eth_dev *dev,
-			    struct rte_eth_rss_reta_entry64 *reta_conf,
-			    uint16_t reta_size);
-/**< @internal Query RSS redirection table on an Ethernet device */
-
-typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
-				 struct rte_eth_rss_conf *rss_conf);
-/**< @internal Update RSS hash configuration of an Ethernet device */
-
-typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
-				   struct rte_eth_rss_conf *rss_conf);
-/**< @internal Get current RSS hash configuration of an Ethernet device */
-
-typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
-/**< @internal Turn on SW controllable LED on an Ethernet device */
-
-typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
-/**< @internal Turn off SW controllable LED on an Ethernet device */
-
-typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
-/**< @internal Remove MAC address from receive address register */
-
-typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr,
-				  uint32_t index,
-				  uint32_t vmdq);
-/**< @internal Set a MAC address into Receive Address Address Register */
-
-typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr);
-/**< @internal Set a MAC address into Receive Address Address Register */
-
-typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
-				  struct rte_ether_addr *mac_addr,
-				  uint8_t on);
-/**< @internal Set a Unicast Hash bitmap */
-
-typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
-				  uint8_t on);
-/**< @internal Set all Unicast Hash bitmap */
-
-typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
-				uint16_t queue_idx,
-				uint16_t tx_rate);
-/**< @internal Set queue TX rate */
-
-typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
-				  struct rte_eth_mirror_conf *mirror_conf,
-				  uint8_t rule_id,
-				  uint8_t on);
-/**< @internal Add a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
-				  uint8_t rule_id);
-/**< @internal Remove a traffic mirroring rule on an Ethernet device */
-
-typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
-					 struct rte_eth_udp_tunnel *tunnel_udp);
-/**< @internal Add tunneling UDP port */
-
-typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
-					 struct rte_eth_udp_tunnel *tunnel_udp);
-/**< @internal Delete tunneling UDP port */
-
-typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
-				      struct rte_ether_addr *mc_addr_set,
-				      uint32_t nb_mc_addr);
-/**< @internal set the list of multicast addresses on an Ethernet device */
-
-typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
-
-typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
-/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
-
-typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
-						struct timespec *timestamp,
-						uint32_t flags);
-/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
-
-typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
-						struct timespec *timestamp);
-/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
 
-typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
-/**< @internal Function used to adjust the device clock */
-
-typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
-				      struct timespec *timestamp);
-/**< @internal Function used to get time from the device clock. */
-
-typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
-				       const struct timespec *timestamp);
-/**< @internal Function used to get time from the device clock */
-
-typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
-				      uint64_t *timestamp);
-/**< @internal Function used to get the current value of the device clock. */
-
-typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
-				struct rte_dev_reg_info *info);
-/**< @internal Retrieve registers  */
-
-typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
-/**< @internal Retrieve eeprom size  */
-
-typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
-				struct rte_dev_eeprom_info *info);
-/**< @internal Retrieve eeprom data  */
-
-typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
-				struct rte_dev_eeprom_info *info);
-/**< @internal Program eeprom data  */
-
-typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
-				     struct rte_eth_dev_module_info *modinfo);
-/**< @internal Retrieve type and size of plugin module eeprom */
-
-typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
-				       struct rte_dev_eeprom_info *info);
-/**< @internal Retrieve plugin module eeprom data */
-
-typedef int (*eth_l2_tunnel_eth_type_conf_t)
-	(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
-/**< @internal config l2 tunnel ether type */
-
-typedef int (*eth_l2_tunnel_offload_set_t)
-	(struct rte_eth_dev *dev,
-	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
-	 uint32_t mask,
-	 uint8_t en);
-/**< @internal enable/disable the l2 tunnel offload functions */
-
-
-typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
-				 enum rte_filter_type filter_type,
-				 enum rte_filter_op filter_op,
-				 void *arg);
-/**< @internal Take operations to assigned filter type on an Ethernet device */
-
-typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
-/**< @internal Get Traffic Management (TM) operations on an Ethernet device */
-
-typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
-/**< @internal Get Traffic Metering and Policing (MTR) operations */
-
-typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
-				 struct rte_eth_dcb_info *dcb_info);
-/**< @internal Get dcb information on an Ethernet device */
-
-typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
-						const char *pool);
-/**< @internal Test if a port supports specific mempool ops */
-
-/**
- * @internal
- * Get the hairpin capabilities.
- *
- * @param dev
- *   ethdev handle of port.
- * @param cap
- *   returns the hairpin capabilities from the device.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- */
-typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
-				     struct rte_eth_hairpin_cap *cap);
-
-/**
- * @internal
- * Setup RX hairpin queue.
- *
- * @param dev
- *   ethdev handle of port.
- * @param rx_queue_id
- *   the selected RX queue index.
- * @param nb_rx_desc
- *   the requested number of descriptors for this queue. 0 - use PMD default.
- * @param conf
- *   the RX hairpin configuration structure.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- * @retval -EINVAL
- *   One of the parameters is invalid.
- * @retval -ENOMEM
- *   Unable to allocate resources.
- */
-typedef int (*eth_rx_hairpin_queue_setup_t)
-	(struct rte_eth_dev *dev, uint16_t rx_queue_id,
-	 uint16_t nb_rx_desc,
-	 const struct rte_eth_hairpin_conf *conf);
-
-/**
- * @internal
- * Setup TX hairpin queue.
- *
- * @param dev
- *   ethdev handle of port.
- * @param tx_queue_id
- *   the selected TX queue index.
- * @param nb_tx_desc
- *   the requested number of descriptors for this queue. 0 - use PMD default.
- * @param conf
- *   the TX hairpin configuration structure.
- *
- * @return
- *   Negative errno value on error, 0 on success.
- *
- * @retval 0
- *   Success, hairpin is supported.
- * @retval -ENOTSUP
- *   Hairpin is not supported.
- * @retval -EINVAL
- *   One of the parameters is invalid.
- * @retval -ENOMEM
- *   Unable to allocate resources.
- */
-typedef int (*eth_tx_hairpin_queue_setup_t)
-	(struct rte_eth_dev *dev, uint16_t tx_queue_id,
-	 uint16_t nb_tx_desc,
-	 const struct rte_eth_hairpin_conf *hairpin_conf);
-
-/**
- * @internal A structure containing the functions exported by an Ethernet driver.
- */
-struct eth_dev_ops {
-	eth_dev_configure_t        dev_configure; /**< Configure device. */
-	eth_dev_start_t            dev_start;     /**< Start device. */
-	eth_dev_stop_t             dev_stop;      /**< Stop device. */
-	eth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */
-	eth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */
-	eth_dev_close_t            dev_close;     /**< Close device. */
-	eth_dev_reset_t		   dev_reset;	  /**< Reset device. */
-	eth_link_update_t          link_update;   /**< Get device link state. */
-	eth_is_removed_t           is_removed;
-	/**< Check if the device was physically removed. */
-
-	eth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */
-	eth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */
-	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
-	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
-	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
-	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
-	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
-	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
-	mtu_set_t                  mtu_set;       /**< Set MTU. */
-
-	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
-	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
-	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
-	eth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */
-	eth_xstats_get_names_t     xstats_get_names;
-	/**< Get names of extended statistics. */
-	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
-	/**< Configure per queue stat counter mapping. */
-
-	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
-	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
-	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
-	eth_burst_mode_get_t       rx_burst_mode_get; /**< Get RX burst mode */
-	eth_burst_mode_get_t       tx_burst_mode_get; /**< Get TX burst mode */
-	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
-	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
-	/**< Get packet types supported and identified by device. */
-	eth_dev_ptypes_set_t dev_ptypes_set;
-	/**< Inform Ethernet device about reduced range of packet types to handle. */
-
-	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
-	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
-	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
-	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
-	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
-
-	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
-	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
-	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
-	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. */
-	/*
-	 * Static inline functions use functions ABOVE this comment.
-	 * New dev_ops functions should be added BELOW to avoid breaking ABI.
-	 */
-	eth_rx_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
-	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
-	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
-	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
-	eth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */
-
-	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
-	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
-
-	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
-	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
-	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
-
-	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
-	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
-
-	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
-	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
-
-	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
-	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
-	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
-	/** Config ether type of l2 tunnel. */
-	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
-	/** Enable/disable l2 tunnel offload functions. */
-
-	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
-
-	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
-	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
-	reta_update_t              reta_update;   /** Update redirection table. */
-	reta_query_t               reta_query;    /** Query redirection table. */
-
-	eth_get_reg_t              get_reg;           /**< Get registers. */
-	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
-	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
-	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
-
-	eth_get_module_info_t      get_module_info;
-	/** Get plugin module eeprom attribute. */
-	eth_get_module_eeprom_t    get_module_eeprom;
-	/** Get plugin module eeprom data. */
-
-	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
-
-	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
-
-	eth_timesync_enable_t      timesync_enable;
-	/** Turn IEEE1588/802.1AS timestamping on. */
-	eth_timesync_disable_t     timesync_disable;
-	/** Turn IEEE1588/802.1AS timestamping off. */
-	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
-	/** Read the IEEE1588/802.1AS RX timestamp. */
-	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
-	/** Read the IEEE1588/802.1AS TX timestamp. */
-	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
-	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
-	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
-
-	eth_read_clock             read_clock;
-
-	eth_xstats_get_by_id_t     xstats_get_by_id;
-	/**< Get extended device statistic values by ID. */
-	eth_xstats_get_names_by_id_t xstats_get_names_by_id;
-	/**< Get name of extended device statistics by ID. */
+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. */
 
-	eth_tm_ops_get_t tm_ops_get;
-	/**< Get Traffic Management (TM) operations. */
+typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset);
+/**< @internal Check DD bit of specific RX descriptor */
 
-	eth_mtr_ops_get_t mtr_ops_get;
-	/**< Get Traffic Metering and Policing (MTR) operations. */
+typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset);
+/**< @internal Check the status of a Rx descriptor */
 
-	eth_pool_ops_supported_t pool_ops_supported;
-	/**< Test if a port supports specific mempool ops */
+typedef int (*eth_tx_descriptor_status_t)(void *txq, uint16_t offset);
+/**< @internal Check the status of a Tx descriptor */
 
-	eth_hairpin_cap_get_t hairpin_cap_get;
-	/**< Returns the hairpin capabilities. */
-	eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
-	/**< Set up device RX hairpin queue. */
-	eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
-	/**< Set up device TX hairpin queue. */
-};
 
 /**
  * @internal
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 13fd049c0d..b006cbbe92 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -21,6 +21,700 @@
 extern "C" {
 #endif
 
+/*
+ * Definitions of all functions exported by an Ethernet driver through the
+ * generic structure of type *eth_dev_ops* supplied in the *rte_eth_dev*
+ * structure associated with an Ethernet device.
+ */
+
+typedef int  (*eth_dev_configure_t)(struct rte_eth_dev *dev);
+/**< @internal Ethernet device configuration. */
+
+typedef int  (*eth_dev_start_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to start a configured Ethernet device. */
+
+typedef void (*eth_dev_stop_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to stop a configured Ethernet device. */
+
+typedef int  (*eth_dev_set_link_up_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to link up a configured Ethernet device. */
+
+typedef int  (*eth_dev_set_link_down_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to link down a configured Ethernet device. */
+
+typedef void (*eth_dev_close_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to close a configured Ethernet device. */
+
+typedef int (*eth_dev_reset_t)(struct rte_eth_dev *dev);
+/** <@internal Function used to reset a configured Ethernet device. */
+
+typedef int (*eth_is_removed_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to detect an Ethernet device removal. */
+
+/**
+ * @internal
+ * Function used to enable the Rx promiscuous mode of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, promiscuous mode is enabled.
+ * @retval -ENOTSUP
+ *   Promiscuous mode is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to enable promiscuos mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to enable promiscuous mode.
+ */
+typedef int (*eth_promiscuous_enable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Function used to disable the Rx promiscuous mode of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, promiscuous mode is disabled.
+ * @retval -ENOTSUP
+ *   Promiscuous mode disabling is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to disable promiscuos mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to disable promiscuous mode.
+ */
+typedef int (*eth_promiscuous_disable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Enable the receipt of all multicast packets by an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, all-multicast mode is enabled.
+ * @retval -ENOTSUP
+ *   All-multicast mode is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to enable all-multicast mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to enable all-multicast mode.
+ */
+typedef int (*eth_allmulticast_enable_t)(struct rte_eth_dev *dev);
+
+/**
+ * @internal
+ * Disable the receipt of all multicast packets by an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, all-multicast mode is disabled.
+ * @retval -ENOTSUP
+ *   All-multicast mode disabling is not supported.
+ * @retval -ENODEV
+ *   Device is gone.
+ * @retval -E_RTE_SECONDARY
+ *   Function was called from a secondary process instance and not supported.
+ * @retval -ETIMEDOUT
+ *   Attempt to disable all-multicast mode failed because of timeout.
+ * @retval -EAGAIN
+ *   Failed to disable all-multicast mode.
+ */
+typedef int (*eth_allmulticast_disable_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_link_update_t)(struct rte_eth_dev *dev,
+				int wait_to_complete);
+/**< @internal Get link speed, duplex mode and state (up/down) of an Ethernet device. */
+
+typedef int (*eth_stats_get_t)(struct rte_eth_dev *dev,
+				struct rte_eth_stats *igb_stats);
+/**< @internal Get global I/O statistics of an Ethernet device. */
+
+/**
+ * @internal
+ * Reset global I/O statistics of an Ethernet device to 0.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, statistics has been reset.
+ * @retval -ENOTSUP
+ *   Resetting statistics is not supported.
+ * @retval -EINVAL
+ *   Resetting statistics is not valid.
+ * @retval -ENOMEM
+ *   Not enough memory to get the stats.
+ */
+typedef int (*eth_stats_reset_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_xstats_get_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat *stats, unsigned int n);
+/**< @internal Get extended stats of an Ethernet device. */
+
+typedef int (*eth_xstats_get_by_id_t)(struct rte_eth_dev *dev,
+				      const uint64_t *ids,
+				      uint64_t *values,
+				      unsigned int n);
+/**< @internal Get extended stats of an Ethernet device. */
+
+/**
+ * @internal
+ * Reset extended stats of an Ethernet device.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, statistics has been reset.
+ * @retval -ENOTSUP
+ *   Resetting statistics is not supported.
+ * @retval -EINVAL
+ *   Resetting statistics is not valid.
+ * @retval -ENOMEM
+ *   Not enough memory to get the stats.
+ */
+typedef int (*eth_xstats_reset_t)(struct rte_eth_dev *dev);
+
+typedef int (*eth_xstats_get_names_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat_name *xstats_names, unsigned int size);
+/**< @internal Get names of extended stats of an Ethernet device. */
+
+typedef int (*eth_xstats_get_names_by_id_t)(struct rte_eth_dev *dev,
+	struct rte_eth_xstat_name *xstats_names, const uint64_t *ids,
+	unsigned int size);
+/**< @internal Get names of extended stats of an Ethernet device. */
+
+typedef int (*eth_queue_stats_mapping_set_t)(struct rte_eth_dev *dev,
+					     uint16_t queue_id,
+					     uint8_t stat_idx,
+					     uint8_t is_rx);
+/**< @internal Set a queue statistics mapping for a tx/rx queue of an Ethernet device. */
+
+typedef int (*eth_dev_infos_get_t)(struct rte_eth_dev *dev,
+				   struct rte_eth_dev_info *dev_info);
+/**< @internal Get specific information of an Ethernet device. */
+
+typedef const uint32_t *(*eth_dev_supported_ptypes_get_t)(struct rte_eth_dev *dev);
+/**< @internal Get supported ptypes of an Ethernet device. */
+
+/**
+ * @internal
+ * Inform Ethernet device about reduced range of packet types to handle.
+ *
+ * @param dev
+ *   The Ethernet device identifier.
+ * @param ptype_mask
+ *   The ptype family that application is interested in should be bitwise OR of
+ *   RTE_PTYPE_*_MASK or 0.
+ * @return
+ *   - (0) if Success.
+ */
+typedef int (*eth_dev_ptypes_set_t)(struct rte_eth_dev *dev,
+				     uint32_t ptype_mask);
+
+typedef int (*eth_queue_start_t)(struct rte_eth_dev *dev,
+				    uint16_t queue_id);
+/**< @internal Start rx and tx of a queue of an Ethernet device. */
+
+typedef int (*eth_queue_stop_t)(struct rte_eth_dev *dev,
+				    uint16_t queue_id);
+/**< @internal Stop rx and tx of a queue of an Ethernet device. */
+
+typedef int (*eth_rx_queue_setup_t)(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,
+				    struct rte_mempool *mb_pool);
+/**< @internal Set up a receive queue of an Ethernet device. */
+
+typedef int (*eth_tx_queue_setup_t)(struct rte_eth_dev *dev,
+				    uint16_t tx_queue_id,
+				    uint16_t nb_tx_desc,
+				    unsigned int socket_id,
+				    const struct rte_eth_txconf *tx_conf);
+/**< @internal Setup a transmit queue of an Ethernet device. */
+
+typedef int (*eth_rx_enable_intr_t)(struct rte_eth_dev *dev,
+				    uint16_t rx_queue_id);
+/**< @internal Enable interrupt of a receive queue of an Ethernet device. */
+
+typedef int (*eth_rx_disable_intr_t)(struct rte_eth_dev *dev,
+				    uint16_t rx_queue_id);
+/**< @internal Disable interrupt of a receive queue of an Ethernet device. */
+
+typedef void (*eth_queue_release_t)(void *queue);
+/**< @internal Release memory resources allocated by given RX/TX queue. */
+
+typedef int (*eth_fw_version_get_t)(struct rte_eth_dev *dev,
+				     char *fw_version, size_t fw_size);
+/**< @internal Get firmware information of an Ethernet device. */
+
+typedef int (*eth_tx_done_cleanup_t)(void *txq, uint32_t free_cnt);
+/**< @internal Force mbufs to be from TX ring. */
+
+typedef void (*eth_rxq_info_get_t)(struct rte_eth_dev *dev,
+	uint16_t rx_queue_id, struct rte_eth_rxq_info *qinfo);
+
+typedef void (*eth_txq_info_get_t)(struct rte_eth_dev *dev,
+	uint16_t tx_queue_id, struct rte_eth_txq_info *qinfo);
+
+typedef int (*eth_burst_mode_get_t)(struct rte_eth_dev *dev,
+	uint16_t queue_id, struct rte_eth_burst_mode *mode);
+
+typedef int (*mtu_set_t)(struct rte_eth_dev *dev, uint16_t mtu);
+/**< @internal Set MTU. */
+
+typedef int (*vlan_filter_set_t)(struct rte_eth_dev *dev,
+				  uint16_t vlan_id,
+				  int on);
+/**< @internal filtering of a VLAN Tag Identifier by an Ethernet device. */
+
+typedef int (*vlan_tpid_set_t)(struct rte_eth_dev *dev,
+			       enum rte_vlan_type type, uint16_t tpid);
+/**< @internal set the outer/inner VLAN-TPID by an Ethernet device. */
+
+typedef int (*vlan_offload_set_t)(struct rte_eth_dev *dev, int mask);
+/**< @internal set VLAN offload function by an Ethernet device. */
+
+typedef int (*vlan_pvid_set_t)(struct rte_eth_dev *dev,
+			       uint16_t vlan_id,
+			       int on);
+/**< @internal set port based TX VLAN insertion by an Ethernet device. */
+
+typedef void (*vlan_strip_queue_set_t)(struct rte_eth_dev *dev,
+				  uint16_t rx_queue_id,
+				  int on);
+/**< @internal VLAN stripping enable/disable by an queue of Ethernet device. */
+
+typedef int (*flow_ctrl_get_t)(struct rte_eth_dev *dev,
+			       struct rte_eth_fc_conf *fc_conf);
+/**< @internal Get current flow control parameter on an Ethernet device */
+
+typedef int (*flow_ctrl_set_t)(struct rte_eth_dev *dev,
+			       struct rte_eth_fc_conf *fc_conf);
+/**< @internal Setup flow control parameter on an Ethernet device */
+
+typedef int (*priority_flow_ctrl_set_t)(struct rte_eth_dev *dev,
+				struct rte_eth_pfc_conf *pfc_conf);
+/**< @internal Setup priority flow control parameter on an Ethernet device */
+
+typedef int (*reta_update_t)(struct rte_eth_dev *dev,
+			     struct rte_eth_rss_reta_entry64 *reta_conf,
+			     uint16_t reta_size);
+/**< @internal Update RSS redirection table on an Ethernet device */
+
+typedef int (*reta_query_t)(struct rte_eth_dev *dev,
+			    struct rte_eth_rss_reta_entry64 *reta_conf,
+			    uint16_t reta_size);
+/**< @internal Query RSS redirection table on an Ethernet device */
+
+typedef int (*rss_hash_update_t)(struct rte_eth_dev *dev,
+				 struct rte_eth_rss_conf *rss_conf);
+/**< @internal Update RSS hash configuration of an Ethernet device */
+
+typedef int (*rss_hash_conf_get_t)(struct rte_eth_dev *dev,
+				   struct rte_eth_rss_conf *rss_conf);
+/**< @internal Get current RSS hash configuration of an Ethernet device */
+
+typedef int (*eth_dev_led_on_t)(struct rte_eth_dev *dev);
+/**< @internal Turn on SW controllable LED on an Ethernet device */
+
+typedef int (*eth_dev_led_off_t)(struct rte_eth_dev *dev);
+/**< @internal Turn off SW controllable LED on an Ethernet device */
+
+typedef void (*eth_mac_addr_remove_t)(struct rte_eth_dev *dev, uint32_t index);
+/**< @internal Remove MAC address from receive address register */
+
+typedef int (*eth_mac_addr_add_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr,
+				  uint32_t index,
+				  uint32_t vmdq);
+/**< @internal Set a MAC address into Receive Address Register */
+
+typedef int (*eth_mac_addr_set_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr);
+/**< @internal Set a MAC address into Receive Address Register */
+
+typedef int (*eth_uc_hash_table_set_t)(struct rte_eth_dev *dev,
+				  struct rte_ether_addr *mac_addr,
+				  uint8_t on);
+/**< @internal Set a Unicast Hash bitmap */
+
+typedef int (*eth_uc_all_hash_table_set_t)(struct rte_eth_dev *dev,
+				  uint8_t on);
+/**< @internal Set all Unicast Hash bitmap */
+
+typedef int (*eth_set_queue_rate_limit_t)(struct rte_eth_dev *dev,
+				uint16_t queue_idx,
+				uint16_t tx_rate);
+/**< @internal Set queue TX rate */
+
+typedef int (*eth_mirror_rule_set_t)(struct rte_eth_dev *dev,
+				  struct rte_eth_mirror_conf *mirror_conf,
+				  uint8_t rule_id,
+				  uint8_t on);
+/**< @internal Add a traffic mirroring rule on an Ethernet device */
+
+typedef int (*eth_mirror_rule_reset_t)(struct rte_eth_dev *dev,
+				  uint8_t rule_id);
+/**< @internal Remove a traffic mirroring rule on an Ethernet device */
+
+typedef int (*eth_udp_tunnel_port_add_t)(struct rte_eth_dev *dev,
+					 struct rte_eth_udp_tunnel *tunnel_udp);
+/**< @internal Add tunneling UDP port */
+
+typedef int (*eth_udp_tunnel_port_del_t)(struct rte_eth_dev *dev,
+					 struct rte_eth_udp_tunnel *tunnel_udp);
+/**< @internal Delete tunneling UDP port */
+
+typedef int (*eth_set_mc_addr_list_t)(struct rte_eth_dev *dev,
+				      struct rte_ether_addr *mc_addr_set,
+				      uint32_t nb_mc_addr);
+/**< @internal set the list of multicast addresses on an Ethernet device */
+
+typedef int (*eth_timesync_enable_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to enable IEEE1588/802.1AS timestamping. */
+
+typedef int (*eth_timesync_disable_t)(struct rte_eth_dev *dev);
+/**< @internal Function used to disable IEEE1588/802.1AS timestamping. */
+
+typedef int (*eth_timesync_read_rx_timestamp_t)(struct rte_eth_dev *dev,
+						struct timespec *timestamp,
+						uint32_t flags);
+/**< @internal Function used to read an RX IEEE1588/802.1AS timestamp. */
+
+typedef int (*eth_timesync_read_tx_timestamp_t)(struct rte_eth_dev *dev,
+						struct timespec *timestamp);
+/**< @internal Function used to read a TX IEEE1588/802.1AS timestamp. */
+
+typedef int (*eth_timesync_adjust_time)(struct rte_eth_dev *dev, int64_t);
+/**< @internal Function used to adjust the device clock */
+
+typedef int (*eth_timesync_read_time)(struct rte_eth_dev *dev,
+				      struct timespec *timestamp);
+/**< @internal Function used to get time from the device clock. */
+
+typedef int (*eth_timesync_write_time)(struct rte_eth_dev *dev,
+				       const struct timespec *timestamp);
+/**< @internal Function used to get time from the device clock */
+
+typedef int (*eth_read_clock)(struct rte_eth_dev *dev,
+				      uint64_t *timestamp);
+/**< @internal Function used to get the current value of the device clock. */
+
+typedef int (*eth_get_reg_t)(struct rte_eth_dev *dev,
+				struct rte_dev_reg_info *info);
+/**< @internal Retrieve registers  */
+
+typedef int (*eth_get_eeprom_length_t)(struct rte_eth_dev *dev);
+/**< @internal Retrieve eeprom size  */
+
+typedef int (*eth_get_eeprom_t)(struct rte_eth_dev *dev,
+				struct rte_dev_eeprom_info *info);
+/**< @internal Retrieve eeprom data  */
+
+typedef int (*eth_set_eeprom_t)(struct rte_eth_dev *dev,
+				struct rte_dev_eeprom_info *info);
+/**< @internal Program eeprom data  */
+
+typedef int (*eth_get_module_info_t)(struct rte_eth_dev *dev,
+				     struct rte_eth_dev_module_info *modinfo);
+/**< @internal Retrieve type and size of plugin module eeprom */
+
+typedef int (*eth_get_module_eeprom_t)(struct rte_eth_dev *dev,
+				       struct rte_dev_eeprom_info *info);
+/**< @internal Retrieve plugin module eeprom data */
+
+typedef int (*eth_l2_tunnel_eth_type_conf_t)
+	(struct rte_eth_dev *dev, struct rte_eth_l2_tunnel_conf *l2_tunnel);
+/**< @internal config l2 tunnel ether type */
+
+typedef int (*eth_l2_tunnel_offload_set_t)
+	(struct rte_eth_dev *dev,
+	 struct rte_eth_l2_tunnel_conf *l2_tunnel,
+	 uint32_t mask,
+	 uint8_t en);
+/**< @internal enable/disable the l2 tunnel offload functions */
+
+
+typedef int (*eth_filter_ctrl_t)(struct rte_eth_dev *dev,
+				 enum rte_filter_type filter_type,
+				 enum rte_filter_op filter_op,
+				 void *arg);
+/**< @internal Take operations to assigned filter type on an Ethernet device */
+
+typedef int (*eth_tm_ops_get_t)(struct rte_eth_dev *dev, void *ops);
+/**< @internal Get Traffic Management (TM) operations on an Ethernet device */
+
+typedef int (*eth_mtr_ops_get_t)(struct rte_eth_dev *dev, void *ops);
+/**< @internal Get Traffic Metering and Policing (MTR) operations */
+
+typedef int (*eth_get_dcb_info)(struct rte_eth_dev *dev,
+				 struct rte_eth_dcb_info *dcb_info);
+/**< @internal Get dcb information on an Ethernet device */
+
+typedef int (*eth_pool_ops_supported_t)(struct rte_eth_dev *dev,
+						const char *pool);
+/**< @internal Test if a port supports specific mempool ops */
+
+/**
+ * @internal
+ * Get the hairpin capabilities.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param cap
+ *   returns the hairpin capabilities from the device.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ */
+typedef int (*eth_hairpin_cap_get_t)(struct rte_eth_dev *dev,
+				     struct rte_eth_hairpin_cap *cap);
+
+/**
+ * @internal
+ * Setup RX hairpin queue.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param rx_queue_id
+ *   the selected RX queue index.
+ * @param nb_rx_desc
+ *   the requested number of descriptors for this queue. 0 - use PMD default.
+ * @param conf
+ *   the RX hairpin configuration structure.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ * @retval -EINVAL
+ *   One of the parameters is invalid.
+ * @retval -ENOMEM
+ *   Unable to allocate resources.
+ */
+typedef int (*eth_rx_hairpin_queue_setup_t)
+	(struct rte_eth_dev *dev, uint16_t rx_queue_id,
+	 uint16_t nb_rx_desc,
+	 const struct rte_eth_hairpin_conf *conf);
+
+/**
+ * @internal
+ * Setup TX hairpin queue.
+ *
+ * @param dev
+ *   ethdev handle of port.
+ * @param tx_queue_id
+ *   the selected TX queue index.
+ * @param nb_tx_desc
+ *   the requested number of descriptors for this queue. 0 - use PMD default.
+ * @param conf
+ *   the TX hairpin configuration structure.
+ *
+ * @return
+ *   Negative errno value on error, 0 on success.
+ *
+ * @retval 0
+ *   Success, hairpin is supported.
+ * @retval -ENOTSUP
+ *   Hairpin is not supported.
+ * @retval -EINVAL
+ *   One of the parameters is invalid.
+ * @retval -ENOMEM
+ *   Unable to allocate resources.
+ */
+typedef int (*eth_tx_hairpin_queue_setup_t)
+	(struct rte_eth_dev *dev, uint16_t tx_queue_id,
+	 uint16_t nb_tx_desc,
+	 const struct rte_eth_hairpin_conf *hairpin_conf);
+
+/**
+ * @internal A structure containing the functions exported by an Ethernet driver.
+ */
+struct eth_dev_ops {
+	eth_dev_configure_t        dev_configure; /**< Configure device. */
+	eth_dev_start_t            dev_start;     /**< Start device. */
+	eth_dev_stop_t             dev_stop;      /**< Stop device. */
+	eth_dev_set_link_up_t      dev_set_link_up;   /**< Device link up. */
+	eth_dev_set_link_down_t    dev_set_link_down; /**< Device link down. */
+	eth_dev_close_t            dev_close;     /**< Close device. */
+	eth_dev_reset_t		   dev_reset;	  /**< Reset device. */
+	eth_link_update_t          link_update;   /**< Get device link state. */
+	eth_is_removed_t           is_removed;
+	/**< Check if the device was physically removed. */
+
+	eth_promiscuous_enable_t   promiscuous_enable; /**< Promiscuous ON. */
+	eth_promiscuous_disable_t  promiscuous_disable;/**< Promiscuous OFF. */
+	eth_allmulticast_enable_t  allmulticast_enable;/**< RX multicast ON. */
+	eth_allmulticast_disable_t allmulticast_disable;/**< RX multicast OFF. */
+	eth_mac_addr_remove_t      mac_addr_remove; /**< Remove MAC address. */
+	eth_mac_addr_add_t         mac_addr_add;  /**< Add a MAC address. */
+	eth_mac_addr_set_t         mac_addr_set;  /**< Set a MAC address. */
+	eth_set_mc_addr_list_t     set_mc_addr_list; /**< set list of mcast addrs. */
+	mtu_set_t                  mtu_set;       /**< Set MTU. */
+
+	eth_stats_get_t            stats_get;     /**< Get generic device statistics. */
+	eth_stats_reset_t          stats_reset;   /**< Reset generic device statistics. */
+	eth_xstats_get_t           xstats_get;    /**< Get extended device statistics. */
+	eth_xstats_reset_t         xstats_reset;  /**< Reset extended device statistics. */
+	eth_xstats_get_names_t     xstats_get_names;
+	/**< Get names of extended statistics. */
+	eth_queue_stats_mapping_set_t queue_stats_mapping_set;
+	/**< Configure per queue stat counter mapping. */
+
+	eth_dev_infos_get_t        dev_infos_get; /**< Get device info. */
+	eth_rxq_info_get_t         rxq_info_get; /**< retrieve RX queue information. */
+	eth_txq_info_get_t         txq_info_get; /**< retrieve TX queue information. */
+	eth_burst_mode_get_t       rx_burst_mode_get; /**< Get RX burst mode */
+	eth_burst_mode_get_t       tx_burst_mode_get; /**< Get TX burst mode */
+	eth_fw_version_get_t       fw_version_get; /**< Get firmware version. */
+	eth_dev_supported_ptypes_get_t dev_supported_ptypes_get;
+	/**< Get packet types supported and identified by device. */
+	eth_dev_ptypes_set_t dev_ptypes_set;
+	/**< Inform Ethernet device about reduced range of packet types to handle. */
+
+	vlan_filter_set_t          vlan_filter_set; /**< Filter VLAN Setup. */
+	vlan_tpid_set_t            vlan_tpid_set; /**< Outer/Inner VLAN TPID Setup. */
+	vlan_strip_queue_set_t     vlan_strip_queue_set; /**< VLAN Stripping on queue. */
+	vlan_offload_set_t         vlan_offload_set; /**< Set VLAN Offload. */
+	vlan_pvid_set_t            vlan_pvid_set; /**< Set port based TX VLAN insertion. */
+
+	eth_queue_start_t          rx_queue_start;/**< Start RX for a queue. */
+	eth_queue_stop_t           rx_queue_stop; /**< Stop RX for a queue. */
+	eth_queue_start_t          tx_queue_start;/**< Start TX for a queue. */
+	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_enable_intr_t       rx_queue_intr_enable;  /**< Enable Rx queue interrupt. */
+	eth_rx_disable_intr_t      rx_queue_intr_disable; /**< Disable Rx queue interrupt. */
+	eth_tx_queue_setup_t       tx_queue_setup;/**< Set up device TX queue. */
+	eth_queue_release_t        tx_queue_release; /**< Release TX queue. */
+	eth_tx_done_cleanup_t      tx_done_cleanup;/**< Free tx ring mbufs */
+
+	eth_dev_led_on_t           dev_led_on;    /**< Turn on LED. */
+	eth_dev_led_off_t          dev_led_off;   /**< Turn off LED. */
+
+	flow_ctrl_get_t            flow_ctrl_get; /**< Get flow control. */
+	flow_ctrl_set_t            flow_ctrl_set; /**< Setup flow control. */
+	priority_flow_ctrl_set_t   priority_flow_ctrl_set; /**< Setup priority flow control. */
+
+	eth_uc_hash_table_set_t    uc_hash_table_set; /**< Set Unicast Table Array. */
+	eth_uc_all_hash_table_set_t uc_all_hash_table_set; /**< Set Unicast hash bitmap. */
+
+	eth_mirror_rule_set_t	   mirror_rule_set; /**< Add a traffic mirror rule. */
+	eth_mirror_rule_reset_t	   mirror_rule_reset; /**< reset a traffic mirror rule. */
+
+	eth_udp_tunnel_port_add_t  udp_tunnel_port_add; /** Add UDP tunnel port. */
+	eth_udp_tunnel_port_del_t  udp_tunnel_port_del; /** Del UDP tunnel port. */
+	eth_l2_tunnel_eth_type_conf_t l2_tunnel_eth_type_conf;
+	/** Config ether type of l2 tunnel. */
+	eth_l2_tunnel_offload_set_t   l2_tunnel_offload_set;
+	/** Enable/disable l2 tunnel offload functions. */
+
+	eth_set_queue_rate_limit_t set_queue_rate_limit; /**< Set queue rate limit. */
+
+	rss_hash_update_t          rss_hash_update; /** Configure RSS hash protocols. */
+	rss_hash_conf_get_t        rss_hash_conf_get; /** Get current RSS hash configuration. */
+	reta_update_t              reta_update;   /** Update redirection table. */
+	reta_query_t               reta_query;    /** Query redirection table. */
+
+	eth_get_reg_t              get_reg;           /**< Get registers. */
+	eth_get_eeprom_length_t    get_eeprom_length; /**< Get eeprom length. */
+	eth_get_eeprom_t           get_eeprom;        /**< Get eeprom data. */
+	eth_set_eeprom_t           set_eeprom;        /**< Set eeprom. */
+
+	eth_get_module_info_t      get_module_info;
+	/** Get plugin module eeprom attribute. */
+	eth_get_module_eeprom_t    get_module_eeprom;
+	/** Get plugin module eeprom data. */
+
+	eth_filter_ctrl_t          filter_ctrl; /**< common filter control. */
+
+	eth_get_dcb_info           get_dcb_info; /** Get DCB information. */
+
+	eth_timesync_enable_t      timesync_enable;
+	/** Turn IEEE1588/802.1AS timestamping on. */
+	eth_timesync_disable_t     timesync_disable;
+	/** Turn IEEE1588/802.1AS timestamping off. */
+	eth_timesync_read_rx_timestamp_t timesync_read_rx_timestamp;
+	/** Read the IEEE1588/802.1AS RX timestamp. */
+	eth_timesync_read_tx_timestamp_t timesync_read_tx_timestamp;
+	/** Read the IEEE1588/802.1AS TX timestamp. */
+	eth_timesync_adjust_time   timesync_adjust_time; /** Adjust the device clock. */
+	eth_timesync_read_time     timesync_read_time; /** Get the device clock time. */
+	eth_timesync_write_time    timesync_write_time; /** Set the device clock time. */
+
+	eth_read_clock             read_clock;
+
+	eth_xstats_get_by_id_t     xstats_get_by_id;
+	/**< Get extended device statistic values by ID. */
+	eth_xstats_get_names_by_id_t xstats_get_names_by_id;
+	/**< Get name of extended device statistics by ID. */
+
+	eth_tm_ops_get_t tm_ops_get;
+	/**< Get Traffic Management (TM) operations. */
+
+	eth_mtr_ops_get_t mtr_ops_get;
+	/**< Get Traffic Metering and Policing (MTR) operations. */
+
+	eth_pool_ops_supported_t pool_ops_supported;
+	/**< Test if a port supports specific mempool ops */
+
+	eth_hairpin_cap_get_t hairpin_cap_get;
+	/**< Returns the hairpin capabilities. */
+	eth_rx_hairpin_queue_setup_t rx_hairpin_queue_setup;
+	/**< Set up device RX hairpin queue. */
+	eth_tx_hairpin_queue_setup_t tx_hairpin_queue_setup;
+	/**< Set up device TX hairpin queue. */
+};
+
 /**
  * RX/TX queue states
  */
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 881cc469b7..997598db11 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h
index 3ec7ffa2a5..3b39532935 100644
--- a/lib/librte_ethdev/rte_mtr_driver.h
+++ b/lib/librte_ethdev/rte_mtr_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h
index 90114ff53e..b86ed89c00 100644
--- a/lib/librte_ethdev/rte_tm_driver.h
+++ b/lib/librte_ethdev/rte_tm_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_driver.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
-- 
2.26.2


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

* [dpdk-dev] [PATCH v4 4/7] ethdev: mark internal functions
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations Ferruh Yigit
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 3/7] ethdev: make device operations struct private Ferruh Yigit
@ 2020-09-09 13:01   ` Ferruh Yigit
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 5/7] ethdev: use hairpin helper functions Ferruh Yigit
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 13:01 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Andrew Rybchenko, Ori Kam
  Cc: Ferruh Yigit, David Marchand

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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
Cc: David Marchand <david.marchand@redhat.com>
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(-)

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 8770c87006..6c82db2961 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -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
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index 9b5bfcfae8..f8c3521b3f 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 ------------
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index b6f26a513b..e7733d828b 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -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
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index b006cbbe92..3d1bc33272 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 8d9d6b1c67..6a84f3d76d 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
 };
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index 997598db11..3ee871d3eb 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -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,
-- 
2.26.2


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

* [dpdk-dev] [PATCH v4 5/7] ethdev: use hairpin helper functions
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
                     ` (2 preceding siblings ...)
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 4/7] ethdev: mark internal functions Ferruh Yigit
@ 2020-09-09 13:01   ` Ferruh Yigit
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 13:01 UTC (permalink / raw)
  To: dev, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko,
	Thomas Monjalon, Andrew Rybchenko, Ray Kinsella, Neil Horman
  Cc: Ferruh Yigit, David Marchand

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.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 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(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 946f7454f6..1b729f7ab2 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -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;
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index 66ad368e64..450d9641de 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -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;
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 3d1bc33272..5dfe9fdf1a 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 6a84f3d76d..5db3fb156a 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.26.2


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

* [dpdk-dev] [PATCH v4 6/7] ethdev: remove invalid symbols from map file
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
                     ` (3 preceding siblings ...)
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 5/7] ethdev: use hairpin helper functions Ferruh Yigit
@ 2020-09-09 13:01   ` Ferruh Yigit
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
  2020-09-10 12:50   ` [dpdk-dev] [PATCH v4 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 13:01 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, Thomas Monjalon,
	Andrew Rybchenko, Sergio Gonzalez Monroy
  Cc: Ferruh Yigit, stable, David Marchand

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

Fixes: 9d41beed24b0 ("lib: provide initial versioning")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
 lib/librte_ethdev/rte_ethdev_version.map | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index 5db3fb156a..a85986a2a2 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.26.2


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

* [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
                     ` (4 preceding siblings ...)
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
@ 2020-09-09 13:01   ` Ferruh Yigit
  2020-09-10  2:04     ` Sachin Saxena (OSS)
  2020-09-10 12:50   ` [dpdk-dev] [PATCH v4 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
  6 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-09 13:01 UTC (permalink / raw)
  To: dev, John McNamara, Marko Kovacevic, Igor Russkikh, Pavel Belous,
	Ajit Khaparde, Somnath Kotur, Chas Williams, Wei Hu (Xavier),
	Hemant Agrawal, Sachin Saxena, Wei Zhao, Jeff Guo, Marcin Wojtas,
	Michal Krawczyk, Guy Tzalik, Evgeny Schemeilin, Igor Chauskin,
	John Daley, Hyong Youb Kim, Gaetan Rivet, Qi Zhang, Xiao Wang,
	Ziyang Xuan, Xiaoyun Wang, Guoyang Zhou, Beilei Xing,
	Jingjing Wu, Qiming Yang, Matan Azrad, Shahaf Shuler,
	Viacheslav Ovsiienko, Stephen Hemminger, K. Y. Srinivasan,
	Haiyang Zhang, Long Li, Heinrich Kuhn, Harman Kalra, Jerin Jacob,
	Nithin Dabilpuram, Kiran Kumar K, Rasesh Mody, Shahed Shaikh,
	Andrew Rybchenko, Maciej Czekaj, Maxime Coquelin, Chenbo Xia,
	Zhihong Wang, Yong Wang, Thomas Monjalon, Ray Kinsella,
	Neil Horman
  Cc: Ferruh Yigit, David Marchand

'_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'.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: David Marchand <david.marchand@redhat.com>
---
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(-)

diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
index 79156cb85a..b49089a33c 100644
--- a/app/test/virtual_pmd.c
+++ b/app/test/virtual_pmd.c
@@ -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
diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst
index 6fae39f904..86e0a141e6 100644
--- a/doc/guides/prog_guide/poll_mode_drv.rst
+++ b/doc/guides/prog_guide/poll_mode_drv.rst
@@ -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().
diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
index f8c3521b3f..7ff6ac23b6 100644
--- a/doc/guides/rel_notes/release_20_11.rst
+++ b/doc/guides/rel_notes/release_20_11.rst
@@ -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
 -----------
diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
index 540b106045..2fca9140d7 100644
--- a/drivers/net/atlantic/atl_ethdev.c
+++ b/drivers/net/atlantic/atl_ethdev.c
@@ -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);
 		}
 	}
diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 4d224bfa04..8c959ac913 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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);
 	}
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
index eafc1d3868..d67db46c65 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.c
+++ b/drivers/net/bnxt/rte_pmd_bnxt.c
@@ -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)
diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
index cdbd8151ed..4ffd2ca4bb 100644
--- a/drivers/net/bonding/rte_eth_bond_pmd.c
+++ b/drivers/net/bonding/rte_eth_bond_pmd.c
@@ -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);
 		}
diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
index e2c3fd0368..a077b98c3e 100644
--- a/drivers/net/dpaa/dpaa_ethdev.c
+++ b/drivers/net/dpaa/dpaa_ethdev.c
@@ -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)
diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
index 38cf0ab71c..0e9f836e55 100644
--- a/drivers/net/dpaa2/dpaa2_ethdev.c
+++ b/drivers/net/dpaa2/dpaa2_ethdev.c
@@ -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,
diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 82766da882..1dc360713a 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -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
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index fe0cea88c2..5ab74840aa 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
index da8c8ad922..8077519735 100644
--- a/drivers/net/ena/ena_ethdev.c
+++ b/drivers/net/ena/ena_ethdev.c
@@ -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,
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 7942b0df6b..8b0441c5cd 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -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);
diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
index 70972d6717..7c68bbdec0 100644
--- a/drivers/net/failsafe/failsafe_ether.c
+++ b/drivers/net/failsafe/failsafe_ether.c
@@ -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;
 }
diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
index e6043e1455..5771d83b55 100644
--- a/drivers/net/fm10k/fm10k_ethdev.c
+++ b/drivers/net/fm10k/fm10k_ethdev.c
@@ -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 */
diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
index ac2a72e388..41c99bdbf8 100644
--- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
+++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
@@ -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,
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 80efd06cd9..563f21d9df 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -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:
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index be4b28fa45..8531cf6b12 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -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:
diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index 7bf1e79410..03c2070c3f 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -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);
diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 34c31a153a..29e4cae10c 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -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");
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index c8b16c7f87..724b2ee26c 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -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
diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
index aa37c11861..810568bc54 100644
--- a/drivers/net/igc/igc_ethdev.c
+++ b/drivers/net/igc/igc_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 337ce90fbf..0f065bbc04 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
index 67b5bef44f..ed5f96b1a4 100644
--- a/drivers/net/ixgbe/ixgbe_pf.c
+++ b/drivers/net/ixgbe/ixgbe_pf.c
@@ -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;
 
diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c
index 19af9359c9..6786b12ab5 100644
--- a/drivers/net/mlx4/mlx4_intr.c
+++ b/drivers/net/mlx4/mlx4_intr.c
@@ -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);
 }
 
 /**
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 3d3dd2e862..7256c1bcfe 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -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;
 		}
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index eb55bd7f99..55cdc37f00 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -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;
diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index d186ddeabd..66d1966f29 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -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)
diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index c556dedab6..4f03691989 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -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);
 
diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
index 76c69294d0..808b761b96 100644
--- a/drivers/net/octeontx/octeontx_ethdev.c
+++ b/drivers/net/octeontx/octeontx_ethdev.c
@@ -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);
 		}
 	}
 
diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c
index 12bf6c3231..439ec4fa89 100644
--- a/drivers/net/octeontx2/otx2_link.c
+++ b/drivers/net/octeontx2/otx2_link.c
@@ -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
diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index 987a6f1e13..aecb98261b 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -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)
diff --git a/drivers/net/sfc/sfc_intr.c b/drivers/net/sfc/sfc_intr.c
index 80feab68f8..da32d393c2 100644
--- a/drivers/net/sfc/sfc_intr.c
+++ b/drivers/net/sfc/sfc_intr.c
@@ -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);
 	}
 }
 
diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
index 959c8e4ddc..83d9488360 100644
--- a/drivers/net/thunderx/nicvf_ethdev.c
+++ b/drivers/net/thunderx/nicvf_ethdev.c
@@ -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);
 		}
 	}
 
diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
index fa365605ef..ce32be9ce3 100644
--- a/drivers/net/vhost/rte_eth_vhost.c
+++ b/drivers/net/vhost/rte_eth_vhost.c
@@ -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;
 }
diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
index 4f2fa0d943..dac0f23052 100644
--- a/drivers/net/virtio/virtio_ethdev.c
+++ b/drivers/net/virtio/virtio_ethdev.c
@@ -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,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 815fba2f55..fa80e75a5b 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -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 */
diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
index f8d63c7e17..066751f287 100644
--- a/lib/librte_ethdev/rte_ethdev.c
+++ b/lib/librte_ethdev/rte_ethdev.c
@@ -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;
 }
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 5dfe9fdf1a..23cc1e0959 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -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);
 
 /**
diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
index a85986a2a2..b6630dfabe 100644
--- a/lib/librte_ethdev/rte_ethdev_version.map
+++ b/lib/librte_ethdev/rte_ethdev_version.map
@@ -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;
-- 
2.26.2


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

* Re: [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations Ferruh Yigit
@ 2020-09-10  1:56     ` Sachin Saxena (OSS)
  0 siblings, 0 replies; 60+ messages in thread
From: Sachin Saxena (OSS) @ 2020-09-10  1:56 UTC (permalink / raw)
  To: dev, ferruh.yigit

Acked-by: Sachin Saxena<sachin.saxena@oss.nxp.com>



On 09-Sep-20 6:31 PM, Ferruh Yigit wrote:
> 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;
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: David Marchand <david.marchand@redhat.com>
> ---
> v2:
> * Updated features.rst
> * Tweak assignment order in sfc
>
> Cc: David Marchand <david.marchand@redhat.com>
> 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(-)
>
> diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst
> index edd21c4d8e..dd8c9555b0 100644
> --- a/doc/guides/nics/features.rst
> +++ b/doc/guides/nics/features.rst
> @@ -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()``.
>   
>   
> diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> index a7d57b001d..ff7242012b 100644
> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
> @@ -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
>   ------------
> diff --git a/drivers/net/ark/ark_ethdev.c b/drivers/net/ark/ark_ethdev.c
> index b32ccd8677..ce7f6e4803 100644
> --- a/drivers/net/ark/ark_ethdev.c
> +++ b/drivers/net/ark/ark_ethdev.c
> @@ -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) {
> diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
> index d3b00ab295..540b106045 100644
> --- a/drivers/net/atlantic/atl_ethdev.c
> +++ b/drivers/net/atlantic/atl_ethdev.c
> @@ -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;
> diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_ethdev.c
> index 0c25739f82..02ceb95754 100644
> --- a/drivers/net/axgbe/axgbe_ethdev.c
> +++ b/drivers/net/axgbe/axgbe_ethdev.c
> @@ -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.
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 75d055be00..4d224bfa04 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -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;
>   
> diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
> index b0f2023e60..e2c3fd0368 100644
> --- a/drivers/net/dpaa/dpaa_ethdev.c
> +++ b/drivers/net/dpaa/dpaa_ethdev.c
> @@ -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;
>   
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index 02c254846c..38cf0ab71c 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -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,
> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
> index 902b1cdca0..82766da882 100644
> --- a/drivers/net/e1000/em_ethdev.c
> +++ b/drivers/net/e1000/em_ethdev.c
> @@ -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;
> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
> index a5551e8175..fe0cea88c2 100644
> --- a/drivers/net/e1000/igb_ethdev.c
> +++ b/drivers/net/e1000/igb_ethdev.c
> @@ -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;
> diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
> index ca75919ee2..2cffa3aa2d 100644
> --- a/drivers/net/enic/enic_ethdev.c
> +++ b/drivers/net/enic/enic_ethdev.c
> @@ -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;
> diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
> index fd927923da..e6043e1455 100644
> --- a/drivers/net/fm10k/fm10k_ethdev.c
> +++ b/drivers/net/fm10k/fm10k_ethdev.c
> @@ -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;
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 841447228a..80efd06cd9 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -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;
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
> index b755350cd2..be4b28fa45 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -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;
>   
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c
> index 8e1d8a8d3e..e1ff38e8be 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -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;
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
> index c5dac2e328..c8b16c7f87 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -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;
> diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
> index 6ab3ee909d..aa37c11861 100644
> --- a/drivers/net/igc/igc_ethdev.c
> +++ b/drivers/net/igc/igc_ethdev.c
> @@ -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
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index d9582473a4..337ce90fbf 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -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;
>   
> diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
> index bf1f82ba67..ec3cc4000e 100644
> --- a/drivers/net/mlx5/linux/mlx5_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_os.c
> @@ -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,
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index 4c29898203..eb55bd7f99 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -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;
>   }
>   
> diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
> index fd91c0e491..229c1b9149 100644
> --- a/drivers/net/netvsc/hn_ethdev.c
> +++ b/drivers/net/netvsc/hn_ethdev.c
> @@ -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;
>   
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index 99946279db..c556dedab6 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -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;
>   
> diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c
> index 33b72bd4db..c06e32f26b 100644
> --- a/drivers/net/octeontx2/otx2_ethdev.c
> +++ b/drivers/net/octeontx2/otx2_ethdev.c
> @@ -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) {
> diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
> index 70d48e48ef..59f1746ee9 100644
> --- a/drivers/net/qede/qede_ethdev.c
> +++ b/drivers/net/qede/qede_ethdev.c
> @@ -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;
> diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
> index acee3e48e4..1a58e0df84 100644
> --- a/drivers/net/sfc/sfc_ethdev.c
> +++ b/drivers/net/sfc/sfc_ethdev.c
> @@ -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;
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index d955a7ee23..959c8e4ddc 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -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) {
> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
> index e55278af69..fa365605ef 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -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;
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index dc0093bdf0..4f2fa0d943 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -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) {
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index eb6cd01f8d..b6f26a513b 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -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);
>   }
>   
>   /**
> diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h
> index 32407dd418..8ed827475f 100644
> --- a/lib/librte_ethdev/rte_ethdev_core.h
> +++ b/lib/librte_ethdev/rte_ethdev_core.h
> @@ -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


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

* Re: [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
@ 2020-09-10  2:04     ` Sachin Saxena (OSS)
  0 siblings, 0 replies; 60+ messages in thread
From: Sachin Saxena (OSS) @ 2020-09-10  2:04 UTC (permalink / raw)
  To: dev

Acked-by: Sachin Saxena<sachin.saxena@oss.nxp.com>


On 09-Sep-20 6:31 PM, Ferruh Yigit wrote:
> '_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'.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
> Acked-by: David Marchand <david.marchand@redhat.com>
> ---
> 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(-)
>
> diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c
> index 79156cb85a..b49089a33c 100644
> --- a/app/test/virtual_pmd.c
> +++ b/app/test/virtual_pmd.c
> @@ -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
> diff --git a/doc/guides/prog_guide/poll_mode_drv.rst b/doc/guides/prog_guide/poll_mode_drv.rst
> index 6fae39f904..86e0a141e6 100644
> --- a/doc/guides/prog_guide/poll_mode_drv.rst
> +++ b/doc/guides/prog_guide/poll_mode_drv.rst
> @@ -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().
> diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst
> index f8c3521b3f..7ff6ac23b6 100644
> --- a/doc/guides/rel_notes/release_20_11.rst
> +++ b/doc/guides/rel_notes/release_20_11.rst
> @@ -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
>   -----------
> diff --git a/drivers/net/atlantic/atl_ethdev.c b/drivers/net/atlantic/atl_ethdev.c
> index 540b106045..2fca9140d7 100644
> --- a/drivers/net/atlantic/atl_ethdev.c
> +++ b/drivers/net/atlantic/atl_ethdev.c
> @@ -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);
>   		}
>   	}
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 4d224bfa04..8c959ac913 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -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);
>   	}
> diff --git a/drivers/net/bnxt/rte_pmd_bnxt.c b/drivers/net/bnxt/rte_pmd_bnxt.c
> index eafc1d3868..d67db46c65 100644
> --- a/drivers/net/bnxt/rte_pmd_bnxt.c
> +++ b/drivers/net/bnxt/rte_pmd_bnxt.c
> @@ -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)
> diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c
> index cdbd8151ed..4ffd2ca4bb 100644
> --- a/drivers/net/bonding/rte_eth_bond_pmd.c
> +++ b/drivers/net/bonding/rte_eth_bond_pmd.c
> @@ -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);
>   		}
> diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c
> index e2c3fd0368..a077b98c3e 100644
> --- a/drivers/net/dpaa/dpaa_ethdev.c
> +++ b/drivers/net/dpaa/dpaa_ethdev.c
> @@ -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)
> diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c
> index 38cf0ab71c..0e9f836e55 100644
> --- a/drivers/net/dpaa2/dpaa2_ethdev.c
> +++ b/drivers/net/dpaa2/dpaa2_ethdev.c
> @@ -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,
> diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
> index 82766da882..1dc360713a 100644
> --- a/drivers/net/e1000/em_ethdev.c
> +++ b/drivers/net/e1000/em_ethdev.c
> @@ -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
> diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
> index fe0cea88c2..5ab74840aa 100644
> --- a/drivers/net/e1000/igb_ethdev.c
> +++ b/drivers/net/e1000/igb_ethdev.c
> @@ -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);
>   	}
>   }
>   
> diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
> index da8c8ad922..8077519735 100644
> --- a/drivers/net/ena/ena_ethdev.c
> +++ b/drivers/net/ena/ena_ethdev.c
> @@ -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,
> diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
> index 7942b0df6b..8b0441c5cd 100644
> --- a/drivers/net/enic/enic_main.c
> +++ b/drivers/net/enic/enic_main.c
> @@ -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);
> diff --git a/drivers/net/failsafe/failsafe_ether.c b/drivers/net/failsafe/failsafe_ether.c
> index 70972d6717..7c68bbdec0 100644
> --- a/drivers/net/failsafe/failsafe_ether.c
> +++ b/drivers/net/failsafe/failsafe_ether.c
> @@ -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;
>   }
> diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c
> index e6043e1455..5771d83b55 100644
> --- a/drivers/net/fm10k/fm10k_ethdev.c
> +++ b/drivers/net/fm10k/fm10k_ethdev.c
> @@ -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 */
> diff --git a/drivers/net/hinic/base/hinic_pmd_hwdev.c b/drivers/net/hinic/base/hinic_pmd_hwdev.c
> index ac2a72e388..41c99bdbf8 100644
> --- a/drivers/net/hinic/base/hinic_pmd_hwdev.c
> +++ b/drivers/net/hinic/base/hinic_pmd_hwdev.c
> @@ -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,
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index 80efd06cd9..563f21d9df 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -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:
> diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
> index be4b28fa45..8531cf6b12 100644
> --- a/drivers/net/i40e/i40e_ethdev_vf.c
> +++ b/drivers/net/i40e/i40e_ethdev_vf.c
> @@ -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:
> diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
> index 7bf1e79410..03c2070c3f 100644
> --- a/drivers/net/i40e/i40e_pf.c
> +++ b/drivers/net/i40e/i40e_pf.c
> @@ -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);
> diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
> index 34c31a153a..29e4cae10c 100644
> --- a/drivers/net/iavf/iavf_vchnl.c
> +++ b/drivers/net/iavf/iavf_vchnl.c
> @@ -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");
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
> index c8b16c7f87..724b2ee26c 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -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
> diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c
> index aa37c11861..810568bc54 100644
> --- a/drivers/net/igc/igc_ethdev.c
> +++ b/drivers/net/igc/igc_ethdev.c
> @@ -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);
>   	}
>   }
>   
> diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
> index 337ce90fbf..0f065bbc04 100644
> --- a/drivers/net/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/ixgbe/ixgbe_ethdev.c
> @@ -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);
>   	}
>   }
>   
> diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c
> index 67b5bef44f..ed5f96b1a4 100644
> --- a/drivers/net/ixgbe/ixgbe_pf.c
> +++ b/drivers/net/ixgbe/ixgbe_pf.c
> @@ -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;
>   
> diff --git a/drivers/net/mlx4/mlx4_intr.c b/drivers/net/mlx4/mlx4_intr.c
> index 19af9359c9..6786b12ab5 100644
> --- a/drivers/net/mlx4/mlx4_intr.c
> +++ b/drivers/net/mlx4/mlx4_intr.c
> @@ -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);
>   }
>   
>   /**
> diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
> index 3d3dd2e862..7256c1bcfe 100644
> --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
> +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
> @@ -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;
>   		}
> diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
> index eb55bd7f99..55cdc37f00 100644
> --- a/drivers/net/mlx5/mlx5_flow.c
> +++ b/drivers/net/mlx5/mlx5_flow.c
> @@ -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;
> diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
> index d186ddeabd..66d1966f29 100644
> --- a/drivers/net/netvsc/hn_rndis.c
> +++ b/drivers/net/netvsc/hn_rndis.c
> @@ -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)
> diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
> index c556dedab6..4f03691989 100644
> --- a/drivers/net/nfp/nfp_net.c
> +++ b/drivers/net/nfp/nfp_net.c
> @@ -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);
>   
> diff --git a/drivers/net/octeontx/octeontx_ethdev.c b/drivers/net/octeontx/octeontx_ethdev.c
> index 76c69294d0..808b761b96 100644
> --- a/drivers/net/octeontx/octeontx_ethdev.c
> +++ b/drivers/net/octeontx/octeontx_ethdev.c
> @@ -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);
>   		}
>   	}
>   
> diff --git a/drivers/net/octeontx2/otx2_link.c b/drivers/net/octeontx2/otx2_link.c
> index 12bf6c3231..439ec4fa89 100644
> --- a/drivers/net/octeontx2/otx2_link.c
> +++ b/drivers/net/octeontx2/otx2_link.c
> @@ -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
> diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
> index 987a6f1e13..aecb98261b 100644
> --- a/drivers/net/qede/qede_main.c
> +++ b/drivers/net/qede/qede_main.c
> @@ -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)
> diff --git a/drivers/net/sfc/sfc_intr.c b/drivers/net/sfc/sfc_intr.c
> index 80feab68f8..da32d393c2 100644
> --- a/drivers/net/sfc/sfc_intr.c
> +++ b/drivers/net/sfc/sfc_intr.c
> @@ -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);
>   	}
>   }
>   
> diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c
> index 959c8e4ddc..83d9488360 100644
> --- a/drivers/net/thunderx/nicvf_ethdev.c
> +++ b/drivers/net/thunderx/nicvf_ethdev.c
> @@ -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);
>   		}
>   	}
>   
> diff --git a/drivers/net/vhost/rte_eth_vhost.c b/drivers/net/vhost/rte_eth_vhost.c
> index fa365605ef..ce32be9ce3 100644
> --- a/drivers/net/vhost/rte_eth_vhost.c
> +++ b/drivers/net/vhost/rte_eth_vhost.c
> @@ -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;
>   }
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 4f2fa0d943..dac0f23052 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -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,
> diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> index 815fba2f55..fa80e75a5b 100644
> --- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
> +++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
> @@ -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 */
> diff --git a/lib/librte_ethdev/rte_ethdev.c b/lib/librte_ethdev/rte_ethdev.c
> index f8d63c7e17..066751f287 100644
> --- a/lib/librte_ethdev/rte_ethdev.c
> +++ b/lib/librte_ethdev/rte_ethdev.c
> @@ -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;
>   }
> diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
> index 5dfe9fdf1a..23cc1e0959 100644
> --- a/lib/librte_ethdev/rte_ethdev_driver.h
> +++ b/lib/librte_ethdev/rte_ethdev_driver.h
> @@ -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);
>   
>   /**
> diff --git a/lib/librte_ethdev/rte_ethdev_version.map b/lib/librte_ethdev/rte_ethdev_version.map
> index a85986a2a2..b6630dfabe 100644
> --- a/lib/librte_ethdev/rte_ethdev_version.map
> +++ b/lib/librte_ethdev/rte_ethdev_version.map
> @@ -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;


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

* Re: [dpdk-dev] [PATCH v4 1/7] ethdev: deprecate descriptor status check API
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
                     ` (5 preceding siblings ...)
  2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
@ 2020-09-10 12:50   ` Ferruh Yigit
  6 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-09-10 12:50 UTC (permalink / raw)
  To: dev, Ray Kinsella, Neil Horman, John McNamara, Marko Kovacevic,
	Thomas Monjalon, Andrew Rybchenko
  Cc: David Marchand

On 9/9/2020 2:01 PM, Ferruh Yigit wrote:
> 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.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Acked-by: David Marchand <david.marchand@redhat.com>
>

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


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

* [dpdk-dev] [v21.02 v3 00/10] cppcheck
  2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
                   ` (9 preceding siblings ...)
  2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
@ 2020-11-19 11:58 ` Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 01/10] app/procinfo: fix redundant condition Ferruh Yigit
                     ` (10 more replies)
  10 siblings, 11 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev; +Cc: 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(-)

-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 01/10] app/procinfo: fix redundant condition
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2021-01-08 10:36     ` David Marchand
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 02/10] app/procinfo: fix negative check on unsigned variable Ferruh Yigit
                     ` (9 subsequent siblings)
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Maryam Tahhan, Reshma Pattan, Harry van Haaren, Roman Korynkevych
  Cc: Ferruh Yigit, stable

'_filters' is compared twice, second one will be always false, removing
it using the message more relevant to the '_filters'.

Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/proc-info/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index d743209f0d..35e5b596eb 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -420,11 +420,9 @@ static void collectd_resolve_cnt_type(char *cnt_type, size_t cnt_type_len,
 	} else if ((type_end != NULL) &&
 		   (strncmp(cnt_name, "flow_", strlen("flow_"))) == 0) {
 		if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
-			strlcpy(cnt_type, "operations", cnt_type_len);
+			strlcpy(cnt_type, "filter_result", cnt_type_len);
 		else if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
 			strlcpy(cnt_type, "errors", cnt_type_len);
-		else if (strncmp(type_end, "_filters", strlen("_filters")) == 0)
-			strlcpy(cnt_type, "filter_result", cnt_type_len);
 	} else if ((type_end != NULL) &&
 		   (strncmp(cnt_name, "mac_", strlen("mac_"))) == 0) {
 		if (strncmp(type_end, "_errors", strlen("_errors")) == 0)
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 02/10] app/procinfo: fix negative check on unsigned variable
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 01/10] app/procinfo: fix redundant condition Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 03/10] app/procinfo: remove suspicious sizeof Ferruh Yigit
                     ` (8 subsequent siblings)
  10 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Maryam Tahhan, Reshma Pattan, Kuba Kozak
  Cc: Ferruh Yigit, stable, David Marchand

'parse_xstats_ids()' return 'int'. The return value is assigned to
'nb_xstats_ids' unsigned value, later negative check on this variable is
wrong.

Adding interim 'int' variable for negative check.

Fixes: 7ac16a3660c0 ("app/proc-info: support xstats by ID and by name")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
v3:
* Removed casting
---
 app/proc-info/main.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 35e5b596eb..8ee30ddb71 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -301,14 +301,13 @@ proc_info_parse_args(int argc, char **argv)
 			} else if (!strncmp(long_option[option_index].name,
 					"xstats-ids",
 					MAX_LONG_OPT_SZ))	{
-				nb_xstats_ids = parse_xstats_ids(optarg,
+				int ret = parse_xstats_ids(optarg,
 						xstats_ids, MAX_NB_XSTATS_IDS);
-
-				if (nb_xstats_ids <= 0) {
+				if (ret <= 0) {
 					printf("xstats-id list parse error.\n");
 					return -1;
 				}
-
+				nb_xstats_ids = ret;
 			}
 			break;
 		default:
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 03/10] app/procinfo: remove suspicious sizeof
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 01/10] app/procinfo: fix redundant condition Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 02/10] app/procinfo: fix negative check on unsigned variable Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 04/10] app/procinfo: remove useless assignment Ferruh Yigit
                     ` (7 subsequent siblings)
  10 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Maryam Tahhan, Reshma Pattan, John McNamara, Vipin Varghese
  Cc: Ferruh Yigit, stable, David Marchand

The intention with the "sizeof(0)" usage is not clear, but the 'stats'
already 'memset' by 'rte_cryptodev_stats_get()' API, removing 'memset'
in application.

Fixes: fe773600fe3e ("app/procinfo: add --show-crypto")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 8ee30ddb71..106b44d6fb 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1207,7 +1207,6 @@ show_crypto(void)
 
 		display_crypto_feature_info(dev_info.feature_flags);
 
-		memset(&stats, 0, sizeof(0));
 		if (rte_cryptodev_stats_get(i, &stats) == 0) {
 			printf("\t  -- stats\n");
 			printf("\t\t  + enqueue count (%"PRIu64")"
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 04/10] app/procinfo: remove useless assignment
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
                     ` (2 preceding siblings ...)
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 03/10] app/procinfo: remove suspicious sizeof Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 05/10] net/pcap: remove local variable shadowing outer one Ferruh Yigit
                     ` (6 subsequent siblings)
  10 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Maryam Tahhan, Reshma Pattan, Vipin Varghese, John McNamara
  Cc: Ferruh Yigit, stable, David Marchand

'flag' is initialized to '0' but it is overwritten later, moving the
declaration where it is used and initialize with actual value.

Fixes: 0101a0ec6217 ("app/procinfo: add --show-mempool")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 app/proc-info/main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/app/proc-info/main.c b/app/proc-info/main.c
index 106b44d6fb..44249dd2cb 100644
--- a/app/proc-info/main.c
+++ b/app/proc-info/main.c
@@ -1264,8 +1264,6 @@ show_ring(char *name)
 static void
 show_mempool(char *name)
 {
-	uint64_t flags = 0;
-
 	snprintf(bdr_str, MAX_STRING_LEN, " show - MEMPOOL ");
 	STATS_BDR_STR(10, bdr_str);
 
@@ -1273,8 +1271,8 @@ show_mempool(char *name)
 		struct rte_mempool *ptr = rte_mempool_lookup(name);
 		if (ptr != NULL) {
 			struct rte_mempool_ops *ops;
+			uint64_t flags = ptr->flags;
 
-			flags = ptr->flags;
 			ops = rte_mempool_get_ops(ptr->ops_index);
 			printf("  - Name: %s on socket %d\n"
 				"  - flags:\n"
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 05/10] net/pcap: remove local variable shadowing outer one
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
                     ` (3 preceding siblings ...)
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 04/10] app/procinfo: remove useless assignment Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2021-01-08 10:31     ` [dpdk-dev] [dpdk-stable] " David Marchand
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 06/10] net/bonding: " Ferruh Yigit
                     ` (5 subsequent siblings)
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Juhamatti Kuusisaari; +Cc: Ferruh Yigit, stable

'ret' is already defined in the function scope, removing the 'ret' in
the block scope.

Fixes: c9507cd0cada ("net/pcap: support physical interface MAC address")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
v3:
* Eliminated block scope 'ret' variable usage completely.
---
 drivers/net/pcap/rte_eth_pcap.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index 4930d7d382..90929478eb 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1324,9 +1324,8 @@ eth_from_pcaps(struct rte_vdev_device *vdev,
 
 		/* phy_mac arg is applied only only if "iface" devarg is provided */
 		if (rx_queues->phy_mac) {
-			int ret = eth_pcap_update_mac(rx_queues->queue[0].name,
-					eth_dev, vdev->device.numa_node);
-			if (ret == 0)
+			if(eth_pcap_update_mac(rx_queues->queue[0].name,
+					eth_dev, vdev->device.numa_node) == 0)
 				internals->phy_mac = 1;
 		}
 	}
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 06/10] net/bonding: remove local variable shadowing outer one
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
                     ` (4 preceding siblings ...)
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 05/10] net/pcap: remove local variable shadowing outer one Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2021-01-08 10:34     ` David Marchand
  2021-01-11  1:03     ` Min Hu (Connor)
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 07/10] net/af_xdp: remove useless assignment Ferruh Yigit
                     ` (4 subsequent siblings)
  10 siblings, 2 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Chas Williams, Min Hu (Connor), Tomasz Kulasek, Declan Doherty
  Cc: Ferruh Yigit, stable

'retval' is already defined in the function scope, removing the 'retval'
in the block scope.

Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: tomaszx.kulasek@intel.com
---
 drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
index 67ca0730fa..5fe004e551 100644
--- a/drivers/net/bonding/rte_eth_bond_8023ad.c
+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
@@ -1334,8 +1334,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 		rte_eth_macaddr_get(slave_id, &m_hdr->eth_hdr.s_addr);
 
 		if (internals->mode4.dedicated_queues.enabled == 0) {
-			int retval = rte_ring_enqueue(port->tx_ring, pkt);
-			if (retval != 0) {
+			if (rte_ring_enqueue(port->tx_ring, pkt) != 0) {
 				/* reset timer */
 				port->rx_marker_timer = 0;
 				wrn = WRN_TX_QUEUE_FULL;
@@ -1355,8 +1354,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
 		}
 	} else if (likely(subtype == SLOW_SUBTYPE_LACP)) {
 		if (internals->mode4.dedicated_queues.enabled == 0) {
-			int retval = rte_ring_enqueue(port->rx_ring, pkt);
-			if (retval != 0) {
+			if (rte_ring_enqueue(port->rx_ring, pkt) != 0) {
 				/* If RX fing full free lacpdu message and drop packet */
 				wrn = WRN_RX_QUEUE_FULL;
 				goto free_out;
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 07/10] net/af_xdp: remove useless assignment
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
                     ` (5 preceding siblings ...)
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 06/10] net/bonding: " Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 08/10] net/bnxt: fix redundant return Ferruh Yigit
                     ` (3 subsequent siblings)
  10 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Ciara Loftus, Qi Zhang, Xiaolong Ye
  Cc: Ferruh Yigit, stable, David Marchand

Assignment of function parameter 'umem' removed.

Fixes: f0ce7af0e182 ("net/af_xdp: remove resources when port is closed")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 2c7892bd7e..7fc70df713 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -840,7 +840,6 @@ xdp_umem_destroy(struct xsk_umem_info *umem)
 #endif
 
 	rte_free(umem);
-	umem = NULL;
 }
 
 static int
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 08/10] net/bnxt: fix redundant return
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
                     ` (6 preceding siblings ...)
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 07/10] net/af_xdp: remove useless assignment Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true condition Ferruh Yigit
                     ` (2 subsequent siblings)
  10 siblings, 0 replies; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Ajit Khaparde, Somnath Kotur, Randy Schacher,
	Venkat Duvvuru, Peter Spreadborough
  Cc: Ferruh Yigit, stable, David Marchand

Removing useless 'return' statement.

Fixes: b2da02480cb7 ("net/bnxt: support EEM system memory")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
---
 drivers/net/bnxt/tf_core/tf_em_common.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/bnxt/tf_core/tf_em_common.c b/drivers/net/bnxt/tf_core/tf_em_common.c
index ad92cbdc75..c96c21c2e9 100644
--- a/drivers/net/bnxt/tf_core/tf_em_common.c
+++ b/drivers/net/bnxt/tf_core/tf_em_common.c
@@ -307,7 +307,6 @@ tf_em_page_tbl_pgcnt(uint32_t num_pages,
 {
 	return roundup(num_pages, MAX_PAGE_PTRS(page_size)) /
 		       MAX_PAGE_PTRS(page_size);
-	return 0;
 }
 
 /**
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true condition
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
                     ` (7 preceding siblings ...)
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 08/10] net/bnxt: fix redundant return Ferruh Yigit
@ 2020-11-19 11:58   ` Ferruh Yigit
  2020-11-23 15:25     ` Zhang, Roy Fan
  2020-11-19 11:59   ` [dpdk-dev] [v21.02 v3 10/10] net/avp: " Ferruh Yigit
  2021-01-11  9:47   ` [dpdk-dev] [v21.02 v3 00/10] cppcheck David Marchand
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:58 UTC (permalink / raw)
  To: dev, Declan Doherty, Marcin Kerlin, Slawomir Mrozowicz,
	Michal Kobylinski, Piotr Azarewicz
  Cc: Ferruh Yigit, stable

This is already 'else' leg of the opposite comparison, simple 'else'
will be logically same.

Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test application")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 app/test-crypto-perf/main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
index 5f035519c3..99f86e9019 100644
--- a/app/test-crypto-perf/main.c
+++ b/app/test-crypto-perf/main.c
@@ -390,7 +390,7 @@ cperf_check_test_vector(struct cperf_options *opts,
 		if (opts->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
-		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+		} else {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
@@ -440,7 +440,7 @@ cperf_check_test_vector(struct cperf_options *opts,
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
 				return -1;
-		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
+		} else {
 			if (test_vec->plaintext.data == NULL)
 				return -1;
 			if (test_vec->plaintext.length < opts->max_buffer_size)
-- 
2.26.2


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

* [dpdk-dev] [v21.02 v3 10/10] net/avp: remove always true condition
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
                     ` (8 preceding siblings ...)
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true condition Ferruh Yigit
@ 2020-11-19 11:59   ` Ferruh Yigit
  2020-11-20 17:40     ` Steven Webster
  2021-01-11  9:47   ` [dpdk-dev] [v21.02 v3 00/10] cppcheck David Marchand
  10 siblings, 1 reply; 60+ messages in thread
From: Ferruh Yigit @ 2020-11-19 11:59 UTC (permalink / raw)
  To: dev, Steven Webster, Matt Peters, Vincent Jardin, Allain Legacy
  Cc: Ferruh Yigit, stable

There is already a break above for the case "count >= 1", so at this
stage 'count' should be always '0'.

Fixes: 1a85922369c4 ("net/avp: add device configuration")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/avp/avp_ethdev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 5f8187b905..f531e03c02 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -267,7 +267,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
 			break;
 		}
 
-		if ((count < 1) && (retry == 0)) {
+		if (retry == 0) {
 			PMD_DRV_LOG(ERR, "Timeout while waiting for a response for %u\n",
 				    request->req_id);
 			ret = -ETIME;
-- 
2.26.2


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

* Re: [dpdk-dev] [v21.02 v3 10/10] net/avp: remove always true condition
  2020-11-19 11:59   ` [dpdk-dev] [v21.02 v3 10/10] net/avp: " Ferruh Yigit
@ 2020-11-20 17:40     ` Steven Webster
  0 siblings, 0 replies; 60+ messages in thread
From: Steven Webster @ 2020-11-20 17:40 UTC (permalink / raw)
  To: Ferruh Yigit, dev, Matt Peters, Vincent Jardin, Allain Legacy; +Cc: stable

On 2020-11-19 6:59 a.m., Ferruh Yigit wrote:

> There is already a break above for the case "count >= 1", so at this
> stage 'count' should be always '0'.
> 
> Fixes: 1a85922369c4 ("net/avp: add device configuration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>   drivers/net/avp/avp_ethdev.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
> index 5f8187b905..f531e03c02 100644
> --- a/drivers/net/avp/avp_ethdev.c
> +++ b/drivers/net/avp/avp_ethdev.c
> @@ -267,7 +267,7 @@ avp_dev_process_request(struct avp_dev *avp, struct rte_avp_request *request)
>                          break;
>                  }
> 
> -               if ((count < 1) && (retry == 0)) {
> +               if (retry == 0) {
>                          PMD_DRV_LOG(ERR, "Timeout while waiting for a response for %u\n",
>                                      request->req_id);
>                          ret = -ETIME;
> --
> 2.26.2
> 
Acked-by: Steven Webster <steven.webster@windriver.com>

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

* Re: [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true condition
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true condition Ferruh Yigit
@ 2020-11-23 15:25     ` Zhang, Roy Fan
  0 siblings, 0 replies; 60+ messages in thread
From: Zhang, Roy Fan @ 2020-11-23 15:25 UTC (permalink / raw)
  To: Yigit, Ferruh, dev, Doherty, Declan, Kerlin, Marcin, Mrozowicz,
	SlawomirX, Kobylinski, Michal, Piotr Azarewicz
  Cc: Yigit, Ferruh, stable

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Ferruh Yigit
> Sent: Thursday, November 19, 2020 11:59 AM
> To: dev@dpdk.org; Doherty, Declan <declan.doherty@intel.com>; Kerlin,
> Marcin <marcin.kerlin@intel.com>; Mrozowicz, SlawomirX
> <slawomirx.mrozowicz@intel.com>; Kobylinski, Michal
> <michal.kobylinski@intel.com>; Piotr Azarewicz
> <piotrx.t.azarewicz@intel.com>
> Cc: Yigit, Ferruh <ferruh.yigit@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true
> condition
> 
> This is already 'else' leg of the opposite comparison, simple 'else'
> will be logically same.
> 
> Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test
> application")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  app/test-crypto-perf/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c
> index 5f035519c3..99f86e9019 100644
> --- a/app/test-crypto-perf/main.c
> +++ b/app/test-crypto-perf/main.c
> @@ -390,7 +390,7 @@ cperf_check_test_vector(struct cperf_options *opts,
>  		if (opts->cipher_algo == RTE_CRYPTO_CIPHER_NULL) {
>  			if (test_vec->plaintext.data == NULL)
>  				return -1;
> -		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
> +		} else {
>  			if (test_vec->plaintext.data == NULL)
>  				return -1;
>  			if (test_vec->plaintext.length < opts-
> >max_buffer_size)
> @@ -440,7 +440,7 @@ cperf_check_test_vector(struct cperf_options *opts,
>  				return -1;
>  			if (test_vec->plaintext.length < opts-
> >max_buffer_size)
>  				return -1;
> -		} else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) {
> +		} else {
>  			if (test_vec->plaintext.data == NULL)
>  				return -1;
>  			if (test_vec->plaintext.length < opts-
> >max_buffer_size)
> --
> 2.26.2

Thanks Ferruh!

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>


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

* Re: [dpdk-dev] [dpdk-stable] [v21.02 v3 05/10] net/pcap: remove local variable shadowing outer one
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 05/10] net/pcap: remove local variable shadowing outer one Ferruh Yigit
@ 2021-01-08 10:31     ` David Marchand
  0 siblings, 0 replies; 60+ messages in thread
From: David Marchand @ 2021-01-08 10:31 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev, Juhamatti Kuusisaari, dpdk stable

On Thu, Nov 19, 2020 at 1:01 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> 'ret' is already defined in the function scope, removing the 'ret' in
> the block scope.
>
> Fixes: c9507cd0cada ("net/pcap: support physical interface MAC address")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>

-- 
David Marchand


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

* Re: [dpdk-dev] [v21.02 v3 06/10] net/bonding: remove local variable shadowing outer one
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 06/10] net/bonding: " Ferruh Yigit
@ 2021-01-08 10:34     ` David Marchand
  2021-01-11  1:03     ` Min Hu (Connor)
  1 sibling, 0 replies; 60+ messages in thread
From: David Marchand @ 2021-01-08 10:34 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, Chas Williams, Min Hu (Connor),
	Tomasz Kulasek, Declan Doherty, dpdk stable

On Thu, Nov 19, 2020 at 1:01 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> 'retval' is already defined in the function scope, removing the 'retval'
> in the block scope.
>
> Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>

-- 
David Marchand


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

* Re: [dpdk-dev] [v21.02 v3 01/10] app/procinfo: fix redundant condition
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 01/10] app/procinfo: fix redundant condition Ferruh Yigit
@ 2021-01-08 10:36     ` David Marchand
  0 siblings, 0 replies; 60+ messages in thread
From: David Marchand @ 2021-01-08 10:36 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, Maryam Tahhan, Reshma Pattan, Harry van Haaren,
	Roman Korynkevych, dpdk stable

On Thu, Nov 19, 2020 at 12:59 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> '_filters' is compared twice, second one will be always false, removing
> it using the message more relevant to the '_filters'.
>
> Fixes: 2deb6b5246d7 ("app/procinfo: add collectd format and host id")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Reviewed-by: David Marchand <david.marchand@redhat.com>

-- 
David Marchand


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

* Re: [dpdk-dev] [v21.02 v3 06/10] net/bonding: remove local variable shadowing outer one
  2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 06/10] net/bonding: " Ferruh Yigit
  2021-01-08 10:34     ` David Marchand
@ 2021-01-11  1:03     ` Min Hu (Connor)
  1 sibling, 0 replies; 60+ messages in thread
From: Min Hu (Connor) @ 2021-01-11  1:03 UTC (permalink / raw)
  To: Ferruh Yigit, dev, Chas Williams, Tomasz Kulasek, Declan Doherty; +Cc: stable

Acked-by: Min Hu (Connor) <humin29@huawei.com>

在 2020/11/19 19:58, Ferruh Yigit 写道:
> 'retval' is already defined in the function scope, removing the 'retval'
> in the block scope.
> 
> Fixes: 112891cd27e5 ("net/bonding: add dedicated HW queues for LACP control")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> Cc: tomaszx.kulasek@intel.com
> ---
>   drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c
> index 67ca0730fa..5fe004e551 100644
> --- a/drivers/net/bonding/rte_eth_bond_8023ad.c
> +++ b/drivers/net/bonding/rte_eth_bond_8023ad.c
> @@ -1334,8 +1334,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
>   		rte_eth_macaddr_get(slave_id, &m_hdr->eth_hdr.s_addr);
>   
>   		if (internals->mode4.dedicated_queues.enabled == 0) {
> -			int retval = rte_ring_enqueue(port->tx_ring, pkt);
> -			if (retval != 0) {
> +			if (rte_ring_enqueue(port->tx_ring, pkt) != 0) {
>   				/* reset timer */
>   				port->rx_marker_timer = 0;
>   				wrn = WRN_TX_QUEUE_FULL;
> @@ -1355,8 +1354,7 @@ bond_mode_8023ad_handle_slow_pkt(struct bond_dev_private *internals,
>   		}
>   	} else if (likely(subtype == SLOW_SUBTYPE_LACP)) {
>   		if (internals->mode4.dedicated_queues.enabled == 0) {
> -			int retval = rte_ring_enqueue(port->rx_ring, pkt);
> -			if (retval != 0) {
> +			if (rte_ring_enqueue(port->rx_ring, pkt) != 0) {
>   				/* If RX fing full free lacpdu message and drop packet */
>   				wrn = WRN_RX_QUEUE_FULL;
>   				goto free_out;
> 

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

* Re: [dpdk-dev] [v21.02 v3 00/10] cppcheck
  2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
                     ` (9 preceding siblings ...)
  2020-11-19 11:59   ` [dpdk-dev] [v21.02 v3 10/10] net/avp: " Ferruh Yigit
@ 2021-01-11  9:47   ` David Marchand
  10 siblings, 0 replies; 60+ messages in thread
From: David Marchand @ 2021-01-11  9:47 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

On Thu, Nov 19, 2020 at 12:59 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> 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

Fixed style issue in the pcap patch, and applied the series.
Thanks.

-- 
David Marchand


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

end of thread, other threads:[~2021-01-11  9:47 UTC | newest]

Thread overview: 60+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-24  9:40 [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Ferruh Yigit
2020-08-24  9:40 ` [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations Ferruh Yigit
2020-08-29 11:57   ` Andrew Rybchenko
2020-08-31 12:25     ` Ferruh Yigit
2020-08-24  9:40 ` [dpdk-dev] [PATCH 3/7] ethdev: make device operations struct private Ferruh Yigit
2020-08-29 12:03   ` Andrew Rybchenko
2020-08-24  9:40 ` [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions Ferruh Yigit
2020-08-29 12:07   ` Andrew Rybchenko
2020-08-24  9:40 ` [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions Ferruh Yigit
2020-08-29 12:13   ` Andrew Rybchenko
2020-08-24  9:40 ` [dpdk-dev] [PATCH 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
2020-08-29 12:14   ` Andrew Rybchenko
2020-08-24  9:40 ` [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
2020-08-29 12:16   ` Andrew Rybchenko
2020-08-29 11:47 ` [dpdk-dev] [PATCH 1/7] ethdev: remove legacy descriptor status check API Andrew Rybchenko
2020-09-03 21:09 ` [dpdk-dev] [PATCH v2 " Ferruh Yigit
2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 2/7] ethdev: move inline device operations Ferruh Yigit
2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private Ferruh Yigit
2020-09-08 12:19     ` Ferruh Yigit
2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 4/7] ethdev: mark internal functions Ferruh Yigit
2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 5/7] ethdev: use hairpin helper functions Ferruh Yigit
2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
2020-09-03 21:09   ` [dpdk-dev] [PATCH v2 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
2020-09-09 11:12 ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 2/7] ethdev: move inline device operations Ferruh Yigit
2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private Ferruh Yigit
2020-09-09 12:57     ` Ferruh Yigit
2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 4/7] ethdev: mark internal functions Ferruh Yigit
2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 5/7] ethdev: use hairpin helper functions Ferruh Yigit
2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
2020-09-09 11:12   ` [dpdk-dev] [PATCH v3 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
2020-09-09 12:07   ` [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API David Marchand
2020-09-09 13:01 ` [dpdk-dev] [PATCH v4 " Ferruh Yigit
2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations Ferruh Yigit
2020-09-10  1:56     ` Sachin Saxena (OSS)
2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 3/7] ethdev: make device operations struct private Ferruh Yigit
2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 4/7] ethdev: mark internal functions Ferruh Yigit
2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 5/7] ethdev: use hairpin helper functions Ferruh Yigit
2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 6/7] ethdev: remove invalid symbols from map file Ferruh Yigit
2020-09-09 13:01   ` [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API Ferruh Yigit
2020-09-10  2:04     ` Sachin Saxena (OSS)
2020-09-10 12:50   ` [dpdk-dev] [PATCH v4 1/7] ethdev: deprecate descriptor status check API Ferruh Yigit
2020-11-19 11:58 ` [dpdk-dev] [v21.02 v3 00/10] cppcheck Ferruh Yigit
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 01/10] app/procinfo: fix redundant condition Ferruh Yigit
2021-01-08 10:36     ` David Marchand
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 02/10] app/procinfo: fix negative check on unsigned variable Ferruh Yigit
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 03/10] app/procinfo: remove suspicious sizeof Ferruh Yigit
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 04/10] app/procinfo: remove useless assignment Ferruh Yigit
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 05/10] net/pcap: remove local variable shadowing outer one Ferruh Yigit
2021-01-08 10:31     ` [dpdk-dev] [dpdk-stable] " David Marchand
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 06/10] net/bonding: " Ferruh Yigit
2021-01-08 10:34     ` David Marchand
2021-01-11  1:03     ` Min Hu (Connor)
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 07/10] net/af_xdp: remove useless assignment Ferruh Yigit
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 08/10] net/bnxt: fix redundant return Ferruh Yigit
2020-11-19 11:58   ` [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true condition Ferruh Yigit
2020-11-23 15:25     ` Zhang, Roy Fan
2020-11-19 11:59   ` [dpdk-dev] [v21.02 v3 10/10] net/avp: " Ferruh Yigit
2020-11-20 17:40     ` Steven Webster
2021-01-11  9:47   ` [dpdk-dev] [v21.02 v3 00/10] cppcheck David Marchand

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