ethdev: get device capability name as string
[dpdk.git] / lib / ethdev / rte_ethdev.h
index 4007bd0..21f5708 100644 (file)
@@ -13,7 +13,7 @@
  * The Ethernet Device API is composed of two parts:
  *
  * - The application-oriented Ethernet API that includes functions to setup
- *   an Ethernet device (configure it, setup its RX and TX queues and start it),
+ *   an Ethernet device (configure it, setup its Rx and Tx queues and start it),
  *   to get its MAC address, the speed and the status of its physical link,
  *   to receive and to transmit packets, and so on.
  *
@@ -26,8 +26,8 @@
  * are lock-free functions which assume to not be invoked in parallel on
  * different logical cores to work on the same target object.  For instance,
  * the receive function of a PMD cannot be invoked in parallel on two logical
- * cores to poll the same RX queue [of the same port]. Of course, this function
- * can be invoked in parallel by different logical cores on different RX queues.
+ * cores to poll the same Rx queue [of the same port]. Of course, this function
+ * can be invoked in parallel by different logical cores on different Rx queues.
  * It is the responsibility of the upper level application to enforce this rule.
  *
  * If needed, parallel accesses by multiple logical cores to shared queues
@@ -83,7 +83,7 @@
  *     - MTU
  *     - flow control settings
  *     - receive mode configuration (promiscuous mode, all-multicast mode,
- *       hardware checksum mode, RSS/VMDQ settings etc.)
+ *       hardware checksum mode, RSS/VMDq settings etc.)
  *     - VLAN filtering configuration
  *     - default MAC address
  *     - MAC addresses supplied to MAC address array
  * performs an indirect invocation of the corresponding driver function
  * supplied in the *eth_dev_ops* structure of the *rte_eth_dev* structure.
  *
- * For performance reasons, the address of the burst-oriented RX and TX
+ * For performance reasons, the address of the burst-oriented Rx and Tx
  * functions of the Ethernet driver are not contained in the *eth_dev_ops*
  * structure. Instead, they are directly stored at the beginning of the
  * *rte_eth_dev* structure to avoid an extra indirect memory access during
  * their invocation.
  *
- * RTE ethernet device drivers do not use interrupts for transmitting or
+ * RTE Ethernet device drivers do not use interrupts for transmitting or
  * receiving. Instead, Ethernet drivers export Poll-Mode receive and transmit
  * functions to applications.
  * Both receive and transmit functions are packet-burst oriented to minimize
@@ -159,6 +159,7 @@ extern "C" {
 #include <rte_interrupts.h>
 #include <rte_dev.h>
 #include <rte_devargs.h>
+#include <rte_bitops.h>
 #include <rte_errno.h>
 #include <rte_common.h>
 #include <rte_config.h>
@@ -197,7 +198,7 @@ int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs);
  * Iterates on devices with devargs filter.
  * The ownership is not checked.
  *
- * The next port id is returned, and the iterator is updated.
+ * The next port ID is returned, and the iterator is updated.
  *
  * @param iter
  *   Device iterator handle initialized by rte_eth_iterator_init().
@@ -205,7 +206,7 @@ int rte_eth_iterator_init(struct rte_dev_iterator *iter, const char *devargs);
  *   by calling rte_eth_iterator_cleanup().
  *
  * @return
- *   A port id if found, RTE_MAX_ETHPORTS otherwise.
+ *   A port ID if found, RTE_MAX_ETHPORTS otherwise.
  */
 uint16_t rte_eth_iterator_next(struct rte_dev_iterator *iter);
 
@@ -230,7 +231,7 @@ void rte_eth_iterator_cleanup(struct rte_dev_iterator *iter);
  * the function rte_eth_iterator_cleanup() must be called.
  *
  * @param id
- *   Iterated port id of type uint16_t.
+ *   Iterated port ID of type uint16_t.
  * @param devargs
  *   Device parameters input as string of type char*.
  * @param iter
@@ -256,46 +257,47 @@ struct rte_eth_stats {
        uint64_t opackets;  /**< Total number of successfully transmitted packets.*/
        uint64_t ibytes;    /**< Total number of successfully received bytes. */
        uint64_t obytes;    /**< Total number of successfully transmitted bytes. */
-       uint64_t imissed;
-       /**< Total of RX packets dropped by the HW,
-        * because there are no available buffer (i.e. RX queues are full).
+       /**
+        * Total of Rx packets dropped by the HW,
+        * because there are no available buffer (i.e. Rx queues are full).
         */
+       uint64_t imissed;
        uint64_t ierrors;   /**< Total number of erroneous received packets. */
        uint64_t oerrors;   /**< Total number of failed transmitted packets. */
-       uint64_t rx_nombuf; /**< Total number of RX mbuf allocation failures. */
+       uint64_t rx_nombuf; /**< Total number of Rx mbuf allocation failures. */
        /* Queue stats are limited to max 256 queues */
+       /** Total number of queue Rx packets. */
        uint64_t q_ipackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
-       /**< Total number of queue RX packets. */
+       /** Total number of queue Tx packets. */
        uint64_t q_opackets[RTE_ETHDEV_QUEUE_STAT_CNTRS];
-       /**< Total number of queue TX packets. */
+       /** Total number of successfully received queue bytes. */
        uint64_t q_ibytes[RTE_ETHDEV_QUEUE_STAT_CNTRS];
-       /**< Total number of successfully received queue bytes. */
+       /** Total number of successfully transmitted queue bytes. */
        uint64_t q_obytes[RTE_ETHDEV_QUEUE_STAT_CNTRS];
-       /**< Total number of successfully transmitted queue bytes. */
+       /** Total number of queue packets received that are dropped. */
        uint64_t q_errors[RTE_ETHDEV_QUEUE_STAT_CNTRS];
-       /**< Total number of queue packets received that are dropped. */
 };
 
 /**@{@name Link speed capabilities
  * Device supported speeds bitmap flags
  */
-#define ETH_LINK_SPEED_AUTONEG  (0 <<  0)  /**< Autonegotiate (all speeds) */
-#define ETH_LINK_SPEED_FIXED    (1 <<  0)  /**< Disable autoneg (fixed speed) */
-#define ETH_LINK_SPEED_10M_HD   (1 <<  1)  /**<  10 Mbps half-duplex */
-#define ETH_LINK_SPEED_10M      (1 <<  2)  /**<  10 Mbps full-duplex */
-#define ETH_LINK_SPEED_100M_HD  (1 <<  3)  /**< 100 Mbps half-duplex */
-#define ETH_LINK_SPEED_100M     (1 <<  4)  /**< 100 Mbps full-duplex */
-#define ETH_LINK_SPEED_1G       (1 <<  5)  /**<   1 Gbps */
-#define ETH_LINK_SPEED_2_5G     (1 <<  6)  /**< 2.5 Gbps */
-#define ETH_LINK_SPEED_5G       (1 <<  7)  /**<   5 Gbps */
-#define ETH_LINK_SPEED_10G      (1 <<  8)  /**<  10 Gbps */
-#define ETH_LINK_SPEED_20G      (1 <<  9)  /**<  20 Gbps */
-#define ETH_LINK_SPEED_25G      (1 << 10)  /**<  25 Gbps */
-#define ETH_LINK_SPEED_40G      (1 << 11)  /**<  40 Gbps */
-#define ETH_LINK_SPEED_50G      (1 << 12)  /**<  50 Gbps */
-#define ETH_LINK_SPEED_56G      (1 << 13)  /**<  56 Gbps */
-#define ETH_LINK_SPEED_100G     (1 << 14)  /**< 100 Gbps */
-#define ETH_LINK_SPEED_200G     (1 << 15)  /**< 200 Gbps */
+#define ETH_LINK_SPEED_AUTONEG 0             /**< Autonegotiate (all speeds) */
+#define ETH_LINK_SPEED_FIXED   RTE_BIT32(0)  /**< Disable autoneg (fixed speed) */
+#define ETH_LINK_SPEED_10M_HD  RTE_BIT32(1)  /**<  10 Mbps half-duplex */
+#define ETH_LINK_SPEED_10M     RTE_BIT32(2)  /**<  10 Mbps full-duplex */
+#define ETH_LINK_SPEED_100M_HD RTE_BIT32(3)  /**< 100 Mbps half-duplex */
+#define ETH_LINK_SPEED_100M    RTE_BIT32(4)  /**< 100 Mbps full-duplex */
+#define ETH_LINK_SPEED_1G      RTE_BIT32(5)  /**<   1 Gbps */
+#define ETH_LINK_SPEED_2_5G    RTE_BIT32(6)  /**< 2.5 Gbps */
+#define ETH_LINK_SPEED_5G      RTE_BIT32(7)  /**<   5 Gbps */
+#define ETH_LINK_SPEED_10G     RTE_BIT32(8)  /**<  10 Gbps */
+#define ETH_LINK_SPEED_20G     RTE_BIT32(9)  /**<  20 Gbps */
+#define ETH_LINK_SPEED_25G     RTE_BIT32(10) /**<  25 Gbps */
+#define ETH_LINK_SPEED_40G     RTE_BIT32(11) /**<  40 Gbps */
+#define ETH_LINK_SPEED_50G     RTE_BIT32(12) /**<  50 Gbps */
+#define ETH_LINK_SPEED_56G     RTE_BIT32(13) /**<  56 Gbps */
+#define ETH_LINK_SPEED_100G    RTE_BIT32(14) /**< 100 Gbps */
+#define ETH_LINK_SPEED_200G    RTE_BIT32(15) /**< 200 Gbps */
 /**@}*/
 
 /**@{@name Link speed
@@ -342,7 +344,7 @@ struct rte_eth_link {
 /**@}*/
 
 /**
- * A structure used to configure the ring threshold registers of an RX/TX
+ * A structure used to configure the ring threshold registers of an Rx/Tx
  * queue for an Ethernet port.
  */
 struct rte_eth_thresh {
@@ -364,29 +366,29 @@ struct rte_eth_thresh {
  *  packets to multiple queues.
  */
 enum rte_eth_rx_mq_mode {
-       /** None of DCB,RSS or VMDQ mode */
+       /** None of DCB, RSS or VMDq mode */
        ETH_MQ_RX_NONE = 0,
 
-       /** For RX side, only RSS is on */
+       /** For Rx side, only RSS is on */
        ETH_MQ_RX_RSS = ETH_MQ_RX_RSS_FLAG,
-       /** For RX side,only DCB is on. */
+       /** For Rx side,only DCB is on. */
        ETH_MQ_RX_DCB = ETH_MQ_RX_DCB_FLAG,
        /** Both DCB and RSS enable */
        ETH_MQ_RX_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG,
 
-       /** Only VMDQ, no RSS nor DCB */
+       /** Only VMDq, no RSS nor DCB */
        ETH_MQ_RX_VMDQ_ONLY = ETH_MQ_RX_VMDQ_FLAG,
-       /** RSS mode with VMDQ */
+       /** RSS mode with VMDq */
        ETH_MQ_RX_VMDQ_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_VMDQ_FLAG,
-       /** Use VMDQ+DCB to route traffic to queues */
+       /** Use VMDq+DCB to route traffic to queues */
        ETH_MQ_RX_VMDQ_DCB = ETH_MQ_RX_VMDQ_FLAG | ETH_MQ_RX_DCB_FLAG,
-       /** Enable both VMDQ and DCB in VMDq */
+       /** Enable both VMDq and DCB in VMDq */
        ETH_MQ_RX_VMDQ_DCB_RSS = ETH_MQ_RX_RSS_FLAG | ETH_MQ_RX_DCB_FLAG |
                                 ETH_MQ_RX_VMDQ_FLAG,
 };
 
 /**
- * for rx mq mode backward compatible
+ * for Rx mq mode backward compatible
  */
 #define ETH_RSS                       ETH_MQ_RX_RSS
 #define VMDQ_DCB                      ETH_MQ_RX_VMDQ_DCB
@@ -398,25 +400,25 @@ enum rte_eth_rx_mq_mode {
  */
 enum rte_eth_tx_mq_mode {
        ETH_MQ_TX_NONE    = 0,  /**< It is in neither DCB nor VT mode. */
-       ETH_MQ_TX_DCB,          /**< For TX side,only DCB is on. */
-       ETH_MQ_TX_VMDQ_DCB,     /**< For TX side,both DCB and VT is on. */
+       ETH_MQ_TX_DCB,          /**< For Tx side,only DCB is on. */
+       ETH_MQ_TX_VMDQ_DCB,     /**< For Tx side,both DCB and VT is on. */
        ETH_MQ_TX_VMDQ_ONLY,    /**< Only VT on, no DCB */
 };
 
 /**
- * for tx mq mode backward compatible
+ * for Tx mq mode backward compatible
  */
 #define ETH_DCB_NONE                ETH_MQ_TX_NONE
 #define ETH_VMDQ_DCB_TX             ETH_MQ_TX_VMDQ_DCB
 #define ETH_DCB_TX                  ETH_MQ_TX_DCB
 
 /**
- * A structure used to configure the RX features of an Ethernet port.
+ * A structure used to configure the Rx features of an Ethernet port.
  */
 struct rte_eth_rxmode {
        /** The multi-queue packet distribution mode to be used, e.g. RSS. */
        enum rte_eth_rx_mq_mode mq_mode;
-       uint32_t max_rx_pkt_len;  /**< Only used if JUMBO_FRAME enabled. */
+       uint32_t mtu;  /**< Requested MTU. */
        /** Maximum allowed size of LRO aggregated packet. */
        uint32_t max_lro_pkt_size;
        uint16_t split_hdr_size;  /**< hdr buf size (header_split enabled).*/
@@ -443,7 +445,7 @@ enum rte_vlan_type {
 };
 
 /**
- * A structure used to describe a vlan filter.
+ * A structure used to describe a VLAN filter.
  * If the bit corresponding to a VID is set, such VID is on.
  */
 struct rte_vlan_filter_conf {
@@ -499,8 +501,8 @@ struct rte_eth_rss_conf {
 #define RTE_ETH_FLOW_IPV6_EX            15
 #define RTE_ETH_FLOW_IPV6_TCP_EX        16
 #define RTE_ETH_FLOW_IPV6_UDP_EX        17
+/** Consider device port number as a flow differentiator */
 #define RTE_ETH_FLOW_PORT               18
-       /**< Consider device port number as a flow differentiator */
 #define RTE_ETH_FLOW_VXLAN              19 /**< VXLAN protocol based flow */
 #define RTE_ETH_FLOW_GENEVE             20 /**< GENEVE protocol based flow */
 #define RTE_ETH_FLOW_NVGRE              21 /**< NVGRE protocol based flow */
@@ -512,38 +514,38 @@ struct rte_eth_rss_conf {
  * Below macros are defined for RSS offload types, they can be used to
  * fill rte_eth_rss_conf.rss_hf or rte_flow_action_rss.types.
  */
-#define ETH_RSS_IPV4               (1ULL << 2)
-#define ETH_RSS_FRAG_IPV4          (1ULL << 3)
-#define ETH_RSS_NONFRAG_IPV4_TCP   (1ULL << 4)
-#define ETH_RSS_NONFRAG_IPV4_UDP   (1ULL << 5)
-#define ETH_RSS_NONFRAG_IPV4_SCTP  (1ULL << 6)
-#define ETH_RSS_NONFRAG_IPV4_OTHER (1ULL << 7)
-#define ETH_RSS_IPV6               (1ULL << 8)
-#define ETH_RSS_FRAG_IPV6          (1ULL << 9)
-#define ETH_RSS_NONFRAG_IPV6_TCP   (1ULL << 10)
-#define ETH_RSS_NONFRAG_IPV6_UDP   (1ULL << 11)
-#define ETH_RSS_NONFRAG_IPV6_SCTP  (1ULL << 12)
-#define ETH_RSS_NONFRAG_IPV6_OTHER (1ULL << 13)
-#define ETH_RSS_L2_PAYLOAD         (1ULL << 14)
-#define ETH_RSS_IPV6_EX            (1ULL << 15)
-#define ETH_RSS_IPV6_TCP_EX        (1ULL << 16)
-#define ETH_RSS_IPV6_UDP_EX        (1ULL << 17)
-#define ETH_RSS_PORT               (1ULL << 18)
-#define ETH_RSS_VXLAN              (1ULL << 19)
-#define ETH_RSS_GENEVE             (1ULL << 20)
-#define ETH_RSS_NVGRE              (1ULL << 21)
-#define ETH_RSS_GTPU               (1ULL << 23)
-#define ETH_RSS_ETH                (1ULL << 24)
-#define ETH_RSS_S_VLAN             (1ULL << 25)
-#define ETH_RSS_C_VLAN             (1ULL << 26)
-#define ETH_RSS_ESP                (1ULL << 27)
-#define ETH_RSS_AH                 (1ULL << 28)
-#define ETH_RSS_L2TPV3             (1ULL << 29)
-#define ETH_RSS_PFCP               (1ULL << 30)
-#define ETH_RSS_PPPOE             (1ULL << 31)
-#define ETH_RSS_ECPRI             (1ULL << 32)
-#define ETH_RSS_MPLS              (1ULL << 33)
-#define ETH_RSS_IPV4_CHKSUM       (1ULL << 34)
+#define ETH_RSS_IPV4               RTE_BIT64(2)
+#define ETH_RSS_FRAG_IPV4          RTE_BIT64(3)
+#define ETH_RSS_NONFRAG_IPV4_TCP   RTE_BIT64(4)
+#define ETH_RSS_NONFRAG_IPV4_UDP   RTE_BIT64(5)
+#define ETH_RSS_NONFRAG_IPV4_SCTP  RTE_BIT64(6)
+#define ETH_RSS_NONFRAG_IPV4_OTHER RTE_BIT64(7)
+#define ETH_RSS_IPV6               RTE_BIT64(8)
+#define ETH_RSS_FRAG_IPV6          RTE_BIT64(9)
+#define ETH_RSS_NONFRAG_IPV6_TCP   RTE_BIT64(10)
+#define ETH_RSS_NONFRAG_IPV6_UDP   RTE_BIT64(11)
+#define ETH_RSS_NONFRAG_IPV6_SCTP  RTE_BIT64(12)
+#define ETH_RSS_NONFRAG_IPV6_OTHER RTE_BIT64(13)
+#define ETH_RSS_L2_PAYLOAD         RTE_BIT64(14)
+#define ETH_RSS_IPV6_EX            RTE_BIT64(15)
+#define ETH_RSS_IPV6_TCP_EX        RTE_BIT64(16)
+#define ETH_RSS_IPV6_UDP_EX        RTE_BIT64(17)
+#define ETH_RSS_PORT               RTE_BIT64(18)
+#define ETH_RSS_VXLAN              RTE_BIT64(19)
+#define ETH_RSS_GENEVE             RTE_BIT64(20)
+#define ETH_RSS_NVGRE              RTE_BIT64(21)
+#define ETH_RSS_GTPU               RTE_BIT64(23)
+#define ETH_RSS_ETH                RTE_BIT64(24)
+#define ETH_RSS_S_VLAN             RTE_BIT64(25)
+#define ETH_RSS_C_VLAN             RTE_BIT64(26)
+#define ETH_RSS_ESP                RTE_BIT64(27)
+#define ETH_RSS_AH                 RTE_BIT64(28)
+#define ETH_RSS_L2TPV3             RTE_BIT64(29)
+#define ETH_RSS_PFCP               RTE_BIT64(30)
+#define ETH_RSS_PPPOE              RTE_BIT64(31)
+#define ETH_RSS_ECPRI              RTE_BIT64(32)
+#define ETH_RSS_MPLS               RTE_BIT64(33)
+#define ETH_RSS_IPV4_CHKSUM        RTE_BIT64(34)
 
 /**
  * The ETH_RSS_L4_CHKSUM works on checksum field of any L4 header.
@@ -557,7 +559,7 @@ struct rte_eth_rss_conf {
  * For the case that checksum is not used in an UDP header,
  * it takes the reserved value 0 as input for the hash function.
  */
-#define ETH_RSS_L4_CHKSUM          (1ULL << 35)
+#define ETH_RSS_L4_CHKSUM          RTE_BIT64(35)
 
 /*
  * We use the following macros to combine with above ETH_RSS_* for
@@ -568,12 +570,12 @@ struct rte_eth_rss_conf {
  * the same level are used simultaneously, it is the same case as none of
  * them are added.
  */
-#define ETH_RSS_L3_SRC_ONLY        (1ULL << 63)
-#define ETH_RSS_L3_DST_ONLY        (1ULL << 62)
-#define ETH_RSS_L4_SRC_ONLY        (1ULL << 61)
-#define ETH_RSS_L4_DST_ONLY        (1ULL << 60)
-#define ETH_RSS_L2_SRC_ONLY        (1ULL << 59)
-#define ETH_RSS_L2_DST_ONLY        (1ULL << 58)
+#define ETH_RSS_L3_SRC_ONLY        RTE_BIT64(63)
+#define ETH_RSS_L3_DST_ONLY        RTE_BIT64(62)
+#define ETH_RSS_L4_SRC_ONLY        RTE_BIT64(61)
+#define ETH_RSS_L4_DST_ONLY        RTE_BIT64(60)
+#define ETH_RSS_L2_SRC_ONLY        RTE_BIT64(59)
+#define ETH_RSS_L2_DST_ONLY        RTE_BIT64(58)
 
 /*
  * Only select IPV6 address prefix as RSS input set according to
@@ -581,12 +583,12 @@ struct rte_eth_rss_conf {
  * Must be combined with ETH_RSS_IPV6, ETH_RSS_NONFRAG_IPV6_UDP,
  * ETH_RSS_NONFRAG_IPV6_TCP, ETH_RSS_NONFRAG_IPV6_SCTP.
  */
-#define RTE_ETH_RSS_L3_PRE32      (1ULL << 57)
-#define RTE_ETH_RSS_L3_PRE40      (1ULL << 56)
-#define RTE_ETH_RSS_L3_PRE48      (1ULL << 55)
-#define RTE_ETH_RSS_L3_PRE56      (1ULL << 54)
-#define RTE_ETH_RSS_L3_PRE64      (1ULL << 53)
-#define RTE_ETH_RSS_L3_PRE96      (1ULL << 52)
+#define RTE_ETH_RSS_L3_PRE32      RTE_BIT64(57)
+#define RTE_ETH_RSS_L3_PRE40      RTE_BIT64(56)
+#define RTE_ETH_RSS_L3_PRE48      RTE_BIT64(55)
+#define RTE_ETH_RSS_L3_PRE56      RTE_BIT64(54)
+#define RTE_ETH_RSS_L3_PRE64      RTE_BIT64(53)
+#define RTE_ETH_RSS_L3_PRE96      RTE_BIT64(52)
 
 /*
  * Use the following macros to combine with the above layers
@@ -768,7 +770,7 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
        ETH_RSS_S_VLAN  | \
        ETH_RSS_C_VLAN)
 
-/**< Mask of valid RSS hash protocols */
+/** Mask of valid RSS hash protocols */
 #define ETH_RSS_PROTO_MASK ( \
        ETH_RSS_IPV4 | \
        ETH_RSS_FRAG_IPV4 | \
@@ -804,9 +806,9 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
 #define RTE_RETA_GROUP_SIZE   64
 
 /**@{@name VMDq and DCB maximums */
-#define ETH_VMDQ_MAX_VLAN_FILTERS   64 /**< Maximum nb. of VMDQ vlan filters. */
+#define ETH_VMDQ_MAX_VLAN_FILTERS   64 /**< Maximum nb. of VMDq VLAN filters. */
 #define ETH_DCB_NUM_USER_PRIORITIES 8  /**< Maximum nb. of DCB priorities. */
-#define ETH_VMDQ_DCB_NUM_QUEUES     128 /**< Maximum nb. of VMDQ DCB queues. */
+#define ETH_VMDQ_DCB_NUM_QUEUES     128 /**< Maximum nb. of VMDq DCB queues. */
 #define ETH_DCB_NUM_QUEUES          128 /**< Maximum nb. of DCB queues. */
 /**@}*/
 
@@ -851,10 +853,10 @@ rte_eth_rss_hf_refine(uint64_t rss_hf)
  * is needed.
  */
 struct rte_eth_rss_reta_entry64 {
+       /** Mask bits indicate which entries need to be updated/queried. */
        uint64_t mask;
-       /**< Mask bits indicate which entries need to be updated/queried. */
+       /** Group of 64 redirection table entries. */
        uint16_t reta[RTE_RETA_GROUP_SIZE];
-       /**< Group of 64 redirection table entries. */
 };
 
 /**
@@ -868,7 +870,7 @@ enum rte_eth_nb_tcs {
 
 /**
  * This enum indicates the possible number of queue pools
- * in VMDQ configurations.
+ * in VMDq configurations.
  */
 enum rte_eth_nb_pools {
        ETH_8_POOLS = 8,    /**< 8 VMDq pools. */
@@ -901,15 +903,15 @@ struct rte_eth_vmdq_tx_conf {
 };
 
 /**
- * A structure used to configure the VMDQ+DCB feature
+ * A structure used to configure the VMDq+DCB feature
  * of an Ethernet port.
  *
  * Using this feature, packets are routed to a pool of queues, based
- * on the vlan id in the vlan tag, and then to a specific queue within
- * that pool, using the user priority vlan tag field.
+ * on the VLAN ID in the VLAN tag, and then to a specific queue within
+ * that pool, using the user priority VLAN tag field.
  *
  * A default pool may be used, if desired, to route all traffic which
- * does not match the vlan filter rules.
+ * does not match the VLAN filter rules.
  */
 struct rte_eth_vmdq_dcb_conf {
        enum rte_eth_nb_pools nb_queue_pools; /**< With DCB, 16 or 32 pools */
@@ -917,30 +919,30 @@ struct rte_eth_vmdq_dcb_conf {
        uint8_t default_pool; /**< The default pool, if applicable */
        uint8_t nb_pool_maps; /**< We can have up to 64 filters/mappings */
        struct {
-               uint16_t vlan_id; /**< The vlan id of the received frame */
-               uint64_t pools;   /**< Bitmask of pools for packet rx */
-       } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq vlan pool maps. */
+               uint16_t vlan_id; /**< The VLAN ID of the received frame */
+               uint64_t pools;   /**< Bitmask of pools for packet Rx */
+       } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq VLAN pool maps. */
+       /** Selects a queue in a pool */
        uint8_t dcb_tc[ETH_DCB_NUM_USER_PRIORITIES];
-       /**< Selects a queue in a pool */
 };
 
 /**
- * A structure used to configure the VMDQ feature of an Ethernet port when
+ * A structure used to configure the VMDq feature of an Ethernet port when
  * not combined with the DCB feature.
  *
  * Using this feature, packets are routed to a pool of queues. By default,
- * the pool selection is based on the MAC address, the vlan id in the
- * vlan tag as specified in the pool_map array.
+ * the pool selection is based on the MAC address, the VLAN ID in the
+ * VLAN tag as specified in the pool_map array.
  * Passing the ETH_VMDQ_ACCEPT_UNTAG in the rx_mode field allows pool
  * selection using only the MAC address. MAC address to pool mapping is done
  * using the rte_eth_dev_mac_addr_add function, with the pool parameter
- * corresponding to the pool id.
+ * corresponding to the pool ID.
  *
  * Queue selection within the selected pool will be done using RSS when
  * it is enabled or revert to the first queue of the pool if not.
  *
  * A default pool may be used, if desired, to route all traffic which
- * does not match the vlan filter rules or any pool MAC address.
+ * does not match the VLAN filter rules or any pool MAC address.
  */
 struct rte_eth_vmdq_rx_conf {
        enum rte_eth_nb_pools nb_queue_pools; /**< VMDq only mode, 8 or 64 pools */
@@ -950,16 +952,16 @@ struct rte_eth_vmdq_rx_conf {
        uint8_t nb_pool_maps; /**< We can have up to 64 filters/mappings */
        uint32_t rx_mode; /**< Flags from ETH_VMDQ_ACCEPT_* */
        struct {
-               uint16_t vlan_id; /**< The vlan id of the received frame */
-               uint64_t pools;   /**< Bitmask of pools for packet rx */
-       } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq vlan pool maps. */
+               uint16_t vlan_id; /**< The VLAN ID of the received frame */
+               uint64_t pools;   /**< Bitmask of pools for packet Rx */
+       } pool_map[ETH_VMDQ_MAX_VLAN_FILTERS]; /**< VMDq VLAN pool maps. */
 };
 
 /**
- * A structure used to configure the TX features of an Ethernet port.
+ * A structure used to configure the Tx features of an Ethernet port.
  */
 struct rte_eth_txmode {
-       enum rte_eth_tx_mq_mode mq_mode; /**< TX multi-queues mode. */
+       enum rte_eth_tx_mq_mode mq_mode; /**< Tx multi-queues mode. */
        /**
         * Per-port Tx offloads to be set using DEV_TX_OFFLOAD_* flags.
         * Only offloads set on tx_offload_capa field on rte_eth_dev_info
@@ -969,12 +971,12 @@ struct rte_eth_txmode {
 
        uint16_t pvid;
        __extension__
-       uint8_t hw_vlan_reject_tagged : 1,
-               /**< If set, reject sending out tagged pkts */
+       uint8_t /** If set, reject sending out tagged pkts */
+               hw_vlan_reject_tagged : 1,
+               /** If set, reject sending out untagged pkts */
                hw_vlan_reject_untagged : 1,
-               /**< If set, reject sending out untagged pkts */
+               /** If set, enable port based VLAN insertion */
                hw_vlan_insert_pvid : 1;
-               /**< If set, enable port based VLAN insertion */
 
        uint64_t reserved_64s[2]; /**< Reserved for future fields */
        void *reserved_ptrs[2];   /**< Reserved for future fields */
@@ -1036,14 +1038,22 @@ union rte_eth_rxseg {
 };
 
 /**
- * A structure used to configure an RX ring of an Ethernet port.
+ * A structure used to configure an Rx ring of an Ethernet port.
  */
 struct rte_eth_rxconf {
-       struct rte_eth_thresh rx_thresh; /**< RX ring threshold registers. */
-       uint16_t rx_free_thresh; /**< Drives the freeing of RX descriptors. */
+       struct rte_eth_thresh rx_thresh; /**< Rx ring threshold registers. */
+       uint16_t rx_free_thresh; /**< Drives the freeing of Rx descriptors. */
        uint8_t rx_drop_en; /**< Drop packets if no descriptors are available. */
        uint8_t rx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */
        uint16_t rx_nseg; /**< Number of descriptions in rx_seg array. */
+       /**
+        * Share group index in Rx domain and switch domain.
+        * Non-zero value to enable Rx queue share, zero value disable share.
+        * PMD is responsible for Rx queue consistency checks to avoid member
+        * port's configuration contradict to each other.
+        */
+       uint16_t share_group;
+       uint16_t share_qid; /**< Shared Rx queue ID in group */
        /**
         * Per-queue Rx offloads to be set using DEV_RX_OFFLOAD_* flags.
         * Only offloads set on rx_queue_offload_capa or rx_offload_capa
@@ -1064,12 +1074,12 @@ struct rte_eth_rxconf {
 };
 
 /**
- * A structure used to configure a TX ring of an Ethernet port.
+ * A structure used to configure a Tx ring of an Ethernet port.
  */
 struct rte_eth_txconf {
-       struct rte_eth_thresh tx_thresh; /**< TX ring threshold registers. */
+       struct rte_eth_thresh tx_thresh; /**< Tx ring threshold registers. */
        uint16_t tx_rs_thresh; /**< Drives the setting of RS bit on TXDs. */
-       uint16_t tx_free_thresh; /**< Start freeing TX buffers if there are
+       uint16_t tx_free_thresh; /**< Start freeing Tx buffers if there are
                                      less free descriptors than this value. */
 
        uint8_t tx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */
@@ -1186,8 +1196,8 @@ struct rte_eth_desc_lim {
  */
 enum rte_eth_fc_mode {
        RTE_FC_NONE = 0, /**< Disable flow control. */
-       RTE_FC_RX_PAUSE, /**< RX pause frame, enable flowctrl on TX side. */
-       RTE_FC_TX_PAUSE, /**< TX pause frame, enable flowctrl on RX side. */
+       RTE_FC_RX_PAUSE, /**< Rx pause frame, enable flowctrl on Tx side. */
+       RTE_FC_TX_PAUSE, /**< Tx pause frame, enable flowctrl on Rx side. */
        RTE_FC_FULL      /**< Enable flow control on both side. */
 };
 
@@ -1247,7 +1257,7 @@ enum rte_fdir_pballoc_type {
 };
 
 /**
- *  Select report mode of FDIR hash information in RX descriptors.
+ *  Select report mode of FDIR hash information in Rx descriptors.
  */
 enum rte_fdir_status_mode {
        RTE_FDIR_NO_REPORT_STATUS = 0, /**< Never report FDIR hash. */
@@ -1265,11 +1275,11 @@ struct rte_fdir_conf {
        enum rte_fdir_mode mode; /**< Flow Director mode. */
        enum rte_fdir_pballoc_type pballoc; /**< Space for FDIR filters. */
        enum rte_fdir_status_mode status;  /**< How to report FDIR hash. */
-       /** RX queue of packets matching a "drop" filter in perfect mode. */
+       /** Rx queue of packets matching a "drop" filter in perfect mode. */
        uint8_t drop_queue;
        struct rte_eth_fdir_masks mask;
+       /** Flex payload configuration. */
        struct rte_eth_fdir_flex_conf flex_conf;
-       /**< Flex payload configuration. */
 };
 
 /**
@@ -1300,7 +1310,7 @@ struct rte_intr_conf {
 
 /**
  * A structure used to configure an Ethernet port.
- * Depending upon the RX multi-queue mode, extra advanced
+ * Depending upon the Rx multi-queue mode, extra advanced
  * configuration settings may be needed.
  */
 struct rte_eth_conf {
@@ -1311,30 +1321,30 @@ struct rte_eth_conf {
                                speeds to be advertised. If the special value
                                ETH_LINK_SPEED_AUTONEG (0) is used, all speeds
                                supported are advertised. */
-       struct rte_eth_rxmode rxmode; /**< Port RX configuration. */
-       struct rte_eth_txmode txmode; /**< Port TX configuration. */
+       struct rte_eth_rxmode rxmode; /**< Port Rx configuration. */
+       struct rte_eth_txmode txmode; /**< Port Tx configuration. */
        uint32_t lpbk_mode; /**< Loopback operation mode. By default the value
                                 is 0, meaning the loopback mode is disabled.
-                                Read the datasheet of given ethernet controller
+                                Read the datasheet of given Ethernet controller
                                 for details. The possible values of this field
                                 are defined in implementation of each driver. */
        struct {
                struct rte_eth_rss_conf rss_conf; /**< Port RSS configuration */
+               /** Port VMDq+DCB configuration. */
                struct rte_eth_vmdq_dcb_conf vmdq_dcb_conf;
-               /**< Port vmdq+dcb configuration. */
+               /** Port DCB Rx configuration. */
                struct rte_eth_dcb_rx_conf dcb_rx_conf;
-               /**< Port dcb RX configuration. */
+               /** Port VMDq Rx configuration. */
                struct rte_eth_vmdq_rx_conf vmdq_rx_conf;
-               /**< Port vmdq RX configuration. */
-       } rx_adv_conf; /**< Port RX filtering configuration. */
+       } rx_adv_conf; /**< Port Rx filtering configuration. */
        union {
+               /** Port VMDq+DCB Tx configuration. */
                struct rte_eth_vmdq_dcb_tx_conf vmdq_dcb_tx_conf;
-               /**< Port vmdq+dcb TX configuration. */
+               /** Port DCB Tx configuration. */
                struct rte_eth_dcb_tx_conf dcb_tx_conf;
-               /**< Port dcb TX configuration. */
+               /** Port VMDq Tx configuration. */
                struct rte_eth_vmdq_tx_conf vmdq_tx_conf;
-               /**< Port vmdq TX configuration. */
-       } tx_adv_conf; /**< Port TX DCB configuration (union). */
+       } tx_adv_conf; /**< Port Tx DCB configuration (union). */
        /** Currently,Priority Flow Control(PFC) are supported,if DCB with PFC
            is needed,and the variable must be set ETH_DCB_PFC_SUPPORT. */
        uint32_t dcb_capability_en;
@@ -1343,7 +1353,7 @@ struct rte_eth_conf {
 };
 
 /**
- * RX offload capabilities of a device.
+ * Rx offload capabilities of a device.
  */
 #define DEV_RX_OFFLOAD_VLAN_STRIP  0x00000001
 #define DEV_RX_OFFLOAD_IPV4_CKSUM  0x00000002
@@ -1356,7 +1366,6 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_HEADER_SPLIT    0x00000100
 #define DEV_RX_OFFLOAD_VLAN_FILTER     0x00000200
 #define DEV_RX_OFFLOAD_VLAN_EXTEND     0x00000400
-#define DEV_RX_OFFLOAD_JUMBO_FRAME     0x00000800
 #define DEV_RX_OFFLOAD_SCATTER         0x00002000
 /**
  * Timestamp is set by the driver in RTE_MBUF_DYNFIELD_TIMESTAMP_NAME
@@ -1385,7 +1394,7 @@ struct rte_eth_conf {
  */
 
 /**
- * TX offload capabilities of a device.
+ * Tx offload capabilities of a device.
  */
 #define DEV_TX_OFFLOAD_VLAN_INSERT 0x00000001
 #define DEV_TX_OFFLOAD_IPV4_CKSUM  0x00000002
@@ -1401,17 +1410,19 @@ struct rte_eth_conf {
 #define DEV_TX_OFFLOAD_IPIP_TNL_TSO     0x00000800    /**< Used for tunneling packet. */
 #define DEV_TX_OFFLOAD_GENEVE_TNL_TSO   0x00001000    /**< Used for tunneling packet. */
 #define DEV_TX_OFFLOAD_MACSEC_INSERT    0x00002000
-#define DEV_TX_OFFLOAD_MT_LOCKFREE      0x00004000
-/**< Multiple threads can invoke rte_eth_tx_burst() concurrently on the same
- * tx queue without SW lock.
+/**
+ * Multiple threads can invoke rte_eth_tx_burst() concurrently on the same
+ * Tx queue without SW lock.
  */
+#define DEV_TX_OFFLOAD_MT_LOCKFREE      0x00004000
+/** Device supports multi segment send. */
 #define DEV_TX_OFFLOAD_MULTI_SEGS      0x00008000
-/**< Device supports multi segment send. */
-#define DEV_TX_OFFLOAD_MBUF_FAST_FREE  0x00010000
-/**< Device supports optimization for fast release of mbufs.
- *   When set application must guarantee that per-queue all mbufs comes from
- *   the same mempool and has refcnt = 1.
+/**
+ * Device supports optimization for fast release of mbufs.
+ * When set application must guarantee that per-queue all mbufs comes from
+ * the same mempool and has refcnt = 1.
  */
+#define DEV_TX_OFFLOAD_MBUF_FAST_FREE  0x00010000
 #define DEV_TX_OFFLOAD_SECURITY         0x00020000
 /**
  * Device supports generic UDP tunneled packet TSO.
@@ -1445,6 +1456,16 @@ struct rte_eth_conf {
 #define RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP 0x00000001
 /** Device supports Tx queue setup after device started. */
 #define RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP 0x00000002
+/**
+ * Device supports shared Rx queue among ports within Rx domain and
+ * switch domain. Mbufs are consumed by shared Rx queue instead of
+ * each queue. Multiple groups are supported by share_group of Rx
+ * queue configuration. Shared Rx queue is identified by PMD using
+ * share_qid of Rx queue configuration. Polling any port in the group
+ * receive packets of all member ports, source port identified by
+ * mbuf->port field.
+ */
+#define RTE_ETH_DEV_CAPA_RXQ_SHARE              RTE_BIT64(2)
 /**@}*/
 
 /*
@@ -1469,7 +1490,7 @@ struct rte_eth_dev_portconf {
 };
 
 /**
- * Default values for switch domain id when ethdev does not support switch
+ * Default values for switch domain ID when ethdev does not support switch
  * domain definitions.
  */
 #define RTE_ETH_DEV_SWITCH_DOMAIN_ID_INVALID   (UINT16_MAX)
@@ -1479,15 +1500,21 @@ struct rte_eth_dev_portconf {
  */
 struct rte_eth_switch_info {
        const char *name;       /**< switch name */
-       uint16_t domain_id;     /**< switch domain id */
-       uint16_t port_id;
-       /**<
-        * mapping to the devices physical switch port as enumerated from the
+       uint16_t domain_id;     /**< switch domain ID */
+       /**
+        * Mapping to the devices physical switch port as enumerated from the
         * perspective of the embedded interconnect/switch. For SR-IOV enabled
         * device this may correspond to the VF_ID of each virtual function,
         * but each driver should explicitly define the mapping of switch
         * port identifier to that physical interconnect/switch
         */
+       uint16_t port_id;
+       /**
+        * Shared Rx queue sub-domain boundary. Only ports in same Rx domain
+        * and switch domain can share Rx queue. Valid only if device advertised
+        * RTE_ETH_DEV_CAPA_RXQ_SHARE capability.
+        */
+       uint16_t rx_domain;
 };
 
 /**
@@ -1532,42 +1559,42 @@ struct rte_eth_dev_info {
        uint16_t min_mtu;       /**< Minimum MTU allowed */
        uint16_t max_mtu;       /**< Maximum MTU allowed */
        const uint32_t *dev_flags; /**< Device flags */
-       uint32_t min_rx_bufsize; /**< Minimum size of RX buffer. */
-       uint32_t max_rx_pktlen; /**< Maximum configurable length of RX pkt. */
+       uint32_t min_rx_bufsize; /**< Minimum size of Rx buffer. */
+       uint32_t max_rx_pktlen; /**< Maximum configurable length of Rx pkt. */
        /** Maximum configurable size of LRO aggregated packet. */
        uint32_t max_lro_pkt_size;
-       uint16_t max_rx_queues; /**< Maximum number of RX queues. */
-       uint16_t max_tx_queues; /**< Maximum number of TX queues. */
+       uint16_t max_rx_queues; /**< Maximum number of Rx queues. */
+       uint16_t max_tx_queues; /**< Maximum number of Tx queues. */
        uint32_t max_mac_addrs; /**< Maximum number of MAC addresses. */
        uint32_t max_hash_mac_addrs;
        /** Maximum number of hash MAC addresses for MTA and UTA. */
        uint16_t max_vfs; /**< Maximum number of VFs. */
        uint16_t max_vmdq_pools; /**< Maximum number of VMDq pools. */
        struct rte_eth_rxseg_capa rx_seg_capa; /**< Segmentation capability.*/
+       /** All Rx offload capabilities including all per-queue ones */
        uint64_t rx_offload_capa;
-       /**< All RX offload capabilities including all per-queue ones */
+       /** All Tx offload capabilities including all per-queue ones */
        uint64_t tx_offload_capa;
-       /**< All TX offload capabilities including all per-queue ones */
+       /** Device per-queue Rx offload capabilities. */
        uint64_t rx_queue_offload_capa;
-       /**< Device per-queue RX offload capabilities. */
+       /** Device per-queue Tx offload capabilities. */
        uint64_t tx_queue_offload_capa;
-       /**< Device per-queue TX offload capabilities. */
+       /** Device redirection table size, the total number of entries. */
        uint16_t reta_size;
-       /**< Device redirection table size, the total number of entries. */
        uint8_t hash_key_size; /**< Hash key size in bytes */
        /** Bit mask of RSS offloads, the bit offset also means flow type */
        uint64_t flow_type_rss_offloads;
-       struct rte_eth_rxconf default_rxconf; /**< Default RX configuration */
-       struct rte_eth_txconf default_txconf; /**< Default TX configuration */
-       uint16_t vmdq_queue_base; /**< First queue ID for VMDQ pools. */
-       uint16_t vmdq_queue_num;  /**< Queue number for VMDQ pools. */
-       uint16_t vmdq_pool_base;  /**< First ID of VMDQ pools. */
-       struct rte_eth_desc_lim rx_desc_lim;  /**< RX descriptors limits */
-       struct rte_eth_desc_lim tx_desc_lim;  /**< TX descriptors limits */
+       struct rte_eth_rxconf default_rxconf; /**< Default Rx configuration */
+       struct rte_eth_txconf default_txconf; /**< Default Tx configuration */
+       uint16_t vmdq_queue_base; /**< First queue ID for VMDq pools. */
+       uint16_t vmdq_queue_num;  /**< Queue number for VMDq pools. */
+       uint16_t vmdq_pool_base;  /**< First ID of VMDq pools. */
+       struct rte_eth_desc_lim rx_desc_lim;  /**< Rx descriptors limits */
+       struct rte_eth_desc_lim tx_desc_lim;  /**< Tx descriptors limits */
        uint32_t speed_capa;  /**< Supported speeds bitmap (ETH_LINK_SPEED_). */
-       /** Configured number of rx/tx queues */
-       uint16_t nb_rx_queues; /**< Number of RX queues. */
-       uint16_t nb_tx_queues; /**< Number of TX queues. */
+       /** Configured number of Rx/Tx queues */
+       uint16_t nb_rx_queues; /**< Number of Rx queues. */
+       uint16_t nb_tx_queues; /**< Number of Tx queues. */
        /** Rx parameter recommendations */
        struct rte_eth_dev_portconf default_rxportconf;
        /** Tx parameter recommendations */
@@ -1591,20 +1618,20 @@ struct rte_eth_dev_info {
 /**@}*/
 
 /**
- * Ethernet device RX queue information structure.
+ * Ethernet device Rx queue information structure.
  * Used to retrieve information about configured queue.
  */
 struct rte_eth_rxq_info {
        struct rte_mempool *mp;     /**< mempool used by that queue. */
        struct rte_eth_rxconf conf; /**< queue config parameters. */
-       uint8_t scattered_rx;       /**< scattered packets RX supported. */
+       uint8_t scattered_rx;       /**< scattered packets Rx supported. */
        uint8_t queue_state;        /**< one of RTE_ETH_QUEUE_STATE_*. */
        uint16_t nb_desc;           /**< configured number of RXDs. */
        uint16_t rx_buf_size;       /**< hardware receive buffer size. */
 } __rte_cache_min_aligned;
 
 /**
- * Ethernet device TX queue information structure.
+ * Ethernet device Tx queue information structure.
  * Used to retrieve information about configured queue.
  */
 struct rte_eth_txq_info {
@@ -1620,10 +1647,10 @@ struct rte_eth_txq_info {
  * by PMD, then the application can iterate to retrieve burst description for
  * all other queues.
  */
-#define RTE_ETH_BURST_FLAG_PER_QUEUE     (1ULL << 0)
+#define RTE_ETH_BURST_FLAG_PER_QUEUE RTE_BIT64(0)
 
 /**
- * Ethernet device RX/TX queue packet burst mode information structure.
+ * Ethernet device Rx/Tx queue packet burst mode information structure.
  * Used to retrieve information about packet burst mode setting.
  */
 struct rte_eth_burst_mode {
@@ -1642,7 +1669,7 @@ struct rte_eth_burst_mode {
  * This structure is used by rte_eth_xstats_get() to provide
  * statistics that are not provided in the generic *rte_eth_stats*
  * structure.
- * It maps a name id, corresponding to an index in the array returned
+ * It maps a name ID, corresponding to an index in the array returned
  * by rte_eth_xstats_get_names(), to a statistic value.
  */
 struct rte_eth_xstat {
@@ -1673,15 +1700,15 @@ struct rte_eth_xstat_name {
 
 /**
  * A structure used to get the information of queue and
- * TC mapping on both TX and RX paths.
+ * TC mapping on both Tx and Rx paths.
  */
 struct rte_eth_dcb_tc_queue_mapping {
-       /** rx queues assigned to tc per Pool */
+       /** Rx queues assigned to tc per Pool */
        struct {
                uint16_t base;
                uint16_t nb_queue;
        } tc_rxq[ETH_MAX_VMDQ_POOL][ETH_DCB_NUM_TCS];
-       /** rx queues assigned to tc per Pool */
+       /** Rx queues assigned to tc per Pool */
        struct {
                uint16_t base;
                uint16_t nb_queue;
@@ -1695,8 +1722,8 @@ struct rte_eth_dcb_tc_queue_mapping {
 struct rte_eth_dcb_info {
        uint8_t nb_tcs;        /**< number of TCs */
        uint8_t prio_tc[ETH_DCB_NUM_USER_PRIORITIES]; /**< Priority to tc */
-       uint8_t tc_bws[ETH_DCB_NUM_TCS]; /**< TX BW percentage for each TC */
-       /** rx queues assigned to tc */
+       uint8_t tc_bws[ETH_DCB_NUM_TCS]; /**< Tx BW percentage for each TC */
+       /** Rx queues assigned to tc */
        struct rte_eth_dcb_tc_queue_mapping tc_queue;
 };
 
@@ -1712,10 +1739,10 @@ enum rte_eth_fec_mode {
 };
 
 /* Translate from FEC mode to FEC capa */
-#define RTE_ETH_FEC_MODE_TO_CAPA(x)    (1U << (x))
+#define RTE_ETH_FEC_MODE_TO_CAPA(x) RTE_BIT32(x)
 
 /* This macro indicates FEC capa mask */
-#define RTE_ETH_FEC_MODE_CAPA_MASK(x)  (1U << (RTE_ETH_FEC_ ## x))
+#define RTE_ETH_FEC_MODE_CAPA_MASK(x) RTE_BIT32(RTE_ETH_FEC_ ## x)
 
 /* A structure used to get capabilities per link speed */
 struct rte_eth_fec_capa {
@@ -1741,24 +1768,24 @@ struct rte_eth_fec_capa {
 } while (0)
 
 /**@{@name L2 tunnel configuration */
-/**< l2 tunnel enable mask */
+/** L2 tunnel enable mask */
 #define ETH_L2_TUNNEL_ENABLE_MASK       0x00000001
-/**< l2 tunnel insertion mask */
+/** L2 tunnel insertion mask */
 #define ETH_L2_TUNNEL_INSERTION_MASK    0x00000002
-/**< l2 tunnel stripping mask */
+/** L2 tunnel stripping mask */
 #define ETH_L2_TUNNEL_STRIPPING_MASK    0x00000004
-/**< l2 tunnel forwarding mask */
+/** L2 tunnel forwarding mask */
 #define ETH_L2_TUNNEL_FORWARDING_MASK   0x00000008
 /**@}*/
 
 /**
- * Function type used for RX packet processing packet callbacks.
+ * Function type used for Rx packet processing packet callbacks.
  *
- * The callback function is called on RX with a burst of packets that have
+ * The callback function is called on Rx with a burst of packets that have
  * been received on the given port and queue.
  *
  * @param port_id
- *   The Ethernet port on which RX is being performed.
+ *   The Ethernet port on which Rx is being performed.
  * @param queue
  *   The queue on the Ethernet port which is being used to receive the packets.
  * @param pkts
@@ -1778,13 +1805,13 @@ typedef uint16_t (*rte_rx_callback_fn)(uint16_t port_id, uint16_t queue,
        void *user_param);
 
 /**
- * Function type used for TX packet processing packet callbacks.
+ * Function type used for Tx packet processing packet callbacks.
  *
- * The callback function is called on TX with a burst of packets immediately
+ * The callback function is called on Tx with a burst of packets immediately
  * before the packets are put onto the hardware queue for transmission.
  *
  * @param port_id
- *   The Ethernet port on which TX is being performed.
+ *   The Ethernet port on which Tx is being performed.
  * @param queue
  *   The queue on the Ethernet port which is being used to transmit the packets.
  * @param pkts
@@ -1814,7 +1841,7 @@ enum rte_eth_dev_state {
 
 struct rte_eth_dev_sriov {
        uint8_t active;               /**< SRIOV is active with 16, 32 or 64 pools */
-       uint8_t nb_q_per_pool;        /**< rx queue number per pool */
+       uint8_t nb_q_per_pool;        /**< Rx queue number per pool */
        uint16_t def_vmdq_idx;        /**< Default pool num used for PF */
        uint16_t def_pool_q_idx;      /**< Default pool queue start reg index */
 };
@@ -1858,12 +1885,12 @@ struct rte_eth_dev_owner {
  * Iterates over valid ethdev ports owned by a specific owner.
  *
  * @param port_id
- *   The id of the next possible valid owned port.
+ *   The ID of the next possible valid owned port.
  * @param      owner_id
  *  The owner identifier.
  *  RTE_ETH_DEV_NO_OWNER means iterate over all valid ownerless ports.
  * @return
- *   Next valid port id owned by owner_id, RTE_MAX_ETHPORTS if there is none.
+ *   Next valid port ID owned by owner_id, RTE_MAX_ETHPORTS if there is none.
  */
 uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
                const uint64_t owner_id);
@@ -1880,9 +1907,9 @@ uint64_t rte_eth_find_next_owned_by(uint16_t port_id,
  * Iterates over valid ethdev ports.
  *
  * @param port_id
- *   The id of the next possible valid port.
+ *   The ID of the next possible valid port.
  * @return
- *   Next valid port id, RTE_MAX_ETHPORTS if there is none.
+ *   Next valid port ID, RTE_MAX_ETHPORTS if there is none.
  */
 uint16_t rte_eth_find_next(uint16_t port_id);
 
@@ -1896,11 +1923,11 @@ uint16_t rte_eth_find_next(uint16_t port_id);
  * Iterates over ethdev ports of a specified device.
  *
  * @param port_id_start
- *   The id of the next possible valid port.
+ *   The ID of the next possible valid port.
  * @param parent
  *   The generic device behind the ports to iterate.
  * @return
- *   Next port id of the device, possibly port_id_start,
+ *   Next port ID of the device, possibly port_id_start,
  *   RTE_MAX_ETHPORTS if there is none.
  */
 uint16_t
@@ -1911,7 +1938,7 @@ rte_eth_find_next_of(uint16_t port_id_start,
  * Macro to iterate over all ethdev ports of a specified device.
  *
  * @param port_id
- *   The id of the matching port being iterated.
+ *   The ID of the matching port being iterated.
  * @param parent
  *   The rte_device pointer matching the iterated ports.
  */
@@ -1924,11 +1951,11 @@ rte_eth_find_next_of(uint16_t port_id_start,
  * Iterates over sibling ethdev ports (i.e. sharing the same rte_device).
  *
  * @param port_id_start
- *   The id of the next possible valid sibling port.
+ *   The ID of the next possible valid sibling port.
  * @param ref_port_id
- *   The id of a reference port to compare rte_device with.
+ *   The ID of a reference port to compare rte_device with.
  * @return
- *   Next sibling port id, possibly port_id_start or ref_port_id itself,
+ *   Next sibling port ID, possibly port_id_start or ref_port_id itself,
  *   RTE_MAX_ETHPORTS if there is none.
  */
 uint16_t
@@ -1940,9 +1967,9 @@ rte_eth_find_next_sibling(uint16_t port_id_start, uint16_t ref_port_id);
  * Note: the specified reference port is part of the loop iterations.
  *
  * @param port_id
- *   The id of the matching port being iterated.
+ *   The ID of the matching port being iterated.
  * @param ref_port_id
- *   The id of the port being compared.
+ *   The ID of the port being compared.
  */
 #define RTE_ETH_FOREACH_DEV_SIBLING(port_id, ref_port_id) \
        for (port_id = rte_eth_find_next_sibling(0, ref_port_id); \
@@ -2085,6 +2112,20 @@ const char *rte_eth_dev_rx_offload_name(uint64_t offload);
  */
 const char *rte_eth_dev_tx_offload_name(uint64_t offload);
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Get RTE_ETH_DEV_CAPA_* flag name.
+ *
+ * @param capability
+ *   Capability flag.
+ * @return
+ *   Capability name or 'UNKNOWN' if the flag cannot be recognized.
+ */
+__rte_experimental
+const char *rte_eth_dev_capability_name(uint64_t capability);
+
 /**
  * Configure an Ethernet device.
  * This function must be invoked first before any other function in the
@@ -2112,7 +2153,7 @@ const char *rte_eth_dev_tx_offload_name(uint64_t offload);
  *        Any type of device supported offloading set in the input argument
  *        eth_conf->[rt]xmode.offloads to rte_eth_dev_configure() is enabled
  *        on all queues and it can't be disabled in rte_eth_[rt]x_queue_setup()
- *     -  the Receive Side Scaling (RSS) configuration when using multiple RX
+ *     -  the Receive Side Scaling (RSS) configuration when using multiple Rx
  *        queues per port. Any RSS hash function set in eth_conf->rss_conf.rss_hf
  *        must be within the flow_type_rss_offloads provided by drivers via
  *        rte_eth_dev_info_get() API.
@@ -2164,7 +2205,7 @@ rte_eth_dev_is_removed(uint16_t port_id);
  *   the DMA memory allocated for the receive descriptors of the ring.
  * @param rx_conf
  *   The pointer to the configuration data to be used for the receive queue.
- *   NULL value is allowed, in which case default RX configuration
+ *   NULL value is allowed, in which case default Rx configuration
  *   will be used.
  *   The *rx_conf* structure contains an *rx_thresh* structure with the values
  *   of the Prefetch, Host, and Write-Back threshold registers of the receive
@@ -2258,7 +2299,7 @@ int rte_eth_rx_hairpin_queue_setup
  *   the DMA memory allocated for the transmit descriptors of the ring.
  * @param tx_conf
  *   The pointer to the configuration data to be used for the transmit queue.
- *   NULL value is allowed, in which case default TX configuration
+ *   NULL value is allowed, in which case default Tx configuration
  *   will be used.
  *   The *tx_conf* structure contains the following data:
  *   - The *tx_thresh* structure with the values of the Prefetch, Host, and
@@ -2411,7 +2452,7 @@ int rte_eth_hairpin_unbind(uint16_t tx_port, uint16_t rx_port);
  * @param port_id
  *   The port identifier of the Ethernet device
  * @return
- *   The NUMA socket id to which the Ethernet device is connected or
+ *   The NUMA socket ID to which the Ethernet device is connected or
  *   a default of zero if the socket could not be determined.
  *   -1 is returned is the port_id value is out of range.
  */
@@ -2429,13 +2470,13 @@ int rte_eth_dev_socket_id(uint16_t port_id);
 int rte_eth_dev_is_valid_port(uint16_t port_id);
 
 /**
- * Start specified RX queue of a port. It is used when rx_deferred_start
+ * Start specified Rx queue of a port. It is used when rx_deferred_start
  * flag of the specified queue is true.
  *
  * @param port_id
  *   The port identifier of the Ethernet device
  * @param rx_queue_id
- *   The index of the rx queue to update the ring.
+ *   The index of the Rx queue to update the ring.
  *   The value must be in the range [0, nb_rx_queue - 1] previously supplied
  *   to rte_eth_dev_configure().
  * @return
@@ -2448,12 +2489,12 @@ int rte_eth_dev_is_valid_port(uint16_t port_id);
 int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
 
 /**
- * Stop specified RX queue of a port
+ * Stop specified Rx queue of a port
  *
  * @param port_id
  *   The port identifier of the Ethernet device
  * @param rx_queue_id
- *   The index of the rx queue to update the ring.
+ *   The index of the Rx queue to update the ring.
  *   The value must be in the range [0, nb_rx_queue - 1] previously supplied
  *   to rte_eth_dev_configure().
  * @return
@@ -2466,13 +2507,13 @@ int rte_eth_dev_rx_queue_start(uint16_t port_id, uint16_t rx_queue_id);
 int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
 
 /**
- * Start TX for specified queue of a port. It is used when tx_deferred_start
+ * Start Tx for specified queue of a port. It is used when tx_deferred_start
  * flag of the specified queue is true.
  *
  * @param port_id
  *   The port identifier of the Ethernet device
  * @param tx_queue_id
- *   The index of the tx queue to update the ring.
+ *   The index of the Tx queue to update the ring.
  *   The value must be in the range [0, nb_tx_queue - 1] previously supplied
  *   to rte_eth_dev_configure().
  * @return
@@ -2485,12 +2526,12 @@ int rte_eth_dev_rx_queue_stop(uint16_t port_id, uint16_t rx_queue_id);
 int rte_eth_dev_tx_queue_start(uint16_t port_id, uint16_t tx_queue_id);
 
 /**
- * Stop specified TX queue of a port
+ * Stop specified Tx queue of a port
  *
  * @param port_id
  *   The port identifier of the Ethernet device
  * @param tx_queue_id
- *   The index of the tx queue to update the ring.
+ *   The index of the Tx queue to update the ring.
  *   The value must be in the range [0, nb_tx_queue - 1] previously supplied
  *   to rte_eth_dev_configure().
  * @return
@@ -2538,7 +2579,7 @@ int rte_eth_dev_stop(uint16_t port_id);
 /**
  * Link up an Ethernet device.
  *
- * Set device link up will re-enable the device rx/tx
+ * Set device link up will re-enable the device Rx/Tx
  * functionality after it is previously set device linked down.
  *
  * @param port_id
@@ -2551,7 +2592,7 @@ int rte_eth_dev_set_link_up(uint16_t port_id);
 
 /**
  * Link down an Ethernet device.
- * The device rx/tx functionality will be disabled if success,
+ * The device Rx/Tx functionality will be disabled if success,
  * and it can be re-enabled with a call to
  * rte_eth_dev_set_link_up()
  *
@@ -2573,7 +2614,7 @@ int rte_eth_dev_set_link_down(uint16_t port_id);
 int rte_eth_dev_close(uint16_t port_id);
 
 /**
- * Reset a Ethernet device and keep its port id.
+ * Reset a Ethernet device and keep its port ID.
  *
  * When a port has to be reset passively, the DPDK application can invoke
  * this function. For example when a PF is reset, all its VFs should also
@@ -2584,7 +2625,7 @@ int rte_eth_dev_close(uint16_t port_id);
  * When this function is called, it first stops the port and then calls the
  * PMD specific dev_uninit( ) and dev_init( ) to return the port to initial
  * state, in which no Tx and Rx queues are setup, as if the port has been
- * reset and not started. The port keeps the port id it had before the
+ * reset and not started. The port keeps the port ID it had before the
  * function call.
  *
  * After calling rte_eth_dev_reset( ), the application should use
@@ -2819,7 +2860,7 @@ int rte_eth_stats_reset(uint16_t port_id);
  *     is too small. The return value corresponds to the size that should
  *     be given to succeed. The entries in the table are not valid and
  *     shall not be used by the caller.
- *   - A negative value on error (invalid port id).
+ *   - A negative value on error (invalid port ID).
  */
 int rte_eth_xstats_get_names(uint16_t port_id,
                struct rte_eth_xstat_name *xstats_names,
@@ -2852,7 +2893,7 @@ int rte_eth_xstats_get_names(uint16_t port_id,
  *     is too small. The return value corresponds to the size that should
  *     be given to succeed. The entries in the table are not valid and
  *     shall not be used by the caller.
- *   - A negative value on error (invalid port id).
+ *   - A negative value on error (invalid port ID).
  */
 int rte_eth_xstats_get(uint16_t port_id, struct rte_eth_xstat *xstats,
                unsigned int n);
@@ -3007,6 +3048,30 @@ int rte_eth_dev_set_rx_queue_stats_mapping(uint16_t port_id,
  */
 int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice
+ *
+ * Retrieve the Ethernet addresses of an Ethernet device.
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param ma
+ *   A pointer to an array of structures of type *ether_addr* to be filled with
+ *   the Ethernet addresses of the Ethernet device.
+ * @param num
+ *   Number of elements in the @p ma array.
+ *   Note that  rte_eth_dev_info::max_mac_addrs can be used to retrieve
+ *   max number of Ethernet addresses for given port.
+ * @return
+ *   - number of retrieved addresses if successful
+ *   - (-ENODEV) if *port_id* invalid.
+ *   - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_macaddrs_get(uint16_t port_id, struct rte_ether_addr *ma,
+       unsigned int num);
+
 /**
  * Retrieve the contextual information of an Ethernet device.
  *
@@ -3027,7 +3092,7 @@ int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);
  *  };
  *
  * device = dev->device
- * min_mtu = RTE_ETHER_MIN_MTU
+ * min_mtu = RTE_ETHER_MIN_LEN - RTE_ETHER_HDR_LEN - RTE_ETHER_CRC_LEN
  * max_mtu = UINT16_MAX
  *
  * The following fields will be populated if support for dev_infos_get()
@@ -3052,6 +3117,24 @@ int rte_eth_macaddr_get(uint16_t port_id, struct rte_ether_addr *mac_addr);
  */
 int rte_eth_dev_info_get(uint16_t port_id, struct rte_eth_dev_info *dev_info);
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this API may change without prior notice.
+ *
+ * Retrieve the configuration of an Ethernet device.
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param dev_conf
+ *   Location for Ethernet device configuration to be filled in.
+ * @return
+ *   - (0) if successful.
+ *   - (-ENODEV) if *port_id* invalid.
+ *   - (-EINVAL) if bad parameter.
+ */
+__rte_experimental
+int rte_eth_dev_conf_get(uint16_t port_id, struct rte_eth_conf *dev_conf);
+
 /**
  * Retrieve the firmware version of a device.
  *
@@ -3083,9 +3166,9 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
  * and RTE_PTYPE_L3_IPV4 are announced, the PMD must return the following
  * packet types for these packets:
  * - Ether/IPv4              -> RTE_PTYPE_L2_ETHER | RTE_PTYPE_L3_IPV4
- * - Ether/Vlan/IPv4         -> RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV4
+ * - Ether/VLAN/IPv4         -> RTE_PTYPE_L2_ETHER_VLAN | RTE_PTYPE_L3_IPV4
  * - Ether/[anything else]   -> RTE_PTYPE_L2_ETHER
- * - Ether/Vlan/[anything else] -> RTE_PTYPE_L2_ETHER_VLAN
+ * - Ether/VLAN/[anything else] -> RTE_PTYPE_L2_ETHER_VLAN
  *
  * When a packet is received by a PMD, the most precise type must be
  * returned among the ones supported. However a PMD is allowed to set
@@ -3094,7 +3177,7 @@ int rte_eth_dev_fw_version_get(uint16_t port_id,
  * can still set a matching packet type in a received packet.
  *
  * @note
- *   Better to invoke this API after the device is already started or rx burst
+ *   Better to invoke this API after the device is already started or Rx burst
  *   function is decided, to obtain correct supported ptypes.
  * @note
  *   if a given PMD does not report what ptypes it supports, then the supported
@@ -3204,7 +3287,7 @@ int rte_eth_dev_set_mtu(uint16_t port_id, uint16_t mtu);
 int rte_eth_dev_vlan_filter(uint16_t port_id, uint16_t vlan_id, int on);
 
 /**
- * Enable/Disable hardware VLAN Strip by a rx queue of an Ethernet device.
+ * Enable/Disable hardware VLAN Strip by a Rx queue of an Ethernet device.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
@@ -3231,7 +3314,7 @@ int rte_eth_dev_set_vlan_strip_on_queue(uint16_t port_id, uint16_t rx_queue_id,
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param vlan_type
- *   The vlan type.
+ *   The VLAN type.
  * @param tag_type
  *   The Tag Protocol ID
  * @return
@@ -3279,14 +3362,14 @@ int rte_eth_dev_set_vlan_offload(uint16_t port_id, int offload_mask);
 int rte_eth_dev_get_vlan_offload(uint16_t port_id);
 
 /**
- * Set port based TX VLAN insertion on or off.
+ * Set port based Tx VLAN insertion on or off.
  *
  * @param port_id
  *  The port identifier of the Ethernet device.
  * @param pvid
- *  Port based TX VLAN identifier together with user priority.
+ *  Port based Tx VLAN identifier together with user priority.
  * @param on
- *  Turn on or off the port based TX VLAN insertion.
+ *  Turn on or off the port based Tx VLAN insertion.
  *
  * @return
  *   - (0) if successful.
@@ -3298,20 +3381,20 @@ typedef void (*buffer_tx_error_fn)(struct rte_mbuf **unsent, uint16_t count,
                void *userdata);
 
 /**
- * Structure used to buffer packets for future TX
+ * Structure used to buffer packets for future Tx
  * Used by APIs rte_eth_tx_buffer and rte_eth_tx_buffer_flush
  */
 struct rte_eth_dev_tx_buffer {
        buffer_tx_error_fn error_callback;
        void *error_userdata;
-       uint16_t size;           /**< Size of buffer for buffered tx */
+       uint16_t size;           /**< Size of buffer for buffered Tx */
        uint16_t length;         /**< Number of packets in the array */
+       /** Pending packets to be sent on explicit flush or when full */
        struct rte_mbuf *pkts[];
-       /**< Pending packets to be sent on explicit flush or when full */
 };
 
 /**
- * Calculate the size of the tx buffer.
+ * Calculate the size of the Tx buffer.
  *
  * @param sz
  *   Number of stored packets.
@@ -3336,7 +3419,7 @@ rte_eth_tx_buffer_init(struct rte_eth_dev_tx_buffer *buffer, uint16_t size);
  * Configure a callback for buffered packets which cannot be sent
  *
  * Register a specific callback to be called when an attempt is made to send
- * all packets buffered on an ethernet port, but not all packets can
+ * all packets buffered on an Ethernet port, but not all packets can
  * successfully be sent. The callback registered here will be called only
  * from calls to rte_eth_tx_buffer() and rte_eth_tx_buffer_flush() APIs.
  * The default callback configured for each queue by default just frees the
@@ -3365,7 +3448,7 @@ rte_eth_tx_buffer_set_err_callback(struct rte_eth_dev_tx_buffer *buffer,
  *
  * This function can be passed to rte_eth_tx_buffer_set_err_callback() to
  * adjust the default behavior when buffered packets cannot be sent. This
- * function drops any unsent packets silently and is used by tx buffered
+ * function drops any unsent packets silently and is used by Tx buffered
  * operations as default behavior.
  *
  * NOTE: this function should not be called directly, instead it should be used
@@ -3446,16 +3529,16 @@ rte_eth_tx_done_cleanup(uint16_t port_id, uint16_t queue_id, uint32_t free_cnt);
  * eth device.
  */
 enum rte_eth_event_ipsec_subtype {
+       /** Unknown event type */
        RTE_ETH_EVENT_IPSEC_UNKNOWN = 0,
-                       /**< Unknown event type */
+       /** Sequence number overflow */
        RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW,
-                       /**< Sequence number overflow */
+       /** Soft time expiry of SA */
        RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY,
-                       /**< Soft time expiry of SA */
+       /** Soft byte expiry of SA */
        RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY,
-                       /**< Soft byte expiry of SA */
+       /** Max value of this enum */
        RTE_ETH_EVENT_IPSEC_MAX
-                       /**< Max value of this enum */
 };
 
 /**
@@ -3463,22 +3546,23 @@ enum rte_eth_event_ipsec_subtype {
  * information of the IPsec offload event.
  */
 struct rte_eth_event_ipsec_desc {
+       /** Type of RTE_ETH_EVENT_IPSEC_* event */
        enum rte_eth_event_ipsec_subtype subtype;
-                       /**< Type of RTE_ETH_EVENT_IPSEC_* event */
+       /**
+        * Event specific metadata.
+        *
+        * For the following events, *userdata* registered
+        * with the *rte_security_session* would be returned
+        * as metadata,
+        *
+        * - @ref RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW
+        * - @ref RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY
+        * - @ref RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY
+        *
+        * @see struct rte_security_session_conf
+        *
+        */
        uint64_t metadata;
-                       /**< Event specific metadata
-                        *
-                        * For the following events, *userdata* registered
-                        * with the *rte_security_session* would be returned
-                        * as metadata,
-                        *
-                        * - @ref RTE_ETH_EVENT_IPSEC_ESN_OVERFLOW
-                        * - @ref RTE_ETH_EVENT_IPSEC_SA_TIME_EXPIRY
-                        * - @ref RTE_ETH_EVENT_IPSEC_SA_BYTE_EXPIRY
-                        *
-                        * @see struct rte_security_session_conf
-                        *
-                        */
 };
 
 /**
@@ -3487,10 +3571,10 @@ struct rte_eth_event_ipsec_desc {
 enum rte_eth_event_type {
        RTE_ETH_EVENT_UNKNOWN,  /**< unknown event type */
        RTE_ETH_EVENT_INTR_LSC, /**< lsc interrupt event */
+       /** queue state event (enabled/disabled) */
        RTE_ETH_EVENT_QUEUE_STATE,
-                               /**< queue state event (enabled/disabled) */
+       /** reset interrupt event, sent to VF on PF reset */
        RTE_ETH_EVENT_INTR_RESET,
-                       /**< reset interrupt event, sent to VF on PF reset */
        RTE_ETH_EVENT_VF_MBOX,  /**< message from the VF received by PF */
        RTE_ETH_EVENT_MACSEC,   /**< MACsec offload related event */
        RTE_ETH_EVENT_INTR_RMV, /**< device removal event */
@@ -3501,15 +3585,15 @@ enum rte_eth_event_type {
        RTE_ETH_EVENT_MAX       /**< max value of this enum */
 };
 
+/** User application callback to be registered for interrupts. */
 typedef int (*rte_eth_dev_cb_fn)(uint16_t port_id,
                enum rte_eth_event_type event, void *cb_arg, void *ret_param);
-/**< user application callback to be registered for interrupts */
 
 /**
  * Register a callback function for port event.
  *
  * @param port_id
- *  Port id.
+ *  Port ID.
  *  RTE_ETH_ALL means register the event for all port ids.
  * @param event
  *  Event interested.
@@ -3530,7 +3614,7 @@ int rte_eth_dev_callback_register(uint16_t port_id,
  * Unregister a callback function for port event.
  *
  * @param port_id
- *  Port id.
+ *  Port ID.
  *  RTE_ETH_ALL means unregister the event for all port ids.
  * @param event
  *  Event interested.
@@ -3549,12 +3633,12 @@ int rte_eth_dev_callback_unregister(uint16_t port_id,
                rte_eth_dev_cb_fn cb_fn, void *cb_arg);
 
 /**
- * When there is no rx packet coming in Rx Queue for a long time, we can
- * sleep lcore related to RX Queue for power saving, and enable rx interrupt
+ * When there is no Rx packet coming in Rx Queue for a long time, we can
+ * sleep lcore related to Rx Queue for power saving, and enable Rx interrupt
  * to be triggered when Rx packet arrives.
  *
- * The rte_eth_dev_rx_intr_enable() function enables rx queue
- * interrupt on specific rx queue of a port.
+ * The rte_eth_dev_rx_intr_enable() function enables Rx queue
+ * interrupt on specific Rx queue of a port.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
@@ -3572,11 +3656,11 @@ int rte_eth_dev_callback_unregister(uint16_t port_id,
 int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
 
 /**
- * When lcore wakes up from rx interrupt indicating packet coming, disable rx
+ * When lcore wakes up from Rx interrupt indicating packet coming, disable Rx
  * interrupt and returns to polling mode.
  *
- * The rte_eth_dev_rx_intr_disable() function disables rx queue
- * interrupt on specific rx queue of a port.
+ * The rte_eth_dev_rx_intr_disable() function disables Rx queue
+ * interrupt on specific Rx queue of a port.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
@@ -3594,7 +3678,7 @@ int rte_eth_dev_rx_intr_enable(uint16_t port_id, uint16_t queue_id);
 int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
 
 /**
- * RX Interrupt control per port.
+ * Rx Interrupt control per port.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
@@ -3613,7 +3697,7 @@ int rte_eth_dev_rx_intr_disable(uint16_t port_id, uint16_t queue_id);
 int rte_eth_dev_rx_intr_ctl(uint16_t port_id, int epfd, int op, void *data);
 
 /**
- * RX Interrupt control per queue.
+ * Rx Interrupt control per queue.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
@@ -3916,7 +4000,7 @@ int rte_eth_dev_rss_reta_query(uint16_t port_id,
 
 /**
  * Updates unicast hash table for receiving packet with the given destination
- * MAC address, and the packet is routed to all VFs for which the RX mode is
+ * MAC address, and the packet is routed to all VFs for which the Rx mode is
  * accept packets that match the unicast hash table.
  *
  * @param port_id
@@ -3938,7 +4022,7 @@ int rte_eth_dev_uc_hash_table_set(uint16_t port_id, struct rte_ether_addr *addr,
 
 /**
  * Updates all unicast hash bitmaps for receiving packet with any Unicast
- * Ethernet MAC addresses,the packet is routed to all VFs for which the RX
+ * Ethernet MAC addresses,the packet is routed to all VFs for which the Rx
  * mode is accept packets that match the unicast hash table.
  *
  * @param port_id
@@ -3962,9 +4046,9 @@ int rte_eth_dev_uc_all_hash_table_set(uint16_t port_id, uint8_t on);
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param queue_idx
- *   The queue id.
+ *   The queue ID.
  * @param tx_rate
- *   The tx rate in Mbps. Allocated from the total port link speed.
+ *   The Tx rate in Mbps. Allocated from the total port link speed.
  * @return
  *   - (0) if successful.
  *   - (-ENOTSUP) if hardware doesn't support this feature.
@@ -4068,7 +4152,7 @@ rte_eth_dev_udp_tunnel_port_delete(uint16_t port_id,
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param dcb_info
- *   dcb information.
+ *   DCB information.
  * @return
  *   - (0) if successful.
  *   - (-ENODEV) if port identifier is invalid.
@@ -4082,7 +4166,7 @@ int rte_eth_dev_get_dcb_info(uint16_t port_id,
 struct rte_eth_rxtx_callback;
 
 /**
- * Add a callback to be called on packet RX on a given port and queue.
+ * Add a callback to be called on packet Rx on a given port and queue.
  *
  * This API configures a function to be called for each burst of
  * packets received on a given NIC port queue. The return value is a pointer
@@ -4111,7 +4195,7 @@ rte_eth_add_rx_callback(uint16_t port_id, uint16_t queue_id,
                rte_rx_callback_fn fn, void *user_param);
 
 /**
- * Add a callback that must be called first on packet RX on a given port
+ * Add a callback that must be called first on packet Rx on a given port
  * and queue.
  *
  * This API configures a first function to be called for each burst of
@@ -4141,7 +4225,7 @@ rte_eth_add_first_rx_callback(uint16_t port_id, uint16_t queue_id,
                rte_rx_callback_fn fn, void *user_param);
 
 /**
- * Add a callback to be called on packet TX on a given port and queue.
+ * Add a callback to be called on packet Tx on a given port and queue.
  *
  * This API configures a function to be called for each burst of
  * packets sent on a given NIC port queue. The return value is a pointer
@@ -4170,7 +4254,7 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
                rte_tx_callback_fn fn, void *user_param);
 
 /**
- * Remove an RX packet callback from a given port and queue.
+ * Remove an Rx packet callback from a given port and queue.
  *
  * This function is used to removed callbacks that were added to a NIC port
  * queue using rte_eth_add_rx_callback().
@@ -4180,7 +4264,7 @@ rte_eth_add_tx_callback(uint16_t port_id, uint16_t queue_id,
  * subsequently freed back by the application by calling rte_free():
  *
  * - Immediately - if the port is stopped, or the user knows that no
- *   callbacks are in flight e.g. if called from the thread doing RX/TX
+ *   callbacks are in flight e.g. if called from the thread doing Rx/Tx
  *   on that queue.
  *
  * - After a short delay - where the delay is sufficient to allow any
@@ -4206,7 +4290,7 @@ int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
                const struct rte_eth_rxtx_callback *user_cb);
 
 /**
- * Remove a TX packet callback from a given port and queue.
+ * Remove a Tx packet callback from a given port and queue.
  *
  * This function is used to removed callbacks that were added to a NIC port
  * queue using rte_eth_add_tx_callback().
@@ -4216,7 +4300,7 @@ int rte_eth_remove_rx_callback(uint16_t port_id, uint16_t queue_id,
  * subsequently freed back by the application by calling rte_free():
  *
  * - Immediately - if the port is stopped, or the user knows that no
- *   callbacks are in flight e.g. if called from the thread doing RX/TX
+ *   callbacks are in flight e.g. if called from the thread doing Rx/Tx
  *   on that queue.
  *
  * - After a short delay - where the delay is sufficient to allow any
@@ -4242,12 +4326,12 @@ int rte_eth_remove_tx_callback(uint16_t port_id, uint16_t queue_id,
                const struct rte_eth_rxtx_callback *user_cb);
 
 /**
- * Retrieve information about given port's RX queue.
+ * Retrieve information about given port's Rx queue.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param queue_id
- *   The RX queue on the Ethernet device for which information
+ *   The Rx queue on the Ethernet device for which information
  *   will be retrieved.
  * @param qinfo
  *   A pointer to a structure of type *rte_eth_rxq_info_info* to be filled with
@@ -4264,12 +4348,12 @@ int rte_eth_rx_queue_info_get(uint16_t port_id, uint16_t queue_id,
        struct rte_eth_rxq_info *qinfo);
 
 /**
- * Retrieve information about given port's TX queue.
+ * Retrieve information about given port's Tx queue.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param queue_id
- *   The TX queue on the Ethernet device for which information
+ *   The Tx queue on the Ethernet device for which information
  *   will be retrieved.
  * @param qinfo
  *   A pointer to a structure of type *rte_eth_txq_info_info* to be filled with
@@ -4520,14 +4604,14 @@ int rte_eth_timesync_enable(uint16_t port_id);
 int rte_eth_timesync_disable(uint16_t port_id);
 
 /**
- * Read an IEEE1588/802.1AS RX timestamp from an Ethernet device.
+ * Read an IEEE1588/802.1AS Rx timestamp from an Ethernet device.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
  * @param timestamp
  *   Pointer to the timestamp struct.
  * @param flags
- *   Device specific flags. Used to pass the RX timesync register index to
+ *   Device specific flags. Used to pass the Rx timesync register index to
  *   i40e. Unused in igb/ixgbe, pass 0 instead.
  *
  * @return
@@ -4541,7 +4625,7 @@ int rte_eth_timesync_read_rx_timestamp(uint16_t port_id,
                struct timespec *timestamp, uint32_t flags);
 
 /**
- * Read an IEEE1588/802.1AS TX timestamp from an Ethernet device.
+ * Read an IEEE1588/802.1AS Tx timestamp from an Ethernet device.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
@@ -4664,7 +4748,7 @@ int
 rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
 
 /**
-* Get the port id from device name. The device name should be specified
+* Get the port ID from device name. The device name should be specified
 * as below:
 * - PCIe address (Domain:Bus:Device.Function), for example- 0000:2:00.0
 * - SoC device name, for example- fsl-gmac0
@@ -4682,7 +4766,7 @@ int
 rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
 
 /**
-* Get the device name from port id. The device name is specified as below:
+* Get the device name from port ID. The device name is specified as below:
 * - PCIe address (Domain:Bus:Device.Function), for example- 0000:02:00.0
 * - SoC device name, for example- fsl-gmac0
 * - vdev dpdk name, for example- net_[pcap0|null0|tun0|tap0]
@@ -4701,7 +4785,7 @@ rte_eth_dev_get_name_by_port(uint16_t port_id, char *name);
 
 /**
  * Check that numbers of Rx and Tx descriptors satisfy descriptors limits from
- * the ethernet device information, otherwise adjust them to boundaries.
+ * the Ethernet device information, otherwise adjust them to boundaries.
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
@@ -4771,7 +4855,7 @@ int rte_eth_dev_hairpin_capability_get(uint16_t port_id,
  * @warning
  * @b EXPERIMENTAL: this structure may change without prior notice.
  *
- * ethernet device representor ID range entry
+ * Ethernet device representor ID range entry
  */
 struct rte_eth_representor_range {
        enum rte_eth_representor_type type; /**< Representor type */
@@ -4829,13 +4913,13 @@ int rte_eth_representor_info_get(uint16_t port_id,
                                 struct rte_eth_representor_info *info);
 
 /** The NIC is able to deliver flag (if set) with packets to the PMD. */
-#define RTE_ETH_RX_METADATA_USER_FLAG (UINT64_C(1) << 0)
+#define RTE_ETH_RX_METADATA_USER_FLAG RTE_BIT64(0)
 
 /** The NIC is able to deliver mark ID with packets to the PMD. */
-#define RTE_ETH_RX_METADATA_USER_MARK (UINT64_C(1) << 1)
+#define RTE_ETH_RX_METADATA_USER_MARK RTE_BIT64(1)
 
 /** The NIC is able to deliver tunnel ID with packets to the PMD. */
-#define RTE_ETH_RX_METADATA_TUNNEL_ID (UINT64_C(1) << 2)
+#define RTE_ETH_RX_METADATA_TUNNEL_ID RTE_BIT64(2)
 
 /**
  * @warning
@@ -4884,24 +4968,51 @@ int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features);
 
 #include <rte_ethdev_core.h>
 
+/**
+ * @internal
+ * Helper routine for rte_eth_rx_burst().
+ * Should be called at exit from PMD's rte_eth_rx_bulk implementation.
+ * Does necessary post-processing - invokes Rx callbacks if any, etc.
+ *
+ * @param port_id
+ *  The port identifier of the Ethernet device.
+ * @param queue_id
+ *  The index of the receive queue from which to retrieve input packets.
+ * @param rx_pkts
+ *   The address of an array of pointers to *rte_mbuf* structures that
+ *   have been retrieved from the device.
+ * @param nb_rx
+ *   The number of packets that were retrieved from the device.
+ * @param nb_pkts
+ *   The number of elements in @p rx_pkts array.
+ * @param opaque
+ *   Opaque pointer of Rx queue callback related data.
+ *
+ * @return
+ *  The number of packets effectively supplied to the @p rx_pkts array.
+ */
+uint16_t rte_eth_call_rx_callbacks(uint16_t port_id, uint16_t queue_id,
+               struct rte_mbuf **rx_pkts, uint16_t nb_rx, uint16_t nb_pkts,
+               void *opaque);
+
 /**
  *
  * Retrieve a burst of input packets from a receive queue of an Ethernet
  * device. The retrieved packets are stored in *rte_mbuf* structures whose
  * pointers are supplied in the *rx_pkts* array.
  *
- * The rte_eth_rx_burst() function loops, parsing the RX ring of the
- * receive queue, up to *nb_pkts* packets, and for each completed RX
+ * The rte_eth_rx_burst() function loops, parsing the Rx ring of the
+ * receive queue, up to *nb_pkts* packets, and for each completed Rx
  * descriptor in the ring, it performs the following operations:
  *
  * - Initialize the *rte_mbuf* data structure associated with the
- *   RX descriptor according to the information provided by the NIC into
- *   that RX descriptor.
+ *   Rx descriptor according to the information provided by the NIC into
+ *   that Rx descriptor.
  *
  * - Store the *rte_mbuf* data structure into the next entry of the
  *   *rx_pkts* array.
  *
- * - Replenish the RX descriptor with a new *rte_mbuf* buffer
+ * - Replenish the Rx descriptor with a new *rte_mbuf* buffer
  *   allocated from the memory pool associated with the receive queue at
  *   initialization time.
  *
@@ -4913,7 +5024,7 @@ int rte_eth_rx_metadata_negotiate(uint16_t port_id, uint64_t *features);
  * The rte_eth_rx_burst() function returns the number of packets
  * actually retrieved, which is the number of *rte_mbuf* data structures
  * effectively supplied into the *rx_pkts* array.
- * A return value equal to *nb_pkts* indicates that the RX queue contained
+ * A return value equal to *nb_pkts* indicates that the Rx queue contained
  * at least *rx_pkts* packets, and this is likely to signify that other
  * received packets remain in the input queue. Applications implementing
  * a "retrieve as much received packets as possible" policy can check this
@@ -4975,39 +5086,51 @@ static inline uint16_t
 rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
                 struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
 {
-       struct rte_eth_dev *dev = &rte_eth_devices[port_id];
        uint16_t nb_rx;
+       struct rte_eth_fp_ops *p;
+       void *qd;
+
+#ifdef RTE_ETHDEV_DEBUG_RX
+       if (port_id >= RTE_MAX_ETHPORTS ||
+                       queue_id >= RTE_MAX_QUEUES_PER_PORT) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Invalid port_id=%u or queue_id=%u\n",
+                       port_id, queue_id);
+               return 0;
+       }
+#endif
+
+       /* fetch pointer to queue data */
+       p = &rte_eth_fp_ops[port_id];
+       qd = p->rxq.data[queue_id];
 
 #ifdef RTE_ETHDEV_DEBUG_RX
        RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
-       RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);
 
-       if (queue_id >= dev->data->nb_rx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", queue_id);
+       if (qd == NULL) {
+               RTE_ETHDEV_LOG(ERR, "Invalid Rx queue_id=%u for port_id=%u\n",
+                       queue_id, port_id);
                return 0;
        }
 #endif
-       nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
-                                    rx_pkts, nb_pkts);
 
-#ifdef RTE_ETHDEV_RXTX_CALLBACKS
-       struct rte_eth_rxtx_callback *cb;
+       nb_rx = p->rx_pkt_burst(qd, rx_pkts, nb_pkts);
 
-       /* __ATOMIC_RELEASE memory order was used when the
-        * call back was inserted into the list.
-        * Since there is a clear dependency between loading
-        * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is
-        * not required.
-        */
-       cb = __atomic_load_n(&dev->post_rx_burst_cbs[queue_id],
+#ifdef RTE_ETHDEV_RXTX_CALLBACKS
+       {
+               void *cb;
+
+               /* __ATOMIC_RELEASE memory order was used when the
+                * call back was inserted into the list.
+                * Since there is a clear dependency between loading
+                * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is
+                * not required.
+                */
+               cb = __atomic_load_n((void **)&p->rxq.clbk[queue_id],
                                __ATOMIC_RELAXED);
-
-       if (unlikely(cb != NULL)) {
-               do {
-                       nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
-                                               nb_pkts, cb->param);
-                       cb = cb->next;
-               } while (cb != NULL);
+               if (unlikely(cb != NULL))
+                       nb_rx = rte_eth_call_rx_callbacks(port_id, queue_id,
+                                       rx_pkts, nb_rx, nb_pkts, cb);
        }
 #endif
 
@@ -5016,12 +5139,12 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
 }
 
 /**
- * Get the number of used descriptors of a rx queue
+ * Get the number of used descriptors of a Rx queue
  *
  * @param port_id
  *  The port identifier of the Ethernet device.
  * @param queue_id
- *  The queue id on the specific port.
+ *  The queue ID on the specific port.
  * @return
  *  The number of used descriptors in the specific queue, or:
  *   - (-ENODEV) if *port_id* is invalid.
@@ -5031,16 +5154,27 @@ rte_eth_rx_burst(uint16_t port_id, uint16_t queue_id,
 static inline int
 rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)
 {
-       struct rte_eth_dev *dev;
+       struct rte_eth_fp_ops *p;
+       void *qd;
+
+       if (port_id >= RTE_MAX_ETHPORTS ||
+                       queue_id >= RTE_MAX_QUEUES_PER_PORT) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Invalid port_id=%u or queue_id=%u\n",
+                       port_id, queue_id);
+               return -EINVAL;
+       }
+
+       /* fetch pointer to queue data */
+       p = &rte_eth_fp_ops[port_id];
+       qd = p->rxq.data[queue_id];
 
        RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
-       dev = &rte_eth_devices[port_id];
-       RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_queue_count, -ENOTSUP);
-       if (queue_id >= dev->data->nb_rx_queues ||
-           dev->data->rx_queues[queue_id] == NULL)
+       RTE_FUNC_PTR_OR_ERR_RET(*p->rx_queue_count, -ENOTSUP);
+       if (qd == NULL)
                return -EINVAL;
 
-       return (int)(*dev->rx_queue_count)(dev->data->rx_queues[queue_id]);
+       return (int)(*p->rx_queue_count)(qd);
 }
 
 /**@{@name Rx hardware descriptor states
@@ -5088,21 +5222,30 @@ static inline int
 rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
        uint16_t offset)
 {
-       struct rte_eth_dev *dev;
-       void *rxq;
+       struct rte_eth_fp_ops *p;
+       void *qd;
 
 #ifdef RTE_ETHDEV_DEBUG_RX
-       RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+       if (port_id >= RTE_MAX_ETHPORTS ||
+                       queue_id >= RTE_MAX_QUEUES_PER_PORT) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Invalid port_id=%u or queue_id=%u\n",
+                       port_id, queue_id);
+               return -EINVAL;
+       }
 #endif
-       dev = &rte_eth_devices[port_id];
+
+       /* fetch pointer to queue data */
+       p = &rte_eth_fp_ops[port_id];
+       qd = p->rxq.data[queue_id];
+
 #ifdef RTE_ETHDEV_DEBUG_RX
-       if (queue_id >= dev->data->nb_rx_queues)
+       RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+       if (qd == NULL)
                return -ENODEV;
 #endif
-       RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_descriptor_status, -ENOTSUP);
-       rxq = dev->data->rx_queues[queue_id];
-
-       return (*dev->rx_descriptor_status)(rxq, offset);
+       RTE_FUNC_PTR_OR_ERR_RET(*p->rx_descriptor_status, -ENOTSUP);
+       return (*p->rx_descriptor_status)(qd, offset);
 }
 
 /**@{@name Tx hardware descriptor states
@@ -5149,23 +5292,54 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,
 static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
        uint16_t queue_id, uint16_t offset)
 {
-       struct rte_eth_dev *dev;
-       void *txq;
+       struct rte_eth_fp_ops *p;
+       void *qd;
 
 #ifdef RTE_ETHDEV_DEBUG_TX
-       RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+       if (port_id >= RTE_MAX_ETHPORTS ||
+                       queue_id >= RTE_MAX_QUEUES_PER_PORT) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Invalid port_id=%u or queue_id=%u\n",
+                       port_id, queue_id);
+               return -EINVAL;
+       }
 #endif
-       dev = &rte_eth_devices[port_id];
+
+       /* fetch pointer to queue data */
+       p = &rte_eth_fp_ops[port_id];
+       qd = p->txq.data[queue_id];
+
 #ifdef RTE_ETHDEV_DEBUG_TX
-       if (queue_id >= dev->data->nb_tx_queues)
+       RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV);
+       if (qd == NULL)
                return -ENODEV;
 #endif
-       RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_descriptor_status, -ENOTSUP);
-       txq = dev->data->tx_queues[queue_id];
-
-       return (*dev->tx_descriptor_status)(txq, offset);
+       RTE_FUNC_PTR_OR_ERR_RET(*p->tx_descriptor_status, -ENOTSUP);
+       return (*p->tx_descriptor_status)(qd, offset);
 }
 
+/**
+ * @internal
+ * Helper routine for rte_eth_tx_burst().
+ * Should be called before entry PMD's rte_eth_tx_bulk implementation.
+ * Does necessary pre-processing - invokes Tx callbacks if any, etc.
+ *
+ * @param port_id
+ *   The port identifier of the Ethernet device.
+ * @param queue_id
+ *   The index of the transmit queue through which output packets must be
+ *   sent.
+ * @param tx_pkts
+ *   The address of an array of *nb_pkts* pointers to *rte_mbuf* structures
+ *   which contain the output packets.
+ * @param nb_pkts
+ *   The maximum number of packets to transmit.
+ * @return
+ *   The number of output packets to transmit.
+ */
+uint16_t rte_eth_call_tx_callbacks(uint16_t port_id, uint16_t queue_id,
+       struct rte_mbuf **tx_pkts, uint16_t nb_pkts, void *opaque);
+
 /**
  * Send a burst of output packets on a transmit queue of an Ethernet device.
  *
@@ -5176,7 +5350,7 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
  * supplied in the *tx_pkts* array of *rte_mbuf* structures, each of them
  * allocated from a pool created with rte_pktmbuf_pool_create().
  * The rte_eth_tx_burst() function loops, sending *nb_pkts* packets,
- * up to the number of transmit descriptors available in the TX ring of the
+ * up to the number of transmit descriptors available in the Tx ring of the
  * transmit queue.
  * For each packet to send, the rte_eth_tx_burst() function performs
  * the following operations:
@@ -5204,12 +5378,12 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
  * transparently free the memory buffers of packets previously sent.
  * This feature is driven by the *tx_free_thresh* value supplied to the
  * rte_eth_dev_configure() function at device configuration time.
- * When the number of free TX descriptors drops below this threshold, the
+ * When the number of free Tx descriptors drops below this threshold, the
  * rte_eth_tx_burst() function must [attempt to] free the *rte_mbuf*  buffers
  * of those packets whose transmission was effectively completed.
  *
  * If the PMD is DEV_TX_OFFLOAD_MT_LOCKFREE capable, multiple threads can
- * invoke this function concurrently on the same tx queue without SW lock.
+ * invoke this function concurrently on the same Tx queue without SW lock.
  * @see rte_eth_dev_info_get, struct rte_eth_txconf::offloads
  *
  * @see rte_eth_tx_prepare to perform some prior checks or adjustments
@@ -5236,42 +5410,55 @@ static inline uint16_t
 rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
                 struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
-       struct rte_eth_dev *dev = &rte_eth_devices[port_id];
+       struct rte_eth_fp_ops *p;
+       void *qd;
+
+#ifdef RTE_ETHDEV_DEBUG_TX
+       if (port_id >= RTE_MAX_ETHPORTS ||
+                       queue_id >= RTE_MAX_QUEUES_PER_PORT) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Invalid port_id=%u or queue_id=%u\n",
+                       port_id, queue_id);
+               return 0;
+       }
+#endif
+
+       /* fetch pointer to queue data */
+       p = &rte_eth_fp_ops[port_id];
+       qd = p->txq.data[queue_id];
 
 #ifdef RTE_ETHDEV_DEBUG_TX
        RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
-       RTE_FUNC_PTR_OR_ERR_RET(*dev->tx_pkt_burst, 0);
 
-       if (queue_id >= dev->data->nb_tx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
+       if (qd == NULL) {
+               RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u for port_id=%u\n",
+                       queue_id, port_id);
                return 0;
        }
 #endif
 
 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
-       struct rte_eth_rxtx_callback *cb;
-
-       /* __ATOMIC_RELEASE memory order was used when the
-        * call back was inserted into the list.
-        * Since there is a clear dependency between loading
-        * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is
-        * not required.
-        */
-       cb = __atomic_load_n(&dev->pre_tx_burst_cbs[queue_id],
+       {
+               void *cb;
+
+               /* __ATOMIC_RELEASE memory order was used when the
+                * call back was inserted into the list.
+                * Since there is a clear dependency between loading
+                * cb and cb->fn/cb->next, __ATOMIC_ACQUIRE memory order is
+                * not required.
+                */
+               cb = __atomic_load_n((void **)&p->txq.clbk[queue_id],
                                __ATOMIC_RELAXED);
-
-       if (unlikely(cb != NULL)) {
-               do {
-                       nb_pkts = cb->fn.tx(port_id, queue_id, tx_pkts, nb_pkts,
-                                       cb->param);
-                       cb = cb->next;
-               } while (cb != NULL);
+               if (unlikely(cb != NULL))
+                       nb_pkts = rte_eth_call_tx_callbacks(port_id, queue_id,
+                                       tx_pkts, nb_pkts, cb);
        }
 #endif
 
-       rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts,
-               nb_pkts);
-       return (*dev->tx_pkt_burst)(dev->data->tx_queues[queue_id], tx_pkts, nb_pkts);
+       nb_pkts = p->tx_pkt_burst(qd, tx_pkts, nb_pkts);
+
+       rte_ethdev_trace_tx_burst(port_id, queue_id, (void **)tx_pkts, nb_pkts);
+       return nb_pkts;
 }
 
 /**
@@ -5286,13 +5473,13 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
  * For each packet to send, the rte_eth_tx_prepare() function performs
  * the following operations:
  *
- * - Check if packet meets devices requirements for tx offloads.
+ * - Check if packet meets devices requirements for Tx offloads.
  *
  * - Check limitations about number of segments.
  *
  * - Check additional requirements when debug is enabled.
  *
- * - Update and/or reset required checksums when tx offload is set for packet.
+ * - Update and/or reset required checksums when Tx offload is set for packet.
  *
  * Since this function can modify packet data, provided mbufs must be safely
  * writable (e.g. modified data cannot be in shared segment).
@@ -5307,7 +5494,7 @@ rte_eth_tx_burst(uint16_t port_id, uint16_t queue_id,
  *
  * @param port_id
  *   The port identifier of the Ethernet device.
- *   The value must be a valid port id.
+ *   The value must be a valid port ID.
  * @param queue_id
  *   The index of the transmit queue through which output packets must be
  *   sent.
@@ -5334,31 +5521,42 @@ static inline uint16_t
 rte_eth_tx_prepare(uint16_t port_id, uint16_t queue_id,
                struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
 {
-       struct rte_eth_dev *dev;
+       struct rte_eth_fp_ops *p;
+       void *qd;
 
 #ifdef RTE_ETHDEV_DEBUG_TX
-       if (!rte_eth_dev_is_valid_port(port_id)) {
-               RTE_ETHDEV_LOG(ERR, "Invalid TX port_id=%u\n", port_id);
+       if (port_id >= RTE_MAX_ETHPORTS ||
+                       queue_id >= RTE_MAX_QUEUES_PER_PORT) {
+               RTE_ETHDEV_LOG(ERR,
+                       "Invalid port_id=%u or queue_id=%u\n",
+                       port_id, queue_id);
                rte_errno = ENODEV;
                return 0;
        }
 #endif
 
-       dev = &rte_eth_devices[port_id];
+       /* fetch pointer to queue data */
+       p = &rte_eth_fp_ops[port_id];
+       qd = p->txq.data[queue_id];
 
 #ifdef RTE_ETHDEV_DEBUG_TX
-       if (queue_id >= dev->data->nb_tx_queues) {
-               RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
+       if (!rte_eth_dev_is_valid_port(port_id)) {
+               RTE_ETHDEV_LOG(ERR, "Invalid Tx port_id=%u\n", port_id);
+               rte_errno = ENODEV;
+               return 0;
+       }
+       if (qd == NULL) {
+               RTE_ETHDEV_LOG(ERR, "Invalid Tx queue_id=%u for port_id=%u\n",
+                       queue_id, port_id);
                rte_errno = EINVAL;
                return 0;
        }
 #endif
 
-       if (!dev->tx_pkt_prepare)
+       if (!p->tx_pkt_prepare)
                return nb_pkts;
 
-       return (*dev->tx_pkt_prepare)(dev->data->tx_queues[queue_id],
-                       tx_pkts, nb_pkts);
+       return p->tx_pkt_prepare(qd, tx_pkts, nb_pkts);
 }
 
 #else