ethdev: remove legacy descriptor status check API
Subsystems (3)
PATCH 1/7 ethdev: remove legacy descriptor status check API
Removing 'rte_eth_rx_descriptor_done()' API and relevant 'rx_descriptor_done' function pointer from 'struct eth_dev_ops'.
Deprecation notice is to deprecate the API in 20.11 and remove one year later, this is useful to prevent new applications use the API but keep the support for old application. But since 20.11 have the ABI break and most of the applications need to re-compile anyway will prevent them to use the API, the affect will be same as removing the API. So removing it in the 20.11 to reduce the churn.
'rx_descriptor_done' implementations removed from PMDs.
--- doc/guides/nics/features.rst | 6 +----- doc/guides/rel_notes/deprecation.rst | 5 ----- drivers/net/e1000/e1000_ethdev.h | 4 ---- drivers/net/e1000/em_ethdev.c | 1 - drivers/net/e1000/em_rxtx.c | 17 ---------------- drivers/net/e1000/igb_ethdev.c | 2 -- drivers/net/e1000/igb_rxtx.c | 17 ---------------- drivers/net/enic/enic_ethdev.c | 1 - drivers/net/fm10k/fm10k.h | 3 --- drivers/net/fm10k/fm10k_ethdev.c | 1 - drivers/net/fm10k/fm10k_rxtx.c | 25 ------------------------ drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev_vf.c | 1 - drivers/net/i40e/i40e_rxtx.c | 26 ------------------------- drivers/net/i40e/i40e_rxtx.h | 1 - drivers/net/igc/igc_ethdev.c | 1 - drivers/net/igc/igc_txrx.c | 18 ----------------- drivers/net/igc/igc_txrx.h | 2 -- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- drivers/net/ixgbe/ixgbe_ethdev.h | 2 -- drivers/net/ixgbe/ixgbe_rxtx.c | 18 ----------------- drivers/net/octeontx2/otx2_ethdev.c | 1 - drivers/net/octeontx2/otx2_ethdev.h | 1 - drivers/net/octeontx2/otx2_ethdev_ops.c | 12 ------------ drivers/net/sfc/sfc_ethdev.c | 17 ---------------- drivers/net/virtio/virtio_ethdev.c | 1 - drivers/net/virtio/virtio_ethdev.h | 2 -- drivers/net/virtio/virtio_rxtx.c | 9 --------- lib/librte_ethdev/rte_ethdev.h | 25 ------------------------ lib/librte_ethdev/rte_ethdev_core.h | 4 ---- 30 files changed, 1 insertion(+), 225 deletions(-)
doc/guides/nics/features.rst +1 -5
@@ -642,14 +642,10 @@ Rx descriptor status -------------------- Supports check the status of a Rx descriptor. When ``rx_descriptor_status`` is -used, status can be "Available", "Done" or "Unavailable". When -``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is -not set". +used, status can be "Available", "Done" or "Unavailable". * **[implements] eth_dev_ops**: ``rx_descriptor_status``. * **[related] API**: ``rte_eth_rx_descriptor_status()``. -* **[implements] eth_dev_ops**: ``rx_descriptor_done``. -* **[related] API**: ``rte_eth_rx_descriptor_done()``. .. _nic_features_tx_descriptor_status:
doc/guides/rel_notes/deprecation.rst +0 -5
@@ -220,11 +220,6 @@ Deprecation Notices for HW. This change is planned for 20.11. For more details: https://mails.dpdk.org/archives/dev/2020-July/176135.html. -* ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done`` - will be deprecated in 20.11 and will be removed in 21.11. - Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` - APIs can be used as replacement. - * ethdev: The port mirroring API can be replaced with a more fine grain flow API. The structs ``rte_eth_mirror_conf``, ``rte_eth_vlan_mirror`` and the functions ``rte_eth_mirror_rule_set``, ``rte_eth_mirror_rule_reset`` will be marked
drivers/net/e1000/e1000_ethdev.h +0 -4
@@ -384,8 +384,6 @@ int eth_igb_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,uint32_t eth_igb_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int eth_igb_rx_descriptor_done (void *rx_queue,uint16_t offset); -int eth_igb_rx_descriptor_status (void *rx_queue,uint16_t offset);int eth_igb_tx_descriptor_status (void *tx_queue,uint16_t offset);
@@ -461,8 +459,6 @@ int eth_em_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,uint32_t eth_em_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int eth_em_rx_descriptor_done (void *rx_queue,uint16_t offset); -int eth_em_rx_descriptor_status (void *rx_queue,uint16_t offset);int eth_em_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/e1000/em_ethdev.c +0 -1
@@ -177,7 +177,6 @@ static const struct eth_dev_ops eth_em_ops = { .rx_queue_setup = eth_em_rx_queue_setup, .rx_queue_release = eth_em_rx_queue_release, .rx_queue_count = eth_em_rx_queue_count, - .rx_descriptor_done = eth_em_rx_descriptor_done, .rx_descriptor_status = eth_em_rx_descriptor_status, .tx_descriptor_status = eth_em_tx_descriptor_status, .tx_queue_setup = eth_em_tx_queue_setup,
drivers/net/e1000/em_rxtx.c +0 -17
@@ -1511,23 +1511,6 @@ eth_em_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -eth_em_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile struct e1000_rx_desc *rxdp; -struct em_rx_queue *rxq = rx_queue; -uint32_t desc; - -if (unlikely (offset >= rxq->nb_rx_desc)) -return 0 ; - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; -return !!(rxdp->status &E1000_RXD_STAT_DD ); -} -int eth_em_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/e1000/igb_ethdev.c +0 -2
@@ -381,7 +381,6 @@ static const struct eth_dev_ops eth_igb_ops = { .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, .rx_queue_release = eth_igb_rx_queue_release, .rx_queue_count = eth_igb_rx_queue_count, - .rx_descriptor_done = eth_igb_rx_descriptor_done, .rx_descriptor_status = eth_igb_rx_descriptor_status, .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup,
@@ -441,7 +440,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, .rx_queue_setup = eth_igb_rx_queue_setup, .rx_queue_release = eth_igb_rx_queue_release, - .rx_descriptor_done = eth_igb_rx_descriptor_done, .rx_descriptor_status = eth_igb_rx_descriptor_status, .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup,
drivers/net/e1000/igb_rxtx.c +0 -17
@@ -1791,23 +1791,6 @@ eth_igb_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -eth_igb_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union e1000_adv_rx_desc *rxdp; -struct igb_rx_queue *rxq = rx_queue; -uint32_t desc; - -if (unlikely (offset >= rxq->nb_rx_desc)) -return 0 ; - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; -return !!(rxdp->wb.upper.status_error &E1000_RXD_STAT_DD ); -} -int eth_igb_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/enic/enic_ethdev.c +0 -1
@@ -1142,7 +1142,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .rx_queue_setup = enicpmd_dev_rx_queue_setup, .rx_queue_release = enicpmd_dev_rx_queue_release, .rx_queue_count = enicpmd_dev_rx_queue_count, - .rx_descriptor_done = NULL, .tx_queue_setup = enicpmd_dev_tx_queue_setup, .tx_queue_release = enicpmd_dev_tx_queue_release, .rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
drivers/net/fm10k/fm10k.h +0 -3
@@ -326,9 +326,6 @@ uint16_t fm10k_recv_scattered_pkts(void *rx_queue,uint32_t fm10k_dev_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int -fm10k_dev_rx_descriptor_done (void *rx_queue,uint16_t offset); -int fm10k_dev_rx_descriptor_status (void *rx_queue,uint16_t offset);
drivers/net/fm10k/fm10k_ethdev.c +0 -1
@@ -2856,7 +2856,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = { .tx_queue_setup = fm10k_tx_queue_setup, .tx_queue_release = fm10k_tx_queue_release, .rx_queue_count = fm10k_dev_rx_queue_count, - .rx_descriptor_done = fm10k_dev_rx_descriptor_done, .rx_descriptor_status = fm10k_dev_rx_descriptor_status, .tx_descriptor_status = fm10k_dev_tx_descriptor_status, .rx_queue_intr_enable = fm10k_dev_rx_queue_intr_enable,
drivers/net/fm10k/fm10k_rxtx.c +0 -25
@@ -393,31 +393,6 @@ fm10k_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -fm10k_dev_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union fm10k_rx_desc *rxdp; -struct fm10k_rx_queue *rxq = rx_queue; -uint16_t desc; -int ret; - -if (unlikely (offset >= rxq->nb_desc)) { -PMD_DRV_LOG (ERR ,"Invalid RX descriptor offset %u" , offset); -return 0 ; - } - - desc = rxq->next_dd + offset; -if (desc >= rxq->nb_desc) - desc -= rxq->nb_desc; - - rxdp = &rxq->hw_ring[desc]; - - ret = !!(rxdp->w.status & -rte_cpu_to_le_16 (FM10K_RXD_STATUS_DD )); - -return ret; -} -int fm10k_dev_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/i40e/i40e_ethdev.c +0 -1
@@ -475,7 +475,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .rx_queue_intr_disable = i40e_dev_rx_queue_intr_disable, .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_count = i40e_dev_rx_queue_count, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, .rx_descriptor_status = i40e_dev_rx_descriptor_status, .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup,
drivers/net/i40e/i40e_ethdev_vf.c +0 -1
@@ -199,7 +199,6 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = { .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, .rx_descriptor_status = i40e_dev_rx_descriptor_status, .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup,
drivers/net/i40e/i40e_rxtx.c +0 -26
@@ -2032,32 +2032,6 @@ i40e_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -i40e_dev_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union i40e_rx_desc *rxdp; -struct i40e_rx_queue *rxq = rx_queue; -uint16_t desc; -int ret; - -if (unlikely (offset >= rxq->nb_rx_desc)) { -PMD_DRV_LOG (ERR ,"Invalid RX descriptor id %u" , offset); -return 0 ; - } - - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &(rxq->rx_ring[desc]); - - ret = !!(((rte_le_to_cpu_64 (rxdp->wb.qword1.status_error_len) & -I40E_RXD_QW1_STATUS_MASK ) >>I40E_RXD_QW1_STATUS_SHIFT ) & - (1 <<I40E_RX_DESC_STATUS_DD_SHIFT )); - -return ret; -} -int i40e_dev_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/i40e/i40e_rxtx.h +0 -1
@@ -221,7 +221,6 @@ void i40e_rx_queue_release_mbufs(struct i40e_rx_queue *rxq);uint32_t i40e_dev_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int i40e_dev_rx_descriptor_done (void *rx_queue,uint16_t offset);int i40e_dev_rx_descriptor_status (void *rx_queue,uint16_t offset);int i40e_dev_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/igc/igc_ethdev.c +0 -1
@@ -273,7 +273,6 @@ static const struct eth_dev_ops eth_igc_ops = { .rx_queue_setup = eth_igc_rx_queue_setup, .rx_queue_release = eth_igc_rx_queue_release, .rx_queue_count = eth_igc_rx_queue_count, - .rx_descriptor_done = eth_igc_rx_descriptor_done, .rx_descriptor_status = eth_igc_rx_descriptor_status, .tx_descriptor_status = eth_igc_tx_descriptor_status, .tx_queue_setup = eth_igc_tx_queue_setup,
drivers/net/igc/igc_txrx.c +0 -18
@@ -756,24 +756,6 @@ uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev,return desc; } -int eth_igc_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union igc_adv_rx_desc *rxdp; -struct igc_rx_queue *rxq = rx_queue; -uint32_t desc; - -if (unlikely (!rxq || offset >= rxq->nb_rx_desc)) -return 0 ; - - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; -return !!(rxdp->wb.upper.status_error & -rte_cpu_to_le_32 (IGC_RXD_STAT_DD )); -} -int eth_igc_rx_descriptor_status (void *rx_queue,uint16_t offset) {struct igc_rx_queue *rxq = rx_queue;
drivers/net/igc/igc_txrx.h +0 -2
@@ -25,8 +25,6 @@ int eth_igc_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,uint32_t eth_igc_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int eth_igc_rx_descriptor_done (void *rx_queue,uint16_t offset); -int eth_igc_rx_descriptor_status (void *rx_queue,uint16_t offset);int eth_igc_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
@@ -546,7 +546,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, .rx_queue_release = ixgbe_dev_rx_queue_release, .rx_queue_count = ixgbe_dev_rx_queue_count, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup,
@@ -622,7 +621,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .vlan_offload_set = ixgbevf_vlan_offload_set, .rx_queue_setup = ixgbe_dev_rx_queue_setup, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup,
drivers/net/ixgbe/ixgbe_ethdev.h +0 -2
@@ -602,8 +602,6 @@ int ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,uint32_t ixgbe_dev_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int ixgbe_dev_rx_descriptor_done (void *rx_queue,uint16_t offset); -int ixgbe_dev_rx_descriptor_status (void *rx_queue,uint16_t offset);int ixgbe_dev_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/ixgbe/ixgbe_rxtx.c +0 -18
@@ -3216,24 +3216,6 @@ ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -ixgbe_dev_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union ixgbe_adv_rx_desc *rxdp; -struct ixgbe_rx_queue *rxq = rx_queue; -uint32_t desc; - -if (unlikely (offset >= rxq->nb_rx_desc)) -return 0 ; - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; -return !!(rxdp->wb.upper.status_error & -rte_cpu_to_le_32 (IXGBE_RXDADV_STAT_DD )); -} -int ixgbe_dev_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/octeontx2/otx2_ethdev.c +0 -1
@@ -2273,7 +2273,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { .rx_burst_mode_get = otx2_rx_burst_mode_get, .tx_burst_mode_get = otx2_tx_burst_mode_get, .rx_queue_count = otx2_nix_rx_queue_count, - .rx_descriptor_done = otx2_nix_rx_descriptor_done, .rx_descriptor_status = otx2_nix_rx_descriptor_status, .tx_descriptor_status = otx2_nix_tx_descriptor_status, .tx_done_cleanup = otx2_nix_tx_done_cleanup,
drivers/net/octeontx2/otx2_ethdev.h +0 -1
@@ -412,7 +412,6 @@ int otx2_tx_burst_mode_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_burst_mode *mode);uint32_t otx2_nix_rx_queue_count (struct rte_eth_dev *eth_dev,uint16_t qidx);int otx2_nix_tx_done_cleanup (void *txq,uint32_t free_cnt); -int otx2_nix_rx_descriptor_done (void *rxq,uint16_t offset);int otx2_nix_rx_descriptor_status (void *rx_queue,uint16_t offset);int otx2_nix_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/octeontx2/otx2_ethdev_ops.c +0 -12
@@ -371,18 +371,6 @@ nix_offset_has_packet(uint32_t head, uint32_t tail, uint16_t offset)return 0 ; } -int -otx2_nix_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -struct otx2_eth_rxq *rxq = rx_queue; -uint32_t head, tail; - -nix_rx_head_tail_get (otx2_eth_pmd_priv (rxq->eth_dev), - &head, &tail, rxq->rq); - -return nix_offset_has_packet (head, tail, offset); -} -int otx2_nix_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/sfc/sfc_ethdev.c +0 -17
@@ -1221,21 +1221,6 @@ sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return sap->dp_rx->qdesc_npending (rxq_info->dp); } -/* -* The function is used by the secondary process as well. It must not -* use any process-local pointers from the adapter data. -*/ -static int -sfc_rx_descriptor_done (void *queue,uint16_t offset) -{ -struct sfc_dp_rxq *dp_rxq = queue; -const struct sfc_dp_rx *dp_rx; - - dp_rx =sfc_dp_rx_by_dp_rxq (dp_rxq); - -return offset < dp_rx->qdesc_npending (dp_rxq); -} -/* * The function is used by the secondary process as well. It must not * use any process-local pointers from the adapter data.
@@ -1820,7 +1805,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .rx_queue_setup = sfc_rx_queue_setup, .rx_queue_release = sfc_rx_queue_release, .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, .rx_descriptor_status = sfc_rx_descriptor_status, .tx_descriptor_status = sfc_tx_descriptor_status, .rx_queue_intr_enable = sfc_rx_queue_intr_enable,
@@ -2018,7 +2002,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, .rx_descriptor_status = sfc_rx_descriptor_status, .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query,
drivers/net/virtio/virtio_ethdev.c +0 -1
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = { .rx_queue_intr_enable = virtio_dev_rx_queue_intr_enable, .rx_queue_intr_disable = virtio_dev_rx_queue_intr_disable, .rx_queue_release = virtio_dev_queue_release, - .rx_descriptor_done = virtio_dev_rx_queue_done, .tx_queue_setup = virtio_dev_tx_queue_setup, .tx_queue_release = virtio_dev_queue_release,/* collect stats per queue */
drivers/net/virtio/virtio_ethdev.h +0 -2
@@ -60,8 +60,6 @@ void virtio_dev_cq_start(struct rte_eth_dev *dev);* RX/TX function prototypes */ -int virtio_dev_rx_queue_done (void *rxq,uint16_t offset); - int virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf,
drivers/net/virtio/virtio_rxtx.c +0 -9
@@ -39,15 +39,6 @@#define VIRTIO_DUMP_PACKET (m, len) do { } while (0)#endif -int -virtio_dev_rx_queue_done (void *rxq,uint16_t offset) -{ -struct virtnet_rx *rxvq = rxq; -struct virtqueue *vq = rxvq->vq; - -return virtqueue_nused (vq) >= offset; -} -void vq_ring_free_inorder (struct virtqueue *vq,uint16_t desc_idx,uint16_t num) {
lib/librte_ethdev/rte_ethdev.h +0 -25
@@ -4552,31 +4552,6 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)return (int )(*dev->dev_ops->rx_queue_count)(dev, queue_id); } -/** -* Check if the DD bit of the specific RX descriptor in the queue has been set -* -* @param port_id -* The port identifier of the Ethernet device. -* @param queue_id -* The queue id on the specific port. -* @param offset -* The offset of the descriptor ID from tail. -* @return -* - (1) if the specific DD bit is set. -* - (0) if the specific DD bit is not set. -* - (-ENODEV) if *port_id* invalid. -* - (-ENOTSUP) if the device does not support this function -*/ -static inline int -rte_eth_rx_descriptor_done (uint16_t port_id,uint16_t queue_id,uint16_t offset) -{ -struct rte_eth_dev *dev = &rte_eth_devices[port_id]; -RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_done, -ENOTSUP ); -return (*dev->dev_ops->rx_descriptor_done)( \ - dev->data->rx_queues[queue_id], offset); -} -#define RTE_ETH_RX_DESC_AVAIL 0/**< Desc available for hw. */ #define RTE_ETH_RX_DESC_DONE 1/**< Desc done, filled by hw. */ #define RTE_ETH_RX_DESC_UNAVAIL 2/**< Desc used by driver or hw. */
lib/librte_ethdev/rte_ethdev_core.h +0 -4
@@ -287,9 +287,6 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev, uint16_t rx_queue_id);/**< @internal Get number of used descriptors on a receive queue. */ -typedef int (*eth_rx_descriptor_done_t )(void *rxq,uint16_t offset); -/**< @internal Check DD bit of specific RX descriptor */ -typedef int (*eth_rx_descriptor_status_t )(void *rxq,uint16_t offset);/**< @internal Check the status of a Rx descriptor */
@@ -662,7 +659,6 @@ struct eth_dev_ops {eth_queue_release_t rx_queue_release;/**< Release RX queue. */ eth_rx_queue_count_t rx_queue_count;/**< Get the number of used RX descriptors. */ -eth_rx_descriptor_done_t rx_descriptor_done;/**< Check rxd DD bit. */ eth_rx_descriptor_status_t rx_descriptor_status;/**< Check the status of a Rx descriptor. */ eth_tx_descriptor_status_t tx_descriptor_status;
Signature · 1 line
2.25.4
PATCH 2/7 ethdev: move inline device operations
This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.
Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.
Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.
To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.
The list of dev_ops moved:eth_rx_queue_count_t rx_queue_count;eth_rx_descriptor_status_t rx_descriptor_status;eth_tx_descriptor_status_t tx_descriptor_status;
--- drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 9 +++++---- drivers/net/axgbe/axgbe_ethdev.c | 5 +++-- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 6 +++--- drivers/net/e1000/igb_ethdev.c | 10 +++++----- drivers/net/enic/enic_ethdev.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev_vf.c | 6 +++--- drivers/net/iavf/iavf_ethdev.c | 6 +++--- drivers/net/ice/ice_ethdev.c | 6 +++--- drivers/net/igc/igc_ethdev.c | 6 +++--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++----- drivers/net/mlx5/linux/mlx5_os.c | 12 +++++------- drivers/net/mlx5/mlx5_flow.c | 4 ++++ drivers/net/netvsc/hn_ethdev.c | 6 +++--- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 6 +++--- drivers/net/qede/qede_ethdev.c | 3 +-- drivers/net/sfc/sfc_ethdev.c | 12 ++++++------ drivers/net/thunderx/nicvf_ethdev.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 12 ++++++------ lib/librte_ethdev/rte_ethdev_core.h | 11 +++++------ 27 files changed, 82 insertions(+), 80 deletions(-)
drivers/net/ark/ark_ethdev.c +1 -1
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = { .dev_infos_get = eth_ark_dev_info_get, .rx_queue_setup = eth_ark_dev_rx_queue_setup, - .rx_queue_count = eth_ark_dev_rx_queue_count, .tx_queue_setup = eth_ark_tx_queue_setup, .link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)return -1 ; dev->dev_ops = &ark_eth_dev_ops; + dev->rx_queue_count = eth_ark_dev_rx_queue_count; dev->data->mac_addrs =rte_zmalloc ("ark" ,RTE_ETHER_ADDR_LEN ,0 );if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = { .rx_queue_intr_enable = atl_dev_rx_queue_intr_enable, .rx_queue_intr_disable = atl_dev_rx_queue_intr_disable, - .rx_queue_count = atl_rx_queue_count, - .rx_descriptor_status = atl_dev_rx_descriptor_status, - .tx_descriptor_status = atl_dev_tx_descriptor_status, -/* EEPROM */ .get_eeprom_length = atl_dev_get_eeprom_length, .get_eeprom = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &atl_eth_dev_ops; + + eth_dev->rx_queue_count = atl_rx_queue_count; + eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status; + eth_dev->rx_pkt_burst = &atl_recv_pkts; eth_dev->tx_pkt_burst = &atl_xmit_pkts; eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .rxq_info_get = axgbe_rxq_info_get, .txq_info_get = axgbe_txq_info_get, .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get, - .rx_descriptor_status = axgbe_dev_rx_descriptor_status, - .tx_descriptor_status = axgbe_dev_tx_descriptor_status, .mtu_set = axgb_mtu_set, };
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) eth_dev->dev_ops = &axgbe_eth_dev_ops; + eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status; +/* * For secondary processes, we don't initialise any further as primary * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -4233,9 +4233,6 @@ static const struct eth_dev_ops bnxt_dev_ops = { .dev_led_off = bnxt_dev_led_off_op, .xstats_get_by_id = bnxt_dev_xstats_get_by_id_op, .xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op, - .rx_queue_count = bnxt_rx_queue_count_op, - .rx_descriptor_status = bnxt_rx_descriptor_status_op, - .tx_descriptor_status = bnxt_tx_descriptor_status_op, .rx_queue_start = bnxt_rx_queue_start, .rx_queue_stop = bnxt_rx_queue_stop, .tx_queue_start = bnxt_tx_queue_start,
@@ -5668,6 +5665,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)PMD_DRV_LOG (INFO ,"%s\n" , bnxt_version); eth_dev->dev_ops = &bnxt_dev_ops; + eth_dev->rx_queue_count = bnxt_rx_queue_count_op; + eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op; + eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op; eth_dev->rx_pkt_burst = &bnxt_recv_pkts; eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
drivers/net/dpaa/dpaa_ethdev.c +1 -1
@@ -1303,7 +1303,6 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_setup = dpaa_eth_tx_queue_setup, .rx_queue_release = dpaa_eth_rx_queue_release, .tx_queue_release = dpaa_eth_tx_queue_release, - .rx_queue_count = dpaa_dev_rx_queue_count, .rx_burst_mode_get = dpaa_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa_dev_tx_burst_mode_get, .rxq_info_get = dpaa_rxq_info_get,
@@ -1766,6 +1765,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)/* Populate ethdev structure */ eth_dev->dev_ops = &dpaa_devops; + eth_dev->rx_queue_count = dpaa_dev_rx_queue_count; eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = { .tx_queue_release = dpaa2_dev_tx_queue_release, .rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get, - .rx_queue_count = dpaa2_dev_rx_queue_count, .flow_ctrl_get = dpaa2_flow_ctrl_get, .flow_ctrl_set = dpaa2_flow_ctrl_set, .mac_addr_add = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)* plugged. */ eth_dev->dev_ops = &dpaa2_ethdev_ops; + eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;if (dpaa2_get_devargs (dev->devargs,DRIVER_LOOPBACK_MODE )) eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx; else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +3 -3
@@ -176,9 +176,6 @@ static const struct eth_dev_ops eth_em_ops = { .vlan_offload_set = eth_em_vlan_offload_set, .rx_queue_setup = eth_em_rx_queue_setup, .rx_queue_release = eth_em_rx_queue_release, - .rx_queue_count = eth_em_rx_queue_count, - .rx_descriptor_status = eth_em_rx_descriptor_status, - .tx_descriptor_status = eth_em_tx_descriptor_status, .tx_queue_setup = eth_em_tx_queue_setup, .tx_queue_release = eth_em_tx_queue_release, .rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -249,6 +246,9 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)E1000_DEV_PRIVATE_TO_VFTA (eth_dev->data->dev_private); eth_dev->dev_ops = ð_em_ops; + eth_dev->rx_queue_count = eth_em_rx_queue_count; + eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status; eth_dev->rx_pkt_burst = (eth_rx_burst_t)ð_em_recv_pkts; eth_dev->tx_pkt_burst = (eth_tx_burst_t)ð_em_xmit_pkts; eth_dev->tx_pkt_prepare = (eth_tx_prep_t)ð_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +5 -5
@@ -380,9 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = { .rx_queue_intr_enable = eth_igb_rx_queue_intr_enable, .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, .rx_queue_release = eth_igb_rx_queue_release, - .rx_queue_count = eth_igb_rx_queue_count, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,
@@ -440,8 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, .rx_queue_setup = eth_igb_rx_queue_setup, .rx_queue_release = eth_igb_rx_queue_release, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,
@@ -752,6 +747,9 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)uint32_t ctrl_ext; eth_dev->dev_ops = ð_igb_ops; + eth_dev->rx_queue_count = eth_igb_rx_queue_count; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;
@@ -947,6 +945,8 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &igbvf_eth_dev_ops; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -1
@@ -1141,7 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .tx_queue_stop = enicpmd_dev_tx_queue_stop, .rx_queue_setup = enicpmd_dev_rx_queue_setup, .rx_queue_release = enicpmd_dev_rx_queue_release, - .rx_queue_count = enicpmd_dev_rx_queue_count, .tx_queue_setup = enicpmd_dev_tx_queue_setup, .tx_queue_release = enicpmd_dev_tx_queue_release, .rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1278,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)ENICPMD_FUNC_TRACE (); eth_dev->dev_ops = &enicpmd_eth_dev_ops; + eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count; eth_dev->rx_pkt_burst = &enic_recv_pkts; eth_dev->tx_pkt_burst = &enic_xmit_pkts; eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +3 -3
@@ -2855,9 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = { .rx_queue_release = fm10k_rx_queue_release, .tx_queue_setup = fm10k_tx_queue_setup, .tx_queue_release = fm10k_tx_queue_release, - .rx_queue_count = fm10k_dev_rx_queue_count, - .rx_descriptor_status = fm10k_dev_rx_descriptor_status, - .tx_descriptor_status = fm10k_dev_tx_descriptor_status, .rx_queue_intr_enable = fm10k_dev_rx_queue_intr_enable, .rx_queue_intr_disable = fm10k_dev_rx_queue_intr_disable, .reta_update = fm10k_reta_update,
@@ -3054,6 +3051,9 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &fm10k_eth_dev_ops; + dev->rx_queue_count = fm10k_dev_rx_queue_count; + dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status; + dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status; dev->rx_pkt_burst = &fm10k_recv_pkts; dev->tx_pkt_burst = &fm10k_xmit_pkts; dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +3 -3
@@ -474,9 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .rx_queue_intr_enable = i40e_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40e_dev_rx_queue_intr_disable, .rx_queue_release = i40e_dev_rx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, .dev_led_on = i40e_dev_led_on,
@@ -1447,6 +1444,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &i40e_eth_dev_ops; + dev->rx_queue_count = i40e_dev_rx_queue_count; + dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; dev->rx_pkt_burst = i40e_recv_pkts; dev->tx_pkt_burst = i40e_xmit_pkts; dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +3 -3
@@ -199,11 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = { .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, .rxq_info_get = i40e_rxq_info_get, .txq_info_get = i40e_txq_info_get, .mac_addr_add = i40evf_add_mac_addr,
@@ -1517,6 +1514,9 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &i40evf_eth_dev_ops; + eth_dev->rx_queue_count = i40e_dev_rx_queue_count; + eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &i40e_recv_pkts; eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
drivers/net/iavf/iavf_ethdev.c +3 -3
@@ -113,9 +113,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .rss_hash_conf_get = iavf_dev_rss_hash_conf_get, .rxq_info_get = iavf_dev_rxq_info_get, .txq_info_get = iavf_dev_txq_info_get, - .rx_queue_count = iavf_dev_rxq_count, - .rx_descriptor_status = iavf_dev_rx_desc_status, - .tx_descriptor_status = iavf_dev_tx_desc_status, .mtu_set = iavf_dev_mtu_set, .rx_queue_intr_enable = iavf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable,
@@ -1335,6 +1332,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; + eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; + eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status; eth_dev->rx_pkt_burst = &iavf_recv_pkts; eth_dev->tx_pkt_burst = &iavf_xmit_pkts; eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
@@ -200,9 +200,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = { .tx_burst_mode_get = ice_tx_burst_mode_get, .get_eeprom_length = ice_get_eeprom_length, .get_eeprom = ice_get_eeprom, - .rx_queue_count = ice_rx_queue_count, - .rx_descriptor_status = ice_rx_descriptor_status, - .tx_descriptor_status = ice_tx_descriptor_status, .stats_get = ice_stats_get, .stats_reset = ice_stats_reset, .xstats_get = ice_xstats_get,
@@ -2139,6 +2136,9 @@ ice_dev_init(struct rte_eth_dev *dev)int ret; dev->dev_ops = &ice_eth_dev_ops; + dev->rx_queue_count = ice_rx_queue_count; + dev->rx_descriptor_status = ice_rx_descriptor_status; + dev->tx_descriptor_status = ice_tx_descriptor_status; dev->rx_pkt_burst = ice_recv_pkts; dev->tx_pkt_burst = ice_xmit_pkts; dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +3 -3
@@ -272,9 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = { .rx_queue_setup = eth_igc_rx_queue_setup, .rx_queue_release = eth_igc_rx_queue_release, - .rx_queue_count = eth_igc_rx_queue_count, - .rx_descriptor_status = eth_igc_rx_descriptor_status, - .tx_descriptor_status = eth_igc_tx_descriptor_status, .tx_queue_setup = eth_igc_tx_queue_setup, .tx_queue_release = eth_igc_tx_queue_release, .tx_done_cleanup = eth_igc_tx_done_cleanup,
@@ -1226,6 +1223,9 @@ eth_igc_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = ð_igc_ops; + dev->rx_queue_count = eth_igc_rx_queue_count; + dev->rx_descriptor_status = eth_igc_rx_descriptor_status; + dev->tx_descriptor_status = eth_igc_tx_descriptor_status;/* * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +5 -5
@@ -545,9 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_queue_count = ixgbe_dev_rx_queue_count, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .dev_led_on = ixgbe_dev_led_on,
@@ -621,8 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .vlan_offload_set = ixgbevf_vlan_offload_set, .rx_queue_setup = ixgbe_dev_rx_queue_setup, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1089,6 +1084,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)ixgbe_dev_macsec_setting_reset (eth_dev); eth_dev->dev_ops = &ixgbe_eth_dev_ops; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; + eth_dev->rx_queue_count = ixgbe_dev_rx_queue_count; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts; eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1568,6 +1566,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &ixgbevf_eth_dev_ops; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
drivers/net/mlx5/linux/mlx5_os.c +5 -7
@@ -585,6 +585,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, } eth_dev->device = dpdk_dev; eth_dev->dev_ops = &mlx5_os_dev_sec_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; err =mlx5_proc_priv_init (eth_dev);if (err)return NULL ;
@@ -1192,6 +1194,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, eth_dev->rx_pkt_burst = removed_rx_burst; eth_dev->tx_pkt_burst = removed_tx_burst; eth_dev->dev_ops = &mlx5_os_dev_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; + eth_dev->rx_queue_count = mlx5_rx_queue_count;/* Register MAC address. */ claim_zero (mlx5_mac_addr_add (eth_dev, &mac,0 ,0 ));if (config->vf && config->vf_nl_en)
@@ -2363,13 +2368,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = { .rss_hash_update = mlx5_rss_hash_update, .rss_hash_conf_get = mlx5_rss_hash_conf_get, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get, .tx_burst_mode_get = mlx5_tx_burst_mode_get, - .rx_queue_count = mlx5_rx_queue_count, .rx_queue_intr_enable = mlx5_rx_intr_enable, .rx_queue_intr_disable = mlx5_rx_intr_disable, .is_removed = mlx5_is_removed,
@@ -2394,8 +2396,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = { .rx_queue_stop = mlx5_rx_queue_stop, .tx_queue_start = mlx5_tx_queue_start, .tx_queue_stop = mlx5_tx_queue_stop, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2447,8 +2447,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = { .vlan_strip_queue_set = mlx5_vlan_strip_queue_set, .vlan_offload_set = mlx5_vlan_offload_set, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
@@ -5131,6 +5131,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev, dev->dev_ops = &mlx5_os_dev_ops_isolate; else dev->dev_ops = &mlx5_os_dev_ops; + + dev->rx_descriptor_status = mlx5_rx_descriptor_status; + dev->tx_descriptor_status = mlx5_tx_descriptor_status; +return 0 ; }
drivers/net/netvsc/hn_ethdev.c +3 -3
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = { .tx_queue_setup = hn_dev_tx_queue_setup, .tx_queue_release = hn_dev_tx_queue_release, .tx_done_cleanup = hn_dev_tx_done_cleanup, - .tx_descriptor_status = hn_dev_tx_descriptor_status, .rx_queue_setup = hn_dev_rx_queue_setup, .rx_queue_release = hn_dev_rx_queue_release, - .rx_queue_count = hn_dev_rx_queue_count, - .rx_descriptor_status = hn_dev_rx_queue_status, .link_update = hn_dev_link_update, .stats_get = hn_dev_stats_get, .stats_reset = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) vmbus = container_of(device, struct rte_vmbus_device, device); eth_dev->dev_ops = &hn_eth_dev_ops; + eth_dev->rx_queue_count = hn_dev_rx_queue_count; + eth_dev->rx_descriptor_status = hn_dev_rx_queue_status; + eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status; eth_dev->tx_pkt_burst = &hn_xmit_pkts; eth_dev->rx_pkt_burst = &hn_recv_pkts;
drivers/net/nfp/nfp_net.c +1 -1
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = { .rss_hash_conf_get = nfp_net_rss_hash_conf_get, .rx_queue_setup = nfp_net_rx_queue_setup, .rx_queue_release = nfp_net_rx_queue_release, - .rx_queue_count = nfp_net_rx_queue_count, .tx_queue_setup = nfp_net_tx_queue_setup, .tx_queue_release = nfp_net_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &nfp_net_eth_dev_ops; + eth_dev->rx_queue_count = nfp_net_rx_queue_count; eth_dev->rx_pkt_burst = &nfp_net_recv_pkts; eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
drivers/net/octeontx2/otx2_ethdev.c +3 -3
@@ -2272,9 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { .txq_info_get = otx2_nix_txq_info_get, .rx_burst_mode_get = otx2_rx_burst_mode_get, .tx_burst_mode_get = otx2_tx_burst_mode_get, - .rx_queue_count = otx2_nix_rx_queue_count, - .rx_descriptor_status = otx2_nix_rx_descriptor_status, - .tx_descriptor_status = otx2_nix_tx_descriptor_status, .tx_done_cleanup = otx2_nix_tx_done_cleanup, .set_queue_rate_limit = otx2_nix_tm_set_queue_rate_limit, .pool_ops_supported = otx2_nix_pool_ops_supported,
@@ -2381,6 +2378,9 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)int rc, max_entries; eth_dev->dev_ops = &otx2_eth_dev_ops; + eth_dev->rx_queue_count = otx2_nix_rx_queue_count; + eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status; + eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {
drivers/net/qede/qede_ethdev.c +1 -2
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) } eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops; + eth_dev->rx_descriptor_status = qede_rx_descriptor_status; adapter->num_tx_queues =0 ; adapter->num_rx_queues =0 ;
drivers/net/sfc/sfc_ethdev.c +6 -6
@@ -1804,9 +1804,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .tx_queue_stop = sfc_tx_queue_stop, .rx_queue_setup = sfc_rx_queue_setup, .rx_queue_release = sfc_rx_queue_release, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .rx_queue_intr_enable = sfc_rx_queue_intr_enable, .rx_queue_intr_disable = sfc_rx_queue_intr_disable, .tx_queue_setup = sfc_tx_queue_setup,
@@ -1962,6 +1959,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) dev->tx_pkt_burst = dp_tx->pkt_burst; dev->dev_ops = &sfc_eth_dev_ops; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status;return 0 ;
@@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query, .rss_hash_conf_get = sfc_dev_rss_hash_conf_get, .rxq_info_get = sfc_rx_queue_info_get,
@@ -2069,6 +2066,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; dev->dev_ops = &sfc_eth_dev_secondary_ops; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status;return 0 ;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = { .tx_queue_stop = nicvf_dev_tx_queue_stop, .rx_queue_setup = nicvf_dev_rx_queue_setup, .rx_queue_release = nicvf_dev_rx_queue_release, - .rx_queue_count = nicvf_dev_rx_queue_count, .tx_queue_setup = nicvf_dev_tx_queue_setup, .tx_queue_release = nicvf_dev_tx_queue_release, .dev_set_link_up = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &nicvf_eth_dev_ops; + eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = { .rx_queue_release = eth_queue_release, .tx_queue_release = eth_queue_release, .tx_done_cleanup = eth_tx_done_cleanup, - .rx_queue_count = eth_rx_queue_count, .link_update = eth_link_update, .stats_get = eth_stats_get, .stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, data->all_multicast =1 ; eth_dev->dev_ops = &ops; + eth_dev->rx_queue_count = eth_rx_queue_count;/* finally assign rx and tx ops */ eth_dev->rx_pkt_burst = eth_vhost_rx;
lib/librte_ethdev/rte_ethdev.h +6 -6
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -EINVAL ); dev = &rte_eth_devices[port_id]; -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_queue_count, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_queue_count, -ENOTSUP );if (queue_id >= dev->data->nb_rx_queues)return -EINVAL ; -return (int )(*dev->dev_ops->rx_queue_count)(dev, queue_id); +return (int )(*dev->rx_queue_count)(dev, queue_id); }#define RTE_ETH_RX_DESC_AVAIL 0/**< Desc available for hw. */
@@ -4604,10 +4604,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,if (queue_id >= dev->data->nb_rx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_descriptor_status, -ENOTSUP ); rxq = dev->data->rx_queues[queue_id]; -return (*dev->dev_ops->rx_descriptor_status)(rxq, offset); +return (*dev->rx_descriptor_status)(rxq, offset); }#define RTE_ETH_TX_DESC_FULL 0/**< Desc filled for hw, waiting xmit. */
@@ -4661,10 +4661,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,if (queue_id >= dev->data->nb_tx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->tx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->tx_descriptor_status, -ENOTSUP ); txq = dev->data->tx_queues[queue_id]; -return (*dev->dev_ops->tx_descriptor_status)(txq, offset); +return (*dev->tx_descriptor_status)(txq, offset); }/**
lib/librte_ethdev/rte_ethdev_core.h +5 -6
@@ -657,12 +657,6 @@ struct eth_dev_ops {eth_queue_stop_t tx_queue_stop;/**< Stop TX for a queue. */ eth_rx_queue_setup_t rx_queue_setup;/**< Set up device RX queue. */ eth_queue_release_t rx_queue_release;/**< Release RX queue. */ -eth_rx_queue_count_t rx_queue_count; -/**< Get the number of used RX descriptors. */ -eth_rx_descriptor_status_t rx_descriptor_status; -/**< Check the status of a Rx descriptor. */ -eth_tx_descriptor_status_t tx_descriptor_status; -/**< Check the status of a Tx descriptor. */ /* * Static inline functions use functions ABOVE this comment. * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -778,6 +772,11 @@ struct rte_eth_dev {eth_rx_burst_t rx_pkt_burst;/**< Pointer to PMD receive function. */ eth_tx_burst_t tx_pkt_burst;/**< Pointer to PMD transmit function. */ eth_tx_prep_t tx_pkt_prepare;/**< Pointer to PMD transmit prepare function. */ + +eth_rx_queue_count_t rx_queue_count;/**< Get the number of used RX descriptors. */ +eth_rx_descriptor_status_t rx_descriptor_status;/**< Check the status of a Rx descriptor. */ +eth_tx_descriptor_status_t tx_descriptor_status;/**< Check the status of a Tx descriptor. */ +/** * Next two fields are per-device data but *data is shared between * primary and secondary processes and *process_private is per-process
Signature · 1 line
2.25.4
Re: [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations
Quoted 16 lines · Ferruh Yigit
This patch is a preparation to hide the 'struct
eth_dev_ops' from applications by moving some device operations from 'structeth_dev_ops' to 'structrte_eth_dev'.Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.
Exposing 'struct
eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.To be able to both keep APIs inline and hide the 'struct
eth_dev_ops', moving device operations used in ethdev inline APIs to 'structrte_eth_dev' to the same level with Rx/Tx burst functions.
Quoted 6 lines
The list of
dev_opsmoved:eth_rx_queue_count_trx_queue_count;eth_rx_descriptor_status_trx_descriptor_status;eth_tx_descriptor_status_ttx_descriptor_status;Signed-off-by Ferruh Yigit <[email protected]>
doc/guides/nics/features.rst should be updated since it says that status callbacks live in eth_dev_ops.
plus an net/sfc-related nit below:
[snip]
Quoted 4 lines
drivers/net/sfc/sfc_ethdev.c +0
-0
[snip]
drivers/net/sfc/sfc_ethdev.c sfc_eth_dev_set_ops(struct rte_eth_dev *dev) · line 1964
Quoted 7 lines
drivers/net/sfc/sfc_ethdev.c +3
-0@@ -1962,6 +1959,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) dev->tx_pkt_burst = dp_tx->pkt_burst; dev->dev_ops = &sfc_eth_dev_ops; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status;
May I ask to put it just after dev->tx_pkt_burst = ... line since these callbacks go before dev_ops in the structure.
Quoted 14 lines
drivers/net/sfc/sfc_ethdev.c +0
-3return 0 ;@@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query, .rss_hash_conf_get = sfc_dev_rss_hash_conf_get, .rxq_info_get = sfc_rx_queue_info_get,
drivers/net/sfc/sfc_ethdev.c sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) · line 2071
Quoted 6 lines
drivers/net/sfc/sfc_ethdev.c +3
-0@@ -2069,6 +2066,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; dev->dev_ops = &sfc_eth_dev_secondary_ops; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status;
Same here.
[snip]
Re: [dpdk-dev] [PATCH 2/7] ethdev: move inline device operations
Quoted 22 lines · Andrew Rybchenko
Quoted 21 lines · Ferruh Yigit
This patch is a preparation to hide the 'struct
eth_dev_ops' from applications by moving some device operations from 'structeth_dev_ops' to 'structrte_eth_dev'.Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.
Exposing 'struct
eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.To be able to both keep APIs inline and hide the 'struct
eth_dev_ops', moving device operations used in ethdev inline APIs to 'structrte_eth_dev' to the same level with Rx/Tx burst functions.The list of
dev_opsmoved:eth_rx_queue_count_trx_queue_count;eth_rx_descriptor_status_trx_descriptor_status;eth_tx_descriptor_status_ttx_descriptor_status;
Quoted 7 lines
Quoted 1 line
Signed-off-by Ferruh Yigit <[email protected]>Reviewed-by Andrew Rybchenko <[email protected]>
doc/guides/nics/features.rstshould be updated since it says that status callbacks live ineth_dev_ops.
Yep, I will fix in v2, thanks for review.
Quoted 14 lines
plus an
net/sfc-relatednit below:[snip]
Quoted 4 lines
drivers/net/sfc/sfc_ethdev.c +0
-0[snip]
Quoted 3 lines
drivers/net/sfc/sfc_ethdev.c +0
-0@@ -1962,6 +1959,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) dev->tx_pkt_burst = dp_tx->pkt_burst;
Quoted 8 lines
drivers/net/sfc/sfc_ethdev.c sfc_eth_dev_set_ops(struct rte_eth_dev *dev) · line 1964
Quoted 4 lines
drivers/net/sfc/sfc_ethdev.c +3
-0dev->dev_ops = &sfc_eth_dev_ops; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status;May I ask to put it just after
dev->tx_pkt_burst= ... line since these callbacks go beforedev_opsin the structure.
ok
Quoted 14 lines
Quoted 14 lines
drivers/net/sfc/sfc_ethdev.c +0
-3return 0 ;@@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query, .rss_hash_conf_get = sfc_dev_rss_hash_conf_get, .rxq_info_get = sfc_rx_queue_info_get,@@ -2069,6 +2066,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main)
Quoted 9 lines
drivers/net/sfc/sfc_ethdev.c sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) · line 2071
Quoted 6 lines
drivers/net/sfc/sfc_ethdev.c +3
-0dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; dev->dev_ops = &sfc_eth_dev_secondary_ops; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status;Same here.
ok
PATCH 3/7 ethdev: make device operations struct private
In reply to Ferruh YigitHiding the 'struct eth_dev_ops' from applications.
Removing relevant deprecation notice.
--- doc/guides/rel_notes/deprecation.rst | 9 - drivers/net/i40e/i40e_vf_representor.c | 1 + drivers/net/ixgbe/ixgbe_vf_representor.c | 1 + lib/librte_ethdev/rte_ethdev_core.h | 708 +---------------------- lib/librte_ethdev/rte_ethdev_driver.h | 694 ++++++++++++++++++++++ lib/librte_ethdev/rte_flow_driver.h | 1 + lib/librte_ethdev/rte_mtr_driver.h | 1 + lib/librte_ethdev/rte_tm_driver.h | 1 + 8 files changed, 706 insertions(+), 710 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -9
@@ -163,15 +163,6 @@ Deprecation Notices Due to adoption of C11 atomic builtins, the field ``refcnt_atomic`` will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11. -* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible - will be done in 20.11. - Currently the ``struct eth_dev_ops`` struct is accessible by the application - because some inline functions, like ``rte_eth_tx_descriptor_status()``, - access the struct directly. - The struct will be separate in two, the ops used by inline functions will be - moved next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct - will be moved to header file for drivers to hide it from applications. - * ethdev: the legacy filter API, including ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
drivers/net/i40e/i40e_vf_representor.c +1 -0
@@ -7,6 +7,7 @@#include <rte_pci.h> #include <rte_malloc.h> +#include "rte_ethdev_driver.h" #include "base/i40e_type.h" #include "base/virtchnl.h" #include "i40e_ethdev.h"
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -0
@@ -6,6 +6,7 @@#include <rte_pci.h> #include <rte_malloc.h> +#include "rte_ethdev_driver.h" #include "base/ixgbe_type.h" #include "base/ixgbe_vf.h" #include "ixgbe_ethdev.h"
lib/librte_ethdev/rte_ethdev_core.h +7 -701
726 lines not on this page · raw message
lib/librte_ethdev/rte_ethdev_driver.h +694 -0
700 lines not on this page · raw message
lib/librte_ethdev/rte_flow_driver.h +1 -0
@@ -18,6 +18,7 @@#include <stdint.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_flow.h" #ifdef __cplusplus
lib/librte_ethdev/rte_mtr_driver.h +1 -0
@@ -18,6 +18,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_mtr.h" #ifdef __cplusplus
lib/librte_ethdev/rte_tm_driver.h +1 -0
@@ -18,6 +18,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_tm.h" #ifdef __cplusplus
Signature · 1 line
2.25.4
Re: [dpdk-dev] [PATCH 3/7] ethdev: make device operations struct private
Quoted 5 lines · Ferruh Yigit
Hiding the 'struct
eth_dev_ops' from applications.Removing relevant deprecation notice.
Signed-off-by Ferruh Yigit <[email protected]>
PATCH 4/7 ethdev: mark internal functions
In reply to Ferruh YigitSome ethdev functions are for drivers only, not for applications.
Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.
Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.
--- doc/guides/rel_notes/deprecation.rst | 6 ----- lib/librte_ethdev/rte_ethdev.h | 3 +-- lib/librte_ethdev/rte_ethdev_driver.h | 33 ++++++++++-------------- lib/librte_ethdev/rte_ethdev_version.map | 30 ++++++++++----------- lib/librte_ethdev/rte_flow_driver.h | 4 +-- 5 files changed, 29 insertions(+), 47 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -6
@@ -227,12 +227,6 @@ Deprecation Notices following the IPv6 header, as proposed in RFC https://mails.dpdk.org/archives/dev/2020-August/177257.html. -* ethdev: Some internal APIs for driver usage are exported in the .map file. - Now DPDK has ``__rte_internal`` marker so we can mark internal APIs and move - them to the INTERNAL block in .map. Although these APIs are internal it will - break the ABI checks, that is why change is planned for 20.11. - The list of internal APIs are mainly ones listed in ``rte_ethdev_driver.h``. - * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made ABI stable in the v19.11 release. The TM maintainer and other contributors have agreed to keep the TM APIs as experimental in expectation of additional spec
lib/librte_ethdev/rte_ethdev.h +1 -2
@@ -1723,8 +1723,7 @@ rte_eth_find_next_of(uint16_t port_id_start,*/ __rte_experimental uint16_t -rte_eth_find_next_sibling (uint16_t port_id_start, -uint16_t ref_port_id); +rte_eth_find_next_sibling (uint16_t port_id_start,uint16_t ref_port_id);/** * Macro to iterate over all ethdev ports sharing the same rte_device
lib/librte_ethdev/rte_ethdev_driver.h +13 -20
@@ -759,6 +759,7 @@ int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);* @return * - The pointer to the ethdev slot, on success. NULL on error */ +__rte_internal struct rte_eth_dev *rte_eth_dev_allocated(const char *name);/**
@@ -770,6 +771,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name);* @return * - Slot in the rte_dev_devices array for a new device; */ +__rte_internal struct rte_eth_dev *rte_eth_dev_allocate(const char *name);/**
@@ -783,6 +785,7 @@ struct rte_eth_dev *rte_eth_dev_allocate(const char *name);* device. * - Error: Null pointer. */ +__rte_internal struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);/**
@@ -801,6 +804,7 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);* @return * - 0 on success, negative on error */ +__rte_internal int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);/**
@@ -814,6 +818,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* @return * void */ +__rte_internal void _rte_eth_dev_reset(struct rte_eth_dev *dev);/**
@@ -833,6 +838,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* @return * int */ +__rte_internal int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);
@@ -848,6 +854,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,* @param dev * New ethdev port. */ +__rte_internal void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);/**
@@ -869,6 +876,7 @@ void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);* @param socket_id * The *socket_id* argument is the socket identifier in case of NUMA. */ +__rte_internal const struct rte_memzone * rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, uint16_t queue_id, size_t size,
@@ -955,9 +963,6 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev, }/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Allocate an unique switch domain identifier. * * A pool of switch domain identifiers which can be allocated on request. This
@@ -971,14 +976,11 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_switch_domain_alloc (uint16_t *domain_id);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Free switch domain. * * Return a switch domain identifier to the pool of free identifiers after it is
@@ -990,7 +992,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id);* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_switch_domain_free (uint16_t domain_id);
@@ -1007,9 +1009,6 @@ struct rte_eth_devargs { };/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function to parse ethdev arguments * * @param devargs
@@ -1020,7 +1019,7 @@ struct rte_eth_devargs {* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_devargs_parse (const char *devargs,struct rte_eth_devargs *eth_devargs);
@@ -1030,9 +1029,6 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev, void *bus_specific_init_params);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function for the creation of a new ethdev ports. * * @param device
@@ -1053,7 +1049,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal int rte_eth_dev_create(struct rte_device *device, const char *name, size_t priv_data_size,
@@ -1064,9 +1060,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,typedef int (*ethdev_uninit_t )(struct rte_eth_dev *ethdev);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function for cleaning up the resources of a ethdev port on it's * destruction. *
@@ -1078,7 +1071,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_dev_destroy (struct rte_eth_dev *ethdev,ethdev_uninit_t ethdev_uninit);
lib/librte_ethdev/rte_ethdev_version.map +14 -16
@@ -1,8 +1,6 @@ DPDK_21 { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_add_first_rx_callback; rte_eth_add_rx_callback; rte_eth_add_tx_callback;
@@ -10,9 +8,6 @@ DPDK_21 { rte_eth_allmulticast_enable; rte_eth_allmulticast_get; rte_eth_dev_adjust_nb_rx_tx_desc; - rte_eth_dev_allocate; - rte_eth_dev_allocated; - rte_eth_dev_attach_secondary; rte_eth_dev_callback_register; rte_eth_dev_callback_unregister; rte_eth_dev_close;
@@ -44,8 +39,6 @@ DPDK_21 { rte_eth_dev_mac_addr_remove; rte_eth_dev_pool_ops_supported; rte_eth_dev_priority_flow_ctrl_set; - rte_eth_dev_probing_finish; - rte_eth_dev_release_port; rte_eth_dev_reset; rte_eth_dev_rss_hash_conf_get; rte_eth_dev_rss_hash_update;
@@ -81,7 +74,6 @@ DPDK_21 { rte_eth_dev_udp_tunnel_port_delete; rte_eth_dev_vlan_filter; rte_eth_devices; - rte_eth_dma_zone_reserve; rte_eth_find_next; rte_eth_find_next_owned_by; rte_eth_iterator_cleanup;
@@ -195,16 +187,8 @@ EXPERIMENTAL { rte_eth_dev_owner_unset; # added in 18.05 - rte_eth_dev_create; - rte_eth_dev_destroy; rte_eth_dev_get_module_eeprom; rte_eth_dev_get_module_info; - rte_eth_devargs_parse; - rte_eth_switch_domain_alloc; - rte_eth_switch_domain_free; - - # added in 18.08 - rte_flow_expand_rss; # added in 18.11 rte_eth_dev_rx_intr_ctl_q_get_fd;
@@ -246,5 +230,19 @@ EXPERIMENTAL { INTERNAL { global: + _rte_eth_dev_callback_process; + _rte_eth_dev_reset; + rte_eth_dev_allocate; + rte_eth_dev_allocated; + rte_eth_dev_attach_secondary; + rte_eth_dev_create; + rte_eth_dev_destroy; + rte_eth_dev_probing_finish; + rte_eth_dev_release_port; + rte_eth_devargs_parse; rte_eth_dma_zone_free; + rte_eth_dma_zone_reserve; + rte_eth_switch_domain_alloc; + rte_eth_switch_domain_free; + rte_flow_expand_rss; };
lib/librte_ethdev/rte_flow_driver.h +1 -3
@@ -161,8 +161,6 @@ struct rte_flow_expand_rss {* Expand RSS flows into several possible flows according to the RSS hash * fields requested and the driver capabilities. * -* @b EXPERIMENTAL: this API may change without prior notice -* * @param[out] buf * Buffer to store the result expansion. * @param[in] size
@@ -183,7 +181,7 @@ struct rte_flow_expand_rss {* * -E2BIG: graph-depth @p graph is too deep. */ -__rte_experimental +__rte_internal int rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size, const struct rte_flow_item *pattern, uint64_t types,
Signature · 1 line
2.25.4
Re: [dpdk-dev] [PATCH 4/7] ethdev: mark internal functions
Quoted 7 lines · Ferruh Yigit
Some ethdev functions are for drivers only, not for applications.
Since we have '
__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.
Quoted 5 lines
Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.
Signed-off-by Ferruh Yigit <[email protected]>
with a nit below
[snip]
lib/librte_ethdev/rte_ethdev.h rte_eth_find_next_of(uint16_t port_id_start, · line 1726
Quoted 11 lines
lib/librte_ethdev/rte_ethdev.h +1
-2@@ -1723,8 +1723,7 @@ rte_eth_find_next_of(uint16_t port_id_start,*/ __rte_experimental uint16_t -rte_eth_find_next_sibling (uint16_t port_id_start, -uint16_t ref_port_id); +rte_eth_find_next_sibling (uint16_t port_id_start,uint16_t ref_port_id);
Looks unrelated
[snip]
PATCH 5/7 ethdev: use hairpin helper functions
In reply to Ferruh YigitHairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'
Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.
--- drivers/net/mlx5/mlx5_rxq.c | 4 ++-- drivers/net/mlx5/mlx5_txq.c | 4 ++-- lib/librte_ethdev/rte_ethdev_driver.h | 2 ++ lib/librte_ethdev/rte_ethdev_version.map | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +2 -2
@@ -542,7 +542,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;int ret; -if (dev->data->rx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_rx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be stopped" ); rte_errno =EINVAL ;return -EINVAL ;
@@ -653,7 +653,7 @@ mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->rx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_rx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be started" ); rte_errno =EINVAL ;return -EINVAL ;
drivers/net/mlx5/mlx5_txq.c +2 -2
@@ -244,7 +244,7 @@ mlx5_tx_queue_stop(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->tx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_tx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be stopped" ); rte_errno =EINVAL ;return -EINVAL ;
@@ -371,7 +371,7 @@ mlx5_tx_queue_start(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->tx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_tx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be started" ); rte_errno =EINVAL ;return -EINVAL ;
lib/librte_ethdev/rte_ethdev_driver.h +2 -0
@@ -734,6 +734,7 @@ struct eth_dev_ops {* @return * - (1) if the queue is hairpin queue, 0 otherwise. */ +__rte_internal int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);/**
@@ -748,6 +749,7 @@ int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);* @return * - (1) if the queue is hairpin queue, 0 otherwise. */ +__rte_internal int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);/**
lib/librte_ethdev/rte_ethdev_version.map +2 -0
@@ -237,6 +237,8 @@ INTERNAL { rte_eth_dev_attach_secondary; rte_eth_dev_create; rte_eth_dev_destroy; + rte_eth_dev_is_rx_hairpin_queue; + rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; rte_eth_devargs_parse;
Signature · 1 line
2.25.4
Re: [dpdk-dev] [PATCH 5/7] ethdev: use hairpin helper functions
Quoted 9 lines · Ferruh Yigit
Hairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.
Signed-off-by Ferruh Yigit <[email protected]>
PATCH 6/7 ethdev: remove invalid symbols from map file
In reply to Ferruh YigitThese are sturct type names, not object names. Removing them from .map file.
--- lib/librte_ethdev/rte_ethdev_version.map | 2 -- 1 file changed, 2 deletions(-)
lib/librte_ethdev/rte_ethdev_version.map +0 -2
@@ -81,7 +81,6 @@ DPDK_21 { rte_eth_iterator_next; rte_eth_led_off; rte_eth_led_on; - rte_eth_link; rte_eth_link_get; rte_eth_link_get_nowait; rte_eth_macaddr_get;
@@ -96,7 +95,6 @@ DPDK_21 { rte_eth_rx_queue_setup; rte_eth_set_queue_rate_limit; rte_eth_speed_bitflag; - rte_eth_stats; rte_eth_stats_get; rte_eth_stats_reset; rte_eth_timesync_adjust_time;
Signature · 1 line
2.25.4
Re: [dpdk-dev] [PATCH 6/7] ethdev: remove invalid symbols from map file
Quoted 7 lines · Ferruh Yigit
These are sturct type names, not object names. Removing them from .map file.
Fixes 9d41beed24b0 ("lib: provide initial versioning")Signed-off-by Ferruh Yigit <[email protected]>
PATCH 7/7 ethdev: remove underscore prefix from internal API
In reply to Ferruh Yigit'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.
For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.
--- app/test/virtual_pmd.c | 4 ++-- doc/guides/prog_guide/poll_mode_drv.rst | 4 ++-- drivers/net/atlantic/atl_ethdev.c | 5 ++--- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/bnxt/rte_pmd_bnxt.c | 4 ++-- drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++---- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 3 +-- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 7 +++---- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enic/enic_main.c | 2 +- drivers/net/failsafe/failsafe_ether.c | 6 +++--- drivers/net/fm10k/fm10k_ethdev.c | 11 ++++------- drivers/net/hinic/base/hinic_pmd_hwdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 5 ++--- drivers/net/ice/ice_ethdev.c | 4 ++-- drivers/net/igc/igc_ethdev.c | 3 +-- drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++------ drivers/net/ixgbe/ixgbe_pf.c | 5 ++--- drivers/net/mlx4/mlx4_intr.c | 10 +++++----- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++-- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx/octeontx_ethdev.c | 6 +++--- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/qede/qede_main.c | 3 +-- drivers/net/sfc/sfc_intr.c | 12 ++++++------ drivers/net/thunderx/nicvf_ethdev.c | 6 +++--- drivers/net/vhost/rte_eth_vhost.c | 6 +++--- drivers/net/virtio/virtio_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.c | 8 ++++---- lib/librte_ethdev/rte_ethdev_driver.h | 4 ++-- lib/librte_ethdev/rte_ethdev_version.map | 4 ++-- 39 files changed, 90 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id, vrtl_eth_dev->data->dev_link.link_status = link_status; -_rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , +NULL ); }int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread. For example when PF is reset, the PF sends a message to notify VFs of this event and also trigger an interrupt to VFs. Then in the interrupt service routine the VFs detects this notification message and calls -_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). +rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET -event within VFs. The function _rte_eth_dev_callback_process() will +event within VFs. The function rte_eth_dev_callback_process() will call the registered callback function. The callback function can trigger the application to handle all operations the VF reset requires including stopping Rx/Tx queues and calling rte_eth_dev_reset().
drivers/net/atlantic/atl_ethdev.c +2 -3
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,/* Notify userapp if link status changed */ if (!atl_dev_link_update (dev,0 )) {atl_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }else {if (hw->aq_fw_ops->send_macsec_req ==NULL ) goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev, resp.stats.egress_expired || resp.stats.ingress_expired) {PMD_DRV_LOG (INFO ,"RTE_ETH_EVENT_MACSEC" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); } }
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -1515,9 +1515,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete, new.link_speed != eth_dev->data->dev_link.link_speed) {rte_eth_linkstatus_set (eth_dev, &new); -_rte_eth_dev_callback_process (eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );bnxt_print_link_info (eth_dev); }
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg) ret_param.vf_id = vf_id; ret_param.msg = msg; -_rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , + &ret_param);/* Default to approve */ if (ret_param.retval ==RTE_PMD_BNXT_MB_EVENT_PROCEED )
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals, internals->slave_count--;/* force reconfiguration of slave interfaces */ -_rte_eth_dev_reset (slave_eth_dev); +rte_eth_dev_internal_reset (slave_eth_dev); } static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)if (arg ==NULL )return ; -_rte_eth_dev_callback_process ((struct rte_eth_dev *)arg, +rte_eth_dev_callback_process ((struct rte_eth_dev *)arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL );
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
drivers/net/dpaa/dpaa_ethdev.c +1 -1
@@ -323,7 +323,7 @@ static void dpaa_interrupt_handler(void *param)if (bytes_read <0 )DPAA_PMD_ERR ("Error reading eventfd\n" );dpaa_eth_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int dpaa_eth_dev_start (struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param) clear =DPNI_IRQ_EVENT_LINK_CHANGED ;dpaa2_dev_link_update (dev,0 );/* calling all the apps registered for link status event */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } out: ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
@@ -1629,7 +1629,7 @@ eth_em_interrupt_handler(void *param)eth_em_interrupt_get_status (dev);eth_em_interrupt_action (dev, dev->intr_handle); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
drivers/net/e1000/igb_ethdev.c +3 -4
@@ -2918,8 +2918,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev, pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }return 0 ;
@@ -2981,8 +2980,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (mbx->ops.read (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }
drivers/net/ena/ena_ethdev.c +2 -2
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,if (unlikely (adapter->trigger_reset)) {PMD_DRV_LOG (ERR ,"Trigger reset is on\n" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL ); } }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data, adapter->link_status = status;ena_link_update (eth_dev,0 ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)vnic_intr_return_all_credits (&enic->intr[ENICPMD_LSC_INTR_OFFSET ]);enic_link_update (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );enic_log_q_error (enic);/* Re-enable irq in case of INTx */ rte_intr_ack (&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused, ret = dev->dev_ops->link_update (dev,0 );/* We must pass on the LSC event */ if (ret) -return _rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +return rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );else return 0 ; }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param) true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)if (err ==FM10K_ERR_RESET_REQUESTED ) {PMD_INIT_LOG (INFO ,"INT: Switch is down" ); dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)/* Setting reset flag */ dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)fm10k_vlan_filter_set (dev, hw->mac.default_vid, true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev, ret =hinic_link_event_process (hwdev, rte_dev, status);/* check if link has changed, notify callback */ if (ret ==0 ) -_rte_eth_dev_callback_process (rte_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (rte_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
@@ -6842,7 +6842,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)case i40e_aqc_opc_get_link_status: ret =i40e_dev_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
@@ -1377,8 +1377,8 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_LINK_CHANGE event" );
drivers/net/i40e/i40e_pf.c +1 -1
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,* do nothing and send not_supported to VF. As PF must send a response * to VF and ACK/NACK is not defined. */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);if (ret_param.retval !=RTE_PMD_I40E_MB_EVENT_PROCEED ) {PMD_DRV_LOG (WARNING ,"VF to PF message(%d) is not permitted!" , opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
@@ -183,7 +183,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :
@@ -198,8 +198,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, vf->link_speed =iavf_convert_link_speed (speed); }iavf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_PF_DRIVER_CLOSE event" );
drivers/net/ice/ice_ethdev.c +2 -2
@@ -1295,7 +1295,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)case ice_aqc_opc_get_link_status: ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :
@@ -1360,7 +1360,7 @@ ice_interrupt_handler(void *param)PMD_DRV_LOG (INFO ,"OICR: link state change event" ); ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev, RTE_ETH_EVENT_INTR_LSC, NULL); }#endif
drivers/net/igc/igc_ethdev.c +1 -2
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev) pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } }
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
@@ -4661,13 +4661,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)ixgbe_dev_link_update (dev,0 ); intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE ;ixgbe_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }if (intr->flags &IXGBE_FLAG_MACSEC ) { -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); intr->flags &= ~IXGBE_FLAG_MACSEC ; }
@@ -8676,8 +8674,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (ixgbe_read_mbx (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }
drivers/net/ixgbe/ixgbe_pf.c +2 -3
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf) vfinfo[vf].clear_to_send = true;/* notify application about VF reset */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);return ret; }
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)* if 0, do nothing and send ACK to VF * if ret_param.retval > 1, do nothing and send NAK to VF */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); retval = ret_param.retval;
drivers/net/mlx4/mlx4_intr.c +5 -5
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)MLX4_ASSERT (priv->intr_alarm ==1 ); priv->intr_alarm =0 ;if (intr_conf->lsc && !mlx4_link_status_check (priv)) -_rte_eth_dev_callback_process (ETH_DEV (priv), -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv) }for (i =0 ; i !=RTE_DIM (caught); ++i)if (caught[i]) -_rte_eth_dev_callback_process (ETH_DEV (priv), type[i], -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), type[i], +NULL ); }/**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh) dev = &rte_eth_devices[sh->port[i].ih_port_id];MLX5_ASSERT (dev);if (dev->data->dev_conf.intr_conf.rmv) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RMV ,NULL ); } }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)usleep (0 );continue ; } -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );continue ; }
drivers/net/mlx5/mlx5_flow.c +1 -1
@@ -6078,7 +6078,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,if (!MLX5_AGE_GET (age_info,MLX5_AGE_EVENT_NEW ))continue ;if (MLX5_AGE_GET (age_info,MLX5_AGE_TRIGGER )) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (&rte_eth_devices[sh->port[i].devx_ih_port_id],RTE_ETH_EVENT_FLOW_AGED ,NULL ); age_info->flags =0 ;
drivers/net/netvsc/hn_rndis.c +1 -1
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,*/ static void hn_rndis_link_alarm (void *arg) { -_rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }void hn_rndis_link_status (struct rte_eth_dev *dev,const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)struct rte_eth_dev *dev = (struct rte_eth_dev *)param;nfp_net_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );nfp_net_dev_link_status_print (dev);
drivers/net/octeontx/octeontx_ethdev.c +3 -3
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)octeontx_link_status_update (nic, &link);octeontx_link_status_print (dev, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/octeontx2/otx2_link.c +1 -1
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,rte_eth_linkstatus_set (eth_dev, ð_link);/* Set the flag and execute application callbacks */ -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
drivers/net/qede/qede_main.c +1 -2
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;if (!qede_link_update (dev,0 )) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int qed_drain (struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)sfc_notice (sa,"link status change event: link %s" , sa->eth_dev->data->dev_link.link_status ?"UP" :"DOWN" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg) exit:if (lsc_seq != sa->port.lsc_seq) {sfc_notice (sa,"link status change event" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/thunderx/nicvf_ethdev.c +3 -3
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)nicvf_link_status_update (nic, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/vhost/rte_eth_vhost.c +3 -3
@@ -832,7 +832,7 @@ new_device(int vid)VHOST_LOG (INFO ,"Vhost device %d created\n" , vid); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL );return 0 ; }
@@ -889,7 +889,7 @@ destroy_device(int vid)VHOST_LOG (INFO ,"Vhost device %d destroyed\n" , vid);eth_vhost_uninstall_intr (eth_dev); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)VHOST_LOG (INFO ,"vring%u is %s\n" , vring, enable ?"enabled" :"disabled" ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL );return 0 ; }
drivers/net/virtio/virtio_ethdev.c +3 -3
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)if (isr &VIRTIO_PCI_ISR_CONFIG ) {if (virtio_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );if (vtpci_with_feature (hw,VIRTIO_NET_F_STATUS )) { vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)if (events &VMXNET3_ECR_LINK ) {PMD_DRV_LOG (DEBUG ,"Process events: VMXNET3_ECR_LINK event" );if (vmxnet3_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)rte_eth_dev_shared_data_prepare ();if (eth_dev->state !=RTE_ETH_DEV_UNUSED ) -_rte_eth_dev_callback_process (eth_dev, +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_DESTROY ,NULL );rte_spinlock_lock (&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, }void -_rte_eth_dev_reset (struct rte_eth_dev *dev) +rte_eth_dev_internal_reset (struct rte_eth_dev *dev) {if (dev->data->dev_started) { RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }int -_rte_eth_dev_callback_process (struct rte_eth_dev *dev, +rte_eth_dev_callback_process (struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param) {struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)if (dev ==NULL )return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); dev->state =RTE_ETH_DEV_ATTACHED ; }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* void */ __rte_internal -void _rte_eth_dev_reset(struct rte_eth_dev *dev); +void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);/** * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* int */ __rte_internal -int _rte_eth_dev_callback_process(struct rte_eth_dev *dev, +int rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);/**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
@@ -228,17 +228,17 @@ EXPERIMENTAL { INTERNAL { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_dev_allocate; rte_eth_dev_allocated; rte_eth_dev_attach_secondary; + rte_eth_dev_callback_process; rte_eth_dev_create; rte_eth_dev_destroy; rte_eth_dev_is_rx_hairpin_queue; rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; + rte_eth_dev_internal_reset; rte_eth_devargs_parse; rte_eth_dma_zone_free; rte_eth_dma_zone_reserve;
Signature · 1 line
2.25.4
Re: [dpdk-dev] [PATCH 7/7] ethdev: remove underscore prefix from internal API
Quoted 11 lines · Ferruh Yigit
'
_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.For '
_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.Signed-off-by Ferruh Yigit <[email protected]>
Quoted 10 lines · Ferruh Yigit
Removing '
rte_eth_rx_descriptor_done()' API and relevant 'rx_descriptor_done' function pointer from 'structeth_dev_ops'.Deprecation notice is to deprecate the API in 20.11 and remove one year later, this is useful to prevent new applications use the API but keep the support for old application. But since 20.11 have the ABI break and most of the applications need to re-compile anyway will prevent them to use the API, the affect will be same as removing the API. So removing it in the 20.11 to reduce the churn.
Quoted 3 lines
'
rx_descriptor_done' implementations removed from PMDs.Signed-off-by Ferruh Yigit <[email protected]>
Thanks for working on it.
PATCH v2 1/7 ethdev: remove legacy descriptor status check API
In reply to Ferruh YigitRemoving 'rte_eth_rx_descriptor_done()' API and relevant 'rx_descriptor_done' function pointer from 'struct eth_dev_ops'.
Deprecation notice is to deprecate the API in 20.11 and remove one year later, this is useful to prevent new applications use the API but keep the support for old application. But since 20.11 have the ABI break and most of the applications need to re-compile anyway will prevent them to use the API, the affect will be same as removing the API. So removing it in the 20.11 to reduce the churn.
'rx_descriptor_done' implementations removed from PMDs.
--- doc/guides/nics/features.rst | 6 +----- doc/guides/rel_notes/deprecation.rst | 5 ----- drivers/net/e1000/e1000_ethdev.h | 4 ---- drivers/net/e1000/em_ethdev.c | 1 - drivers/net/e1000/em_rxtx.c | 17 ---------------- drivers/net/e1000/igb_ethdev.c | 2 -- drivers/net/e1000/igb_rxtx.c | 17 ---------------- drivers/net/enic/enic_ethdev.c | 1 - drivers/net/fm10k/fm10k.h | 3 --- drivers/net/fm10k/fm10k_ethdev.c | 1 - drivers/net/fm10k/fm10k_rxtx.c | 25 ------------------------ drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev_vf.c | 1 - drivers/net/i40e/i40e_rxtx.c | 26 ------------------------- drivers/net/i40e/i40e_rxtx.h | 1 - drivers/net/igc/igc_ethdev.c | 1 - drivers/net/igc/igc_txrx.c | 18 ----------------- drivers/net/igc/igc_txrx.h | 2 -- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- drivers/net/ixgbe/ixgbe_ethdev.h | 2 -- drivers/net/ixgbe/ixgbe_rxtx.c | 18 ----------------- drivers/net/octeontx2/otx2_ethdev.c | 1 - drivers/net/octeontx2/otx2_ethdev.h | 1 - drivers/net/octeontx2/otx2_ethdev_ops.c | 12 ------------ drivers/net/sfc/sfc_ethdev.c | 17 ---------------- drivers/net/virtio/virtio_ethdev.c | 1 - drivers/net/virtio/virtio_ethdev.h | 2 -- drivers/net/virtio/virtio_rxtx.c | 9 --------- lib/librte_ethdev/rte_ethdev.h | 25 ------------------------ lib/librte_ethdev/rte_ethdev_core.h | 4 ---- 30 files changed, 1 insertion(+), 225 deletions(-)
doc/guides/nics/features.rst +1 -5
@@ -642,14 +642,10 @@ Rx descriptor status -------------------- Supports check the status of a Rx descriptor. When ``rx_descriptor_status`` is -used, status can be "Available", "Done" or "Unavailable". When -``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is -not set". +used, status can be "Available", "Done" or "Unavailable". * **[implements] eth_dev_ops**: ``rx_descriptor_status``. * **[related] API**: ``rte_eth_rx_descriptor_status()``. -* **[implements] eth_dev_ops**: ``rx_descriptor_done``. -* **[related] API**: ``rte_eth_rx_descriptor_done()``. .. _nic_features_tx_descriptor_status:
doc/guides/rel_notes/deprecation.rst +0 -5
@@ -220,11 +220,6 @@ Deprecation Notices for HW. This change is planned for 20.11. For more details: https://mails.dpdk.org/archives/dev/2020-July/176135.html. -* ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done`` - will be deprecated in 20.11 and will be removed in 21.11. - Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` - APIs can be used as replacement. - * ethdev: The port mirroring API can be replaced with a more fine grain flow API. The structs ``rte_eth_mirror_conf``, ``rte_eth_vlan_mirror`` and the functions ``rte_eth_mirror_rule_set``, ``rte_eth_mirror_rule_reset`` will be marked
drivers/net/e1000/e1000_ethdev.h +0 -4
@@ -384,8 +384,6 @@ int eth_igb_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,uint32_t eth_igb_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int eth_igb_rx_descriptor_done (void *rx_queue,uint16_t offset); -int eth_igb_rx_descriptor_status (void *rx_queue,uint16_t offset);int eth_igb_tx_descriptor_status (void *tx_queue,uint16_t offset);
@@ -461,8 +459,6 @@ int eth_em_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,uint32_t eth_em_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int eth_em_rx_descriptor_done (void *rx_queue,uint16_t offset); -int eth_em_rx_descriptor_status (void *rx_queue,uint16_t offset);int eth_em_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/e1000/em_ethdev.c +0 -1
@@ -177,7 +177,6 @@ static const struct eth_dev_ops eth_em_ops = { .rx_queue_setup = eth_em_rx_queue_setup, .rx_queue_release = eth_em_rx_queue_release, .rx_queue_count = eth_em_rx_queue_count, - .rx_descriptor_done = eth_em_rx_descriptor_done, .rx_descriptor_status = eth_em_rx_descriptor_status, .tx_descriptor_status = eth_em_tx_descriptor_status, .tx_queue_setup = eth_em_tx_queue_setup,
drivers/net/e1000/em_rxtx.c +0 -17
@@ -1511,23 +1511,6 @@ eth_em_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -eth_em_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile struct e1000_rx_desc *rxdp; -struct em_rx_queue *rxq = rx_queue; -uint32_t desc; - -if (unlikely (offset >= rxq->nb_rx_desc)) -return 0 ; - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; -return !!(rxdp->status &E1000_RXD_STAT_DD ); -} -int eth_em_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/e1000/igb_ethdev.c +0 -2
@@ -381,7 +381,6 @@ static const struct eth_dev_ops eth_igb_ops = { .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, .rx_queue_release = eth_igb_rx_queue_release, .rx_queue_count = eth_igb_rx_queue_count, - .rx_descriptor_done = eth_igb_rx_descriptor_done, .rx_descriptor_status = eth_igb_rx_descriptor_status, .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup,
@@ -441,7 +440,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, .rx_queue_setup = eth_igb_rx_queue_setup, .rx_queue_release = eth_igb_rx_queue_release, - .rx_descriptor_done = eth_igb_rx_descriptor_done, .rx_descriptor_status = eth_igb_rx_descriptor_status, .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup,
drivers/net/e1000/igb_rxtx.c +0 -17
@@ -1791,23 +1791,6 @@ eth_igb_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -eth_igb_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union e1000_adv_rx_desc *rxdp; -struct igb_rx_queue *rxq = rx_queue; -uint32_t desc; - -if (unlikely (offset >= rxq->nb_rx_desc)) -return 0 ; - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; -return !!(rxdp->wb.upper.status_error &E1000_RXD_STAT_DD ); -} -int eth_igb_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/enic/enic_ethdev.c +0 -1
@@ -1142,7 +1142,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .rx_queue_setup = enicpmd_dev_rx_queue_setup, .rx_queue_release = enicpmd_dev_rx_queue_release, .rx_queue_count = enicpmd_dev_rx_queue_count, - .rx_descriptor_done = NULL, .tx_queue_setup = enicpmd_dev_tx_queue_setup, .tx_queue_release = enicpmd_dev_tx_queue_release, .rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
drivers/net/fm10k/fm10k.h +0 -3
@@ -326,9 +326,6 @@ uint16_t fm10k_recv_scattered_pkts(void *rx_queue,uint32_t fm10k_dev_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int -fm10k_dev_rx_descriptor_done (void *rx_queue,uint16_t offset); -int fm10k_dev_rx_descriptor_status (void *rx_queue,uint16_t offset);
drivers/net/fm10k/fm10k_ethdev.c +0 -1
@@ -2856,7 +2856,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = { .tx_queue_setup = fm10k_tx_queue_setup, .tx_queue_release = fm10k_tx_queue_release, .rx_queue_count = fm10k_dev_rx_queue_count, - .rx_descriptor_done = fm10k_dev_rx_descriptor_done, .rx_descriptor_status = fm10k_dev_rx_descriptor_status, .tx_descriptor_status = fm10k_dev_tx_descriptor_status, .rx_queue_intr_enable = fm10k_dev_rx_queue_intr_enable,
drivers/net/fm10k/fm10k_rxtx.c +0 -25
@@ -393,31 +393,6 @@ fm10k_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -fm10k_dev_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union fm10k_rx_desc *rxdp; -struct fm10k_rx_queue *rxq = rx_queue; -uint16_t desc; -int ret; - -if (unlikely (offset >= rxq->nb_desc)) { -PMD_DRV_LOG (ERR ,"Invalid RX descriptor offset %u" , offset); -return 0 ; - } - - desc = rxq->next_dd + offset; -if (desc >= rxq->nb_desc) - desc -= rxq->nb_desc; - - rxdp = &rxq->hw_ring[desc]; - - ret = !!(rxdp->w.status & -rte_cpu_to_le_16 (FM10K_RXD_STATUS_DD )); - -return ret; -} -int fm10k_dev_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/i40e/i40e_ethdev.c +0 -1
@@ -475,7 +475,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .rx_queue_intr_disable = i40e_dev_rx_queue_intr_disable, .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_count = i40e_dev_rx_queue_count, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, .rx_descriptor_status = i40e_dev_rx_descriptor_status, .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup,
drivers/net/i40e/i40e_ethdev_vf.c +0 -1
@@ -199,7 +199,6 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = { .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, .rx_descriptor_status = i40e_dev_rx_descriptor_status, .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup,
drivers/net/i40e/i40e_rxtx.c +0 -26
@@ -2032,32 +2032,6 @@ i40e_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -i40e_dev_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union i40e_rx_desc *rxdp; -struct i40e_rx_queue *rxq = rx_queue; -uint16_t desc; -int ret; - -if (unlikely (offset >= rxq->nb_rx_desc)) { -PMD_DRV_LOG (ERR ,"Invalid RX descriptor id %u" , offset); -return 0 ; - } - - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &(rxq->rx_ring[desc]); - - ret = !!(((rte_le_to_cpu_64 (rxdp->wb.qword1.status_error_len) & -I40E_RXD_QW1_STATUS_MASK ) >>I40E_RXD_QW1_STATUS_SHIFT ) & - (1 <<I40E_RX_DESC_STATUS_DD_SHIFT )); - -return ret; -} -int i40e_dev_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/i40e/i40e_rxtx.h +0 -1
@@ -221,7 +221,6 @@ void i40e_rx_queue_release_mbufs(struct i40e_rx_queue *rxq);uint32_t i40e_dev_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int i40e_dev_rx_descriptor_done (void *rx_queue,uint16_t offset);int i40e_dev_rx_descriptor_status (void *rx_queue,uint16_t offset);int i40e_dev_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/igc/igc_ethdev.c +0 -1
@@ -273,7 +273,6 @@ static const struct eth_dev_ops eth_igc_ops = { .rx_queue_setup = eth_igc_rx_queue_setup, .rx_queue_release = eth_igc_rx_queue_release, .rx_queue_count = eth_igc_rx_queue_count, - .rx_descriptor_done = eth_igc_rx_descriptor_done, .rx_descriptor_status = eth_igc_rx_descriptor_status, .tx_descriptor_status = eth_igc_tx_descriptor_status, .tx_queue_setup = eth_igc_tx_queue_setup,
drivers/net/igc/igc_txrx.c +0 -18
@@ -756,24 +756,6 @@ uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev,return desc; } -int eth_igc_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union igc_adv_rx_desc *rxdp; -struct igc_rx_queue *rxq = rx_queue; -uint32_t desc; - -if (unlikely (!rxq || offset >= rxq->nb_rx_desc)) -return 0 ; - - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; -return !!(rxdp->wb.upper.status_error & -rte_cpu_to_le_32 (IGC_RXD_STAT_DD )); -} -int eth_igc_rx_descriptor_status (void *rx_queue,uint16_t offset) {struct igc_rx_queue *rxq = rx_queue;
drivers/net/igc/igc_txrx.h +0 -2
@@ -25,8 +25,6 @@ int eth_igc_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id,uint32_t eth_igc_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int eth_igc_rx_descriptor_done (void *rx_queue,uint16_t offset); -int eth_igc_rx_descriptor_status (void *rx_queue,uint16_t offset);int eth_igc_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/ixgbe/ixgbe_ethdev.c +0 -2
@@ -546,7 +546,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, .rx_queue_release = ixgbe_dev_rx_queue_release, .rx_queue_count = ixgbe_dev_rx_queue_count, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup,
@@ -622,7 +621,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .vlan_offload_set = ixgbevf_vlan_offload_set, .rx_queue_setup = ixgbe_dev_rx_queue_setup, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup,
drivers/net/ixgbe/ixgbe_ethdev.h +0 -2
@@ -602,8 +602,6 @@ int ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,uint32_t ixgbe_dev_rx_queue_count (struct rte_eth_dev *dev,uint16_t rx_queue_id); -int ixgbe_dev_rx_descriptor_done (void *rx_queue,uint16_t offset); -int ixgbe_dev_rx_descriptor_status (void *rx_queue,uint16_t offset);int ixgbe_dev_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/ixgbe/ixgbe_rxtx.c +0 -18
@@ -3216,24 +3216,6 @@ ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return desc; } -int -ixgbe_dev_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -volatile union ixgbe_adv_rx_desc *rxdp; -struct ixgbe_rx_queue *rxq = rx_queue; -uint32_t desc; - -if (unlikely (offset >= rxq->nb_rx_desc)) -return 0 ; - desc = rxq->rx_tail + offset; -if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; -return !!(rxdp->wb.upper.status_error & -rte_cpu_to_le_32 (IXGBE_RXDADV_STAT_DD )); -} -int ixgbe_dev_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/octeontx2/otx2_ethdev.c +0 -1
@@ -2273,7 +2273,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { .rx_burst_mode_get = otx2_rx_burst_mode_get, .tx_burst_mode_get = otx2_tx_burst_mode_get, .rx_queue_count = otx2_nix_rx_queue_count, - .rx_descriptor_done = otx2_nix_rx_descriptor_done, .rx_descriptor_status = otx2_nix_rx_descriptor_status, .tx_descriptor_status = otx2_nix_tx_descriptor_status, .tx_done_cleanup = otx2_nix_tx_done_cleanup,
drivers/net/octeontx2/otx2_ethdev.h +0 -1
@@ -412,7 +412,6 @@ int otx2_tx_burst_mode_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_burst_mode *mode);uint32_t otx2_nix_rx_queue_count (struct rte_eth_dev *eth_dev,uint16_t qidx);int otx2_nix_tx_done_cleanup (void *txq,uint32_t free_cnt); -int otx2_nix_rx_descriptor_done (void *rxq,uint16_t offset);int otx2_nix_rx_descriptor_status (void *rx_queue,uint16_t offset);int otx2_nix_tx_descriptor_status (void *tx_queue,uint16_t offset);
drivers/net/octeontx2/otx2_ethdev_ops.c +0 -12
@@ -371,18 +371,6 @@ nix_offset_has_packet(uint32_t head, uint32_t tail, uint16_t offset)return 0 ; } -int -otx2_nix_rx_descriptor_done (void *rx_queue,uint16_t offset) -{ -struct otx2_eth_rxq *rxq = rx_queue; -uint32_t head, tail; - -nix_rx_head_tail_get (otx2_eth_pmd_priv (rxq->eth_dev), - &head, &tail, rxq->rq); - -return nix_offset_has_packet (head, tail, offset); -} -int otx2_nix_rx_descriptor_status (void *rx_queue,uint16_t offset) {
drivers/net/sfc/sfc_ethdev.c +0 -17
@@ -1221,21 +1221,6 @@ sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)return sap->dp_rx->qdesc_npending (rxq_info->dp); } -/* -* The function is used by the secondary process as well. It must not -* use any process-local pointers from the adapter data. -*/ -static int -sfc_rx_descriptor_done (void *queue,uint16_t offset) -{ -struct sfc_dp_rxq *dp_rxq = queue; -const struct sfc_dp_rx *dp_rx; - - dp_rx =sfc_dp_rx_by_dp_rxq (dp_rxq); - -return offset < dp_rx->qdesc_npending (dp_rxq); -} -/* * The function is used by the secondary process as well. It must not * use any process-local pointers from the adapter data.
@@ -1820,7 +1805,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .rx_queue_setup = sfc_rx_queue_setup, .rx_queue_release = sfc_rx_queue_release, .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, .rx_descriptor_status = sfc_rx_descriptor_status, .tx_descriptor_status = sfc_tx_descriptor_status, .rx_queue_intr_enable = sfc_rx_queue_intr_enable,
@@ -2018,7 +2002,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, .rx_descriptor_status = sfc_rx_descriptor_status, .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query,
drivers/net/virtio/virtio_ethdev.c +0 -1
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = { .rx_queue_intr_enable = virtio_dev_rx_queue_intr_enable, .rx_queue_intr_disable = virtio_dev_rx_queue_intr_disable, .rx_queue_release = virtio_dev_queue_release, - .rx_descriptor_done = virtio_dev_rx_queue_done, .tx_queue_setup = virtio_dev_tx_queue_setup, .tx_queue_release = virtio_dev_queue_release,/* collect stats per queue */
drivers/net/virtio/virtio_ethdev.h +0 -2
@@ -60,8 +60,6 @@ void virtio_dev_cq_start(struct rte_eth_dev *dev);* RX/TX function prototypes */ -int virtio_dev_rx_queue_done (void *rxq,uint16_t offset); - int virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf,
drivers/net/virtio/virtio_rxtx.c +0 -9
@@ -39,15 +39,6 @@#define VIRTIO_DUMP_PACKET (m, len) do { } while (0)#endif -int -virtio_dev_rx_queue_done (void *rxq,uint16_t offset) -{ -struct virtnet_rx *rxvq = rxq; -struct virtqueue *vq = rxvq->vq; - -return virtqueue_nused (vq) >= offset; -} -void vq_ring_free_inorder (struct virtqueue *vq,uint16_t desc_idx,uint16_t num) {
lib/librte_ethdev/rte_ethdev.h +0 -25
@@ -4552,31 +4552,6 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)return (int )(*dev->dev_ops->rx_queue_count)(dev, queue_id); } -/** -* Check if the DD bit of the specific RX descriptor in the queue has been set -* -* @param port_id -* The port identifier of the Ethernet device. -* @param queue_id -* The queue id on the specific port. -* @param offset -* The offset of the descriptor ID from tail. -* @return -* - (1) if the specific DD bit is set. -* - (0) if the specific DD bit is not set. -* - (-ENODEV) if *port_id* invalid. -* - (-ENOTSUP) if the device does not support this function -*/ -static inline int -rte_eth_rx_descriptor_done (uint16_t port_id,uint16_t queue_id,uint16_t offset) -{ -struct rte_eth_dev *dev = &rte_eth_devices[port_id]; -RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_done, -ENOTSUP ); -return (*dev->dev_ops->rx_descriptor_done)( \ - dev->data->rx_queues[queue_id], offset); -} -#define RTE_ETH_RX_DESC_AVAIL 0/**< Desc available for hw. */ #define RTE_ETH_RX_DESC_DONE 1/**< Desc done, filled by hw. */ #define RTE_ETH_RX_DESC_UNAVAIL 2/**< Desc used by driver or hw. */
lib/librte_ethdev/rte_ethdev_core.h +0 -4
@@ -287,9 +287,6 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev, uint16_t rx_queue_id);/**< @internal Get number of used descriptors on a receive queue. */ -typedef int (*eth_rx_descriptor_done_t )(void *rxq,uint16_t offset); -/**< @internal Check DD bit of specific RX descriptor */ -typedef int (*eth_rx_descriptor_status_t )(void *rxq,uint16_t offset);/**< @internal Check the status of a Rx descriptor */
@@ -662,7 +659,6 @@ struct eth_dev_ops {eth_queue_release_t rx_queue_release;/**< Release RX queue. */ eth_rx_queue_count_t rx_queue_count;/**< Get the number of used RX descriptors. */ -eth_rx_descriptor_done_t rx_descriptor_done;/**< Check rxd DD bit. */ eth_rx_descriptor_status_t rx_descriptor_status;/**< Check the status of a Rx descriptor. */ eth_tx_descriptor_status_t tx_descriptor_status;
Signature · 1 line
2.25.4
PATCH v2 2/7 ethdev: move inline device operations
This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.
Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.
Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.
To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.
The list of dev_ops moved:eth_rx_queue_count_t rx_queue_count;eth_rx_descriptor_status_t rx_descriptor_status;eth_tx_descriptor_status_t tx_descriptor_status;
---
v2:
* Updated features.rst
* Tweak assignment order in sfc
--- doc/guides/nics/features.rst | 4 ++-- drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 9 +++++---- drivers/net/axgbe/axgbe_ethdev.c | 5 +++-- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 6 +++--- drivers/net/e1000/igb_ethdev.c | 10 +++++----- drivers/net/enic/enic_ethdev.c | 2 +- drivers/net/fm10k/fm10k_ethdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev_vf.c | 6 +++--- drivers/net/iavf/iavf_ethdev.c | 6 +++--- drivers/net/ice/ice_ethdev.c | 6 +++--- drivers/net/igc/igc_ethdev.c | 6 +++--- drivers/net/ixgbe/ixgbe_ethdev.c | 10 +++++----- drivers/net/mlx5/linux/mlx5_os.c | 12 +++++------- drivers/net/mlx5/mlx5_flow.c | 4 ++++ drivers/net/netvsc/hn_ethdev.c | 6 +++--- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 6 +++--- drivers/net/qede/qede_ethdev.c | 3 +-- drivers/net/sfc/sfc_ethdev.c | 12 ++++++------ drivers/net/thunderx/nicvf_ethdev.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 12 ++++++------ lib/librte_ethdev/rte_ethdev_core.h | 11 +++++------ 28 files changed, 84 insertions(+), 82 deletions(-)
doc/guides/nics/features.rst +2 -2
@@ -644,7 +644,7 @@ Rx descriptor status Supports check the status of a Rx descriptor. When ``rx_descriptor_status`` is used, status can be "Available", "Done" or "Unavailable". -* **[implements] eth_dev_ops**: ``rx_descriptor_status``. +* **[implements] rte_eth_dev**: ``rx_descriptor_status``. * **[related] API**: ``rte_eth_rx_descriptor_status()``.
@@ -656,7 +656,7 @@ Tx descriptor status Supports checking the status of a Tx descriptor. Status can be "Full", "Done" or "Unavailable." -* **[implements] eth_dev_ops**: ``tx_descriptor_status``. +* **[implements] rte_eth_dev**: ``tx_descriptor_status``. * **[related] API**: ``rte_eth_tx_descriptor_status()``.
drivers/net/ark/ark_ethdev.c +1 -1
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = { .dev_infos_get = eth_ark_dev_info_get, .rx_queue_setup = eth_ark_dev_rx_queue_setup, - .rx_queue_count = eth_ark_dev_rx_queue_count, .tx_queue_setup = eth_ark_tx_queue_setup, .link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)return -1 ; dev->dev_ops = &ark_eth_dev_ops; + dev->rx_queue_count = eth_ark_dev_rx_queue_count; dev->data->mac_addrs =rte_zmalloc ("ark" ,RTE_ETHER_ADDR_LEN ,0 );if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = { .rx_queue_intr_enable = atl_dev_rx_queue_intr_enable, .rx_queue_intr_disable = atl_dev_rx_queue_intr_disable, - .rx_queue_count = atl_rx_queue_count, - .rx_descriptor_status = atl_dev_rx_descriptor_status, - .tx_descriptor_status = atl_dev_tx_descriptor_status, -/* EEPROM */ .get_eeprom_length = atl_dev_get_eeprom_length, .get_eeprom = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &atl_eth_dev_ops; + + eth_dev->rx_queue_count = atl_rx_queue_count; + eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status; + eth_dev->rx_pkt_burst = &atl_recv_pkts; eth_dev->tx_pkt_burst = &atl_xmit_pkts; eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .rxq_info_get = axgbe_rxq_info_get, .txq_info_get = axgbe_txq_info_get, .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get, - .rx_descriptor_status = axgbe_dev_rx_descriptor_status, - .tx_descriptor_status = axgbe_dev_tx_descriptor_status, .mtu_set = axgb_mtu_set, };
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) eth_dev->dev_ops = &axgbe_eth_dev_ops; + eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status; +/* * For secondary processes, we don't initialise any further as primary * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -4246,9 +4246,6 @@ static const struct eth_dev_ops bnxt_dev_ops = { .dev_led_off = bnxt_dev_led_off_op, .xstats_get_by_id = bnxt_dev_xstats_get_by_id_op, .xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op, - .rx_queue_count = bnxt_rx_queue_count_op, - .rx_descriptor_status = bnxt_rx_descriptor_status_op, - .tx_descriptor_status = bnxt_tx_descriptor_status_op, .rx_queue_start = bnxt_rx_queue_start, .rx_queue_stop = bnxt_rx_queue_stop, .tx_queue_start = bnxt_tx_queue_start,
@@ -5681,6 +5678,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)PMD_DRV_LOG (INFO ,"%s\n" , bnxt_version); eth_dev->dev_ops = &bnxt_dev_ops; + eth_dev->rx_queue_count = bnxt_rx_queue_count_op; + eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op; + eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op; eth_dev->rx_pkt_burst = &bnxt_recv_pkts; eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
drivers/net/dpaa/dpaa_ethdev.c +1 -1
@@ -1303,7 +1303,6 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_setup = dpaa_eth_tx_queue_setup, .rx_queue_release = dpaa_eth_rx_queue_release, .tx_queue_release = dpaa_eth_tx_queue_release, - .rx_queue_count = dpaa_dev_rx_queue_count, .rx_burst_mode_get = dpaa_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa_dev_tx_burst_mode_get, .rxq_info_get = dpaa_rxq_info_get,
@@ -1766,6 +1765,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)/* Populate ethdev structure */ eth_dev->dev_ops = &dpaa_devops; + eth_dev->rx_queue_count = dpaa_dev_rx_queue_count; eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = { .tx_queue_release = dpaa2_dev_tx_queue_release, .rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get, - .rx_queue_count = dpaa2_dev_rx_queue_count, .flow_ctrl_get = dpaa2_flow_ctrl_get, .flow_ctrl_set = dpaa2_flow_ctrl_set, .mac_addr_add = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)* plugged. */ eth_dev->dev_ops = &dpaa2_ethdev_ops; + eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;if (dpaa2_get_devargs (dev->devargs,DRIVER_LOOPBACK_MODE )) eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx; else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +3 -3
@@ -176,9 +176,6 @@ static const struct eth_dev_ops eth_em_ops = { .vlan_offload_set = eth_em_vlan_offload_set, .rx_queue_setup = eth_em_rx_queue_setup, .rx_queue_release = eth_em_rx_queue_release, - .rx_queue_count = eth_em_rx_queue_count, - .rx_descriptor_status = eth_em_rx_descriptor_status, - .tx_descriptor_status = eth_em_tx_descriptor_status, .tx_queue_setup = eth_em_tx_queue_setup, .tx_queue_release = eth_em_tx_queue_release, .rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -249,6 +246,9 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)E1000_DEV_PRIVATE_TO_VFTA (eth_dev->data->dev_private); eth_dev->dev_ops = ð_em_ops; + eth_dev->rx_queue_count = eth_em_rx_queue_count; + eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status; eth_dev->rx_pkt_burst = (eth_rx_burst_t)ð_em_recv_pkts; eth_dev->tx_pkt_burst = (eth_tx_burst_t)ð_em_xmit_pkts; eth_dev->tx_pkt_prepare = (eth_tx_prep_t)ð_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +5 -5
@@ -380,9 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = { .rx_queue_intr_enable = eth_igb_rx_queue_intr_enable, .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, .rx_queue_release = eth_igb_rx_queue_release, - .rx_queue_count = eth_igb_rx_queue_count, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,
@@ -440,8 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, .rx_queue_setup = eth_igb_rx_queue_setup, .rx_queue_release = eth_igb_rx_queue_release, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,
@@ -752,6 +747,9 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)uint32_t ctrl_ext; eth_dev->dev_ops = ð_igb_ops; + eth_dev->rx_queue_count = eth_igb_rx_queue_count; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;
@@ -947,6 +945,8 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &igbvf_eth_dev_ops; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -1
@@ -1141,7 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .tx_queue_stop = enicpmd_dev_tx_queue_stop, .rx_queue_setup = enicpmd_dev_rx_queue_setup, .rx_queue_release = enicpmd_dev_rx_queue_release, - .rx_queue_count = enicpmd_dev_rx_queue_count, .tx_queue_setup = enicpmd_dev_tx_queue_setup, .tx_queue_release = enicpmd_dev_tx_queue_release, .rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1278,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)ENICPMD_FUNC_TRACE (); eth_dev->dev_ops = &enicpmd_eth_dev_ops; + eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count; eth_dev->rx_pkt_burst = &enic_recv_pkts; eth_dev->tx_pkt_burst = &enic_xmit_pkts; eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +3 -3
@@ -2855,9 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = { .rx_queue_release = fm10k_rx_queue_release, .tx_queue_setup = fm10k_tx_queue_setup, .tx_queue_release = fm10k_tx_queue_release, - .rx_queue_count = fm10k_dev_rx_queue_count, - .rx_descriptor_status = fm10k_dev_rx_descriptor_status, - .tx_descriptor_status = fm10k_dev_tx_descriptor_status, .rx_queue_intr_enable = fm10k_dev_rx_queue_intr_enable, .rx_queue_intr_disable = fm10k_dev_rx_queue_intr_disable, .reta_update = fm10k_reta_update,
@@ -3054,6 +3051,9 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &fm10k_eth_dev_ops; + dev->rx_queue_count = fm10k_dev_rx_queue_count; + dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status; + dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status; dev->rx_pkt_burst = &fm10k_recv_pkts; dev->tx_pkt_burst = &fm10k_xmit_pkts; dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +3 -3
@@ -474,9 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .rx_queue_intr_enable = i40e_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40e_dev_rx_queue_intr_disable, .rx_queue_release = i40e_dev_rx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, .dev_led_on = i40e_dev_led_on,
@@ -1447,6 +1444,9 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &i40e_eth_dev_ops; + dev->rx_queue_count = i40e_dev_rx_queue_count; + dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; dev->rx_pkt_burst = i40e_recv_pkts; dev->tx_pkt_burst = i40e_xmit_pkts; dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +3 -3
@@ -199,11 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = { .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, .rxq_info_get = i40e_rxq_info_get, .txq_info_get = i40e_txq_info_get, .mac_addr_add = i40evf_add_mac_addr,
@@ -1520,6 +1517,9 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &i40evf_eth_dev_ops; + eth_dev->rx_queue_count = i40e_dev_rx_queue_count; + eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &i40e_recv_pkts; eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
drivers/net/iavf/iavf_ethdev.c +3 -3
@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .rss_hash_conf_get = iavf_dev_rss_hash_conf_get, .rxq_info_get = iavf_dev_rxq_info_get, .txq_info_get = iavf_dev_txq_info_get, - .rx_queue_count = iavf_dev_rxq_count, - .rx_descriptor_status = iavf_dev_rx_desc_status, - .tx_descriptor_status = iavf_dev_tx_desc_status, .mtu_set = iavf_dev_mtu_set, .rx_queue_intr_enable = iavf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable,
@@ -1378,6 +1375,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; + eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; + eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status; eth_dev->rx_pkt_burst = &iavf_recv_pkts; eth_dev->tx_pkt_burst = &iavf_xmit_pkts; eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = { .tx_burst_mode_get = ice_tx_burst_mode_get, .get_eeprom_length = ice_get_eeprom_length, .get_eeprom = ice_get_eeprom, - .rx_queue_count = ice_rx_queue_count, - .rx_descriptor_status = ice_rx_descriptor_status, - .tx_descriptor_status = ice_tx_descriptor_status, .stats_get = ice_stats_get, .stats_reset = ice_stats_reset, .xstats_get = ice_xstats_get,
@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)int ret; dev->dev_ops = &ice_eth_dev_ops; + dev->rx_queue_count = ice_rx_queue_count; + dev->rx_descriptor_status = ice_rx_descriptor_status; + dev->tx_descriptor_status = ice_tx_descriptor_status; dev->rx_pkt_burst = ice_recv_pkts; dev->tx_pkt_burst = ice_xmit_pkts; dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +3 -3
@@ -272,9 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = { .rx_queue_setup = eth_igc_rx_queue_setup, .rx_queue_release = eth_igc_rx_queue_release, - .rx_queue_count = eth_igc_rx_queue_count, - .rx_descriptor_status = eth_igc_rx_descriptor_status, - .tx_descriptor_status = eth_igc_tx_descriptor_status, .tx_queue_setup = eth_igc_tx_queue_setup, .tx_queue_release = eth_igc_tx_queue_release, .tx_done_cleanup = eth_igc_tx_done_cleanup,
@@ -1226,6 +1223,9 @@ eth_igc_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = ð_igc_ops; + dev->rx_queue_count = eth_igc_rx_queue_count; + dev->rx_descriptor_status = eth_igc_rx_descriptor_status; + dev->tx_descriptor_status = eth_igc_tx_descriptor_status;/* * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +5 -5
@@ -545,9 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_queue_count = ixgbe_dev_rx_queue_count, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .dev_led_on = ixgbe_dev_led_on,
@@ -621,8 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .vlan_offload_set = ixgbevf_vlan_offload_set, .rx_queue_setup = ixgbe_dev_rx_queue_setup, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1089,6 +1084,9 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)ixgbe_dev_macsec_setting_reset (eth_dev); eth_dev->dev_ops = &ixgbe_eth_dev_ops; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; + eth_dev->rx_queue_count = ixgbe_dev_rx_queue_count; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts; eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1568,6 +1566,8 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &ixgbevf_eth_dev_ops; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
drivers/net/mlx5/linux/mlx5_os.c +5 -7
@@ -601,6 +601,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, } eth_dev->device = dpdk_dev; eth_dev->dev_ops = &mlx5_os_dev_sec_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; err =mlx5_proc_priv_init (eth_dev);if (err)return NULL ;
@@ -1208,6 +1210,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, eth_dev->rx_pkt_burst = removed_rx_burst; eth_dev->tx_pkt_burst = removed_tx_burst; eth_dev->dev_ops = &mlx5_os_dev_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; + eth_dev->rx_queue_count = mlx5_rx_queue_count;/* Register MAC address. */ claim_zero (mlx5_mac_addr_add (eth_dev, &mac,0 ,0 ));if (config->vf && config->vf_nl_en)
@@ -2396,13 +2401,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = { .rss_hash_update = mlx5_rss_hash_update, .rss_hash_conf_get = mlx5_rss_hash_conf_get, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get, .tx_burst_mode_get = mlx5_tx_burst_mode_get, - .rx_queue_count = mlx5_rx_queue_count, .rx_queue_intr_enable = mlx5_rx_intr_enable, .rx_queue_intr_disable = mlx5_rx_intr_disable, .is_removed = mlx5_is_removed,
@@ -2427,8 +2429,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = { .rx_queue_stop = mlx5_rx_queue_stop, .tx_queue_start = mlx5_tx_queue_start, .tx_queue_stop = mlx5_tx_queue_stop, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2480,8 +2480,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = { .vlan_strip_queue_set = mlx5_vlan_strip_queue_set, .vlan_offload_set = mlx5_vlan_offload_set, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
@@ -5138,6 +5138,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev, dev->dev_ops = &mlx5_os_dev_ops_isolate; else dev->dev_ops = &mlx5_os_dev_ops; + + dev->rx_descriptor_status = mlx5_rx_descriptor_status; + dev->tx_descriptor_status = mlx5_tx_descriptor_status; +return 0 ; }
drivers/net/netvsc/hn_ethdev.c +3 -3
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = { .tx_queue_setup = hn_dev_tx_queue_setup, .tx_queue_release = hn_dev_tx_queue_release, .tx_done_cleanup = hn_dev_tx_done_cleanup, - .tx_descriptor_status = hn_dev_tx_descriptor_status, .rx_queue_setup = hn_dev_rx_queue_setup, .rx_queue_release = hn_dev_rx_queue_release, - .rx_queue_count = hn_dev_rx_queue_count, - .rx_descriptor_status = hn_dev_rx_queue_status, .link_update = hn_dev_link_update, .stats_get = hn_dev_stats_get, .stats_reset = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) vmbus = container_of(device, struct rte_vmbus_device, device); eth_dev->dev_ops = &hn_eth_dev_ops; + eth_dev->rx_queue_count = hn_dev_rx_queue_count; + eth_dev->rx_descriptor_status = hn_dev_rx_queue_status; + eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status; eth_dev->tx_pkt_burst = &hn_xmit_pkts; eth_dev->rx_pkt_burst = &hn_recv_pkts;
drivers/net/nfp/nfp_net.c +1 -1
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = { .rss_hash_conf_get = nfp_net_rss_hash_conf_get, .rx_queue_setup = nfp_net_rx_queue_setup, .rx_queue_release = nfp_net_rx_queue_release, - .rx_queue_count = nfp_net_rx_queue_count, .tx_queue_setup = nfp_net_tx_queue_setup, .tx_queue_release = nfp_net_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &nfp_net_eth_dev_ops; + eth_dev->rx_queue_count = nfp_net_rx_queue_count; eth_dev->rx_pkt_burst = &nfp_net_recv_pkts; eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
drivers/net/octeontx2/otx2_ethdev.c +3 -3
@@ -2272,9 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { .txq_info_get = otx2_nix_txq_info_get, .rx_burst_mode_get = otx2_rx_burst_mode_get, .tx_burst_mode_get = otx2_tx_burst_mode_get, - .rx_queue_count = otx2_nix_rx_queue_count, - .rx_descriptor_status = otx2_nix_rx_descriptor_status, - .tx_descriptor_status = otx2_nix_tx_descriptor_status, .tx_done_cleanup = otx2_nix_tx_done_cleanup, .set_queue_rate_limit = otx2_nix_tm_set_queue_rate_limit, .pool_ops_supported = otx2_nix_pool_ops_supported,
@@ -2381,6 +2378,9 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)int rc, max_entries; eth_dev->dev_ops = &otx2_eth_dev_ops; + eth_dev->rx_queue_count = otx2_nix_rx_queue_count; + eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status; + eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {
drivers/net/qede/qede_ethdev.c +1 -2
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) } eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops; + eth_dev->rx_descriptor_status = qede_rx_descriptor_status; adapter->num_tx_queues =0 ; adapter->num_rx_queues =0 ;
drivers/net/sfc/sfc_ethdev.c +6 -6
@@ -1804,9 +1804,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .tx_queue_stop = sfc_tx_queue_stop, .rx_queue_setup = sfc_rx_queue_setup, .rx_queue_release = sfc_rx_queue_release, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .rx_queue_intr_enable = sfc_rx_queue_intr_enable, .rx_queue_intr_disable = sfc_rx_queue_intr_disable, .tx_queue_setup = sfc_tx_queue_setup,
@@ -1961,6 +1958,9 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status; dev->dev_ops = &sfc_eth_dev_ops;return 0 ;
@@ -2001,9 +2001,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query, .rss_hash_conf_get = sfc_dev_rss_hash_conf_get, .rxq_info_get = sfc_rx_queue_info_get,
@@ -2068,6 +2065,9 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) dev->rx_pkt_burst = dp_rx->pkt_burst; dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status; dev->dev_ops = &sfc_eth_dev_secondary_ops;return 0 ;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = { .tx_queue_stop = nicvf_dev_tx_queue_stop, .rx_queue_setup = nicvf_dev_rx_queue_setup, .rx_queue_release = nicvf_dev_rx_queue_release, - .rx_queue_count = nicvf_dev_rx_queue_count, .tx_queue_setup = nicvf_dev_tx_queue_setup, .tx_queue_release = nicvf_dev_tx_queue_release, .dev_set_link_up = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &nicvf_eth_dev_ops; + eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = { .rx_queue_release = eth_queue_release, .tx_queue_release = eth_queue_release, .tx_done_cleanup = eth_tx_done_cleanup, - .rx_queue_count = eth_rx_queue_count, .link_update = eth_link_update, .stats_get = eth_stats_get, .stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, data->all_multicast =1 ; eth_dev->dev_ops = &ops; + eth_dev->rx_queue_count = eth_rx_queue_count;/* finally assign rx and tx ops */ eth_dev->rx_pkt_burst = eth_vhost_rx;
lib/librte_ethdev/rte_ethdev.h +6 -6
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -EINVAL ); dev = &rte_eth_devices[port_id]; -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_queue_count, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_queue_count, -ENOTSUP );if (queue_id >= dev->data->nb_rx_queues)return -EINVAL ; -return (int )(*dev->dev_ops->rx_queue_count)(dev, queue_id); +return (int )(*dev->rx_queue_count)(dev, queue_id); }#define RTE_ETH_RX_DESC_AVAIL 0/**< Desc available for hw. */
@@ -4604,10 +4604,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,if (queue_id >= dev->data->nb_rx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_descriptor_status, -ENOTSUP ); rxq = dev->data->rx_queues[queue_id]; -return (*dev->dev_ops->rx_descriptor_status)(rxq, offset); +return (*dev->rx_descriptor_status)(rxq, offset); }#define RTE_ETH_TX_DESC_FULL 0/**< Desc filled for hw, waiting xmit. */
@@ -4661,10 +4661,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,if (queue_id >= dev->data->nb_tx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->tx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->tx_descriptor_status, -ENOTSUP ); txq = dev->data->tx_queues[queue_id]; -return (*dev->dev_ops->tx_descriptor_status)(txq, offset); +return (*dev->tx_descriptor_status)(txq, offset); }/**
lib/librte_ethdev/rte_ethdev_core.h +5 -6
@@ -657,12 +657,6 @@ struct eth_dev_ops {eth_queue_stop_t tx_queue_stop;/**< Stop TX for a queue. */ eth_rx_queue_setup_t rx_queue_setup;/**< Set up device RX queue. */ eth_queue_release_t rx_queue_release;/**< Release RX queue. */ -eth_rx_queue_count_t rx_queue_count; -/**< Get the number of used RX descriptors. */ -eth_rx_descriptor_status_t rx_descriptor_status; -/**< Check the status of a Rx descriptor. */ -eth_tx_descriptor_status_t tx_descriptor_status; -/**< Check the status of a Tx descriptor. */ /* * Static inline functions use functions ABOVE this comment. * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -778,6 +772,11 @@ struct rte_eth_dev {eth_rx_burst_t rx_pkt_burst;/**< Pointer to PMD receive function. */ eth_tx_burst_t tx_pkt_burst;/**< Pointer to PMD transmit function. */ eth_tx_prep_t tx_pkt_prepare;/**< Pointer to PMD transmit prepare function. */ + +eth_rx_queue_count_t rx_queue_count;/**< Get the number of used RX descriptors. */ +eth_rx_descriptor_status_t rx_descriptor_status;/**< Check the status of a Rx descriptor. */ +eth_tx_descriptor_status_t tx_descriptor_status;/**< Check the status of a Tx descriptor. */ +/** * Next two fields are per-device data but *data is shared between * primary and secondary processes and *process_private is per-process
Signature · 1 line
2.25.4
PATCH v2 3/7 ethdev: make device operations struct private
In reply to Ferruh YigitHiding the 'struct eth_dev_ops' from applications.
Removing relevant deprecation notice.
--- doc/guides/rel_notes/deprecation.rst | 9 - drivers/net/i40e/i40e_vf_representor.c | 1 + drivers/net/ixgbe/ixgbe_vf_representor.c | 1 + lib/librte_ethdev/rte_ethdev_core.h | 708 +---------------------- lib/librte_ethdev/rte_ethdev_driver.h | 694 ++++++++++++++++++++++ lib/librte_ethdev/rte_flow_driver.h | 1 + lib/librte_ethdev/rte_mtr_driver.h | 1 + lib/librte_ethdev/rte_tm_driver.h | 1 + 8 files changed, 706 insertions(+), 710 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -9
@@ -163,15 +163,6 @@ Deprecation Notices Due to adoption of C11 atomic builtins, the field ``refcnt_atomic`` will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11. -* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible - will be done in 20.11. - Currently the ``struct eth_dev_ops`` struct is accessible by the application - because some inline functions, like ``rte_eth_tx_descriptor_status()``, - access the struct directly. - The struct will be separate in two, the ops used by inline functions will be - moved next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct - will be moved to header file for drivers to hide it from applications. - * ethdev: the legacy filter API, including ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
drivers/net/i40e/i40e_vf_representor.c +1 -0
@@ -7,6 +7,7 @@#include <rte_pci.h> #include <rte_malloc.h> +#include "rte_ethdev_driver.h" #include "base/i40e_type.h" #include "base/virtchnl.h" #include "i40e_ethdev.h"
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -0
@@ -6,6 +6,7 @@#include <rte_pci.h> #include <rte_malloc.h> +#include "rte_ethdev_driver.h" #include "base/ixgbe_type.h" #include "base/ixgbe_vf.h" #include "ixgbe_ethdev.h"
lib/librte_ethdev/rte_ethdev_core.h +7 -701
726 lines not on this page · raw message
lib/librte_ethdev/rte_ethdev_driver.h +694 -0
700 lines not on this page · raw message
lib/librte_ethdev/rte_flow_driver.h +1 -0
@@ -18,6 +18,7 @@#include <stdint.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_flow.h" #ifdef __cplusplus
lib/librte_ethdev/rte_mtr_driver.h +1 -0
@@ -18,6 +18,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_mtr.h" #ifdef __cplusplus
lib/librte_ethdev/rte_tm_driver.h +1 -0
@@ -18,6 +18,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_tm.h" #ifdef __cplusplus
Signature · 1 line
2.25.4
Re: [dpdk-dev] [PATCH v2 3/7] ethdev: make device operations struct private
Quoted 6 lines · Ferruh Yigit
Hiding the 'struct
eth_dev_ops' from applications.Removing relevant deprecation notice.
Signed-off-by Ferruh Yigit <[email protected]>Acked-by Andrew Rybchenko <[email protected]>
Hi Thomas and all,
If there is no objection I am willing to merge this series soon to prevent more conflicts caused by this moving/renaming work.
Thanks,
ferruh
PATCH v2 4/7 ethdev: mark internal functions
In reply to Ferruh YigitSome ethdev functions are for drivers only, not for applications.
Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.
Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.
--- doc/guides/rel_notes/deprecation.rst | 6 ----- lib/librte_ethdev/rte_ethdev.h | 3 +-- lib/librte_ethdev/rte_ethdev_driver.h | 33 ++++++++++-------------- lib/librte_ethdev/rte_ethdev_version.map | 30 ++++++++++----------- lib/librte_ethdev/rte_flow_driver.h | 4 +-- 5 files changed, 29 insertions(+), 47 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -6
@@ -227,12 +227,6 @@ Deprecation Notices following the IPv6 header, as proposed in RFC https://mails.dpdk.org/archives/dev/2020-August/177257.html. -* ethdev: Some internal APIs for driver usage are exported in the .map file. - Now DPDK has ``__rte_internal`` marker so we can mark internal APIs and move - them to the INTERNAL block in .map. Although these APIs are internal it will - break the ABI checks, that is why change is planned for 20.11. - The list of internal APIs are mainly ones listed in ``rte_ethdev_driver.h``. - * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made ABI stable in the v19.11 release. The TM maintainer and other contributors have agreed to keep the TM APIs as experimental in expectation of additional spec
lib/librte_ethdev/rte_ethdev.h +1 -2
@@ -1723,8 +1723,7 @@ rte_eth_find_next_of(uint16_t port_id_start,*/ __rte_experimental uint16_t -rte_eth_find_next_sibling (uint16_t port_id_start, -uint16_t ref_port_id); +rte_eth_find_next_sibling (uint16_t port_id_start,uint16_t ref_port_id);/** * Macro to iterate over all ethdev ports sharing the same rte_device
lib/librte_ethdev/rte_ethdev_driver.h +13 -20
@@ -759,6 +759,7 @@ int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);* @return * - The pointer to the ethdev slot, on success. NULL on error */ +__rte_internal struct rte_eth_dev *rte_eth_dev_allocated(const char *name);/**
@@ -770,6 +771,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name);* @return * - Slot in the rte_dev_devices array for a new device; */ +__rte_internal struct rte_eth_dev *rte_eth_dev_allocate(const char *name);/**
@@ -783,6 +785,7 @@ struct rte_eth_dev *rte_eth_dev_allocate(const char *name);* device. * - Error: Null pointer. */ +__rte_internal struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);/**
@@ -801,6 +804,7 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);* @return * - 0 on success, negative on error */ +__rte_internal int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);/**
@@ -814,6 +818,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* @return * void */ +__rte_internal void _rte_eth_dev_reset(struct rte_eth_dev *dev);/**
@@ -833,6 +838,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* @return * int */ +__rte_internal int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);
@@ -848,6 +854,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,* @param dev * New ethdev port. */ +__rte_internal void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);/**
@@ -869,6 +876,7 @@ void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);* @param socket_id * The *socket_id* argument is the socket identifier in case of NUMA. */ +__rte_internal const struct rte_memzone * rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, uint16_t queue_id, size_t size,
@@ -955,9 +963,6 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev, }/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Allocate an unique switch domain identifier. * * A pool of switch domain identifiers which can be allocated on request. This
@@ -971,14 +976,11 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_switch_domain_alloc (uint16_t *domain_id);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Free switch domain. * * Return a switch domain identifier to the pool of free identifiers after it is
@@ -990,7 +992,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id);* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_switch_domain_free (uint16_t domain_id);
@@ -1007,9 +1009,6 @@ struct rte_eth_devargs { };/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function to parse ethdev arguments * * @param devargs
@@ -1020,7 +1019,7 @@ struct rte_eth_devargs {* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_devargs_parse (const char *devargs,struct rte_eth_devargs *eth_devargs);
@@ -1030,9 +1029,6 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev, void *bus_specific_init_params);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function for the creation of a new ethdev ports. * * @param device
@@ -1053,7 +1049,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal int rte_eth_dev_create(struct rte_device *device, const char *name, size_t priv_data_size,
@@ -1064,9 +1060,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,typedef int (*ethdev_uninit_t )(struct rte_eth_dev *ethdev);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function for cleaning up the resources of a ethdev port on it's * destruction. *
@@ -1078,7 +1071,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_dev_destroy (struct rte_eth_dev *ethdev,ethdev_uninit_t ethdev_uninit);
lib/librte_ethdev/rte_ethdev_version.map +14 -16
@@ -1,8 +1,6 @@ DPDK_21 { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_add_first_rx_callback; rte_eth_add_rx_callback; rte_eth_add_tx_callback;
@@ -10,9 +8,6 @@ DPDK_21 { rte_eth_allmulticast_enable; rte_eth_allmulticast_get; rte_eth_dev_adjust_nb_rx_tx_desc; - rte_eth_dev_allocate; - rte_eth_dev_allocated; - rte_eth_dev_attach_secondary; rte_eth_dev_callback_register; rte_eth_dev_callback_unregister; rte_eth_dev_close;
@@ -44,8 +39,6 @@ DPDK_21 { rte_eth_dev_mac_addr_remove; rte_eth_dev_pool_ops_supported; rte_eth_dev_priority_flow_ctrl_set; - rte_eth_dev_probing_finish; - rte_eth_dev_release_port; rte_eth_dev_reset; rte_eth_dev_rss_hash_conf_get; rte_eth_dev_rss_hash_update;
@@ -81,7 +74,6 @@ DPDK_21 { rte_eth_dev_udp_tunnel_port_delete; rte_eth_dev_vlan_filter; rte_eth_devices; - rte_eth_dma_zone_reserve; rte_eth_find_next; rte_eth_find_next_owned_by; rte_eth_iterator_cleanup;
@@ -195,16 +187,8 @@ EXPERIMENTAL { rte_eth_dev_owner_unset; # added in 18.05 - rte_eth_dev_create; - rte_eth_dev_destroy; rte_eth_dev_get_module_eeprom; rte_eth_dev_get_module_info; - rte_eth_devargs_parse; - rte_eth_switch_domain_alloc; - rte_eth_switch_domain_free; - - # added in 18.08 - rte_flow_expand_rss; # added in 18.11 rte_eth_dev_rx_intr_ctl_q_get_fd;
@@ -246,5 +230,19 @@ EXPERIMENTAL { INTERNAL { global: + _rte_eth_dev_callback_process; + _rte_eth_dev_reset; + rte_eth_dev_allocate; + rte_eth_dev_allocated; + rte_eth_dev_attach_secondary; + rte_eth_dev_create; + rte_eth_dev_destroy; + rte_eth_dev_probing_finish; + rte_eth_dev_release_port; + rte_eth_devargs_parse; rte_eth_dma_zone_free; + rte_eth_dma_zone_reserve; + rte_eth_switch_domain_alloc; + rte_eth_switch_domain_free; + rte_flow_expand_rss; };
lib/librte_ethdev/rte_flow_driver.h +1 -3
@@ -161,8 +161,6 @@ struct rte_flow_expand_rss {* Expand RSS flows into several possible flows according to the RSS hash * fields requested and the driver capabilities. * -* @b EXPERIMENTAL: this API may change without prior notice -* * @param[out] buf * Buffer to store the result expansion. * @param[in] size
@@ -183,7 +181,7 @@ struct rte_flow_expand_rss {* * -E2BIG: graph-depth @p graph is too deep. */ -__rte_experimental +__rte_internal int rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size, const struct rte_flow_item *pattern, uint64_t types,
Signature · 1 line
2.25.4
PATCH v2 5/7 ethdev: use hairpin helper functions
In reply to Ferruh YigitHairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'
Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.
--- drivers/net/mlx5/mlx5_rxq.c | 4 ++-- drivers/net/mlx5/mlx5_txq.c | 4 ++-- lib/librte_ethdev/rte_ethdev_driver.h | 2 ++ lib/librte_ethdev/rte_ethdev_version.map | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +2 -2
@@ -542,7 +542,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;int ret; -if (dev->data->rx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_rx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be stopped" ); rte_errno =EINVAL ;return -EINVAL ;
@@ -653,7 +653,7 @@ mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->rx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_rx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be started" ); rte_errno =EINVAL ;return -EINVAL ;
drivers/net/mlx5/mlx5_txq.c +2 -2
@@ -244,7 +244,7 @@ mlx5_tx_queue_stop(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->tx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_tx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be stopped" ); rte_errno =EINVAL ;return -EINVAL ;
@@ -371,7 +371,7 @@ mlx5_tx_queue_start(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->tx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_tx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be started" ); rte_errno =EINVAL ;return -EINVAL ;
lib/librte_ethdev/rte_ethdev_driver.h +2 -0
@@ -734,6 +734,7 @@ struct eth_dev_ops {* @return * - (1) if the queue is hairpin queue, 0 otherwise. */ +__rte_internal int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);/**
@@ -748,6 +749,7 @@ int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);* @return * - (1) if the queue is hairpin queue, 0 otherwise. */ +__rte_internal int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);/**
lib/librte_ethdev/rte_ethdev_version.map +2 -0
@@ -237,6 +237,8 @@ INTERNAL { rte_eth_dev_attach_secondary; rte_eth_dev_create; rte_eth_dev_destroy; + rte_eth_dev_is_rx_hairpin_queue; + rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; rte_eth_devargs_parse;
Signature · 1 line
2.25.4
PATCH v2 6/7 ethdev: remove invalid symbols from map file
In reply to Ferruh YigitThese are sturct type names, not object names. Removing them from .map file.
--- lib/librte_ethdev/rte_ethdev_version.map | 2 -- 1 file changed, 2 deletions(-)
lib/librte_ethdev/rte_ethdev_version.map +0 -2
@@ -81,7 +81,6 @@ DPDK_21 { rte_eth_iterator_next; rte_eth_led_off; rte_eth_led_on; - rte_eth_link; rte_eth_link_get; rte_eth_link_get_nowait; rte_eth_macaddr_get;
@@ -96,7 +95,6 @@ DPDK_21 { rte_eth_rx_queue_setup; rte_eth_set_queue_rate_limit; rte_eth_speed_bitflag; - rte_eth_stats; rte_eth_stats_get; rte_eth_stats_reset; rte_eth_timesync_adjust_time;
Signature · 1 line
2.25.4
PATCH v2 7/7 ethdev: remove underscore prefix from internal API
In reply to Ferruh Yigit'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.
For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.
--- app/test/virtual_pmd.c | 4 ++-- doc/guides/prog_guide/poll_mode_drv.rst | 4 ++-- drivers/net/atlantic/atl_ethdev.c | 5 ++--- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/bnxt/rte_pmd_bnxt.c | 4 ++-- drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++---- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 3 +-- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 7 +++---- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enic/enic_main.c | 2 +- drivers/net/failsafe/failsafe_ether.c | 6 +++--- drivers/net/fm10k/fm10k_ethdev.c | 11 ++++------- drivers/net/hinic/base/hinic_pmd_hwdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 5 ++--- drivers/net/ice/ice_ethdev.c | 4 ++-- drivers/net/igc/igc_ethdev.c | 3 +-- drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++------ drivers/net/ixgbe/ixgbe_pf.c | 5 ++--- drivers/net/mlx4/mlx4_intr.c | 10 +++++----- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++-- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx/octeontx_ethdev.c | 6 +++--- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/qede/qede_main.c | 3 +-- drivers/net/sfc/sfc_intr.c | 12 ++++++------ drivers/net/thunderx/nicvf_ethdev.c | 6 +++--- drivers/net/vhost/rte_eth_vhost.c | 6 +++--- drivers/net/virtio/virtio_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.c | 8 ++++---- lib/librte_ethdev/rte_ethdev_driver.h | 4 ++-- lib/librte_ethdev/rte_ethdev_version.map | 4 ++-- 39 files changed, 90 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id, vrtl_eth_dev->data->dev_link.link_status = link_status; -_rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , +NULL ); }int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread. For example when PF is reset, the PF sends a message to notify VFs of this event and also trigger an interrupt to VFs. Then in the interrupt service routine the VFs detects this notification message and calls -_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). +rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET -event within VFs. The function _rte_eth_dev_callback_process() will +event within VFs. The function rte_eth_dev_callback_process() will call the registered callback function. The callback function can trigger the application to handle all operations the VF reset requires including stopping Rx/Tx queues and calling rte_eth_dev_reset().
drivers/net/atlantic/atl_ethdev.c +2 -3
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,/* Notify userapp if link status changed */ if (!atl_dev_link_update (dev,0 )) {atl_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }else {if (hw->aq_fw_ops->send_macsec_req ==NULL ) goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev, resp.stats.egress_expired || resp.stats.ingress_expired) {PMD_DRV_LOG (INFO ,"RTE_ETH_EVENT_MACSEC" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); } }
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -1528,9 +1528,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete, new.link_speed != eth_dev->data->dev_link.link_speed) {rte_eth_linkstatus_set (eth_dev, &new); -_rte_eth_dev_callback_process (eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );bnxt_print_link_info (eth_dev); }
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg) ret_param.vf_id = vf_id; ret_param.msg = msg; -_rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , + &ret_param);/* Default to approve */ if (ret_param.retval ==RTE_PMD_BNXT_MB_EVENT_PROCEED )
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals, internals->slave_count--;/* force reconfiguration of slave interfaces */ -_rte_eth_dev_reset (slave_eth_dev); +rte_eth_dev_internal_reset (slave_eth_dev); } static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)if (arg ==NULL )return ; -_rte_eth_dev_callback_process ((struct rte_eth_dev *)arg, +rte_eth_dev_callback_process ((struct rte_eth_dev *)arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL );
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
drivers/net/dpaa/dpaa_ethdev.c +1 -1
@@ -323,7 +323,7 @@ static void dpaa_interrupt_handler(void *param)if (bytes_read <0 )DPAA_PMD_ERR ("Error reading eventfd\n" );dpaa_eth_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int dpaa_eth_dev_start (struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param) clear =DPNI_IRQ_EVENT_LINK_CHANGED ;dpaa2_dev_link_update (dev,0 );/* calling all the apps registered for link status event */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } out: ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
@@ -1629,7 +1629,7 @@ eth_em_interrupt_handler(void *param)eth_em_interrupt_get_status (dev);eth_em_interrupt_action (dev, dev->intr_handle); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
drivers/net/e1000/igb_ethdev.c +3 -4
@@ -2918,8 +2918,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev, pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }return 0 ;
@@ -2981,8 +2980,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (mbx->ops.read (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }
drivers/net/ena/ena_ethdev.c +2 -2
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,if (unlikely (adapter->trigger_reset)) {PMD_DRV_LOG (ERR ,"Trigger reset is on\n" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL ); } }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data, adapter->link_status = status;ena_link_update (eth_dev,0 ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)vnic_intr_return_all_credits (&enic->intr[ENICPMD_LSC_INTR_OFFSET ]);enic_link_update (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );enic_log_q_error (enic);/* Re-enable irq in case of INTx */ rte_intr_ack (&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused, ret = dev->dev_ops->link_update (dev,0 );/* We must pass on the LSC event */ if (ret) -return _rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +return rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );else return 0 ; }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param) true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)if (err ==FM10K_ERR_RESET_REQUESTED ) {PMD_INIT_LOG (INFO ,"INT: Switch is down" ); dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)/* Setting reset flag */ dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)fm10k_vlan_filter_set (dev, hw->mac.default_vid, true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev, ret =hinic_link_event_process (hwdev, rte_dev, status);/* check if link has changed, notify callback */ if (ret ==0 ) -_rte_eth_dev_callback_process (rte_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (rte_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
@@ -6842,7 +6842,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)case i40e_aqc_opc_get_link_status: ret =i40e_dev_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
@@ -1377,7 +1377,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :
@@ -1385,7 +1385,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg, vf->link_up = pf_msg->event_data.link_event.link_status; vf->link_speed = pf_msg->event_data.link_event.link_speed;i40evf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :
drivers/net/i40e/i40e_pf.c +1 -1
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,* do nothing and send not_supported to VF. As PF must send a response * to VF and ACK/NACK is not defined. */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);if (ret_param.retval !=RTE_PMD_I40E_MB_EVENT_PROCEED ) {PMD_DRV_LOG (WARNING ,"VF to PF message(%d) is not permitted!" , opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
@@ -186,7 +186,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :
@@ -201,8 +201,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, vf->link_speed =iavf_convert_link_speed (speed); }iavf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_PF_DRIVER_CLOSE event" );
drivers/net/ice/ice_ethdev.c +2 -2
@@ -1314,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)case ice_aqc_opc_get_link_status: ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :
@@ -1379,7 +1379,7 @@ ice_interrupt_handler(void *param)PMD_DRV_LOG (INFO ,"OICR: link state change event" ); ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev, RTE_ETH_EVENT_INTR_LSC, NULL); }#endif
drivers/net/igc/igc_ethdev.c +1 -2
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev) pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } }
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
@@ -4661,13 +4661,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)ixgbe_dev_link_update (dev,0 ); intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE ;ixgbe_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }if (intr->flags &IXGBE_FLAG_MACSEC ) { -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); intr->flags &= ~IXGBE_FLAG_MACSEC ; }
@@ -8676,8 +8674,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (ixgbe_read_mbx (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }
drivers/net/ixgbe/ixgbe_pf.c +2 -3
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf) vfinfo[vf].clear_to_send = true;/* notify application about VF reset */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);return ret; }
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)* if 0, do nothing and send ACK to VF * if ret_param.retval > 1, do nothing and send NAK to VF */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); retval = ret_param.retval;
drivers/net/mlx4/mlx4_intr.c +5 -5
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)MLX4_ASSERT (priv->intr_alarm ==1 ); priv->intr_alarm =0 ;if (intr_conf->lsc && !mlx4_link_status_check (priv)) -_rte_eth_dev_callback_process (ETH_DEV (priv), -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv) }for (i =0 ; i !=RTE_DIM (caught); ++i)if (caught[i]) -_rte_eth_dev_callback_process (ETH_DEV (priv), type[i], -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), type[i], +NULL ); }/**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh) dev = &rte_eth_devices[sh->port[i].ih_port_id];MLX5_ASSERT (dev);if (dev->data->dev_conf.intr_conf.rmv) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RMV ,NULL ); } }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)usleep (0 );continue ; } -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );continue ; }
drivers/net/mlx5/mlx5_flow.c +1 -1
@@ -6085,7 +6085,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,if (!MLX5_AGE_GET (age_info,MLX5_AGE_EVENT_NEW ))continue ;if (MLX5_AGE_GET (age_info,MLX5_AGE_TRIGGER )) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (&rte_eth_devices[sh->port[i].devx_ih_port_id],RTE_ETH_EVENT_FLOW_AGED ,NULL ); age_info->flags =0 ;
drivers/net/netvsc/hn_rndis.c +1 -1
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,*/ static void hn_rndis_link_alarm (void *arg) { -_rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }void hn_rndis_link_status (struct rte_eth_dev *dev,const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)struct rte_eth_dev *dev = (struct rte_eth_dev *)param;nfp_net_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );nfp_net_dev_link_status_print (dev);
drivers/net/octeontx/octeontx_ethdev.c +3 -3
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)octeontx_link_status_update (nic, &link);octeontx_link_status_print (dev, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/octeontx2/otx2_link.c +1 -1
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,rte_eth_linkstatus_set (eth_dev, ð_link);/* Set the flag and execute application callbacks */ -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
drivers/net/qede/qede_main.c +1 -2
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;if (!qede_link_update (dev,0 )) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int qed_drain (struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)sfc_notice (sa,"link status change event: link %s" , sa->eth_dev->data->dev_link.link_status ?"UP" :"DOWN" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg) exit:if (lsc_seq != sa->port.lsc_seq) {sfc_notice (sa,"link status change event" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/thunderx/nicvf_ethdev.c +3 -3
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)nicvf_link_status_update (nic, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/vhost/rte_eth_vhost.c +3 -3
@@ -832,7 +832,7 @@ new_device(int vid)VHOST_LOG (INFO ,"Vhost device %d created\n" , vid); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL );return 0 ; }
@@ -889,7 +889,7 @@ destroy_device(int vid)VHOST_LOG (INFO ,"Vhost device %d destroyed\n" , vid);eth_vhost_uninstall_intr (eth_dev); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)VHOST_LOG (INFO ,"vring%u is %s\n" , vring, enable ?"enabled" :"disabled" ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL );return 0 ; }
drivers/net/virtio/virtio_ethdev.c +3 -3
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)if (isr &VIRTIO_PCI_ISR_CONFIG ) {if (virtio_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );if (vtpci_with_feature (hw,VIRTIO_NET_F_STATUS )) { vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)if (events &VMXNET3_ECR_LINK ) {PMD_DRV_LOG (DEBUG ,"Process events: VMXNET3_ECR_LINK event" );if (vmxnet3_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)rte_eth_dev_shared_data_prepare ();if (eth_dev->state !=RTE_ETH_DEV_UNUSED ) -_rte_eth_dev_callback_process (eth_dev, +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_DESTROY ,NULL );rte_spinlock_lock (&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, }void -_rte_eth_dev_reset (struct rte_eth_dev *dev) +rte_eth_dev_internal_reset (struct rte_eth_dev *dev) {if (dev->data->dev_started) { RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }int -_rte_eth_dev_callback_process (struct rte_eth_dev *dev, +rte_eth_dev_callback_process (struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param) {struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)if (dev ==NULL )return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); dev->state =RTE_ETH_DEV_ATTACHED ; }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* void */ __rte_internal -void _rte_eth_dev_reset(struct rte_eth_dev *dev); +void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);/** * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* int */ __rte_internal -int _rte_eth_dev_callback_process(struct rte_eth_dev *dev, +int rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);/**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
@@ -228,17 +228,17 @@ EXPERIMENTAL { INTERNAL { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_dev_allocate; rte_eth_dev_allocated; rte_eth_dev_attach_secondary; + rte_eth_dev_callback_process; rte_eth_dev_create; rte_eth_dev_destroy; rte_eth_dev_is_rx_hairpin_queue; rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; + rte_eth_dev_internal_reset; rte_eth_devargs_parse; rte_eth_dma_zone_free; rte_eth_dma_zone_reserve;
Signature · 1 line
2.25.4
PATCH v3 1/7 ethdev: deprecate descriptor status check API
In reply to Ferruh YigitMarking 'rte_eth_rx_descriptor_done()' API as deprecated. ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.
Plan is to remove the API on 21.11 release.
---
Cc: David Marchand <[email protected]>
v3:
* Just deprecating the 'rte_eth_rx_descriptor_done()' API without removing it to stick to the original plan.
--- doc/guides/rel_notes/deprecation.rst | 2 +- doc/guides/rel_notes/release_20_11.rst | 2 ++ lib/librte_ethdev/rte_ethdev.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
doc/guides/rel_notes/deprecation.rst +1 -1
@@ -214,7 +214,7 @@ Deprecation Notices https://mails.dpdk.org/archives/dev/2020-July/176135.html. * ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done`` - will be deprecated in 20.11 and will be removed in 21.11. + will be removed in 21.11. Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.
doc/guides/rel_notes/release_20_11.rst +2 -0
@@ -84,6 +84,8 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* ``rte_eth_rx_descriptor_done()`` API has deprecated. + ABI Changes -----------
lib/librte_ethdev/rte_ethdev.h +1 -0
@@ -4567,6 +4567,7 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)* - (-ENODEV) if *port_id* invalid. * - (-ENOTSUP) if the device does not support this function */ +__rte_deprecated static inline intrte_eth_rx_descriptor_done (uint16_t port_id,uint16_t queue_id,uint16_t offset) {
Signature · 1 line
2.26.2
PATCH v3 2/7 ethdev: move inline device operations
This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.
Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.
Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.
To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.
The list of dev_ops moved:eth_rx_queue_count_t rx_queue_count;eth_rx_descriptor_done_t rx_descriptor_done;eth_rx_descriptor_status_t rx_descriptor_status;eth_tx_descriptor_status_t tx_descriptor_status;
---
v2:
* Updated features.rst
* Tweak assignment order in sfc
Cc: David Marchand <[email protected]>
v3:
* ``rx_descriptor_done`` also moved
* release note updated
--- doc/guides/nics/features.rst | 6 +++--- doc/guides/rel_notes/release_20_11.rst | 9 +++++++++ drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 9 +++++---- drivers/net/axgbe/axgbe_ethdev.c | 5 +++-- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 8 ++++---- drivers/net/e1000/igb_ethdev.c | 14 +++++++------- drivers/net/enic/enic_ethdev.c | 3 +-- drivers/net/fm10k/fm10k_ethdev.c | 8 ++++---- drivers/net/i40e/i40e_ethdev.c | 8 ++++---- drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++---- drivers/net/iavf/iavf_ethdev.c | 6 +++--- drivers/net/ice/ice_ethdev.c | 6 +++--- drivers/net/igc/igc_ethdev.c | 8 ++++---- drivers/net/ixgbe/ixgbe_ethdev.c | 14 +++++++------- drivers/net/mlx5/linux/mlx5_os.c | 12 +++++------- drivers/net/mlx5/mlx5_flow.c | 4 ++++ drivers/net/netvsc/hn_ethdev.c | 6 +++--- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 8 ++++---- drivers/net/qede/qede_ethdev.c | 3 +-- drivers/net/sfc/sfc_ethdev.c | 16 ++++++++-------- drivers/net/thunderx/nicvf_ethdev.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 17 ++++++++--------- lib/librte_ethdev/rte_ethdev_core.h | 13 ++++++------- 30 files changed, 110 insertions(+), 101 deletions(-)
doc/guides/nics/features.rst +3 -3
@@ -646,9 +646,9 @@ used, status can be "Available", "Done" or "Unavailable". When ``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is not set". -* **[implements] eth_dev_ops**: ``rx_descriptor_status``. +* **[implements] rte_eth_dev**: ``rx_descriptor_status``. * **[related] API**: ``rte_eth_rx_descriptor_status()``. -* **[implements] eth_dev_ops**: ``rx_descriptor_done``. +* **[implements] rte_eth_dev**: ``rx_descriptor_done``. * **[related] API**: ``rte_eth_rx_descriptor_done()``.
@@ -660,7 +660,7 @@ Tx descriptor status Supports checking the status of a Tx descriptor. Status can be "Full", "Done" or "Unavailable." -* **[implements] eth_dev_ops**: ``tx_descriptor_status``. +* **[implements] rte_eth_dev**: ``tx_descriptor_status``. * **[related] API**: ``rte_eth_tx_descriptor_status()``.
doc/guides/rel_notes/release_20_11.rst +9 -0
@@ -102,6 +102,15 @@ ABI Changes Also, make sure to start the actual text at the margin. ======================================================= +* ``ethdev`` changes + + * Following device operation function pointers moved from ``struct eth_dev_ops`` to ``struct rte_eth_dev``: + + * ``eth_rx_queue_count_t rx_queue_count;`` + * ``eth_rx_descriptor_done_t rx_descriptor_done;`` + * ``eth_rx_descriptor_status_t rx_descriptor_status;`` + * ``eth_tx_descriptor_status_t tx_descriptor_status;`` + Known Issues ------------
drivers/net/ark/ark_ethdev.c +1 -1
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = { .dev_infos_get = eth_ark_dev_info_get, .rx_queue_setup = eth_ark_dev_rx_queue_setup, - .rx_queue_count = eth_ark_dev_rx_queue_count, .tx_queue_setup = eth_ark_tx_queue_setup, .link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)return -1 ; dev->dev_ops = &ark_eth_dev_ops; + dev->rx_queue_count = eth_ark_dev_rx_queue_count; dev->data->mac_addrs =rte_zmalloc ("ark" ,RTE_ETHER_ADDR_LEN ,0 );if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = { .rx_queue_intr_enable = atl_dev_rx_queue_intr_enable, .rx_queue_intr_disable = atl_dev_rx_queue_intr_disable, - .rx_queue_count = atl_rx_queue_count, - .rx_descriptor_status = atl_dev_rx_descriptor_status, - .tx_descriptor_status = atl_dev_tx_descriptor_status, -/* EEPROM */ .get_eeprom_length = atl_dev_get_eeprom_length, .get_eeprom = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &atl_eth_dev_ops; + + eth_dev->rx_queue_count = atl_rx_queue_count; + eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status; + eth_dev->rx_pkt_burst = &atl_recv_pkts; eth_dev->tx_pkt_burst = &atl_xmit_pkts; eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .rxq_info_get = axgbe_rxq_info_get, .txq_info_get = axgbe_txq_info_get, .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get, - .rx_descriptor_status = axgbe_dev_rx_descriptor_status, - .tx_descriptor_status = axgbe_dev_tx_descriptor_status, .mtu_set = axgb_mtu_set, };
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) eth_dev->dev_ops = &axgbe_eth_dev_ops; + eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status; +/* * For secondary processes, we don't initialise any further as primary * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -4246,9 +4246,6 @@ static const struct eth_dev_ops bnxt_dev_ops = { .dev_led_off = bnxt_dev_led_off_op, .xstats_get_by_id = bnxt_dev_xstats_get_by_id_op, .xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op, - .rx_queue_count = bnxt_rx_queue_count_op, - .rx_descriptor_status = bnxt_rx_descriptor_status_op, - .tx_descriptor_status = bnxt_tx_descriptor_status_op, .rx_queue_start = bnxt_rx_queue_start, .rx_queue_stop = bnxt_rx_queue_stop, .tx_queue_start = bnxt_tx_queue_start,
@@ -5681,6 +5678,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)PMD_DRV_LOG (INFO ,"%s\n" , bnxt_version); eth_dev->dev_ops = &bnxt_dev_ops; + eth_dev->rx_queue_count = bnxt_rx_queue_count_op; + eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op; + eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op; eth_dev->rx_pkt_burst = &bnxt_recv_pkts; eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
drivers/net/dpaa/dpaa_ethdev.c +1 -1
@@ -1421,7 +1421,6 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_setup = dpaa_eth_tx_queue_setup, .rx_queue_release = dpaa_eth_rx_queue_release, .tx_queue_release = dpaa_eth_tx_queue_release, - .rx_queue_count = dpaa_dev_rx_queue_count, .rx_burst_mode_get = dpaa_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa_dev_tx_burst_mode_get, .rxq_info_get = dpaa_rxq_info_get,
@@ -1917,6 +1916,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)/* Populate ethdev structure */ eth_dev->dev_ops = &dpaa_devops; + eth_dev->rx_queue_count = dpaa_dev_rx_queue_count; eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = { .tx_queue_release = dpaa2_dev_tx_queue_release, .rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get, - .rx_queue_count = dpaa2_dev_rx_queue_count, .flow_ctrl_get = dpaa2_flow_ctrl_get, .flow_ctrl_set = dpaa2_flow_ctrl_set, .mac_addr_add = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)* plugged. */ eth_dev->dev_ops = &dpaa2_ethdev_ops; + eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;if (dpaa2_get_devargs (dev->devargs,DRIVER_LOOPBACK_MODE )) eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx; else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +4 -4
@@ -176,10 +176,6 @@ static const struct eth_dev_ops eth_em_ops = { .vlan_offload_set = eth_em_vlan_offload_set, .rx_queue_setup = eth_em_rx_queue_setup, .rx_queue_release = eth_em_rx_queue_release, - .rx_queue_count = eth_em_rx_queue_count, - .rx_descriptor_done = eth_em_rx_descriptor_done, - .rx_descriptor_status = eth_em_rx_descriptor_status, - .tx_descriptor_status = eth_em_tx_descriptor_status, .tx_queue_setup = eth_em_tx_queue_setup, .tx_queue_release = eth_em_tx_queue_release, .rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -250,6 +246,10 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)E1000_DEV_PRIVATE_TO_VFTA (eth_dev->data->dev_private); eth_dev->dev_ops = ð_em_ops; + eth_dev->rx_queue_count = eth_em_rx_queue_count; + eth_dev->rx_descriptor_done = eth_em_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status; eth_dev->rx_pkt_burst = (eth_rx_burst_t)ð_em_recv_pkts; eth_dev->tx_pkt_burst = (eth_tx_burst_t)ð_em_xmit_pkts; eth_dev->tx_pkt_prepare = (eth_tx_prep_t)ð_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +7 -7
@@ -380,10 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = { .rx_queue_intr_enable = eth_igb_rx_queue_intr_enable, .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, .rx_queue_release = eth_igb_rx_queue_release, - .rx_queue_count = eth_igb_rx_queue_count, - .rx_descriptor_done = eth_igb_rx_descriptor_done, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,
@@ -441,9 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, .rx_queue_setup = eth_igb_rx_queue_setup, .rx_queue_release = eth_igb_rx_queue_release, - .rx_descriptor_done = eth_igb_rx_descriptor_done, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,
@@ -754,6 +747,10 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)uint32_t ctrl_ext; eth_dev->dev_ops = ð_igb_ops; + eth_dev->rx_queue_count = eth_igb_rx_queue_count; + eth_dev->rx_descriptor_done = eth_igb_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;
@@ -949,6 +946,9 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &igbvf_eth_dev_ops; + eth_dev->rx_descriptor_done = eth_igb_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -2
@@ -1141,8 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .tx_queue_stop = enicpmd_dev_tx_queue_stop, .rx_queue_setup = enicpmd_dev_rx_queue_setup, .rx_queue_release = enicpmd_dev_rx_queue_release, - .rx_queue_count = enicpmd_dev_rx_queue_count, - .rx_descriptor_done = NULL, .tx_queue_setup = enicpmd_dev_tx_queue_setup, .tx_queue_release = enicpmd_dev_tx_queue_release, .rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1279,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)ENICPMD_FUNC_TRACE (); eth_dev->dev_ops = &enicpmd_eth_dev_ops; + eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count; eth_dev->rx_pkt_burst = &enic_recv_pkts; eth_dev->tx_pkt_burst = &enic_xmit_pkts; eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +4 -4
@@ -2855,10 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = { .rx_queue_release = fm10k_rx_queue_release, .tx_queue_setup = fm10k_tx_queue_setup, .tx_queue_release = fm10k_tx_queue_release, - .rx_queue_count = fm10k_dev_rx_queue_count, - .rx_descriptor_done = fm10k_dev_rx_descriptor_done, - .rx_descriptor_status = fm10k_dev_rx_descriptor_status, - .tx_descriptor_status = fm10k_dev_tx_descriptor_status, .rx_queue_intr_enable = fm10k_dev_rx_queue_intr_enable, .rx_queue_intr_disable = fm10k_dev_rx_queue_intr_disable, .reta_update = fm10k_reta_update,
@@ -3055,6 +3051,10 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &fm10k_eth_dev_ops; + dev->rx_queue_count = fm10k_dev_rx_queue_count; + dev->rx_descriptor_done = fm10k_dev_rx_descriptor_done; + dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status; + dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status; dev->rx_pkt_burst = &fm10k_recv_pkts; dev->tx_pkt_burst = &fm10k_xmit_pkts; dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +4 -4
@@ -474,10 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .rx_queue_intr_enable = i40e_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40e_dev_rx_queue_intr_disable, .rx_queue_release = i40e_dev_rx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, .dev_led_on = i40e_dev_led_on,
@@ -1448,6 +1444,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &i40e_eth_dev_ops; + dev->rx_queue_count = i40e_dev_rx_queue_count; + dev->rx_descriptor_done = i40e_dev_rx_descriptor_done; + dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; dev->rx_pkt_burst = i40e_recv_pkts; dev->tx_pkt_burst = i40e_xmit_pkts; dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +4 -4
@@ -199,12 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = { .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, .rxq_info_get = i40e_rxq_info_get, .txq_info_get = i40e_txq_info_get, .mac_addr_add = i40evf_add_mac_addr,
@@ -1561,6 +1557,10 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &i40evf_eth_dev_ops; + eth_dev->rx_queue_count = i40e_dev_rx_queue_count; + eth_dev->rx_descriptor_done = i40e_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &i40e_recv_pkts; eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
drivers/net/iavf/iavf_ethdev.c +3 -3
@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .rss_hash_conf_get = iavf_dev_rss_hash_conf_get, .rxq_info_get = iavf_dev_rxq_info_get, .txq_info_get = iavf_dev_txq_info_get, - .rx_queue_count = iavf_dev_rxq_count, - .rx_descriptor_status = iavf_dev_rx_desc_status, - .tx_descriptor_status = iavf_dev_tx_desc_status, .mtu_set = iavf_dev_mtu_set, .rx_queue_intr_enable = iavf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable,
@@ -1383,6 +1380,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; + eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; + eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status; eth_dev->rx_pkt_burst = &iavf_recv_pkts; eth_dev->tx_pkt_burst = &iavf_xmit_pkts; eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = { .tx_burst_mode_get = ice_tx_burst_mode_get, .get_eeprom_length = ice_get_eeprom_length, .get_eeprom = ice_get_eeprom, - .rx_queue_count = ice_rx_queue_count, - .rx_descriptor_status = ice_rx_descriptor_status, - .tx_descriptor_status = ice_tx_descriptor_status, .stats_get = ice_stats_get, .stats_reset = ice_stats_reset, .xstats_get = ice_xstats_get,
@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)int ret; dev->dev_ops = &ice_eth_dev_ops; + dev->rx_queue_count = ice_rx_queue_count; + dev->rx_descriptor_status = ice_rx_descriptor_status; + dev->tx_descriptor_status = ice_tx_descriptor_status; dev->rx_pkt_burst = ice_recv_pkts; dev->tx_pkt_burst = ice_xmit_pkts; dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +4 -4
@@ -272,10 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = { .rx_queue_setup = eth_igc_rx_queue_setup, .rx_queue_release = eth_igc_rx_queue_release, - .rx_queue_count = eth_igc_rx_queue_count, - .rx_descriptor_done = eth_igc_rx_descriptor_done, - .rx_descriptor_status = eth_igc_rx_descriptor_status, - .tx_descriptor_status = eth_igc_tx_descriptor_status, .tx_queue_setup = eth_igc_tx_queue_setup, .tx_queue_release = eth_igc_tx_queue_release, .tx_done_cleanup = eth_igc_tx_done_cleanup,
@@ -1227,6 +1223,10 @@ eth_igc_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = ð_igc_ops; + dev->rx_descriptor_done = eth_igc_rx_descriptor_done; + dev->rx_queue_count = eth_igc_rx_queue_count; + dev->rx_descriptor_status = eth_igc_rx_descriptor_status; + dev->tx_descriptor_status = eth_igc_tx_descriptor_status;/* * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +7 -7
@@ -545,10 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_queue_count = ixgbe_dev_rx_queue_count, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .dev_led_on = ixgbe_dev_led_on,
@@ -622,9 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .vlan_offload_set = ixgbevf_vlan_offload_set, .rx_queue_setup = ixgbe_dev_rx_queue_setup, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1091,6 +1084,10 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)ixgbe_dev_macsec_setting_reset (eth_dev); eth_dev->dev_ops = &ixgbe_eth_dev_ops; + eth_dev->rx_queue_count = ixgbe_dev_rx_queue_count; + eth_dev->rx_descriptor_done = ixgbe_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts; eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1570,6 +1567,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &ixgbevf_eth_dev_ops; + eth_dev->rx_descriptor_done = ixgbe_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
drivers/net/mlx5/linux/mlx5_os.c +5 -7
@@ -601,6 +601,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, } eth_dev->device = dpdk_dev; eth_dev->dev_ops = &mlx5_os_dev_sec_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; err =mlx5_proc_priv_init (eth_dev);if (err)return NULL ;
@@ -1208,6 +1210,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, eth_dev->rx_pkt_burst = removed_rx_burst; eth_dev->tx_pkt_burst = removed_tx_burst; eth_dev->dev_ops = &mlx5_os_dev_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; + eth_dev->rx_queue_count = mlx5_rx_queue_count;/* Register MAC address. */ claim_zero (mlx5_mac_addr_add (eth_dev, &mac,0 ,0 ));if (config->vf && config->vf_nl_en)
@@ -2396,13 +2401,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = { .rss_hash_update = mlx5_rss_hash_update, .rss_hash_conf_get = mlx5_rss_hash_conf_get, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get, .tx_burst_mode_get = mlx5_tx_burst_mode_get, - .rx_queue_count = mlx5_rx_queue_count, .rx_queue_intr_enable = mlx5_rx_intr_enable, .rx_queue_intr_disable = mlx5_rx_intr_disable, .is_removed = mlx5_is_removed,
@@ -2427,8 +2429,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = { .rx_queue_stop = mlx5_rx_queue_stop, .tx_queue_start = mlx5_tx_queue_start, .tx_queue_stop = mlx5_tx_queue_stop, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2480,8 +2480,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = { .vlan_strip_queue_set = mlx5_vlan_strip_queue_set, .vlan_offload_set = mlx5_vlan_offload_set, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
@@ -5138,6 +5138,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev, dev->dev_ops = &mlx5_os_dev_ops_isolate; else dev->dev_ops = &mlx5_os_dev_ops; + + dev->rx_descriptor_status = mlx5_rx_descriptor_status; + dev->tx_descriptor_status = mlx5_tx_descriptor_status; +return 0 ; }
drivers/net/netvsc/hn_ethdev.c +3 -3
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = { .tx_queue_setup = hn_dev_tx_queue_setup, .tx_queue_release = hn_dev_tx_queue_release, .tx_done_cleanup = hn_dev_tx_done_cleanup, - .tx_descriptor_status = hn_dev_tx_descriptor_status, .rx_queue_setup = hn_dev_rx_queue_setup, .rx_queue_release = hn_dev_rx_queue_release, - .rx_queue_count = hn_dev_rx_queue_count, - .rx_descriptor_status = hn_dev_rx_queue_status, .link_update = hn_dev_link_update, .stats_get = hn_dev_stats_get, .stats_reset = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) vmbus = container_of(device, struct rte_vmbus_device, device); eth_dev->dev_ops = &hn_eth_dev_ops; + eth_dev->rx_queue_count = hn_dev_rx_queue_count; + eth_dev->rx_descriptor_status = hn_dev_rx_queue_status; + eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status; eth_dev->tx_pkt_burst = &hn_xmit_pkts; eth_dev->rx_pkt_burst = &hn_recv_pkts;
drivers/net/nfp/nfp_net.c +1 -1
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = { .rss_hash_conf_get = nfp_net_rss_hash_conf_get, .rx_queue_setup = nfp_net_rx_queue_setup, .rx_queue_release = nfp_net_rx_queue_release, - .rx_queue_count = nfp_net_rx_queue_count, .tx_queue_setup = nfp_net_tx_queue_setup, .tx_queue_release = nfp_net_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &nfp_net_eth_dev_ops; + eth_dev->rx_queue_count = nfp_net_rx_queue_count; eth_dev->rx_pkt_burst = &nfp_net_recv_pkts; eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
drivers/net/octeontx2/otx2_ethdev.c +4 -4
@@ -2272,10 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { .txq_info_get = otx2_nix_txq_info_get, .rx_burst_mode_get = otx2_rx_burst_mode_get, .tx_burst_mode_get = otx2_tx_burst_mode_get, - .rx_queue_count = otx2_nix_rx_queue_count, - .rx_descriptor_done = otx2_nix_rx_descriptor_done, - .rx_descriptor_status = otx2_nix_rx_descriptor_status, - .tx_descriptor_status = otx2_nix_tx_descriptor_status, .tx_done_cleanup = otx2_nix_tx_done_cleanup, .set_queue_rate_limit = otx2_nix_tm_set_queue_rate_limit, .pool_ops_supported = otx2_nix_pool_ops_supported,
@@ -2382,6 +2378,10 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)int rc, max_entries; eth_dev->dev_ops = &otx2_eth_dev_ops; + eth_dev->rx_descriptor_done = otx2_nix_rx_descriptor_done; + eth_dev->rx_queue_count = otx2_nix_rx_queue_count; + eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status; + eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {
drivers/net/qede/qede_ethdev.c +1 -2
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) } eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops; + eth_dev->rx_descriptor_status = qede_rx_descriptor_status; adapter->num_tx_queues =0 ; adapter->num_rx_queues =0 ;
drivers/net/sfc/sfc_ethdev.c +8 -8
@@ -1819,10 +1819,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .tx_queue_stop = sfc_tx_queue_stop, .rx_queue_setup = sfc_rx_queue_setup, .rx_queue_release = sfc_rx_queue_release, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .rx_queue_intr_enable = sfc_rx_queue_intr_enable, .rx_queue_intr_disable = sfc_rx_queue_intr_disable, .tx_queue_setup = sfc_tx_queue_setup,
@@ -1977,6 +1973,10 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_done = sfc_rx_descriptor_done; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status; dev->dev_ops = &sfc_eth_dev_ops;return 0 ;
@@ -2017,10 +2017,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query, .rss_hash_conf_get = sfc_dev_rss_hash_conf_get, .rxq_info_get = sfc_rx_queue_info_get,
@@ -2085,6 +2081,10 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) dev->rx_pkt_burst = dp_rx->pkt_burst; dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_done = sfc_rx_descriptor_done; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status; dev->dev_ops = &sfc_eth_dev_secondary_ops;return 0 ;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = { .tx_queue_stop = nicvf_dev_tx_queue_stop, .rx_queue_setup = nicvf_dev_rx_queue_setup, .rx_queue_release = nicvf_dev_rx_queue_release, - .rx_queue_count = nicvf_dev_rx_queue_count, .tx_queue_setup = nicvf_dev_tx_queue_setup, .tx_queue_release = nicvf_dev_tx_queue_release, .dev_set_link_up = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &nicvf_eth_dev_ops; + eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = { .rx_queue_release = eth_queue_release, .tx_queue_release = eth_queue_release, .tx_done_cleanup = eth_tx_done_cleanup, - .rx_queue_count = eth_rx_queue_count, .link_update = eth_link_update, .stats_get = eth_stats_get, .stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, data->all_multicast =1 ; eth_dev->dev_ops = &ops; + eth_dev->rx_queue_count = eth_rx_queue_count;/* finally assign rx and tx ops */ eth_dev->rx_pkt_burst = eth_vhost_rx;
drivers/net/virtio/virtio_ethdev.c +1 -1
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = { .rx_queue_intr_enable = virtio_dev_rx_queue_intr_enable, .rx_queue_intr_disable = virtio_dev_rx_queue_intr_disable, .rx_queue_release = virtio_dev_queue_release, - .rx_descriptor_done = virtio_dev_rx_queue_done, .tx_queue_setup = virtio_dev_tx_queue_setup, .tx_queue_release = virtio_dev_queue_release,/* collect stats per queue */
@@ -1903,6 +1902,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &virtio_eth_dev_ops; + eth_dev->rx_descriptor_done = virtio_dev_rx_queue_done;if (rte_eal_process_type () ==RTE_PROC_SECONDARY ) {if (!hw->virtio_user_dev) {
lib/librte_ethdev/rte_ethdev.h +8 -9
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -EINVAL ); dev = &rte_eth_devices[port_id]; -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_queue_count, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_queue_count, -ENOTSUP );if (queue_id >= dev->data->nb_rx_queues)return -EINVAL ; -return (int )(*dev->dev_ops->rx_queue_count)(dev, queue_id); +return (int )(*dev->rx_queue_count)(dev, queue_id); }/**
@@ -4573,9 +4573,8 @@ rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset) {struct rte_eth_dev *dev = &rte_eth_devices[port_id];RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_done, -ENOTSUP ); -return (*dev->dev_ops->rx_descriptor_done)( \ - dev->data->rx_queues[queue_id], offset); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_descriptor_done, -ENOTSUP ); +return (*dev->rx_descriptor_done)(dev->data->rx_queues[queue_id], offset); }#define RTE_ETH_RX_DESC_AVAIL 0/**< Desc available for hw. */
@@ -4630,10 +4629,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,if (queue_id >= dev->data->nb_rx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_descriptor_status, -ENOTSUP ); rxq = dev->data->rx_queues[queue_id]; -return (*dev->dev_ops->rx_descriptor_status)(rxq, offset); +return (*dev->rx_descriptor_status)(rxq, offset); }#define RTE_ETH_TX_DESC_FULL 0/**< Desc filled for hw, waiting xmit. */
@@ -4687,10 +4686,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,if (queue_id >= dev->data->nb_tx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->tx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->tx_descriptor_status, -ENOTSUP ); txq = dev->data->tx_queues[queue_id]; -return (*dev->dev_ops->tx_descriptor_status)(txq, offset); +return (*dev->tx_descriptor_status)(txq, offset); }/**
lib/librte_ethdev/rte_ethdev_core.h +6 -7
@@ -660,13 +660,6 @@ struct eth_dev_ops {eth_queue_stop_t tx_queue_stop;/**< Stop TX for a queue. */ eth_rx_queue_setup_t rx_queue_setup;/**< Set up device RX queue. */ eth_queue_release_t rx_queue_release;/**< Release RX queue. */ -eth_rx_queue_count_t rx_queue_count; -/**< Get the number of used RX descriptors. */ -eth_rx_descriptor_done_t rx_descriptor_done;/**< Check rxd DD bit. */ -eth_rx_descriptor_status_t rx_descriptor_status; -/**< Check the status of a Rx descriptor. */ -eth_tx_descriptor_status_t tx_descriptor_status; -/**< Check the status of a Tx descriptor. */ /* * Static inline functions use functions ABOVE this comment. * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -782,6 +775,12 @@ struct rte_eth_dev {eth_rx_burst_t rx_pkt_burst;/**< Pointer to PMD receive function. */ eth_tx_burst_t tx_pkt_burst;/**< Pointer to PMD transmit function. */ eth_tx_prep_t tx_pkt_prepare;/**< Pointer to PMD transmit prepare function. */ + +eth_rx_queue_count_t rx_queue_count;/**< Get the number of used RX descriptors. */ +eth_rx_descriptor_done_t rx_descriptor_done;/**< Check rxd DD bit. */ +eth_rx_descriptor_status_t rx_descriptor_status;/**< Check the status of a Rx descriptor. */ +eth_tx_descriptor_status_t tx_descriptor_status;/**< Check the status of a Tx descriptor. */ +/** * Next two fields are per-device data but *data is shared between * primary and secondary processes and *process_private is per-process
Signature · 1 line
2.26.2
PATCH v3 3/7 ethdev: make device operations struct private
In reply to Ferruh YigitHiding the 'struct eth_dev_ops' from applications.
Removing relevant deprecation notice.
---
Cc: David Marchand <[email protected]>
v3:
* release note updated
--- doc/guides/rel_notes/deprecation.rst | 9 - doc/guides/rel_notes/release_20_11.rst | 2 + drivers/net/i40e/i40e_vf_representor.c | 1 + drivers/net/ixgbe/ixgbe_vf_representor.c | 1 + lib/librte_ethdev/rte_ethdev_core.h | 712 +---------------------- lib/librte_ethdev/rte_ethdev_driver.h | 694 ++++++++++++++++++++++ lib/librte_ethdev/rte_flow_driver.h | 1 + lib/librte_ethdev/rte_mtr_driver.h | 1 + lib/librte_ethdev/rte_tm_driver.h | 1 + 9 files changed, 710 insertions(+), 712 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -9
@@ -156,15 +156,6 @@ Deprecation Notices Due to adoption of C11 atomic builtins, the field ``refcnt_atomic`` will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11. -* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible - will be done in 20.11. - Currently the ``struct eth_dev_ops`` struct is accessible by the application - because some inline functions, like ``rte_eth_tx_descriptor_status()``, - access the struct directly. - The struct will be separate in two, the ops used by inline functions will be - moved next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct - will be moved to header file for drivers to hide it from applications. - * ethdev: the legacy filter API, including ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
doc/guides/rel_notes/release_20_11.rst +2 -0
@@ -111,6 +111,8 @@ ABI Changes * ``eth_rx_descriptor_status_t rx_descriptor_status;`` * ``eth_tx_descriptor_status_t tx_descriptor_status;`` + * ``struct eth_dev_ops`` is no more accessible by applications, which was already inline data structure. + Known Issues ------------
drivers/net/i40e/i40e_vf_representor.c +1 -0
@@ -7,6 +7,7 @@#include <rte_pci.h> #include <rte_malloc.h> +#include "rte_ethdev_driver.h" #include "base/i40e_type.h" #include "base/virtchnl.h" #include "i40e_ethdev.h"
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -0
@@ -6,6 +6,7 @@#include <rte_pci.h> #include <rte_malloc.h> +#include "rte_ethdev_driver.h" #include "base/ixgbe_type.h" #include "base/ixgbe_vf.h" #include "ixgbe_ethdev.h"
lib/librte_ethdev/rte_ethdev_core.h +9 -703
731 lines not on this page · raw message
lib/librte_ethdev/rte_ethdev_driver.h +694 -0
700 lines not on this page · raw message
lib/librte_ethdev/rte_flow_driver.h +1 -0
@@ -18,6 +18,7 @@#include <stdint.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_flow.h" #ifdef __cplusplus
lib/librte_ethdev/rte_mtr_driver.h +1 -0
@@ -18,6 +18,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_mtr.h" #ifdef __cplusplus
lib/librte_ethdev/rte_tm_driver.h +1 -0
@@ -18,6 +18,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_tm.h" #ifdef __cplusplus
Signature · 1 line
2.26.2
Re: [dpdk-dev] [PATCH v3 3/7] ethdev: make device operations struct private
Quoted 6 lines · Ferruh Yigit
Hiding the 'struct
eth_dev_ops' from applications.Removing relevant deprecation notice.
Signed-off-by Ferruh Yigit <[email protected]>Acked-by Andrew Rybchenko <[email protected]>
<...>
doc/guides/rel_notes/release_20_11.rst ABI Changes · line 115
Quoted 8 lines
doc/guides/rel_notes/release_20_11.rst +1
-0@@ -111,6 +111,8 @@ ABI Changes * ``eth_rx_descriptor_status_t rx_descriptor_status;`` * ``eth_tx_descriptor_status_t tx_descriptor_status;`` + * ``struct eth_dev_ops`` is no more accessible by applications, which was already inline data structure.
s/inline/internal, will send a v4
PATCH v3 4/7 ethdev: mark internal functions
In reply to Ferruh YigitSome ethdev functions are for drivers only, not for applications.
Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.
Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.
---
Cc: David Marchand <[email protected]>
v3:
* release note updated
--- doc/guides/rel_notes/deprecation.rst | 6 ----- doc/guides/rel_notes/release_20_11.rst | 2 ++ lib/librte_ethdev/rte_ethdev.h | 3 +-- lib/librte_ethdev/rte_ethdev_driver.h | 33 ++++++++++-------------- lib/librte_ethdev/rte_ethdev_version.map | 30 ++++++++++----------- lib/librte_ethdev/rte_flow_driver.h | 4 +-- 6 files changed, 31 insertions(+), 47 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -6
@@ -225,12 +225,6 @@ Deprecation Notices following the IPv6 header, as proposed in RFC https://mails.dpdk.org/archives/dev/2020-August/177257.html. -* ethdev: Some internal APIs for driver usage are exported in the .map file. - Now DPDK has ``__rte_internal`` marker so we can mark internal APIs and move - them to the INTERNAL block in .map. Although these APIs are internal it will - break the ABI checks, that is why change is planned for 20.11. - The list of internal APIs are mainly ones listed in ``rte_ethdev_driver.h``. - * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made ABI stable in the v19.11 release. The TM maintainer and other contributors have agreed to keep the TM APIs as experimental in expectation of additional spec
doc/guides/rel_notes/release_20_11.rst +2 -0
@@ -113,6 +113,8 @@ ABI Changes * ``struct eth_dev_ops`` is no more accessible by applications, which was already inline data structure. + * ``ethdev`` internal functions are marked with ``__rte_internal`` tag. + Known Issues ------------
lib/librte_ethdev/rte_ethdev.h +1 -2
@@ -1724,8 +1724,7 @@ rte_eth_find_next_of(uint16_t port_id_start,*/ __rte_experimental uint16_t -rte_eth_find_next_sibling (uint16_t port_id_start, -uint16_t ref_port_id); +rte_eth_find_next_sibling (uint16_t port_id_start,uint16_t ref_port_id);/** * Macro to iterate over all ethdev ports sharing the same rte_device
lib/librte_ethdev/rte_ethdev_driver.h +13 -20
@@ -759,6 +759,7 @@ int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);* @return * - The pointer to the ethdev slot, on success. NULL on error */ +__rte_internal struct rte_eth_dev *rte_eth_dev_allocated(const char *name);/**
@@ -770,6 +771,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name);* @return * - Slot in the rte_dev_devices array for a new device; */ +__rte_internal struct rte_eth_dev *rte_eth_dev_allocate(const char *name);/**
@@ -783,6 +785,7 @@ struct rte_eth_dev *rte_eth_dev_allocate(const char *name);* device. * - Error: Null pointer. */ +__rte_internal struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);/**
@@ -801,6 +804,7 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);* @return * - 0 on success, negative on error */ +__rte_internal int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);/**
@@ -814,6 +818,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* @return * void */ +__rte_internal void _rte_eth_dev_reset(struct rte_eth_dev *dev);/**
@@ -833,6 +838,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* @return * int */ +__rte_internal int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);
@@ -848,6 +854,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,* @param dev * New ethdev port. */ +__rte_internal void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);/**
@@ -869,6 +876,7 @@ void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);* @param socket_id * The *socket_id* argument is the socket identifier in case of NUMA. */ +__rte_internal const struct rte_memzone * rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, uint16_t queue_id, size_t size,
@@ -955,9 +963,6 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev, }/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Allocate an unique switch domain identifier. * * A pool of switch domain identifiers which can be allocated on request. This
@@ -971,14 +976,11 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_switch_domain_alloc (uint16_t *domain_id);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Free switch domain. * * Return a switch domain identifier to the pool of free identifiers after it is
@@ -990,7 +992,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id);* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_switch_domain_free (uint16_t domain_id);
@@ -1007,9 +1009,6 @@ struct rte_eth_devargs { };/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function to parse ethdev arguments * * @param devargs
@@ -1020,7 +1019,7 @@ struct rte_eth_devargs {* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_devargs_parse (const char *devargs,struct rte_eth_devargs *eth_devargs);
@@ -1030,9 +1029,6 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev, void *bus_specific_init_params);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function for the creation of a new ethdev ports. * * @param device
@@ -1053,7 +1049,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal int rte_eth_dev_create(struct rte_device *device, const char *name, size_t priv_data_size,
@@ -1064,9 +1060,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,typedef int (*ethdev_uninit_t )(struct rte_eth_dev *ethdev);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function for cleaning up the resources of a ethdev port on it's * destruction. *
@@ -1078,7 +1071,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_dev_destroy (struct rte_eth_dev *ethdev,ethdev_uninit_t ethdev_uninit);
lib/librte_ethdev/rte_ethdev_version.map +14 -16
@@ -1,8 +1,6 @@ DPDK_21 { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_add_first_rx_callback; rte_eth_add_rx_callback; rte_eth_add_tx_callback;
@@ -10,9 +8,6 @@ DPDK_21 { rte_eth_allmulticast_enable; rte_eth_allmulticast_get; rte_eth_dev_adjust_nb_rx_tx_desc; - rte_eth_dev_allocate; - rte_eth_dev_allocated; - rte_eth_dev_attach_secondary; rte_eth_dev_callback_register; rte_eth_dev_callback_unregister; rte_eth_dev_close;
@@ -44,8 +39,6 @@ DPDK_21 { rte_eth_dev_mac_addr_remove; rte_eth_dev_pool_ops_supported; rte_eth_dev_priority_flow_ctrl_set; - rte_eth_dev_probing_finish; - rte_eth_dev_release_port; rte_eth_dev_reset; rte_eth_dev_rss_hash_conf_get; rte_eth_dev_rss_hash_update;
@@ -81,7 +74,6 @@ DPDK_21 { rte_eth_dev_udp_tunnel_port_delete; rte_eth_dev_vlan_filter; rte_eth_devices; - rte_eth_dma_zone_reserve; rte_eth_find_next; rte_eth_find_next_owned_by; rte_eth_iterator_cleanup;
@@ -195,16 +187,8 @@ EXPERIMENTAL { rte_eth_dev_owner_unset; # added in 18.05 - rte_eth_dev_create; - rte_eth_dev_destroy; rte_eth_dev_get_module_eeprom; rte_eth_dev_get_module_info; - rte_eth_devargs_parse; - rte_eth_switch_domain_alloc; - rte_eth_switch_domain_free; - - # added in 18.08 - rte_flow_expand_rss; # added in 18.11 rte_eth_dev_rx_intr_ctl_q_get_fd;
@@ -246,5 +230,19 @@ EXPERIMENTAL { INTERNAL { global: + _rte_eth_dev_callback_process; + _rte_eth_dev_reset; + rte_eth_dev_allocate; + rte_eth_dev_allocated; + rte_eth_dev_attach_secondary; + rte_eth_dev_create; + rte_eth_dev_destroy; + rte_eth_dev_probing_finish; + rte_eth_dev_release_port; + rte_eth_devargs_parse; rte_eth_dma_zone_free; + rte_eth_dma_zone_reserve; + rte_eth_switch_domain_alloc; + rte_eth_switch_domain_free; + rte_flow_expand_rss; };
lib/librte_ethdev/rte_flow_driver.h +1 -3
@@ -161,8 +161,6 @@ struct rte_flow_expand_rss {* Expand RSS flows into several possible flows according to the RSS hash * fields requested and the driver capabilities. * -* @b EXPERIMENTAL: this API may change without prior notice -* * @param[out] buf * Buffer to store the result expansion. * @param[in] size
@@ -183,7 +181,7 @@ struct rte_flow_expand_rss {* * -E2BIG: graph-depth @p graph is too deep. */ -__rte_experimental +__rte_internal int rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size, const struct rte_flow_item *pattern, uint64_t types,
Signature · 1 line
2.26.2
PATCH v3 5/7 ethdev: use hairpin helper functions
In reply to Ferruh YigitHairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'
Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.
--- drivers/net/mlx5/mlx5_rxq.c | 4 ++-- drivers/net/mlx5/mlx5_txq.c | 4 ++-- lib/librte_ethdev/rte_ethdev_driver.h | 2 ++ lib/librte_ethdev/rte_ethdev_version.map | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +2 -2
@@ -542,7 +542,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;int ret; -if (dev->data->rx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_rx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be stopped" ); rte_errno =EINVAL ;return -EINVAL ;
@@ -653,7 +653,7 @@ mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->rx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_rx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be started" ); rte_errno =EINVAL ;return -EINVAL ;
drivers/net/mlx5/mlx5_txq.c +2 -2
@@ -244,7 +244,7 @@ mlx5_tx_queue_stop(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->tx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_tx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be stopped" ); rte_errno =EINVAL ;return -EINVAL ;
@@ -371,7 +371,7 @@ mlx5_tx_queue_start(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->tx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_tx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be started" ); rte_errno =EINVAL ;return -EINVAL ;
lib/librte_ethdev/rte_ethdev_driver.h +2 -0
@@ -734,6 +734,7 @@ struct eth_dev_ops {* @return * - (1) if the queue is hairpin queue, 0 otherwise. */ +__rte_internal int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);/**
@@ -748,6 +749,7 @@ int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);* @return * - (1) if the queue is hairpin queue, 0 otherwise. */ +__rte_internal int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);/**
lib/librte_ethdev/rte_ethdev_version.map +2 -0
@@ -237,6 +237,8 @@ INTERNAL { rte_eth_dev_attach_secondary; rte_eth_dev_create; rte_eth_dev_destroy; + rte_eth_dev_is_rx_hairpin_queue; + rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; rte_eth_devargs_parse;
Signature · 1 line
2.26.2
PATCH v3 6/7 ethdev: remove invalid symbols from map file
In reply to Ferruh YigitThese are struct type names, not object names. Removing them from .map file.
--- lib/librte_ethdev/rte_ethdev_version.map | 2 -- 1 file changed, 2 deletions(-)
lib/librte_ethdev/rte_ethdev_version.map +0 -2
@@ -81,7 +81,6 @@ DPDK_21 { rte_eth_iterator_next; rte_eth_led_off; rte_eth_led_on; - rte_eth_link; rte_eth_link_get; rte_eth_link_get_nowait; rte_eth_macaddr_get;
@@ -96,7 +95,6 @@ DPDK_21 { rte_eth_rx_queue_setup; rte_eth_set_queue_rate_limit; rte_eth_speed_bitflag; - rte_eth_stats; rte_eth_stats_get; rte_eth_stats_reset; rte_eth_timesync_adjust_time;
Signature · 1 line
2.26.2
PATCH v3 7/7 ethdev: remove underscore prefix from internal API
In reply to Ferruh Yigit'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.
For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.
---
v3:
* release note updated
--- app/test/virtual_pmd.c | 4 ++-- doc/guides/prog_guide/poll_mode_drv.rst | 4 ++-- doc/guides/rel_notes/release_20_11.rst | 5 +++++ drivers/net/atlantic/atl_ethdev.c | 5 ++--- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/bnxt/rte_pmd_bnxt.c | 4 ++-- drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++---- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 3 +-- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 7 +++---- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enic/enic_main.c | 2 +- drivers/net/failsafe/failsafe_ether.c | 6 +++--- drivers/net/fm10k/fm10k_ethdev.c | 11 ++++------- drivers/net/hinic/base/hinic_pmd_hwdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 5 ++--- drivers/net/ice/ice_ethdev.c | 4 ++-- drivers/net/igc/igc_ethdev.c | 3 +-- drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++------ drivers/net/ixgbe/ixgbe_pf.c | 5 ++--- drivers/net/mlx4/mlx4_intr.c | 10 +++++----- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++-- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx/octeontx_ethdev.c | 6 +++--- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/qede/qede_main.c | 3 +-- drivers/net/sfc/sfc_intr.c | 12 ++++++------ drivers/net/thunderx/nicvf_ethdev.c | 6 +++--- drivers/net/vhost/rte_eth_vhost.c | 6 +++--- drivers/net/virtio/virtio_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.c | 8 ++++---- lib/librte_ethdev/rte_ethdev_driver.h | 4 ++-- lib/librte_ethdev/rte_ethdev_version.map | 4 ++-- 40 files changed, 95 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id, vrtl_eth_dev->data->dev_link.link_status = link_status; -_rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , +NULL ); }int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread. For example when PF is reset, the PF sends a message to notify VFs of this event and also trigger an interrupt to VFs. Then in the interrupt service routine the VFs detects this notification message and calls -_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). +rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET -event within VFs. The function _rte_eth_dev_callback_process() will +event within VFs. The function rte_eth_dev_callback_process() will call the registered callback function. The callback function can trigger the application to handle all operations the VF reset requires including stopping Rx/Tx queues and calling rte_eth_dev_reset().
doc/guides/rel_notes/release_20_11.rst +5 -0
@@ -86,6 +86,11 @@ API Changes * ``rte_eth_rx_descriptor_done()`` API has deprecated. +* Renamed internal ethdev APIs: + + * ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_process()`` + * ``_rte_eth_dev_reset`` -> ``rte_eth_dev_internal_reset()`` + ABI Changes -----------
drivers/net/atlantic/atl_ethdev.c +2 -3
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,/* Notify userapp if link status changed */ if (!atl_dev_link_update (dev,0 )) {atl_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }else {if (hw->aq_fw_ops->send_macsec_req ==NULL ) goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev, resp.stats.egress_expired || resp.stats.ingress_expired) {PMD_DRV_LOG (INFO ,"RTE_ETH_EVENT_MACSEC" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); } }
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -1528,9 +1528,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete, new.link_speed != eth_dev->data->dev_link.link_speed) {rte_eth_linkstatus_set (eth_dev, &new); -_rte_eth_dev_callback_process (eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );bnxt_print_link_info (eth_dev); }
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg) ret_param.vf_id = vf_id; ret_param.msg = msg; -_rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , + &ret_param);/* Default to approve */ if (ret_param.retval ==RTE_PMD_BNXT_MB_EVENT_PROCEED )
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals, internals->slave_count--;/* force reconfiguration of slave interfaces */ -_rte_eth_dev_reset (slave_eth_dev); +rte_eth_dev_internal_reset (slave_eth_dev); } static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)if (arg ==NULL )return ; -_rte_eth_dev_callback_process ((struct rte_eth_dev *)arg, +rte_eth_dev_callback_process ((struct rte_eth_dev *)arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL );
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
drivers/net/dpaa/dpaa_ethdev.c +1 -1
@@ -335,7 +335,7 @@ static void dpaa_interrupt_handler(void *param)if (bytes_read <0 )DPAA_PMD_ERR ("Error reading eventfd\n" );dpaa_eth_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int dpaa_eth_dev_start (struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param) clear =DPNI_IRQ_EVENT_LINK_CHANGED ;dpaa2_dev_link_update (dev,0 );/* calling all the apps registered for link status event */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } out: ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
@@ -1630,7 +1630,7 @@ eth_em_interrupt_handler(void *param)eth_em_interrupt_get_status (dev);eth_em_interrupt_action (dev, dev->intr_handle); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
drivers/net/e1000/igb_ethdev.c +3 -4
@@ -2920,8 +2920,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev, pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }return 0 ;
@@ -2983,8 +2982,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (mbx->ops.read (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }
drivers/net/ena/ena_ethdev.c +2 -2
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,if (unlikely (adapter->trigger_reset)) {PMD_DRV_LOG (ERR ,"Trigger reset is on\n" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL ); } }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data, adapter->link_status = status;ena_link_update (eth_dev,0 ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)vnic_intr_return_all_credits (&enic->intr[ENICPMD_LSC_INTR_OFFSET ]);enic_link_update (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );enic_log_q_error (enic);/* Re-enable irq in case of INTx */ rte_intr_ack (&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused, ret = dev->dev_ops->link_update (dev,0 );/* We must pass on the LSC event */ if (ret) -return _rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +return rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );else return 0 ; }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param) true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)if (err ==FM10K_ERR_RESET_REQUESTED ) {PMD_INIT_LOG (INFO ,"INT: Switch is down" ); dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)/* Setting reset flag */ dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)fm10k_vlan_filter_set (dev, hw->mac.default_vid, true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev, ret =hinic_link_event_process (hwdev, rte_dev, status);/* check if link has changed, notify callback */ if (ret ==0 ) -_rte_eth_dev_callback_process (rte_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (rte_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
@@ -6846,7 +6846,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)case i40e_aqc_opc_get_link_status: ret =i40e_dev_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
@@ -1378,7 +1378,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :
@@ -1425,7 +1425,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg, }i40evf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :
drivers/net/i40e/i40e_pf.c +1 -1
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,* do nothing and send not_supported to VF. As PF must send a response * to VF and ACK/NACK is not defined. */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);if (ret_param.retval !=RTE_PMD_I40E_MB_EVENT_PROCEED ) {PMD_DRV_LOG (WARNING ,"VF to PF message(%d) is not permitted!" , opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
@@ -187,7 +187,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :
@@ -202,8 +202,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, vf->link_speed =iavf_convert_link_speed (speed); }iavf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_PF_DRIVER_CLOSE event" );
drivers/net/ice/ice_ethdev.c +2 -2
@@ -1314,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)case ice_aqc_opc_get_link_status: ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :
@@ -1379,7 +1379,7 @@ ice_interrupt_handler(void *param)PMD_DRV_LOG (INFO ,"OICR: link state change event" ); ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev, RTE_ETH_EVENT_INTR_LSC, NULL); }#endif
drivers/net/igc/igc_ethdev.c +1 -2
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev) pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } }
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
@@ -4659,13 +4659,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)ixgbe_dev_link_update (dev,0 ); intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE ;ixgbe_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }if (intr->flags &IXGBE_FLAG_MACSEC ) { -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); intr->flags &= ~IXGBE_FLAG_MACSEC ; }
@@ -8674,8 +8672,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (ixgbe_read_mbx (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }
drivers/net/ixgbe/ixgbe_pf.c +2 -3
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf) vfinfo[vf].clear_to_send = true;/* notify application about VF reset */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);return ret; }
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)* if 0, do nothing and send ACK to VF * if ret_param.retval > 1, do nothing and send NAK to VF */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); retval = ret_param.retval;
drivers/net/mlx4/mlx4_intr.c +5 -5
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)MLX4_ASSERT (priv->intr_alarm ==1 ); priv->intr_alarm =0 ;if (intr_conf->lsc && !mlx4_link_status_check (priv)) -_rte_eth_dev_callback_process (ETH_DEV (priv), -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv) }for (i =0 ; i !=RTE_DIM (caught); ++i)if (caught[i]) -_rte_eth_dev_callback_process (ETH_DEV (priv), type[i], -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), type[i], +NULL ); }/**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh) dev = &rte_eth_devices[sh->port[i].ih_port_id];MLX5_ASSERT (dev);if (dev->data->dev_conf.intr_conf.rmv) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RMV ,NULL ); } }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)usleep (0 );continue ; } -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );continue ; }
drivers/net/mlx5/mlx5_flow.c +1 -1
@@ -6085,7 +6085,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,if (!MLX5_AGE_GET (age_info,MLX5_AGE_EVENT_NEW ))continue ;if (MLX5_AGE_GET (age_info,MLX5_AGE_TRIGGER )) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (&rte_eth_devices[sh->port[i].devx_ih_port_id],RTE_ETH_EVENT_FLOW_AGED ,NULL ); age_info->flags =0 ;
drivers/net/netvsc/hn_rndis.c +1 -1
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,*/ static void hn_rndis_link_alarm (void *arg) { -_rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }void hn_rndis_link_status (struct rte_eth_dev *dev,const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)struct rte_eth_dev *dev = (struct rte_eth_dev *)param;nfp_net_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );nfp_net_dev_link_status_print (dev);
drivers/net/octeontx/octeontx_ethdev.c +3 -3
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)octeontx_link_status_update (nic, &link);octeontx_link_status_print (dev, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/octeontx2/otx2_link.c +1 -1
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,rte_eth_linkstatus_set (eth_dev, ð_link);/* Set the flag and execute application callbacks */ -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
drivers/net/qede/qede_main.c +1 -2
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;if (!qede_link_update (dev,0 )) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int qed_drain (struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)sfc_notice (sa,"link status change event: link %s" , sa->eth_dev->data->dev_link.link_status ?"UP" :"DOWN" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg) exit:if (lsc_seq != sa->port.lsc_seq) {sfc_notice (sa,"link status change event" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/thunderx/nicvf_ethdev.c +3 -3
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)nicvf_link_status_update (nic, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/vhost/rte_eth_vhost.c +3 -3
@@ -832,7 +832,7 @@ new_device(int vid)VHOST_LOG (INFO ,"Vhost device %d created\n" , vid); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL );return 0 ; }
@@ -889,7 +889,7 @@ destroy_device(int vid)VHOST_LOG (INFO ,"Vhost device %d destroyed\n" , vid);eth_vhost_uninstall_intr (eth_dev); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)VHOST_LOG (INFO ,"vring%u is %s\n" , vring, enable ?"enabled" :"disabled" ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL );return 0 ; }
drivers/net/virtio/virtio_ethdev.c +3 -3
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)if (isr &VIRTIO_PCI_ISR_CONFIG ) {if (virtio_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );if (vtpci_with_feature (hw,VIRTIO_NET_F_STATUS )) { vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)if (events &VMXNET3_ECR_LINK ) {PMD_DRV_LOG (DEBUG ,"Process events: VMXNET3_ECR_LINK event" );if (vmxnet3_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)rte_eth_dev_shared_data_prepare ();if (eth_dev->state !=RTE_ETH_DEV_UNUSED ) -_rte_eth_dev_callback_process (eth_dev, +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_DESTROY ,NULL );rte_spinlock_lock (&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, }void -_rte_eth_dev_reset (struct rte_eth_dev *dev) +rte_eth_dev_internal_reset (struct rte_eth_dev *dev) {if (dev->data->dev_started) { RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }int -_rte_eth_dev_callback_process (struct rte_eth_dev *dev, +rte_eth_dev_callback_process (struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param) {struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)if (dev ==NULL )return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); dev->state =RTE_ETH_DEV_ATTACHED ; }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* void */ __rte_internal -void _rte_eth_dev_reset(struct rte_eth_dev *dev); +void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);/** * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* int */ __rte_internal -int _rte_eth_dev_callback_process(struct rte_eth_dev *dev, +int rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);/**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
@@ -228,17 +228,17 @@ EXPERIMENTAL { INTERNAL { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_dev_allocate; rte_eth_dev_allocated; rte_eth_dev_attach_secondary; + rte_eth_dev_callback_process; rte_eth_dev_create; rte_eth_dev_destroy; rte_eth_dev_is_rx_hairpin_queue; rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; + rte_eth_dev_internal_reset; rte_eth_devargs_parse; rte_eth_dma_zone_free; rte_eth_dma_zone_reserve;
Signature · 1 line
2.26.2
Re: [dpdk-dev] [PATCH v3 1/7] ethdev: deprecate descriptor status check API
In reply to Ferruh YigitQuoted 7 lines · Ferruh Yigit
Marking '
rte_eth_rx_descriptor_done()' API as deprecated. ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.Plan is to remove the API on 21.11 release.
Quoted 7 lines
Signed-off-by Ferruh Yigit <[email protected]>---
Cc: David Marchand <[email protected]>
v3:
* Just deprecating the 'rte_eth_rx_descriptor_done()' API without removing it to stick to the original plan.
LGTM, thanks.
For the series,
Signature · 1 line
David Marchand
PATCH v4 1/7 ethdev: deprecate descriptor status check API
In reply to Ferruh YigitMarking 'rte_eth_rx_descriptor_done()' API as deprecated. ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.
Plan is to remove the API on 21.11 release.
---
Cc: David Marchand <[email protected]>
v3:
* Just deprecating the 'rte_eth_rx_descriptor_done()' API without removing it to stick to the original plan.
--- doc/guides/rel_notes/deprecation.rst | 2 +- doc/guides/rel_notes/release_20_11.rst | 2 ++ lib/librte_ethdev/rte_ethdev.h | 1 + 3 files changed, 4 insertions(+), 1 deletion(-)
doc/guides/rel_notes/deprecation.rst +1 -1
@@ -214,7 +214,7 @@ Deprecation Notices https://mails.dpdk.org/archives/dev/2020-July/176135.html. * ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done`` - will be deprecated in 20.11 and will be removed in 21.11. + will be removed in 21.11. Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.
doc/guides/rel_notes/release_20_11.rst +2 -0
@@ -84,6 +84,8 @@ API Changes Also, make sure to start the actual text at the margin. ======================================================= +* ``rte_eth_rx_descriptor_done()`` API has deprecated. + ABI Changes -----------
lib/librte_ethdev/rte_ethdev.h +1 -0
@@ -4567,6 +4567,7 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)* - (-ENODEV) if *port_id* invalid. * - (-ENOTSUP) if the device does not support this function */ +__rte_deprecated static inline intrte_eth_rx_descriptor_done (uint16_t port_id,uint16_t queue_id,uint16_t offset) {
Signature · 1 line
2.26.2
PATCH v4 2/7 ethdev: move inline device operations
This patch is a preparation to hide the 'struct eth_dev_ops' from applications by moving some device operations from 'struct eth_dev_ops' to 'struct rte_eth_dev'.
Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.
Exposing 'struct eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.
To be able to both keep APIs inline and hide the 'struct eth_dev_ops', moving device operations used in ethdev inline APIs to 'struct rte_eth_dev' to the same level with Rx/Tx burst functions.
The list of dev_ops moved:eth_rx_queue_count_t rx_queue_count;eth_rx_descriptor_done_t rx_descriptor_done;eth_rx_descriptor_status_t rx_descriptor_status;eth_tx_descriptor_status_t tx_descriptor_status;
---
v2:
* Updated features.rst
* Tweak assignment order in sfc
Cc: David Marchand <[email protected]>
v3:
* ``rx_descriptor_done`` also moved
* release note updated
--- doc/guides/nics/features.rst | 6 +++--- doc/guides/rel_notes/release_20_11.rst | 9 +++++++++ drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 9 +++++---- drivers/net/axgbe/axgbe_ethdev.c | 5 +++-- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 8 ++++---- drivers/net/e1000/igb_ethdev.c | 14 +++++++------- drivers/net/enic/enic_ethdev.c | 3 +-- drivers/net/fm10k/fm10k_ethdev.c | 8 ++++---- drivers/net/i40e/i40e_ethdev.c | 8 ++++---- drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++---- drivers/net/iavf/iavf_ethdev.c | 6 +++--- drivers/net/ice/ice_ethdev.c | 6 +++--- drivers/net/igc/igc_ethdev.c | 8 ++++---- drivers/net/ixgbe/ixgbe_ethdev.c | 14 +++++++------- drivers/net/mlx5/linux/mlx5_os.c | 12 +++++------- drivers/net/mlx5/mlx5_flow.c | 4 ++++ drivers/net/netvsc/hn_ethdev.c | 6 +++--- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 8 ++++---- drivers/net/qede/qede_ethdev.c | 3 +-- drivers/net/sfc/sfc_ethdev.c | 16 ++++++++-------- drivers/net/thunderx/nicvf_ethdev.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 17 ++++++++--------- lib/librte_ethdev/rte_ethdev_core.h | 13 ++++++------- 30 files changed, 110 insertions(+), 101 deletions(-)
doc/guides/nics/features.rst +3 -3
@@ -646,9 +646,9 @@ used, status can be "Available", "Done" or "Unavailable". When ``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is not set". -* **[implements] eth_dev_ops**: ``rx_descriptor_status``. +* **[implements] rte_eth_dev**: ``rx_descriptor_status``. * **[related] API**: ``rte_eth_rx_descriptor_status()``. -* **[implements] eth_dev_ops**: ``rx_descriptor_done``. +* **[implements] rte_eth_dev**: ``rx_descriptor_done``. * **[related] API**: ``rte_eth_rx_descriptor_done()``.
@@ -660,7 +660,7 @@ Tx descriptor status Supports checking the status of a Tx descriptor. Status can be "Full", "Done" or "Unavailable." -* **[implements] eth_dev_ops**: ``tx_descriptor_status``. +* **[implements] rte_eth_dev**: ``tx_descriptor_status``. * **[related] API**: ``rte_eth_tx_descriptor_status()``.
doc/guides/rel_notes/release_20_11.rst +9 -0
@@ -102,6 +102,15 @@ ABI Changes Also, make sure to start the actual text at the margin. ======================================================= +* ``ethdev`` changes + + * Following device operation function pointers moved from ``struct eth_dev_ops`` to ``struct rte_eth_dev``: + + * ``eth_rx_queue_count_t rx_queue_count;`` + * ``eth_rx_descriptor_done_t rx_descriptor_done;`` + * ``eth_rx_descriptor_status_t rx_descriptor_status;`` + * ``eth_tx_descriptor_status_t tx_descriptor_status;`` + Known Issues ------------
drivers/net/ark/ark_ethdev.c +1 -1
@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = { .dev_infos_get = eth_ark_dev_info_get, .rx_queue_setup = eth_ark_dev_rx_queue_setup, - .rx_queue_count = eth_ark_dev_rx_queue_count, .tx_queue_setup = eth_ark_tx_queue_setup, .link_update = eth_ark_dev_link_update,
@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)return -1 ; dev->dev_ops = &ark_eth_dev_ops; + dev->rx_queue_count = eth_ark_dev_rx_queue_count; dev->data->mac_addrs =rte_zmalloc ("ark" ,RTE_ETHER_ADDR_LEN ,0 );if (!dev->data->mac_addrs) {
drivers/net/atlantic/atl_ethdev.c +5 -4
@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = { .rx_queue_intr_enable = atl_dev_rx_queue_intr_enable, .rx_queue_intr_disable = atl_dev_rx_queue_intr_disable, - .rx_queue_count = atl_rx_queue_count, - .rx_descriptor_status = atl_dev_rx_descriptor_status, - .tx_descriptor_status = atl_dev_tx_descriptor_status, -/* EEPROM */ .get_eeprom_length = atl_dev_get_eeprom_length, .get_eeprom = atl_dev_get_eeprom,
@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &atl_eth_dev_ops; + + eth_dev->rx_queue_count = atl_rx_queue_count; + eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status; + eth_dev->rx_pkt_burst = &atl_recv_pkts; eth_dev->tx_pkt_burst = &atl_xmit_pkts; eth_dev->tx_pkt_prepare = &atl_prep_pkts;
drivers/net/axgbe/axgbe_ethdev.c +3 -2
@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .rxq_info_get = axgbe_rxq_info_get, .txq_info_get = axgbe_txq_info_get, .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get, - .rx_descriptor_status = axgbe_dev_rx_descriptor_status, - .tx_descriptor_status = axgbe_dev_tx_descriptor_status, .mtu_set = axgb_mtu_set, };
@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) eth_dev->dev_ops = &axgbe_eth_dev_ops; + eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status; +/* * For secondary processes, we don't initialise any further as primary * has already done this work.
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -4246,9 +4246,6 @@ static const struct eth_dev_ops bnxt_dev_ops = { .dev_led_off = bnxt_dev_led_off_op, .xstats_get_by_id = bnxt_dev_xstats_get_by_id_op, .xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op, - .rx_queue_count = bnxt_rx_queue_count_op, - .rx_descriptor_status = bnxt_rx_descriptor_status_op, - .tx_descriptor_status = bnxt_tx_descriptor_status_op, .rx_queue_start = bnxt_rx_queue_start, .rx_queue_stop = bnxt_rx_queue_stop, .tx_queue_start = bnxt_tx_queue_start,
@@ -5681,6 +5678,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)PMD_DRV_LOG (INFO ,"%s\n" , bnxt_version); eth_dev->dev_ops = &bnxt_dev_ops; + eth_dev->rx_queue_count = bnxt_rx_queue_count_op; + eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op; + eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op; eth_dev->rx_pkt_burst = &bnxt_recv_pkts; eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;
drivers/net/dpaa/dpaa_ethdev.c +1 -1
@@ -1421,7 +1421,6 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_setup = dpaa_eth_tx_queue_setup, .rx_queue_release = dpaa_eth_rx_queue_release, .tx_queue_release = dpaa_eth_tx_queue_release, - .rx_queue_count = dpaa_dev_rx_queue_count, .rx_burst_mode_get = dpaa_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa_dev_tx_burst_mode_get, .rxq_info_get = dpaa_rxq_info_get,
@@ -1917,6 +1916,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)/* Populate ethdev structure */ eth_dev->dev_ops = &dpaa_devops; + eth_dev->rx_queue_count = dpaa_dev_rx_queue_count; eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;
drivers/net/dpaa2/dpaa2_ethdev.c +1 -1
@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = { .tx_queue_release = dpaa2_dev_tx_queue_release, .rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get, - .rx_queue_count = dpaa2_dev_rx_queue_count, .flow_ctrl_get = dpaa2_flow_ctrl_get, .flow_ctrl_set = dpaa2_flow_ctrl_set, .mac_addr_add = dpaa2_dev_add_mac_addr,
@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)* plugged. */ eth_dev->dev_ops = &dpaa2_ethdev_ops; + eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;if (dpaa2_get_devargs (dev->devargs,DRIVER_LOOPBACK_MODE )) eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx; else if (dpaa2_get_devargs(dev->devargs,
drivers/net/e1000/em_ethdev.c +4 -4
@@ -176,10 +176,6 @@ static const struct eth_dev_ops eth_em_ops = { .vlan_offload_set = eth_em_vlan_offload_set, .rx_queue_setup = eth_em_rx_queue_setup, .rx_queue_release = eth_em_rx_queue_release, - .rx_queue_count = eth_em_rx_queue_count, - .rx_descriptor_done = eth_em_rx_descriptor_done, - .rx_descriptor_status = eth_em_rx_descriptor_status, - .tx_descriptor_status = eth_em_tx_descriptor_status, .tx_queue_setup = eth_em_tx_queue_setup, .tx_queue_release = eth_em_tx_queue_release, .rx_queue_intr_enable = eth_em_rx_queue_intr_enable,
@@ -250,6 +246,10 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)E1000_DEV_PRIVATE_TO_VFTA (eth_dev->data->dev_private); eth_dev->dev_ops = ð_em_ops; + eth_dev->rx_queue_count = eth_em_rx_queue_count; + eth_dev->rx_descriptor_done = eth_em_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status; eth_dev->rx_pkt_burst = (eth_rx_burst_t)ð_em_recv_pkts; eth_dev->tx_pkt_burst = (eth_tx_burst_t)ð_em_xmit_pkts; eth_dev->tx_pkt_prepare = (eth_tx_prep_t)ð_em_prep_pkts;
drivers/net/e1000/igb_ethdev.c +7 -7
@@ -380,10 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = { .rx_queue_intr_enable = eth_igb_rx_queue_intr_enable, .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, .rx_queue_release = eth_igb_rx_queue_release, - .rx_queue_count = eth_igb_rx_queue_count, - .rx_descriptor_done = eth_igb_rx_descriptor_done, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,
@@ -441,9 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, .rx_queue_setup = eth_igb_rx_queue_setup, .rx_queue_release = eth_igb_rx_queue_release, - .rx_descriptor_done = eth_igb_rx_descriptor_done, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,
@@ -754,6 +747,10 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)uint32_t ctrl_ext; eth_dev->dev_ops = ð_igb_ops; + eth_dev->rx_queue_count = eth_igb_rx_queue_count; + eth_dev->rx_descriptor_done = eth_igb_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;
@@ -949,6 +946,9 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &igbvf_eth_dev_ops; + eth_dev->rx_descriptor_done = eth_igb_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;
drivers/net/enic/enic_ethdev.c +1 -2
@@ -1141,8 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .tx_queue_stop = enicpmd_dev_tx_queue_stop, .rx_queue_setup = enicpmd_dev_rx_queue_setup, .rx_queue_release = enicpmd_dev_rx_queue_release, - .rx_queue_count = enicpmd_dev_rx_queue_count, - .rx_descriptor_done = NULL, .tx_queue_setup = enicpmd_dev_tx_queue_setup, .tx_queue_release = enicpmd_dev_tx_queue_release, .rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,
@@ -1279,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)ENICPMD_FUNC_TRACE (); eth_dev->dev_ops = &enicpmd_eth_dev_ops; + eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count; eth_dev->rx_pkt_burst = &enic_recv_pkts; eth_dev->tx_pkt_burst = &enic_xmit_pkts; eth_dev->tx_pkt_prepare = &enic_prep_pkts;
drivers/net/fm10k/fm10k_ethdev.c +4 -4
@@ -2855,10 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = { .rx_queue_release = fm10k_rx_queue_release, .tx_queue_setup = fm10k_tx_queue_setup, .tx_queue_release = fm10k_tx_queue_release, - .rx_queue_count = fm10k_dev_rx_queue_count, - .rx_descriptor_done = fm10k_dev_rx_descriptor_done, - .rx_descriptor_status = fm10k_dev_rx_descriptor_status, - .tx_descriptor_status = fm10k_dev_tx_descriptor_status, .rx_queue_intr_enable = fm10k_dev_rx_queue_intr_enable, .rx_queue_intr_disable = fm10k_dev_rx_queue_intr_disable, .reta_update = fm10k_reta_update,
@@ -3055,6 +3051,10 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &fm10k_eth_dev_ops; + dev->rx_queue_count = fm10k_dev_rx_queue_count; + dev->rx_descriptor_done = fm10k_dev_rx_descriptor_done; + dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status; + dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status; dev->rx_pkt_burst = &fm10k_recv_pkts; dev->tx_pkt_burst = &fm10k_xmit_pkts; dev->tx_pkt_prepare = &fm10k_prep_pkts;
drivers/net/i40e/i40e_ethdev.c +4 -4
@@ -474,10 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .rx_queue_intr_enable = i40e_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40e_dev_rx_queue_intr_disable, .rx_queue_release = i40e_dev_rx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, .dev_led_on = i40e_dev_led_on,
@@ -1448,6 +1444,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &i40e_eth_dev_ops; + dev->rx_queue_count = i40e_dev_rx_queue_count; + dev->rx_descriptor_done = i40e_dev_rx_descriptor_done; + dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; dev->rx_pkt_burst = i40e_recv_pkts; dev->tx_pkt_burst = i40e_xmit_pkts; dev->tx_pkt_prepare = i40e_prep_pkts;
drivers/net/i40e/i40e_ethdev_vf.c +4 -4
@@ -199,12 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = { .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, .rxq_info_get = i40e_rxq_info_get, .txq_info_get = i40e_txq_info_get, .mac_addr_add = i40evf_add_mac_addr,
@@ -1561,6 +1557,10 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &i40evf_eth_dev_ops; + eth_dev->rx_queue_count = i40e_dev_rx_queue_count; + eth_dev->rx_descriptor_done = i40e_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &i40e_recv_pkts; eth_dev->tx_pkt_burst = &i40e_xmit_pkts;
drivers/net/iavf/iavf_ethdev.c +3 -3
@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .rss_hash_conf_get = iavf_dev_rss_hash_conf_get, .rxq_info_get = iavf_dev_rxq_info_get, .txq_info_get = iavf_dev_txq_info_get, - .rx_queue_count = iavf_dev_rxq_count, - .rx_descriptor_status = iavf_dev_rx_desc_status, - .tx_descriptor_status = iavf_dev_tx_desc_status, .mtu_set = iavf_dev_mtu_set, .rx_queue_intr_enable = iavf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable,
@@ -1383,6 +1380,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; + eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; + eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status; eth_dev->rx_pkt_burst = &iavf_recv_pkts; eth_dev->tx_pkt_burst = &iavf_xmit_pkts; eth_dev->tx_pkt_prepare = &iavf_prep_pkts;
drivers/net/ice/ice_ethdev.c +3 -3
@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = { .tx_burst_mode_get = ice_tx_burst_mode_get, .get_eeprom_length = ice_get_eeprom_length, .get_eeprom = ice_get_eeprom, - .rx_queue_count = ice_rx_queue_count, - .rx_descriptor_status = ice_rx_descriptor_status, - .tx_descriptor_status = ice_tx_descriptor_status, .stats_get = ice_stats_get, .stats_reset = ice_stats_reset, .xstats_get = ice_xstats_get,
@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)int ret; dev->dev_ops = &ice_eth_dev_ops; + dev->rx_queue_count = ice_rx_queue_count; + dev->rx_descriptor_status = ice_rx_descriptor_status; + dev->tx_descriptor_status = ice_tx_descriptor_status; dev->rx_pkt_burst = ice_recv_pkts; dev->tx_pkt_burst = ice_xmit_pkts; dev->tx_pkt_prepare = ice_prep_pkts;
drivers/net/igc/igc_ethdev.c +4 -4
@@ -272,10 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = { .rx_queue_setup = eth_igc_rx_queue_setup, .rx_queue_release = eth_igc_rx_queue_release, - .rx_queue_count = eth_igc_rx_queue_count, - .rx_descriptor_done = eth_igc_rx_descriptor_done, - .rx_descriptor_status = eth_igc_rx_descriptor_status, - .tx_descriptor_status = eth_igc_tx_descriptor_status, .tx_queue_setup = eth_igc_tx_queue_setup, .tx_queue_release = eth_igc_tx_queue_release, .tx_done_cleanup = eth_igc_tx_done_cleanup,
@@ -1227,6 +1223,10 @@ eth_igc_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = ð_igc_ops; + dev->rx_descriptor_done = eth_igc_rx_descriptor_done; + dev->rx_queue_count = eth_igc_rx_queue_count; + dev->rx_descriptor_status = eth_igc_rx_descriptor_status; + dev->tx_descriptor_status = eth_igc_tx_descriptor_status;/* * for secondary processes, we don't initialize any further as primary
drivers/net/ixgbe/ixgbe_ethdev.c +7 -7
@@ -545,10 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_queue_count = ixgbe_dev_rx_queue_count, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .dev_led_on = ixgbe_dev_led_on,
@@ -622,9 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .vlan_offload_set = ixgbevf_vlan_offload_set, .rx_queue_setup = ixgbe_dev_rx_queue_setup, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,
@@ -1091,6 +1084,10 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)ixgbe_dev_macsec_setting_reset (eth_dev); eth_dev->dev_ops = &ixgbe_eth_dev_ops; + eth_dev->rx_queue_count = ixgbe_dev_rx_queue_count; + eth_dev->rx_descriptor_done = ixgbe_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts; eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;
@@ -1570,6 +1567,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &ixgbevf_eth_dev_ops; + eth_dev->rx_descriptor_done = ixgbe_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;
drivers/net/mlx5/linux/mlx5_os.c +5 -7
@@ -601,6 +601,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, } eth_dev->device = dpdk_dev; eth_dev->dev_ops = &mlx5_os_dev_sec_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; err =mlx5_proc_priv_init (eth_dev);if (err)return NULL ;
@@ -1208,6 +1210,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, eth_dev->rx_pkt_burst = removed_rx_burst; eth_dev->tx_pkt_burst = removed_tx_burst; eth_dev->dev_ops = &mlx5_os_dev_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; + eth_dev->rx_queue_count = mlx5_rx_queue_count;/* Register MAC address. */ claim_zero (mlx5_mac_addr_add (eth_dev, &mac,0 ,0 ));if (config->vf && config->vf_nl_en)
@@ -2396,13 +2401,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = { .rss_hash_update = mlx5_rss_hash_update, .rss_hash_conf_get = mlx5_rss_hash_conf_get, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get, .tx_burst_mode_get = mlx5_tx_burst_mode_get, - .rx_queue_count = mlx5_rx_queue_count, .rx_queue_intr_enable = mlx5_rx_intr_enable, .rx_queue_intr_disable = mlx5_rx_intr_disable, .is_removed = mlx5_is_removed,
@@ -2427,8 +2429,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = { .rx_queue_stop = mlx5_rx_queue_stop, .tx_queue_start = mlx5_tx_queue_start, .tx_queue_stop = mlx5_tx_queue_stop, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,
@@ -2480,8 +2480,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = { .vlan_strip_queue_set = mlx5_vlan_strip_queue_set, .vlan_offload_set = mlx5_vlan_offload_set, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,
drivers/net/mlx5/mlx5_flow.c +4 -0
@@ -5138,6 +5138,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev, dev->dev_ops = &mlx5_os_dev_ops_isolate; else dev->dev_ops = &mlx5_os_dev_ops; + + dev->rx_descriptor_status = mlx5_rx_descriptor_status; + dev->tx_descriptor_status = mlx5_tx_descriptor_status; +return 0 ; }
drivers/net/netvsc/hn_ethdev.c +3 -3
@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = { .tx_queue_setup = hn_dev_tx_queue_setup, .tx_queue_release = hn_dev_tx_queue_release, .tx_done_cleanup = hn_dev_tx_done_cleanup, - .tx_descriptor_status = hn_dev_tx_descriptor_status, .rx_queue_setup = hn_dev_rx_queue_setup, .rx_queue_release = hn_dev_rx_queue_release, - .rx_queue_count = hn_dev_rx_queue_count, - .rx_descriptor_status = hn_dev_rx_queue_status, .link_update = hn_dev_link_update, .stats_get = hn_dev_stats_get, .stats_reset = hn_dev_stats_reset,
@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) vmbus = container_of(device, struct rte_vmbus_device, device); eth_dev->dev_ops = &hn_eth_dev_ops; + eth_dev->rx_queue_count = hn_dev_rx_queue_count; + eth_dev->rx_descriptor_status = hn_dev_rx_queue_status; + eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status; eth_dev->tx_pkt_burst = &hn_xmit_pkts; eth_dev->rx_pkt_burst = &hn_recv_pkts;
drivers/net/nfp/nfp_net.c +1 -1
@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = { .rss_hash_conf_get = nfp_net_rss_hash_conf_get, .rx_queue_setup = nfp_net_rx_queue_setup, .rx_queue_release = nfp_net_rx_queue_release, - .rx_queue_count = nfp_net_rx_queue_count, .tx_queue_setup = nfp_net_tx_queue_setup, .tx_queue_release = nfp_net_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable,
@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &nfp_net_eth_dev_ops; + eth_dev->rx_queue_count = nfp_net_rx_queue_count; eth_dev->rx_pkt_burst = &nfp_net_recv_pkts; eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;
drivers/net/octeontx2/otx2_ethdev.c +4 -4
@@ -2272,10 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { .txq_info_get = otx2_nix_txq_info_get, .rx_burst_mode_get = otx2_rx_burst_mode_get, .tx_burst_mode_get = otx2_tx_burst_mode_get, - .rx_queue_count = otx2_nix_rx_queue_count, - .rx_descriptor_done = otx2_nix_rx_descriptor_done, - .rx_descriptor_status = otx2_nix_rx_descriptor_status, - .tx_descriptor_status = otx2_nix_tx_descriptor_status, .tx_done_cleanup = otx2_nix_tx_done_cleanup, .set_queue_rate_limit = otx2_nix_tm_set_queue_rate_limit, .pool_ops_supported = otx2_nix_pool_ops_supported,
@@ -2382,6 +2378,10 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)int rc, max_entries; eth_dev->dev_ops = &otx2_eth_dev_ops; + eth_dev->rx_descriptor_done = otx2_nix_rx_descriptor_done; + eth_dev->rx_queue_count = otx2_nix_rx_queue_count; + eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status; + eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {
drivers/net/qede/qede_ethdev.c +1 -2
@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,
@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,
@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) } eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops; + eth_dev->rx_descriptor_status = qede_rx_descriptor_status; adapter->num_tx_queues =0 ; adapter->num_rx_queues =0 ;
drivers/net/sfc/sfc_ethdev.c +8 -8
@@ -1819,10 +1819,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .tx_queue_stop = sfc_tx_queue_stop, .rx_queue_setup = sfc_rx_queue_setup, .rx_queue_release = sfc_rx_queue_release, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .rx_queue_intr_enable = sfc_rx_queue_intr_enable, .rx_queue_intr_disable = sfc_rx_queue_intr_disable, .tx_queue_setup = sfc_tx_queue_setup,
@@ -1977,6 +1973,10 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_done = sfc_rx_descriptor_done; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status; dev->dev_ops = &sfc_eth_dev_ops;return 0 ;
@@ -2017,10 +2017,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query, .rss_hash_conf_get = sfc_dev_rss_hash_conf_get, .rxq_info_get = sfc_rx_queue_info_get,
@@ -2085,6 +2081,10 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) dev->rx_pkt_burst = dp_rx->pkt_burst; dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_done = sfc_rx_descriptor_done; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status; dev->dev_ops = &sfc_eth_dev_secondary_ops;return 0 ;
drivers/net/thunderx/nicvf_ethdev.c +1 -1
@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = { .tx_queue_stop = nicvf_dev_tx_queue_stop, .rx_queue_setup = nicvf_dev_rx_queue_setup, .rx_queue_release = nicvf_dev_rx_queue_release, - .rx_queue_count = nicvf_dev_rx_queue_count, .tx_queue_setup = nicvf_dev_tx_queue_setup, .tx_queue_release = nicvf_dev_tx_queue_release, .dev_set_link_up = nicvf_dev_set_link_up,
@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &nicvf_eth_dev_ops; + eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {
drivers/net/vhost/rte_eth_vhost.c +1 -1
@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = { .rx_queue_release = eth_queue_release, .tx_queue_release = eth_queue_release, .tx_done_cleanup = eth_tx_done_cleanup, - .rx_queue_count = eth_rx_queue_count, .link_update = eth_link_update, .stats_get = eth_stats_get, .stats_reset = eth_stats_reset,
@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, data->all_multicast =1 ; eth_dev->dev_ops = &ops; + eth_dev->rx_queue_count = eth_rx_queue_count;/* finally assign rx and tx ops */ eth_dev->rx_pkt_burst = eth_vhost_rx;
drivers/net/virtio/virtio_ethdev.c +1 -1
@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = { .rx_queue_intr_enable = virtio_dev_rx_queue_intr_enable, .rx_queue_intr_disable = virtio_dev_rx_queue_intr_disable, .rx_queue_release = virtio_dev_queue_release, - .rx_descriptor_done = virtio_dev_rx_queue_done, .tx_queue_setup = virtio_dev_tx_queue_setup, .tx_queue_release = virtio_dev_queue_release,/* collect stats per queue */
@@ -1903,6 +1902,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &virtio_eth_dev_ops; + eth_dev->rx_descriptor_done = virtio_dev_rx_queue_done;if (rte_eal_process_type () ==RTE_PROC_SECONDARY ) {if (!hw->virtio_user_dev) {
lib/librte_ethdev/rte_ethdev.h +8 -9
@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -EINVAL ); dev = &rte_eth_devices[port_id]; -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_queue_count, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_queue_count, -ENOTSUP );if (queue_id >= dev->data->nb_rx_queues)return -EINVAL ; -return (int )(*dev->dev_ops->rx_queue_count)(dev, queue_id); +return (int )(*dev->rx_queue_count)(dev, queue_id); }/**
@@ -4573,9 +4573,8 @@ rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset) {struct rte_eth_dev *dev = &rte_eth_devices[port_id];RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_done, -ENOTSUP ); -return (*dev->dev_ops->rx_descriptor_done)( \ - dev->data->rx_queues[queue_id], offset); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_descriptor_done, -ENOTSUP ); +return (*dev->rx_descriptor_done)(dev->data->rx_queues[queue_id], offset); }#define RTE_ETH_RX_DESC_AVAIL 0/**< Desc available for hw. */
@@ -4630,10 +4629,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,if (queue_id >= dev->data->nb_rx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_descriptor_status, -ENOTSUP ); rxq = dev->data->rx_queues[queue_id]; -return (*dev->dev_ops->rx_descriptor_status)(rxq, offset); +return (*dev->rx_descriptor_status)(rxq, offset); }#define RTE_ETH_TX_DESC_FULL 0/**< Desc filled for hw, waiting xmit. */
@@ -4687,10 +4686,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,if (queue_id >= dev->data->nb_tx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->tx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->tx_descriptor_status, -ENOTSUP ); txq = dev->data->tx_queues[queue_id]; -return (*dev->dev_ops->tx_descriptor_status)(txq, offset); +return (*dev->tx_descriptor_status)(txq, offset); }/**
lib/librte_ethdev/rte_ethdev_core.h +6 -7
@@ -660,13 +660,6 @@ struct eth_dev_ops {eth_queue_stop_t tx_queue_stop;/**< Stop TX for a queue. */ eth_rx_queue_setup_t rx_queue_setup;/**< Set up device RX queue. */ eth_queue_release_t rx_queue_release;/**< Release RX queue. */ -eth_rx_queue_count_t rx_queue_count; -/**< Get the number of used RX descriptors. */ -eth_rx_descriptor_done_t rx_descriptor_done;/**< Check rxd DD bit. */ -eth_rx_descriptor_status_t rx_descriptor_status; -/**< Check the status of a Rx descriptor. */ -eth_tx_descriptor_status_t tx_descriptor_status; -/**< Check the status of a Tx descriptor. */ /* * Static inline functions use functions ABOVE this comment. * New dev_ops functions should be added BELOW to avoid breaking ABI.
@@ -782,6 +775,12 @@ struct rte_eth_dev {eth_rx_burst_t rx_pkt_burst;/**< Pointer to PMD receive function. */ eth_tx_burst_t tx_pkt_burst;/**< Pointer to PMD transmit function. */ eth_tx_prep_t tx_pkt_prepare;/**< Pointer to PMD transmit prepare function. */ + +eth_rx_queue_count_t rx_queue_count;/**< Get the number of used RX descriptors. */ +eth_rx_descriptor_done_t rx_descriptor_done;/**< Check rxd DD bit. */ +eth_rx_descriptor_status_t rx_descriptor_status;/**< Check the status of a Rx descriptor. */ +eth_tx_descriptor_status_t tx_descriptor_status;/**< Check the status of a Tx descriptor. */ +/** * Next two fields are per-device data but *data is shared between * primary and secondary processes and *process_private is per-process
Signature · 1 line
2.26.2
Re: [dpdk-dev] [PATCH v4 2/7] ethdev: move inline device operations
Quoted 904 lines · Ferruh Yigit
This patch is a preparation to hide the 'struct
eth_dev_ops' from applications by moving some device operations from 'structeth_dev_ops' to 'structrte_eth_dev'.Mentioned ethdev APIs are in the data path and implemented as inline because of performance reasons.
Exposing 'struct
eth_dev_ops' to applications is bad because it is a contract between ethdev and PMDs, not really needs to be known by applications, also changes in the struct causing ABI breakages which shouldn't.To be able to both keep APIs inline and hide the 'struct
eth_dev_ops', moving device operations used in ethdev inline APIs to 'structrte_eth_dev' to the same level with Rx/Tx burst functions.The list of
dev_opsmoved:eth_rx_queue_count_trx_queue_count;eth_rx_descriptor_done_trx_descriptor_done;eth_rx_descriptor_status_trx_descriptor_status;eth_tx_descriptor_status_ttx_descriptor_status;Signed-off-by Ferruh Yigit <[email protected]>Reviewed-by Andrew Rybchenko <[email protected]>Acked-by David Marchand <[email protected]>---
v2:
* Updatedfeatures.rst
* Tweak assignment order in sfcCc: David Marchand <[email protected]>
v3:
* ``rx_descriptor_done`` also moved
* release note updated--- doc/guides/nics/features.rst | 6 +++--- doc/guides/rel_notes/release_20_11.rst | 9 +++++++++ drivers/net/ark/ark_ethdev.c | 2 +- drivers/net/atlantic/atl_ethdev.c | 9 +++++---- drivers/net/axgbe/axgbe_ethdev.c | 5 +++-- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 2 +- drivers/net/e1000/em_ethdev.c | 8 ++++---- drivers/net/e1000/igb_ethdev.c | 14 +++++++------- drivers/net/enic/enic_ethdev.c | 3 +-- drivers/net/fm10k/fm10k_ethdev.c | 8 ++++---- drivers/net/i40e/i40e_ethdev.c | 8 ++++---- drivers/net/i40e/i40e_ethdev_vf.c | 8 ++++---- drivers/net/iavf/iavf_ethdev.c | 6 +++--- drivers/net/ice/ice_ethdev.c | 6 +++--- drivers/net/igc/igc_ethdev.c | 8 ++++---- drivers/net/ixgbe/ixgbe_ethdev.c | 14 +++++++------- drivers/net/mlx5/linux/mlx5_os.c | 12 +++++------- drivers/net/mlx5/mlx5_flow.c | 4 ++++ drivers/net/netvsc/hn_ethdev.c | 6 +++--- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx2/otx2_ethdev.c | 8 ++++---- drivers/net/qede/qede_ethdev.c | 3 +-- drivers/net/sfc/sfc_ethdev.c | 16 ++++++++-------- drivers/net/thunderx/nicvf_ethdev.c | 2 +- drivers/net/vhost/rte_eth_vhost.c | 2 +- drivers/net/virtio/virtio_ethdev.c | 2 +- lib/librte_ethdev/rte_ethdev.h | 17 ++++++++--------- lib/librte_ethdev/rte_ethdev_core.h | 13 ++++++------- 30 files changed, 110 insertions(+), 101 deletions(-)doc/guides/nics/features.rst +3
-3@@ -646,9 +646,9 @@ used, status can be "Available", "Done" or "Unavailable". When ``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is not set". -* **[implements] eth_dev_ops**: ``rx_descriptor_status``. +* **[implements] rte_eth_dev**: ``rx_descriptor_status``. * **[related] API**: ``rte_eth_rx_descriptor_status()``. -* **[implements] eth_dev_ops**: ``rx_descriptor_done``. +* **[implements] rte_eth_dev**: ``rx_descriptor_done``. * **[related] API**: ``rte_eth_rx_descriptor_done()``.@@ -660,7 +660,7 @@ Tx descriptor status Supports checking the status of a Tx descriptor. Status can be "Full", "Done" or "Unavailable." -* **[implements] eth_dev_ops**: ``tx_descriptor_status``. +* **[implements] rte_eth_dev**: ``tx_descriptor_status``. * **[related] API**: ``rte_eth_tx_descriptor_status()``.doc/guides/rel_notes/release_20_11.rst +9
-0@@ -102,6 +102,15 @@ ABI Changes Also, make sure to start the actual text at the margin. ======================================================= +* ``ethdev`` changes + + * Following device operation function pointers moved from ``struct eth_dev_ops`` to ``struct rte_eth_dev``: + + * ``eth_rx_queue_count_t rx_queue_count;`` + * ``eth_rx_descriptor_done_t rx_descriptor_done;`` + * ``eth_rx_descriptor_status_t rx_descriptor_status;`` + * ``eth_tx_descriptor_status_t tx_descriptor_status;`` + Known Issues ------------drivers/net/ark/ark_ethdev.c +1
-1@@ -132,7 +132,6 @@ static const struct eth_dev_ops ark_eth_dev_ops = { .dev_infos_get = eth_ark_dev_info_get, .rx_queue_setup = eth_ark_dev_rx_queue_setup, - .rx_queue_count = eth_ark_dev_rx_queue_count, .tx_queue_setup = eth_ark_tx_queue_setup, .link_update = eth_ark_dev_link_update,@@ -318,6 +317,7 @@ eth_ark_dev_init(struct rte_eth_dev *dev)return -1 ; dev->dev_ops = &ark_eth_dev_ops; + dev->rx_queue_count = eth_ark_dev_rx_queue_count; dev->data->mac_addrs =rte_zmalloc ("ark" ,RTE_ETHER_ADDR_LEN ,0 );if (!dev->data->mac_addrs) {drivers/net/atlantic/atl_ethdev.c +5
-4@@ -313,10 +313,6 @@ static const struct eth_dev_ops atl_eth_dev_ops = { .rx_queue_intr_enable = atl_dev_rx_queue_intr_enable, .rx_queue_intr_disable = atl_dev_rx_queue_intr_disable, - .rx_queue_count = atl_rx_queue_count, - .rx_descriptor_status = atl_dev_rx_descriptor_status, - .tx_descriptor_status = atl_dev_tx_descriptor_status, -/* EEPROM */ .get_eeprom_length = atl_dev_get_eeprom_length, .get_eeprom = atl_dev_get_eeprom,@@ -373,6 +369,11 @@ eth_atl_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &atl_eth_dev_ops; + + eth_dev->rx_queue_count = atl_rx_queue_count; + eth_dev->rx_descriptor_status = atl_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = atl_dev_tx_descriptor_status; + eth_dev->rx_pkt_burst = &atl_recv_pkts; eth_dev->tx_pkt_burst = &atl_xmit_pkts; eth_dev->tx_pkt_prepare = &atl_prep_pkts;drivers/net/axgbe/axgbe_ethdev.c +3
-2@@ -224,8 +224,6 @@ static const struct eth_dev_ops axgbe_eth_dev_ops = { .rxq_info_get = axgbe_rxq_info_get, .txq_info_get = axgbe_txq_info_get, .dev_supported_ptypes_get = axgbe_dev_supported_ptypes_get, - .rx_descriptor_status = axgbe_dev_rx_descriptor_status, - .tx_descriptor_status = axgbe_dev_tx_descriptor_status, .mtu_set = axgb_mtu_set, };@@ -1632,6 +1630,9 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) eth_dev->dev_ops = &axgbe_eth_dev_ops; + eth_dev->rx_descriptor_status = axgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = axgbe_dev_tx_descriptor_status; +/* * For secondary processes, we don't initialise any further as primary * has already done this work. drivers/net/bnxt/bnxt_ethdev.c +3
-3@@ -4246,9 +4246,6 @@ static const struct eth_dev_ops bnxt_dev_ops = { .dev_led_off = bnxt_dev_led_off_op, .xstats_get_by_id = bnxt_dev_xstats_get_by_id_op, .xstats_get_names_by_id = bnxt_dev_xstats_get_names_by_id_op, - .rx_queue_count = bnxt_rx_queue_count_op, - .rx_descriptor_status = bnxt_rx_descriptor_status_op, - .tx_descriptor_status = bnxt_tx_descriptor_status_op, .rx_queue_start = bnxt_rx_queue_start, .rx_queue_stop = bnxt_rx_queue_stop, .tx_queue_start = bnxt_tx_queue_start,@@ -5681,6 +5678,9 @@ bnxt_dev_init(struct rte_eth_dev *eth_dev, void *params __rte_unused)PMD_DRV_LOG (INFO ,"%s\n" , bnxt_version); eth_dev->dev_ops = &bnxt_dev_ops; + eth_dev->rx_queue_count = bnxt_rx_queue_count_op; + eth_dev->rx_descriptor_status = bnxt_rx_descriptor_status_op; + eth_dev->tx_descriptor_status = bnxt_tx_descriptor_status_op; eth_dev->rx_pkt_burst = &bnxt_recv_pkts; eth_dev->tx_pkt_burst = &bnxt_xmit_pkts;drivers/net/dpaa/dpaa_ethdev.c +1
-1@@ -1421,7 +1421,6 @@ static struct eth_dev_ops dpaa_devops = { .tx_queue_setup = dpaa_eth_tx_queue_setup, .rx_queue_release = dpaa_eth_rx_queue_release, .tx_queue_release = dpaa_eth_tx_queue_release, - .rx_queue_count = dpaa_dev_rx_queue_count, .rx_burst_mode_get = dpaa_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa_dev_tx_burst_mode_get, .rxq_info_get = dpaa_rxq_info_get,@@ -1917,6 +1916,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)/* Populate ethdev structure */ eth_dev->dev_ops = &dpaa_devops; + eth_dev->rx_queue_count = dpaa_dev_rx_queue_count; eth_dev->rx_pkt_burst = dpaa_eth_queue_rx; eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;drivers/net/dpaa2/dpaa2_ethdev.c +1
-1@@ -2331,7 +2331,6 @@ static struct eth_dev_ops dpaa2_ethdev_ops = { .tx_queue_release = dpaa2_dev_tx_queue_release, .rx_burst_mode_get = dpaa2_dev_rx_burst_mode_get, .tx_burst_mode_get = dpaa2_dev_tx_burst_mode_get, - .rx_queue_count = dpaa2_dev_rx_queue_count, .flow_ctrl_get = dpaa2_flow_ctrl_get, .flow_ctrl_set = dpaa2_flow_ctrl_set, .mac_addr_add = dpaa2_dev_add_mac_addr,@@ -2486,6 +2485,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev)* plugged. */ eth_dev->dev_ops = &dpaa2_ethdev_ops; + eth_dev->rx_queue_count = dpaa2_dev_rx_queue_count;if (dpaa2_get_devargs (dev->devargs,DRIVER_LOOPBACK_MODE )) eth_dev->rx_pkt_burst = dpaa2_dev_loopback_rx; else if (dpaa2_get_devargs(dev->devargs,drivers/net/e1000/em_ethdev.c +4
-4@@ -176,10 +176,6 @@ static const struct eth_dev_ops eth_em_ops = { .vlan_offload_set = eth_em_vlan_offload_set, .rx_queue_setup = eth_em_rx_queue_setup, .rx_queue_release = eth_em_rx_queue_release, - .rx_queue_count = eth_em_rx_queue_count, - .rx_descriptor_done = eth_em_rx_descriptor_done, - .rx_descriptor_status = eth_em_rx_descriptor_status, - .tx_descriptor_status = eth_em_tx_descriptor_status, .tx_queue_setup = eth_em_tx_queue_setup, .tx_queue_release = eth_em_tx_queue_release, .rx_queue_intr_enable = eth_em_rx_queue_intr_enable,@@ -250,6 +246,10 @@ eth_em_dev_init(struct rte_eth_dev *eth_dev)E1000_DEV_PRIVATE_TO_VFTA (eth_dev->data->dev_private); eth_dev->dev_ops = ð_em_ops; + eth_dev->rx_queue_count = eth_em_rx_queue_count; + eth_dev->rx_descriptor_done = eth_em_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_em_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_em_tx_descriptor_status; eth_dev->rx_pkt_burst = (eth_rx_burst_t)ð_em_recv_pkts; eth_dev->tx_pkt_burst = (eth_tx_burst_t)ð_em_xmit_pkts; eth_dev->tx_pkt_prepare = (eth_tx_prep_t)ð_em_prep_pkts;drivers/net/e1000/igb_ethdev.c +7
-7@@ -380,10 +380,6 @@ static const struct eth_dev_ops eth_igb_ops = { .rx_queue_intr_enable = eth_igb_rx_queue_intr_enable, .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, .rx_queue_release = eth_igb_rx_queue_release, - .rx_queue_count = eth_igb_rx_queue_count, - .rx_descriptor_done = eth_igb_rx_descriptor_done, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,@@ -441,9 +437,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, .rx_queue_setup = eth_igb_rx_queue_setup, .rx_queue_release = eth_igb_rx_queue_release, - .rx_descriptor_done = eth_igb_rx_descriptor_done, - .rx_descriptor_status = eth_igb_rx_descriptor_status, - .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, .tx_queue_release = eth_igb_tx_queue_release, .tx_done_cleanup = eth_igb_tx_done_cleanup,@@ -754,6 +747,10 @@ eth_igb_dev_init(struct rte_eth_dev *eth_dev)uint32_t ctrl_ext; eth_dev->dev_ops = ð_igb_ops; + eth_dev->rx_queue_count = eth_igb_rx_queue_count; + eth_dev->rx_descriptor_done = eth_igb_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;@@ -949,6 +946,9 @@ eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &igbvf_eth_dev_ops; + eth_dev->rx_descriptor_done = eth_igb_rx_descriptor_done; + eth_dev->rx_descriptor_status = eth_igb_rx_descriptor_status; + eth_dev->tx_descriptor_status = eth_igb_tx_descriptor_status; eth_dev->rx_pkt_burst = ð_igb_recv_pkts; eth_dev->tx_pkt_burst = ð_igb_xmit_pkts; eth_dev->tx_pkt_prepare = ð_igb_prep_pkts;drivers/net/enic/enic_ethdev.c +1
-2@@ -1141,8 +1141,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .tx_queue_stop = enicpmd_dev_tx_queue_stop, .rx_queue_setup = enicpmd_dev_rx_queue_setup, .rx_queue_release = enicpmd_dev_rx_queue_release, - .rx_queue_count = enicpmd_dev_rx_queue_count, - .rx_descriptor_done = NULL, .tx_queue_setup = enicpmd_dev_tx_queue_setup, .tx_queue_release = enicpmd_dev_tx_queue_release, .rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable,@@ -1279,6 +1277,7 @@ static int eth_enicpmd_dev_init(struct rte_eth_dev *eth_dev)ENICPMD_FUNC_TRACE (); eth_dev->dev_ops = &enicpmd_eth_dev_ops; + eth_dev->rx_queue_count = enicpmd_dev_rx_queue_count; eth_dev->rx_pkt_burst = &enic_recv_pkts; eth_dev->tx_pkt_burst = &enic_xmit_pkts; eth_dev->tx_pkt_prepare = &enic_prep_pkts;drivers/net/fm10k/fm10k_ethdev.c +4
-4@@ -2855,10 +2855,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = { .rx_queue_release = fm10k_rx_queue_release, .tx_queue_setup = fm10k_tx_queue_setup, .tx_queue_release = fm10k_tx_queue_release, - .rx_queue_count = fm10k_dev_rx_queue_count, - .rx_descriptor_done = fm10k_dev_rx_descriptor_done, - .rx_descriptor_status = fm10k_dev_rx_descriptor_status, - .tx_descriptor_status = fm10k_dev_tx_descriptor_status, .rx_queue_intr_enable = fm10k_dev_rx_queue_intr_enable, .rx_queue_intr_disable = fm10k_dev_rx_queue_intr_disable, .reta_update = fm10k_reta_update,@@ -3055,6 +3051,10 @@ eth_fm10k_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &fm10k_eth_dev_ops; + dev->rx_queue_count = fm10k_dev_rx_queue_count; + dev->rx_descriptor_done = fm10k_dev_rx_descriptor_done; + dev->rx_descriptor_status = fm10k_dev_rx_descriptor_status; + dev->tx_descriptor_status = fm10k_dev_tx_descriptor_status; dev->rx_pkt_burst = &fm10k_recv_pkts; dev->tx_pkt_burst = &fm10k_xmit_pkts; dev->tx_pkt_prepare = &fm10k_prep_pkts;drivers/net/i40e/i40e_ethdev.c +4
-4@@ -474,10 +474,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .rx_queue_intr_enable = i40e_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40e_dev_rx_queue_intr_disable, .rx_queue_release = i40e_dev_rx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, .dev_led_on = i40e_dev_led_on,@@ -1448,6 +1444,10 @@ eth_i40e_dev_init(struct rte_eth_dev *dev, void *init_params __rte_unused)PMD_INIT_FUNC_TRACE (); dev->dev_ops = &i40e_eth_dev_ops; + dev->rx_queue_count = i40e_dev_rx_queue_count; + dev->rx_descriptor_done = i40e_dev_rx_descriptor_done; + dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; dev->rx_pkt_burst = i40e_recv_pkts; dev->tx_pkt_burst = i40e_xmit_pkts; dev->tx_pkt_prepare = i40e_prep_pkts;drivers/net/i40e/i40e_ethdev_vf.c +4
-4@@ -199,12 +199,8 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = { .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, - .rx_descriptor_status = i40e_dev_rx_descriptor_status, - .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, .tx_queue_release = i40e_dev_tx_queue_release, - .rx_queue_count = i40e_dev_rx_queue_count, .rxq_info_get = i40e_rxq_info_get, .txq_info_get = i40e_txq_info_get, .mac_addr_add = i40evf_add_mac_addr,@@ -1561,6 +1557,10 @@ i40evf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &i40evf_eth_dev_ops; + eth_dev->rx_queue_count = i40e_dev_rx_queue_count; + eth_dev->rx_descriptor_done = i40e_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = i40e_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = i40e_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &i40e_recv_pkts; eth_dev->tx_pkt_burst = &i40e_xmit_pkts;drivers/net/iavf/iavf_ethdev.c +3
-3@@ -117,9 +117,6 @@ static const struct eth_dev_ops iavf_eth_dev_ops = { .rss_hash_conf_get = iavf_dev_rss_hash_conf_get, .rxq_info_get = iavf_dev_rxq_info_get, .txq_info_get = iavf_dev_txq_info_get, - .rx_queue_count = iavf_dev_rxq_count, - .rx_descriptor_status = iavf_dev_rx_desc_status, - .tx_descriptor_status = iavf_dev_tx_desc_status, .mtu_set = iavf_dev_mtu_set, .rx_queue_intr_enable = iavf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = iavf_dev_rx_queue_intr_disable,@@ -1383,6 +1380,9 @@ iavf_dev_init(struct rte_eth_dev *eth_dev)/* assign ops func pointer */ eth_dev->dev_ops = &iavf_eth_dev_ops; + eth_dev->rx_queue_count = iavf_dev_rxq_count; + eth_dev->rx_descriptor_status = iavf_dev_rx_desc_status; + eth_dev->tx_descriptor_status = iavf_dev_tx_desc_status; eth_dev->rx_pkt_burst = &iavf_recv_pkts; eth_dev->tx_pkt_burst = &iavf_xmit_pkts; eth_dev->tx_pkt_prepare = &iavf_prep_pkts;drivers/net/ice/ice_ethdev.c +3
-3@@ -205,9 +205,6 @@ static const struct eth_dev_ops ice_eth_dev_ops = { .tx_burst_mode_get = ice_tx_burst_mode_get, .get_eeprom_length = ice_get_eeprom_length, .get_eeprom = ice_get_eeprom, - .rx_queue_count = ice_rx_queue_count, - .rx_descriptor_status = ice_rx_descriptor_status, - .tx_descriptor_status = ice_tx_descriptor_status, .stats_get = ice_stats_get, .stats_reset = ice_stats_reset, .xstats_get = ice_xstats_get,@@ -2163,6 +2160,9 @@ ice_dev_init(struct rte_eth_dev *dev)int ret; dev->dev_ops = &ice_eth_dev_ops; + dev->rx_queue_count = ice_rx_queue_count; + dev->rx_descriptor_status = ice_rx_descriptor_status; + dev->tx_descriptor_status = ice_tx_descriptor_status; dev->rx_pkt_burst = ice_recv_pkts; dev->tx_pkt_burst = ice_xmit_pkts; dev->tx_pkt_prepare = ice_prep_pkts;drivers/net/igc/igc_ethdev.c +4
-4@@ -272,10 +272,6 @@ static const struct eth_dev_ops eth_igc_ops = { .rx_queue_setup = eth_igc_rx_queue_setup, .rx_queue_release = eth_igc_rx_queue_release, - .rx_queue_count = eth_igc_rx_queue_count, - .rx_descriptor_done = eth_igc_rx_descriptor_done, - .rx_descriptor_status = eth_igc_rx_descriptor_status, - .tx_descriptor_status = eth_igc_tx_descriptor_status, .tx_queue_setup = eth_igc_tx_queue_setup, .tx_queue_release = eth_igc_tx_queue_release, .tx_done_cleanup = eth_igc_tx_done_cleanup,@@ -1227,6 +1223,10 @@ eth_igc_dev_init(struct rte_eth_dev *dev)PMD_INIT_FUNC_TRACE (); dev->dev_ops = ð_igc_ops; + dev->rx_descriptor_done = eth_igc_rx_descriptor_done; + dev->rx_queue_count = eth_igc_rx_queue_count; + dev->rx_descriptor_status = eth_igc_rx_descriptor_status; + dev->tx_descriptor_status = eth_igc_tx_descriptor_status;/* * for secondary processes, we don't initialize any further as primary drivers/net/ixgbe/ixgbe_ethdev.c +7
-7@@ -545,10 +545,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .rx_queue_intr_enable = ixgbe_dev_rx_queue_intr_enable, .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_queue_count = ixgbe_dev_rx_queue_count, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .dev_led_on = ixgbe_dev_led_on,@@ -622,9 +618,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .vlan_offload_set = ixgbevf_vlan_offload_set, .rx_queue_setup = ixgbe_dev_rx_queue_setup, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, - .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, - .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, .tx_queue_release = ixgbe_dev_tx_queue_release, .rx_queue_intr_enable = ixgbevf_dev_rx_queue_intr_enable,@@ -1091,6 +1084,10 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev, void *init_params __rte_unused)ixgbe_dev_macsec_setting_reset (eth_dev); eth_dev->dev_ops = &ixgbe_eth_dev_ops; + eth_dev->rx_queue_count = ixgbe_dev_rx_queue_count; + eth_dev->rx_descriptor_done = ixgbe_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts; eth_dev->tx_pkt_prepare = &ixgbe_prep_pkts;@@ -1570,6 +1567,9 @@ eth_ixgbevf_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &ixgbevf_eth_dev_ops; + eth_dev->rx_descriptor_done = ixgbe_dev_rx_descriptor_done; + eth_dev->rx_descriptor_status = ixgbe_dev_rx_descriptor_status; + eth_dev->tx_descriptor_status = ixgbe_dev_tx_descriptor_status; eth_dev->rx_pkt_burst = &ixgbe_recv_pkts; eth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;drivers/net/mlx5/linux/mlx5_os.c +5
-7@@ -601,6 +601,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, } eth_dev->device = dpdk_dev; eth_dev->dev_ops = &mlx5_os_dev_sec_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; err =mlx5_proc_priv_init (eth_dev);if (err)return NULL ;@@ -1208,6 +1210,9 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, eth_dev->rx_pkt_burst = removed_rx_burst; eth_dev->tx_pkt_burst = removed_tx_burst; eth_dev->dev_ops = &mlx5_os_dev_ops; + eth_dev->rx_descriptor_status = mlx5_rx_descriptor_status; + eth_dev->tx_descriptor_status = mlx5_tx_descriptor_status; + eth_dev->rx_queue_count = mlx5_rx_queue_count;/* Register MAC address. */ claim_zero (mlx5_mac_addr_add (eth_dev, &mac,0 ,0 ));if (config->vf && config->vf_nl_en)@@ -2396,13 +2401,10 @@ const struct eth_dev_ops mlx5_os_dev_ops = { .rss_hash_update = mlx5_rss_hash_update, .rss_hash_conf_get = mlx5_rss_hash_conf_get, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get, .tx_burst_mode_get = mlx5_tx_burst_mode_get, - .rx_queue_count = mlx5_rx_queue_count, .rx_queue_intr_enable = mlx5_rx_intr_enable, .rx_queue_intr_disable = mlx5_rx_intr_disable, .is_removed = mlx5_is_removed,@@ -2427,8 +2429,6 @@ const struct eth_dev_ops mlx5_os_dev_sec_ops = { .rx_queue_stop = mlx5_rx_queue_stop, .tx_queue_start = mlx5_tx_queue_start, .tx_queue_stop = mlx5_tx_queue_stop, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,@@ -2480,8 +2480,6 @@ const struct eth_dev_ops mlx5_os_dev_ops_isolate = { .vlan_strip_queue_set = mlx5_vlan_strip_queue_set, .vlan_offload_set = mlx5_vlan_offload_set, .filter_ctrl = mlx5_dev_filter_ctrl, - .rx_descriptor_status = mlx5_rx_descriptor_status, - .tx_descriptor_status = mlx5_tx_descriptor_status, .rxq_info_get = mlx5_rxq_info_get, .txq_info_get = mlx5_txq_info_get, .rx_burst_mode_get = mlx5_rx_burst_mode_get,drivers/net/mlx5/mlx5_flow.c +4
-0@@ -5138,6 +5138,10 @@ mlx5_flow_isolate(struct rte_eth_dev *dev, dev->dev_ops = &mlx5_os_dev_ops_isolate; else dev->dev_ops = &mlx5_os_dev_ops; + + dev->rx_descriptor_status = mlx5_rx_descriptor_status; + dev->tx_descriptor_status = mlx5_tx_descriptor_status; +return 0 ; }drivers/net/netvsc/hn_ethdev.c +3
-3@@ -871,11 +871,8 @@ static const struct eth_dev_ops hn_eth_dev_ops = { .tx_queue_setup = hn_dev_tx_queue_setup, .tx_queue_release = hn_dev_tx_queue_release, .tx_done_cleanup = hn_dev_tx_done_cleanup, - .tx_descriptor_status = hn_dev_tx_descriptor_status, .rx_queue_setup = hn_dev_rx_queue_setup, .rx_queue_release = hn_dev_rx_queue_release, - .rx_queue_count = hn_dev_rx_queue_count, - .rx_descriptor_status = hn_dev_rx_queue_status, .link_update = hn_dev_link_update, .stats_get = hn_dev_stats_get, .stats_reset = hn_dev_stats_reset,@@ -936,6 +933,9 @@ eth_hn_dev_init(struct rte_eth_dev *eth_dev) vmbus = container_of(device, struct rte_vmbus_device, device); eth_dev->dev_ops = &hn_eth_dev_ops; + eth_dev->rx_queue_count = hn_dev_rx_queue_count; + eth_dev->rx_descriptor_status = hn_dev_rx_queue_status; + eth_dev->tx_descriptor_status = hn_dev_tx_descriptor_status; eth_dev->tx_pkt_burst = &hn_xmit_pkts; eth_dev->rx_pkt_burst = &hn_recv_pkts;drivers/net/nfp/nfp_net.c +1
-1@@ -2701,7 +2701,6 @@ static const struct eth_dev_ops nfp_net_eth_dev_ops = { .rss_hash_conf_get = nfp_net_rss_hash_conf_get, .rx_queue_setup = nfp_net_rx_queue_setup, .rx_queue_release = nfp_net_rx_queue_release, - .rx_queue_count = nfp_net_rx_queue_count, .tx_queue_setup = nfp_net_tx_queue_setup, .tx_queue_release = nfp_net_tx_queue_release, .rx_queue_intr_enable = nfp_rx_queue_intr_enable,@@ -2785,6 +2784,7 @@ nfp_net_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &nfp_net_eth_dev_ops; + eth_dev->rx_queue_count = nfp_net_rx_queue_count; eth_dev->rx_pkt_burst = &nfp_net_recv_pkts; eth_dev->tx_pkt_burst = &nfp_net_xmit_pkts;drivers/net/octeontx2/otx2_ethdev.c +4
-4@@ -2272,10 +2272,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { .txq_info_get = otx2_nix_txq_info_get, .rx_burst_mode_get = otx2_rx_burst_mode_get, .tx_burst_mode_get = otx2_tx_burst_mode_get, - .rx_queue_count = otx2_nix_rx_queue_count, - .rx_descriptor_done = otx2_nix_rx_descriptor_done, - .rx_descriptor_status = otx2_nix_rx_descriptor_status, - .tx_descriptor_status = otx2_nix_tx_descriptor_status, .tx_done_cleanup = otx2_nix_tx_done_cleanup, .set_queue_rate_limit = otx2_nix_tm_set_queue_rate_limit, .pool_ops_supported = otx2_nix_pool_ops_supported,@@ -2382,6 +2378,10 @@ otx2_eth_dev_init(struct rte_eth_dev *eth_dev)int rc, max_entries; eth_dev->dev_ops = &otx2_eth_dev_ops; + eth_dev->rx_descriptor_done = otx2_nix_rx_descriptor_done; + eth_dev->rx_queue_count = otx2_nix_rx_queue_count; + eth_dev->rx_descriptor_status = otx2_nix_rx_descriptor_status; + eth_dev->tx_descriptor_status = otx2_nix_tx_descriptor_status;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {drivers/net/qede/qede_ethdev.c +1
-2@@ -2386,7 +2386,6 @@ static const struct eth_dev_ops qede_eth_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,@@ -2431,7 +2430,6 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = { .dev_infos_get = qede_dev_info_get, .rx_queue_setup = qede_rx_queue_setup, .rx_queue_release = qede_rx_queue_release, - .rx_descriptor_status = qede_rx_descriptor_status, .tx_queue_setup = qede_tx_queue_setup, .tx_queue_release = qede_tx_queue_release, .dev_start = qede_dev_start,@@ -2670,6 +2668,7 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf) } eth_dev->dev_ops = (is_vf) ? &qede_eth_vf_dev_ops : &qede_eth_dev_ops; + eth_dev->rx_descriptor_status = qede_rx_descriptor_status; adapter->num_tx_queues =0 ; adapter->num_rx_queues =0 ;drivers/net/sfc/sfc_ethdev.c +8
-8@@ -1819,10 +1819,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .tx_queue_stop = sfc_tx_queue_stop, .rx_queue_setup = sfc_rx_queue_setup, .rx_queue_release = sfc_rx_queue_release, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .rx_queue_intr_enable = sfc_rx_queue_intr_enable, .rx_queue_intr_disable = sfc_rx_queue_intr_disable, .tx_queue_setup = sfc_tx_queue_setup,@@ -1977,6 +1973,10 @@ sfc_eth_dev_set_ops(struct rte_eth_dev *dev) dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_done = sfc_rx_descriptor_done; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status; dev->dev_ops = &sfc_eth_dev_ops;return 0 ;@@ -2017,10 +2017,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev)static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, - .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, - .rx_descriptor_status = sfc_rx_descriptor_status, - .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query, .rss_hash_conf_get = sfc_dev_rss_hash_conf_get, .rxq_info_get = sfc_rx_queue_info_get,@@ -2085,6 +2081,10 @@ sfc_eth_dev_secondary_init(struct rte_eth_dev *dev, uint32_t logtype_main) dev->rx_pkt_burst = dp_rx->pkt_burst; dev->tx_pkt_prepare = dp_tx->pkt_prepare; dev->tx_pkt_burst = dp_tx->pkt_burst; + dev->rx_queue_count = sfc_rx_queue_count; + dev->rx_descriptor_done = sfc_rx_descriptor_done; + dev->rx_descriptor_status = sfc_rx_descriptor_status; + dev->tx_descriptor_status = sfc_tx_descriptor_status; dev->dev_ops = &sfc_eth_dev_secondary_ops;return 0 ;drivers/net/thunderx/nicvf_ethdev.c +1
-1@@ -2029,7 +2029,6 @@ static const struct eth_dev_ops nicvf_eth_dev_ops = { .tx_queue_stop = nicvf_dev_tx_queue_stop, .rx_queue_setup = nicvf_dev_rx_queue_setup, .rx_queue_release = nicvf_dev_rx_queue_release, - .rx_queue_count = nicvf_dev_rx_queue_count, .tx_queue_setup = nicvf_dev_tx_queue_setup, .tx_queue_release = nicvf_dev_tx_queue_release, .dev_set_link_up = nicvf_dev_set_link_up,@@ -2134,6 +2133,7 @@ nicvf_eth_dev_init(struct rte_eth_dev *eth_dev)PMD_INIT_FUNC_TRACE (); eth_dev->dev_ops = &nicvf_eth_dev_ops; + eth_dev->rx_queue_count = nicvf_dev_rx_queue_count;/* For secondary processes, the primary has done all the work */ if (rte_eal_process_type () !=RTE_PROC_PRIMARY ) {drivers/net/vhost/rte_eth_vhost.c +1
-1@@ -1385,7 +1385,6 @@ static const struct eth_dev_ops ops = { .rx_queue_release = eth_queue_release, .tx_queue_release = eth_queue_release, .tx_done_cleanup = eth_tx_done_cleanup, - .rx_queue_count = eth_rx_queue_count, .link_update = eth_link_update, .stats_get = eth_stats_get, .stats_reset = eth_stats_reset,@@ -1447,6 +1446,7 @@ eth_dev_vhost_create(struct rte_vdev_device *dev, char *iface_name, data->all_multicast =1 ; eth_dev->dev_ops = &ops; + eth_dev->rx_queue_count = eth_rx_queue_count;/* finally assign rx and tx ops */ eth_dev->rx_pkt_burst = eth_vhost_rx;drivers/net/virtio/virtio_ethdev.c +1
-1@@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = { .rx_queue_intr_enable = virtio_dev_rx_queue_intr_enable, .rx_queue_intr_disable = virtio_dev_rx_queue_intr_disable, .rx_queue_release = virtio_dev_queue_release, - .rx_descriptor_done = virtio_dev_rx_queue_done, .tx_queue_setup = virtio_dev_tx_queue_setup, .tx_queue_release = virtio_dev_queue_release,/* collect stats per queue */ @@ -1903,6 +1902,7 @@ eth_virtio_dev_init(struct rte_eth_dev *eth_dev) } eth_dev->dev_ops = &virtio_eth_dev_ops; + eth_dev->rx_descriptor_done = virtio_dev_rx_queue_done;if (rte_eal_process_type () ==RTE_PROC_SECONDARY ) {if (!hw->virtio_user_dev) {lib/librte_ethdev/rte_ethdev.h +8
-9@@ -4545,11 +4545,11 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id)RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -EINVAL ); dev = &rte_eth_devices[port_id]; -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_queue_count, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_queue_count, -ENOTSUP );if (queue_id >= dev->data->nb_rx_queues)return -EINVAL ; -return (int )(*dev->dev_ops->rx_queue_count)(dev, queue_id); +return (int )(*dev->rx_queue_count)(dev, queue_id); }/** @@ -4573,9 +4573,8 @@ rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset) {struct rte_eth_dev *dev = &rte_eth_devices[port_id];RTE_ETH_VALID_PORTID_OR_ERR_RET (port_id, -ENODEV ); -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_done, -ENOTSUP ); -return (*dev->dev_ops->rx_descriptor_done)( \ - dev->data->rx_queues[queue_id], offset); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_descriptor_done, -ENOTSUP ); +return (*dev->rx_descriptor_done)(dev->data->rx_queues[queue_id], offset); }#define RTE_ETH_RX_DESC_AVAIL 0/**< Desc available for hw. */ @@ -4630,10 +4629,10 @@ rte_eth_rx_descriptor_status(uint16_t port_id, uint16_t queue_id,if (queue_id >= dev->data->nb_rx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->rx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->rx_descriptor_status, -ENOTSUP ); rxq = dev->data->rx_queues[queue_id]; -return (*dev->dev_ops->rx_descriptor_status)(rxq, offset); +return (*dev->rx_descriptor_status)(rxq, offset); }#define RTE_ETH_TX_DESC_FULL 0/**< Desc filled for hw, waiting xmit. */ @@ -4687,10 +4686,10 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,if (queue_id >= dev->data->nb_tx_queues)return -ENODEV ;#endif -RTE_FUNC_PTR_OR_ERR_RET (*dev->dev_ops->tx_descriptor_status, -ENOTSUP ); +RTE_FUNC_PTR_OR_ERR_RET (*dev->tx_descriptor_status, -ENOTSUP ); txq = dev->data->tx_queues[queue_id]; -return (*dev->dev_ops->tx_descriptor_status)(txq, offset); +return (*dev->tx_descriptor_status)(txq, offset); }/** lib/librte_ethdev/rte_ethdev_core.h +6
-7@@ -660,13 +660,6 @@ struct eth_dev_ops {eth_queue_stop_t tx_queue_stop;/**< Stop TX for a queue. */ eth_rx_queue_setup_t rx_queue_setup;/**< Set up device RX queue. */ eth_queue_release_t rx_queue_release;/**< Release RX queue. */ -eth_rx_queue_count_t rx_queue_count; -/**< Get the number of used RX descriptors. */ -eth_rx_descriptor_done_t rx_descriptor_done;/**< Check rxd DD bit. */ -eth_rx_descriptor_status_t rx_descriptor_status; -/**< Check the status of a Rx descriptor. */ -eth_tx_descriptor_status_t tx_descriptor_status; -/**< Check the status of a Tx descriptor. */ /* * Static inline functions use functions ABOVE this comment. * New dev_ops functions should be added BELOW to avoid breaking ABI. @@ -782,6 +775,12 @@ struct rte_eth_dev {eth_rx_burst_t rx_pkt_burst;/**< Pointer to PMD receive function. */ eth_tx_burst_t tx_pkt_burst;/**< Pointer to PMD transmit function. */ eth_tx_prep_t tx_pkt_prepare;/**< Pointer to PMD transmit prepare function. */ + +eth_rx_queue_count_t rx_queue_count;/**< Get the number of used RX descriptors. */ +eth_rx_descriptor_done_t rx_descriptor_done;/**< Check rxd DD bit. */ +eth_rx_descriptor_status_t rx_descriptor_status;/**< Check the status of a Rx descriptor. */ +eth_tx_descriptor_status_t tx_descriptor_status;/**< Check the status of a Tx descriptor. */ +/** * Next two fields are per-device data but *data is shared between * primary and secondary processes and *process_private is per-process
PATCH v4 3/7 ethdev: make device operations struct private
In reply to Ferruh YigitHiding the 'struct eth_dev_ops' from applications.
Removing relevant deprecation notice.
---
Cc: David Marchand <[email protected]>
v3:
* release note updated
v4:
* Fix wording in release notes, s/inline/internal
--- doc/guides/rel_notes/deprecation.rst | 9 - doc/guides/rel_notes/release_20_11.rst | 2 + drivers/net/i40e/i40e_vf_representor.c | 1 + drivers/net/ixgbe/ixgbe_vf_representor.c | 1 + lib/librte_ethdev/rte_ethdev_core.h | 712 +---------------------- lib/librte_ethdev/rte_ethdev_driver.h | 694 ++++++++++++++++++++++ lib/librte_ethdev/rte_flow_driver.h | 1 + lib/librte_ethdev/rte_mtr_driver.h | 1 + lib/librte_ethdev/rte_tm_driver.h | 1 + 9 files changed, 710 insertions(+), 712 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -9
@@ -156,15 +156,6 @@ Deprecation Notices Due to adoption of C11 atomic builtins, the field ``refcnt_atomic`` will be replaced with ``refcnt`` of type ``uint16_t`` in DPDK 20.11. -* ethdev: Split the ``struct eth_dev_ops`` struct to hide it as much as possible - will be done in 20.11. - Currently the ``struct eth_dev_ops`` struct is accessible by the application - because some inline functions, like ``rte_eth_tx_descriptor_status()``, - access the struct directly. - The struct will be separate in two, the ops used by inline functions will be - moved next to Rx/Tx burst functions, rest of the ``struct eth_dev_ops`` struct - will be moved to header file for drivers to hide it from applications. - * ethdev: the legacy filter API, including ``rte_eth_dev_filter_supported()``, ``rte_eth_dev_filter_ctrl()`` as well as filter types MACVLAN, ETHERTYPE, FLEXIBLE, SYN, NTUPLE, TUNNEL, FDIR,
doc/guides/rel_notes/release_20_11.rst +2 -0
@@ -111,6 +111,8 @@ ABI Changes * ``eth_rx_descriptor_status_t rx_descriptor_status;`` * ``eth_tx_descriptor_status_t tx_descriptor_status;`` + * ``struct eth_dev_ops`` is no more accessible by applications, which was already internal data structure. + Known Issues ------------
drivers/net/i40e/i40e_vf_representor.c +1 -0
@@ -7,6 +7,7 @@#include <rte_pci.h> #include <rte_malloc.h> +#include "rte_ethdev_driver.h" #include "base/i40e_type.h" #include "base/virtchnl.h" #include "i40e_ethdev.h"
drivers/net/ixgbe/ixgbe_vf_representor.c +1 -0
@@ -6,6 +6,7 @@#include <rte_pci.h> #include <rte_malloc.h> +#include "rte_ethdev_driver.h" #include "base/ixgbe_type.h" #include "base/ixgbe_vf.h" #include "ixgbe_ethdev.h"
lib/librte_ethdev/rte_ethdev_core.h +9 -703
731 lines not on this page · raw message
lib/librte_ethdev/rte_ethdev_driver.h +694 -0
700 lines not on this page · raw message
lib/librte_ethdev/rte_flow_driver.h +1 -0
@@ -18,6 +18,7 @@#include <stdint.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_flow.h" #ifdef __cplusplus
lib/librte_ethdev/rte_mtr_driver.h +1 -0
@@ -18,6 +18,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_mtr.h" #ifdef __cplusplus
lib/librte_ethdev/rte_tm_driver.h +1 -0
@@ -18,6 +18,7 @@#include <rte_errno.h> #include "rte_ethdev.h" +#include "rte_ethdev_driver.h" #include "rte_tm.h" #ifdef __cplusplus
Signature · 1 line
2.26.2
PATCH v4 4/7 ethdev: mark internal functions
In reply to Ferruh YigitSome ethdev functions are for drivers only, not for applications.
Since we have '__rte_internal' tag available now, marking internal functions with it and moving functions to INTERNAL section in linker script.
This is also good for documenting the internal functions.
Some internal APIs seems marked as experimental, but it doesn't make sense to have internals APIs as experimental, updating their tag and doxygen comments.
---
Cc: David Marchand <[email protected]>
v3:
* release note updated
--- doc/guides/rel_notes/deprecation.rst | 6 ----- doc/guides/rel_notes/release_20_11.rst | 2 ++ lib/librte_ethdev/rte_ethdev.h | 3 +-- lib/librte_ethdev/rte_ethdev_driver.h | 33 ++++++++++-------------- lib/librte_ethdev/rte_ethdev_version.map | 30 ++++++++++----------- lib/librte_ethdev/rte_flow_driver.h | 4 +-- 6 files changed, 31 insertions(+), 47 deletions(-)
doc/guides/rel_notes/deprecation.rst +0 -6
@@ -225,12 +225,6 @@ Deprecation Notices following the IPv6 header, as proposed in RFC https://mails.dpdk.org/archives/dev/2020-August/177257.html. -* ethdev: Some internal APIs for driver usage are exported in the .map file. - Now DPDK has ``__rte_internal`` marker so we can mark internal APIs and move - them to the INTERNAL block in .map. Although these APIs are internal it will - break the ABI checks, that is why change is planned for 20.11. - The list of internal APIs are mainly ones listed in ``rte_ethdev_driver.h``. - * traffic manager: All traffic manager API's in ``rte_tm.h`` were mistakenly made ABI stable in the v19.11 release. The TM maintainer and other contributors have agreed to keep the TM APIs as experimental in expectation of additional spec
doc/guides/rel_notes/release_20_11.rst +2 -0
@@ -113,6 +113,8 @@ ABI Changes * ``struct eth_dev_ops`` is no more accessible by applications, which was already internal data structure. + * ``ethdev`` internal functions are marked with ``__rte_internal`` tag. + Known Issues ------------
lib/librte_ethdev/rte_ethdev.h +1 -2
@@ -1724,8 +1724,7 @@ rte_eth_find_next_of(uint16_t port_id_start,*/ __rte_experimental uint16_t -rte_eth_find_next_sibling (uint16_t port_id_start, -uint16_t ref_port_id); +rte_eth_find_next_sibling (uint16_t port_id_start,uint16_t ref_port_id);/** * Macro to iterate over all ethdev ports sharing the same rte_device
lib/librte_ethdev/rte_ethdev_driver.h +13 -20
@@ -759,6 +759,7 @@ int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);* @return * - The pointer to the ethdev slot, on success. NULL on error */ +__rte_internal struct rte_eth_dev *rte_eth_dev_allocated(const char *name);/**
@@ -770,6 +771,7 @@ struct rte_eth_dev *rte_eth_dev_allocated(const char *name);* @return * - Slot in the rte_dev_devices array for a new device; */ +__rte_internal struct rte_eth_dev *rte_eth_dev_allocate(const char *name);/**
@@ -783,6 +785,7 @@ struct rte_eth_dev *rte_eth_dev_allocate(const char *name);* device. * - Error: Null pointer. */ +__rte_internal struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);/**
@@ -801,6 +804,7 @@ struct rte_eth_dev *rte_eth_dev_attach_secondary(const char *name);* @return * - 0 on success, negative on error */ +__rte_internal int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);/**
@@ -814,6 +818,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* @return * void */ +__rte_internal void _rte_eth_dev_reset(struct rte_eth_dev *dev);/**
@@ -833,6 +838,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* @return * int */ +__rte_internal int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);
@@ -848,6 +854,7 @@ int _rte_eth_dev_callback_process(struct rte_eth_dev *dev,* @param dev * New ethdev port. */ +__rte_internal void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);/**
@@ -869,6 +876,7 @@ void rte_eth_dev_probing_finish(struct rte_eth_dev *dev);* @param socket_id * The *socket_id* argument is the socket identifier in case of NUMA. */ +__rte_internal const struct rte_memzone * rte_eth_dma_zone_reserve(const struct rte_eth_dev *eth_dev, const char *name, uint16_t queue_id, size_t size,
@@ -955,9 +963,6 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev, }/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Allocate an unique switch domain identifier. * * A pool of switch domain identifiers which can be allocated on request. This
@@ -971,14 +976,11 @@ rte_eth_linkstatus_get(const struct rte_eth_dev *dev,* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_switch_domain_alloc (uint16_t *domain_id);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * Free switch domain. * * Return a switch domain identifier to the pool of free identifiers after it is
@@ -990,7 +992,7 @@ rte_eth_switch_domain_alloc(uint16_t *domain_id);* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_switch_domain_free (uint16_t domain_id);
@@ -1007,9 +1009,6 @@ struct rte_eth_devargs { };/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function to parse ethdev arguments * * @param devargs
@@ -1020,7 +1019,7 @@ struct rte_eth_devargs {* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_devargs_parse (const char *devargs,struct rte_eth_devargs *eth_devargs);
@@ -1030,9 +1029,6 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev, void *bus_specific_init_params);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function for the creation of a new ethdev ports. * * @param device
@@ -1053,7 +1049,7 @@ typedef int (*ethdev_bus_specific_init)(struct rte_eth_dev *ethdev,* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal int rte_eth_dev_create(struct rte_device *device, const char *name, size_t priv_data_size,
@@ -1064,9 +1060,6 @@ rte_eth_dev_create(struct rte_device *device, const char *name,typedef int (*ethdev_uninit_t )(struct rte_eth_dev *ethdev);/** -* @warning -* @b EXPERIMENTAL: this API may change without prior notice. -* * PMD helper function for cleaning up the resources of a ethdev port on it's * destruction. *
@@ -1078,7 +1071,7 @@ typedef int (*ethdev_uninit_t)(struct rte_eth_dev *ethdev);* @return * Negative errno value on error, 0 on success. */ -__rte_experimental +__rte_internal intrte_eth_dev_destroy (struct rte_eth_dev *ethdev,ethdev_uninit_t ethdev_uninit);
lib/librte_ethdev/rte_ethdev_version.map +14 -16
@@ -1,8 +1,6 @@ DPDK_21 { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_add_first_rx_callback; rte_eth_add_rx_callback; rte_eth_add_tx_callback;
@@ -10,9 +8,6 @@ DPDK_21 { rte_eth_allmulticast_enable; rte_eth_allmulticast_get; rte_eth_dev_adjust_nb_rx_tx_desc; - rte_eth_dev_allocate; - rte_eth_dev_allocated; - rte_eth_dev_attach_secondary; rte_eth_dev_callback_register; rte_eth_dev_callback_unregister; rte_eth_dev_close;
@@ -44,8 +39,6 @@ DPDK_21 { rte_eth_dev_mac_addr_remove; rte_eth_dev_pool_ops_supported; rte_eth_dev_priority_flow_ctrl_set; - rte_eth_dev_probing_finish; - rte_eth_dev_release_port; rte_eth_dev_reset; rte_eth_dev_rss_hash_conf_get; rte_eth_dev_rss_hash_update;
@@ -81,7 +74,6 @@ DPDK_21 { rte_eth_dev_udp_tunnel_port_delete; rte_eth_dev_vlan_filter; rte_eth_devices; - rte_eth_dma_zone_reserve; rte_eth_find_next; rte_eth_find_next_owned_by; rte_eth_iterator_cleanup;
@@ -195,16 +187,8 @@ EXPERIMENTAL { rte_eth_dev_owner_unset; # added in 18.05 - rte_eth_dev_create; - rte_eth_dev_destroy; rte_eth_dev_get_module_eeprom; rte_eth_dev_get_module_info; - rte_eth_devargs_parse; - rte_eth_switch_domain_alloc; - rte_eth_switch_domain_free; - - # added in 18.08 - rte_flow_expand_rss; # added in 18.11 rte_eth_dev_rx_intr_ctl_q_get_fd;
@@ -246,5 +230,19 @@ EXPERIMENTAL { INTERNAL { global: + _rte_eth_dev_callback_process; + _rte_eth_dev_reset; + rte_eth_dev_allocate; + rte_eth_dev_allocated; + rte_eth_dev_attach_secondary; + rte_eth_dev_create; + rte_eth_dev_destroy; + rte_eth_dev_probing_finish; + rte_eth_dev_release_port; + rte_eth_devargs_parse; rte_eth_dma_zone_free; + rte_eth_dma_zone_reserve; + rte_eth_switch_domain_alloc; + rte_eth_switch_domain_free; + rte_flow_expand_rss; };
lib/librte_ethdev/rte_flow_driver.h +1 -3
@@ -161,8 +161,6 @@ struct rte_flow_expand_rss {* Expand RSS flows into several possible flows according to the RSS hash * fields requested and the driver capabilities. * -* @b EXPERIMENTAL: this API may change without prior notice -* * @param[out] buf * Buffer to store the result expansion. * @param[in] size
@@ -183,7 +181,7 @@ struct rte_flow_expand_rss {* * -E2BIG: graph-depth @p graph is too deep. */ -__rte_experimental +__rte_internal int rte_flow_expand_rss(struct rte_flow_expand_rss *buf, size_t size, const struct rte_flow_item *pattern, uint64_t types,
Signature · 1 line
2.26.2
PATCH v4 5/7 ethdev: use hairpin helper functions
In reply to Ferruh YigitHairpin helper functions were not used by drivers, but it was used only local to ethdev. They are:
'rte_eth_dev_is_rx_hairpin_queue()' 'rte_eth_dev_is_tx_hairpin_queue()'
Exposing them as internal APIs and update mlx5 driver (only user of hairpin) to use them.
--- drivers/net/mlx5/mlx5_rxq.c | 4 ++-- drivers/net/mlx5/mlx5_txq.c | 4 ++-- lib/librte_ethdev/rte_ethdev_driver.h | 2 ++ lib/librte_ethdev/rte_ethdev_version.map | 2 ++ 4 files changed, 8 insertions(+), 4 deletions(-)
drivers/net/mlx5/mlx5_rxq.c +2 -2
@@ -542,7 +542,7 @@ mlx5_rx_queue_stop(struct rte_eth_dev *dev, uint16_t idx)eth_rx_burst_t pkt_burst = dev->rx_pkt_burst;int ret; -if (dev->data->rx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_rx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be stopped" ); rte_errno =EINVAL ;return -EINVAL ;
@@ -653,7 +653,7 @@ mlx5_rx_queue_start(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->rx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_rx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be started" ); rte_errno =EINVAL ;return -EINVAL ;
drivers/net/mlx5/mlx5_txq.c +2 -2
@@ -244,7 +244,7 @@ mlx5_tx_queue_stop(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->tx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_tx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be stopped" ); rte_errno =EINVAL ;return -EINVAL ;
@@ -371,7 +371,7 @@ mlx5_tx_queue_start(struct rte_eth_dev *dev, uint16_t idx) {int ret; -if (dev->data->tx_queue_state[idx] ==RTE_ETH_QUEUE_STATE_HAIRPIN ) { +if (rte_eth_dev_is_tx_hairpin_queue (dev, idx)) {DRV_LOG (ERR ,"Hairpin queue can't be started" ); rte_errno =EINVAL ;return -EINVAL ;
lib/librte_ethdev/rte_ethdev_driver.h +2 -0
@@ -734,6 +734,7 @@ struct eth_dev_ops {* @return * - (1) if the queue is hairpin queue, 0 otherwise. */ +__rte_internal int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);/**
@@ -748,6 +749,7 @@ int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);* @return * - (1) if the queue is hairpin queue, 0 otherwise. */ +__rte_internal int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);/**
lib/librte_ethdev/rte_ethdev_version.map +2 -0
@@ -237,6 +237,8 @@ INTERNAL { rte_eth_dev_attach_secondary; rte_eth_dev_create; rte_eth_dev_destroy; + rte_eth_dev_is_rx_hairpin_queue; + rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; rte_eth_devargs_parse;
Signature · 1 line
2.26.2
PATCH v4 6/7 ethdev: remove invalid symbols from map file
In reply to Ferruh YigitThese are struct type names, not object names. Removing them from .map file.
--- lib/librte_ethdev/rte_ethdev_version.map | 2 -- 1 file changed, 2 deletions(-)
lib/librte_ethdev/rte_ethdev_version.map +0 -2
@@ -81,7 +81,6 @@ DPDK_21 { rte_eth_iterator_next; rte_eth_led_off; rte_eth_led_on; - rte_eth_link; rte_eth_link_get; rte_eth_link_get_nowait; rte_eth_macaddr_get;
@@ -96,7 +95,6 @@ DPDK_21 { rte_eth_rx_queue_setup; rte_eth_set_queue_rate_limit; rte_eth_speed_bitflag; - rte_eth_stats; rte_eth_stats_get; rte_eth_stats_reset; rte_eth_timesync_adjust_time;
Signature · 1 line
2.26.2
PATCH v4 7/7 ethdev: remove underscore prefix from internal API
In reply to Ferruh Yigit'_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.
For '_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.
---
v3:
* release note updated
--- app/test/virtual_pmd.c | 4 ++-- doc/guides/prog_guide/poll_mode_drv.rst | 4 ++-- doc/guides/rel_notes/release_20_11.rst | 5 +++++ drivers/net/atlantic/atl_ethdev.c | 5 ++--- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/bnxt/rte_pmd_bnxt.c | 4 ++-- drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++---- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 3 +-- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 7 +++---- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enic/enic_main.c | 2 +- drivers/net/failsafe/failsafe_ether.c | 6 +++--- drivers/net/fm10k/fm10k_ethdev.c | 11 ++++------- drivers/net/hinic/base/hinic_pmd_hwdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 5 ++--- drivers/net/ice/ice_ethdev.c | 4 ++-- drivers/net/igc/igc_ethdev.c | 3 +-- drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++------ drivers/net/ixgbe/ixgbe_pf.c | 5 ++--- drivers/net/mlx4/mlx4_intr.c | 10 +++++----- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++-- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx/octeontx_ethdev.c | 6 +++--- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/qede/qede_main.c | 3 +-- drivers/net/sfc/sfc_intr.c | 12 ++++++------ drivers/net/thunderx/nicvf_ethdev.c | 6 +++--- drivers/net/vhost/rte_eth_vhost.c | 6 +++--- drivers/net/virtio/virtio_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.c | 8 ++++---- lib/librte_ethdev/rte_ethdev_driver.h | 4 ++-- lib/librte_ethdev/rte_ethdev_version.map | 4 ++-- 40 files changed, 95 insertions(+), 102 deletions(-)
app/test/virtual_pmd.c +2 -2
@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id, vrtl_eth_dev->data->dev_link.link_status = link_status; -_rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , +NULL ); }int
doc/guides/prog_guide/poll_mode_drv.rst +2 -2
@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread. For example when PF is reset, the PF sends a message to notify VFs of this event and also trigger an interrupt to VFs. Then in the interrupt service routine the VFs detects this notification message and calls -_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). +rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET -event within VFs. The function _rte_eth_dev_callback_process() will +event within VFs. The function rte_eth_dev_callback_process() will call the registered callback function. The callback function can trigger the application to handle all operations the VF reset requires including stopping Rx/Tx queues and calling rte_eth_dev_reset().
doc/guides/rel_notes/release_20_11.rst +5 -0
@@ -86,6 +86,11 @@ API Changes * ``rte_eth_rx_descriptor_done()`` API has deprecated. +* Renamed internal ethdev APIs: + + * ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_process()`` + * ``_rte_eth_dev_reset`` -> ``rte_eth_dev_internal_reset()`` + ABI Changes -----------
drivers/net/atlantic/atl_ethdev.c +2 -3
@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,/* Notify userapp if link status changed */ if (!atl_dev_link_update (dev,0 )) {atl_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }else {if (hw->aq_fw_ops->send_macsec_req ==NULL ) goto done;
@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev, resp.stats.egress_expired || resp.stats.ingress_expired) {PMD_DRV_LOG (INFO ,"RTE_ETH_EVENT_MACSEC" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); } }
drivers/net/bnxt/bnxt_ethdev.c +3 -3
@@ -1528,9 +1528,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete, new.link_speed != eth_dev->data->dev_link.link_speed) {rte_eth_linkstatus_set (eth_dev, &new); -_rte_eth_dev_callback_process (eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );bnxt_print_link_info (eth_dev); }
drivers/net/bnxt/rte_pmd_bnxt.c +2 -2
@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg) ret_param.vf_id = vf_id; ret_param.msg = msg; -_rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , + &ret_param);/* Default to approve */ if (ret_param.retval ==RTE_PMD_BNXT_MB_EVENT_PROCEED )
drivers/net/bonding/rte_eth_bond_pmd.c +4 -4
@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals, internals->slave_count--;/* force reconfiguration of slave interfaces */ -_rte_eth_dev_reset (slave_eth_dev); +rte_eth_dev_internal_reset (slave_eth_dev); } static void
@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)if (arg ==NULL )return ; -_rte_eth_dev_callback_process ((struct rte_eth_dev *)arg, +rte_eth_dev_callback_process ((struct rte_eth_dev *)arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL );
@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
drivers/net/dpaa/dpaa_ethdev.c +1 -1
@@ -335,7 +335,7 @@ static void dpaa_interrupt_handler(void *param)if (bytes_read <0 )DPAA_PMD_ERR ("Error reading eventfd\n" );dpaa_eth_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int dpaa_eth_dev_start (struct rte_eth_dev *dev)
drivers/net/dpaa2/dpaa2_ethdev.c +1 -2
@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param) clear =DPNI_IRQ_EVENT_LINK_CHANGED ;dpaa2_dev_link_update (dev,0 );/* calling all the apps registered for link status event */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } out: ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,
drivers/net/e1000/em_ethdev.c +1 -1
@@ -1630,7 +1630,7 @@ eth_em_interrupt_handler(void *param)eth_em_interrupt_get_status (dev);eth_em_interrupt_action (dev, dev->intr_handle); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
drivers/net/e1000/igb_ethdev.c +3 -4
@@ -2920,8 +2920,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev, pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }return 0 ;
@@ -2983,8 +2982,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (mbx->ops.read (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }
drivers/net/ena/ena_ethdev.c +2 -2
@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,if (unlikely (adapter->trigger_reset)) {PMD_DRV_LOG (ERR ,"Trigger reset is on\n" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL ); } }
@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data, adapter->link_status = status;ena_link_update (eth_dev,0 ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static void ena_notification(void *data,
drivers/net/enic/enic_main.c +1 -1
@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)vnic_intr_return_all_credits (&enic->intr[ENICPMD_LSC_INTR_OFFSET ]);enic_link_update (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );enic_log_q_error (enic);/* Re-enable irq in case of INTx */ rte_intr_ack (&enic->pdev->intr_handle);
drivers/net/failsafe/failsafe_ether.c +3 -3
@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused, ret = dev->dev_ops->link_update (dev,0 );/* We must pass on the LSC event */ if (ret) -return _rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +return rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );else return 0 ; }
drivers/net/fm10k/fm10k_ethdev.c +4 -7
@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param) true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }
@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)if (err ==FM10K_ERR_RESET_REQUESTED ) {PMD_INIT_LOG (INFO ,"INT: Switch is down" ); dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Handle SRAM error */
@@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)/* Setting reset flag */ dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } if (dev_info->sm_down == 1 &&
@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)fm10k_vlan_filter_set (dev, hw->mac.default_vid, true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Re-enable interrupt from device side */
drivers/net/hinic/base/hinic_pmd_hwdev.c +3 -3
@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev, ret =hinic_link_event_process (hwdev, rte_dev, status);/* check if link has changed, notify callback */ if (ret ==0 ) -_rte_eth_dev_callback_process (rte_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (rte_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,
drivers/net/i40e/i40e_ethdev.c +1 -1
@@ -6846,7 +6846,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)case i40e_aqc_opc_get_link_status: ret =i40e_dev_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :
drivers/net/i40e/i40e_ethdev_vf.c +2 -2
@@ -1378,7 +1378,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :
@@ -1425,7 +1425,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg, }i40evf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :
drivers/net/i40e/i40e_pf.c +1 -1
@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,* do nothing and send not_supported to VF. As PF must send a response * to VF and ACK/NACK is not defined. */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);if (ret_param.retval !=RTE_PMD_I40E_MB_EVENT_PROCEED ) {PMD_DRV_LOG (WARNING ,"VF to PF message(%d) is not permitted!" , opcode);
drivers/net/iavf/iavf_vchnl.c +2 -3
@@ -187,7 +187,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :
@@ -202,8 +202,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, vf->link_speed =iavf_convert_link_speed (speed); }iavf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_PF_DRIVER_CLOSE event" );
drivers/net/ice/ice_ethdev.c +2 -2
@@ -1314,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)case ice_aqc_opc_get_link_status: ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :
@@ -1379,7 +1379,7 @@ ice_interrupt_handler(void *param)PMD_DRV_LOG (INFO ,"OICR: link state change event" ); ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev, RTE_ETH_EVENT_INTR_LSC, NULL); }#endif
drivers/net/igc/igc_ethdev.c +1 -2
@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev) pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } }
drivers/net/ixgbe/ixgbe_ethdev.c +4 -6
@@ -4659,13 +4659,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)ixgbe_dev_link_update (dev,0 ); intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE ;ixgbe_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }if (intr->flags &IXGBE_FLAG_MACSEC ) { -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); intr->flags &= ~IXGBE_FLAG_MACSEC ; }
@@ -8674,8 +8672,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (ixgbe_read_mbx (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }
drivers/net/ixgbe/ixgbe_pf.c +2 -3
@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf) vfinfo[vf].clear_to_send = true;/* notify application about VF reset */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);return ret; }
@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)* if 0, do nothing and send ACK to VF * if ret_param.retval > 1, do nothing and send NAK to VF */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); retval = ret_param.retval;
drivers/net/mlx4/mlx4_intr.c +5 -5
@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)MLX4_ASSERT (priv->intr_alarm ==1 ); priv->intr_alarm =0 ;if (intr_conf->lsc && !mlx4_link_status_check (priv)) -_rte_eth_dev_callback_process (ETH_DEV (priv), -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/**
@@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv) }for (i =0 ; i !=RTE_DIM (caught); ++i)if (caught[i]) -_rte_eth_dev_callback_process (ETH_DEV (priv), type[i], -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), type[i], +NULL ); }/**
drivers/net/mlx5/linux/mlx5_ethdev_os.c +2 -2
@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh) dev = &rte_eth_devices[sh->port[i].ih_port_id];MLX5_ASSERT (dev);if (dev->data->dev_conf.intr_conf.rmv) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RMV ,NULL ); } }
@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)usleep (0 );continue ; } -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );continue ; }
drivers/net/mlx5/mlx5_flow.c +1 -1
@@ -6085,7 +6085,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,if (!MLX5_AGE_GET (age_info,MLX5_AGE_EVENT_NEW ))continue ;if (MLX5_AGE_GET (age_info,MLX5_AGE_TRIGGER )) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (&rte_eth_devices[sh->port[i].devx_ih_port_id],RTE_ETH_EVENT_FLOW_AGED ,NULL ); age_info->flags =0 ;
drivers/net/netvsc/hn_rndis.c +1 -1
@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,*/ static void hn_rndis_link_alarm (void *arg) { -_rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }void hn_rndis_link_status (struct rte_eth_dev *dev,const void *msg)
drivers/net/nfp/nfp_net.c +1 -1
@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)struct rte_eth_dev *dev = (struct rte_eth_dev *)param;nfp_net_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );nfp_net_dev_link_status_print (dev);
drivers/net/octeontx/octeontx_ethdev.c +3 -3
@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)octeontx_link_status_update (nic, &link);octeontx_link_status_print (dev, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/octeontx2/otx2_link.c +1 -1
@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,rte_eth_linkstatus_set (eth_dev, ð_link);/* Set the flag and execute application callbacks */ -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
drivers/net/qede/qede_main.c +1 -2
@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;if (!qede_link_update (dev,0 )) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int qed_drain (struct ecore_dev *edev)
drivers/net/sfc/sfc_intr.c +6 -6
@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)sfc_notice (sa,"link status change event: link %s" , sa->eth_dev->data->dev_link.link_status ?"UP" :"DOWN" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg) exit:if (lsc_seq != sa->port.lsc_seq) {sfc_notice (sa,"link status change event" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/thunderx/nicvf_ethdev.c +3 -3
@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)nicvf_link_status_update (nic, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }
drivers/net/vhost/rte_eth_vhost.c +3 -3
@@ -832,7 +832,7 @@ new_device(int vid)VHOST_LOG (INFO ,"Vhost device %d created\n" , vid); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL );return 0 ; }
@@ -889,7 +889,7 @@ destroy_device(int vid)VHOST_LOG (INFO ,"Vhost device %d destroyed\n" , vid);eth_vhost_uninstall_intr (eth_dev); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int
@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)VHOST_LOG (INFO ,"vring%u is %s\n" , vring, enable ?"enabled" :"disabled" ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL );return 0 ; }
drivers/net/virtio/virtio_ethdev.c +3 -3
@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)if (isr &VIRTIO_PCI_ISR_CONFIG ) {if (virtio_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );if (vtpci_with_feature (hw,VIRTIO_NET_F_STATUS )) { vtpci_read_dev_config(hw,
drivers/net/vmxnet3/vmxnet3_ethdev.c +3 -3
@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)if (events &VMXNET3_ECR_LINK ) {PMD_DRV_LOG (DEBUG ,"Process events: VMXNET3_ECR_LINK event" );if (vmxnet3_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/* Check if there is an error on xmit/recv queues */
lib/librte_ethdev/rte_ethdev.c +4 -4
@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)rte_eth_dev_shared_data_prepare ();if (eth_dev->state !=RTE_ETH_DEV_UNUSED ) -_rte_eth_dev_callback_process (eth_dev, +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_DESTROY ,NULL );rte_spinlock_lock (&rte_eth_dev_shared_data->ownership_lock);
@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, }void -_rte_eth_dev_reset (struct rte_eth_dev *dev) +rte_eth_dev_internal_reset (struct rte_eth_dev *dev) {if (dev->data->dev_started) { RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",
@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }int -_rte_eth_dev_callback_process (struct rte_eth_dev *dev, +rte_eth_dev_callback_process (struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param) {struct rte_eth_dev_callback *cb_lst;
@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)if (dev ==NULL )return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); dev->state =RTE_ETH_DEV_ATTACHED ; }
lib/librte_ethdev/rte_ethdev_driver.h +2 -2
@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* void */ __rte_internal -void _rte_eth_dev_reset(struct rte_eth_dev *dev); +void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);/** * @internal Executes all the user application registered callbacks for
@@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* int */ __rte_internal -int _rte_eth_dev_callback_process(struct rte_eth_dev *dev, +int rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);/**
lib/librte_ethdev/rte_ethdev_version.map +2 -2
@@ -228,17 +228,17 @@ EXPERIMENTAL { INTERNAL { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_dev_allocate; rte_eth_dev_allocated; rte_eth_dev_attach_secondary; + rte_eth_dev_callback_process; rte_eth_dev_create; rte_eth_dev_destroy; rte_eth_dev_is_rx_hairpin_queue; rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; + rte_eth_dev_internal_reset; rte_eth_devargs_parse; rte_eth_dma_zone_free; rte_eth_dma_zone_reserve;
Signature · 1 line
2.26.2
Re: [dpdk-dev] [PATCH v4 7/7] ethdev: remove underscore prefix from internal API
Quoted 870 lines · Ferruh Yigit
'
_rte_eth_dev_callback_process()' & '_rte_eth_dev_reset()' internal APIs has unconventional underscore ('_') prefix.
Although this is not documented most probably this is to mark them as internal. Since we have '__rte_internal' flag to mark this, removing '_' from API names.For '
_rte_eth_dev_reset()', there is already a public API named 'rte_eth_dev_reset()', so renaming '_rte_eth_dev_reset()' to 'rte_eth_dev_internal_reset'.Signed-off-by Ferruh Yigit <[email protected]>Acked-by Andrew Rybchenko <[email protected]>Acked-by David Marchand <[email protected]>---
v3:
* release note updated--- app/test/virtual_pmd.c | 4 ++-- doc/guides/prog_guide/poll_mode_drv.rst | 4 ++-- doc/guides/rel_notes/release_20_11.rst | 5 +++++ drivers/net/atlantic/atl_ethdev.c | 5 ++--- drivers/net/bnxt/bnxt_ethdev.c | 6 +++--- drivers/net/bnxt/rte_pmd_bnxt.c | 4 ++-- drivers/net/bonding/rte_eth_bond_pmd.c | 8 ++++---- drivers/net/dpaa/dpaa_ethdev.c | 2 +- drivers/net/dpaa2/dpaa2_ethdev.c | 3 +-- drivers/net/e1000/em_ethdev.c | 2 +- drivers/net/e1000/igb_ethdev.c | 7 +++---- drivers/net/ena/ena_ethdev.c | 4 ++-- drivers/net/enic/enic_main.c | 2 +- drivers/net/failsafe/failsafe_ether.c | 6 +++--- drivers/net/fm10k/fm10k_ethdev.c | 11 ++++------- drivers/net/hinic/base/hinic_pmd_hwdev.c | 6 +++--- drivers/net/i40e/i40e_ethdev.c | 2 +- drivers/net/i40e/i40e_ethdev_vf.c | 4 ++-- drivers/net/i40e/i40e_pf.c | 2 +- drivers/net/iavf/iavf_vchnl.c | 5 ++--- drivers/net/ice/ice_ethdev.c | 4 ++-- drivers/net/igc/igc_ethdev.c | 3 +-- drivers/net/ixgbe/ixgbe_ethdev.c | 10 ++++------ drivers/net/ixgbe/ixgbe_pf.c | 5 ++--- drivers/net/mlx4/mlx4_intr.c | 10 +++++----- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++-- drivers/net/mlx5/mlx5_flow.c | 2 +- drivers/net/netvsc/hn_rndis.c | 2 +- drivers/net/nfp/nfp_net.c | 2 +- drivers/net/octeontx/octeontx_ethdev.c | 6 +++--- drivers/net/octeontx2/otx2_link.c | 2 +- drivers/net/qede/qede_main.c | 3 +-- drivers/net/sfc/sfc_intr.c | 12 ++++++------ drivers/net/thunderx/nicvf_ethdev.c | 6 +++--- drivers/net/vhost/rte_eth_vhost.c | 6 +++--- drivers/net/virtio/virtio_ethdev.c | 6 +++--- drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++--- lib/librte_ethdev/rte_ethdev.c | 8 ++++---- lib/librte_ethdev/rte_ethdev_driver.h | 4 ++-- lib/librte_ethdev/rte_ethdev_version.map | 4 ++-- 40 files changed, 95 insertions(+), 102 deletions(-)app/test/virtual_pmd.c +2
-2@@ -474,8 +474,8 @@ virtual_ethdev_simulate_link_status_interrupt(uint16_t port_id, vrtl_eth_dev->data->dev_link.link_status = link_status; -_rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (vrtl_eth_dev,RTE_ETH_EVENT_INTR_LSC , +NULL ); }int doc/guides/prog_guide/poll_mode_drv.rst +2
-2@@ -600,9 +600,9 @@ thread safety all these operations should be called from the same thread. For example when PF is reset, the PF sends a message to notify VFs of this event and also trigger an interrupt to VFs. Then in the interrupt service routine the VFs detects this notification message and calls -_rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). +rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_RESET, NULL). This means that a PF reset triggers an RTE_ETH_EVENT_INTR_RESET -event within VFs. The function _rte_eth_dev_callback_process() will +event within VFs. The function rte_eth_dev_callback_process() will call the registered callback function. The callback function can trigger the application to handle all operations the VF reset requires including stopping Rx/Tx queues and calling rte_eth_dev_reset().doc/guides/rel_notes/release_20_11.rst +5
-0@@ -86,6 +86,11 @@ API Changes * ``rte_eth_rx_descriptor_done()`` API has deprecated. +* Renamed internal ethdev APIs: + + * ``_rte_eth_dev_callback_process()`` -> ``rte_eth_dev_callback_process()`` + * ``_rte_eth_dev_reset`` -> ``rte_eth_dev_internal_reset()`` + ABI Changes -----------drivers/net/atlantic/atl_ethdev.c +2
-3@@ -1395,8 +1395,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev,/* Notify userapp if link status changed */ if (!atl_dev_link_update (dev,0 )) {atl_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }else {if (hw->aq_fw_ops->send_macsec_req ==NULL ) goto done;@@ -1422,7 +1421,7 @@ atl_dev_interrupt_action(struct rte_eth_dev *dev, resp.stats.egress_expired || resp.stats.ingress_expired) {PMD_DRV_LOG (INFO ,"RTE_ETH_EVENT_MACSEC" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); } }drivers/net/bnxt/bnxt_ethdev.c +3
-3@@ -1528,9 +1528,9 @@ int bnxt_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete, new.link_speed != eth_dev->data->dev_link.link_speed) {rte_eth_linkstatus_set (eth_dev, &new); -_rte_eth_dev_callback_process (eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );bnxt_print_link_info (eth_dev); }drivers/net/bnxt/rte_pmd_bnxt.c +2
-2@@ -28,8 +28,8 @@ int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg) ret_param.vf_id = vf_id; ret_param.msg = msg; -_rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (bp->eth_dev,RTE_ETH_EVENT_VF_MBOX , + &ret_param);/* Default to approve */ if (ret_param.retval ==RTE_PMD_BNXT_MB_EVENT_PROCEED )drivers/net/bonding/rte_eth_bond_pmd.c +4
-4@@ -1879,7 +1879,7 @@ slave_remove(struct bond_dev_private *internals, internals->slave_count--;/* force reconfiguration of slave interfaces */ -_rte_eth_dev_reset (slave_eth_dev); +rte_eth_dev_internal_reset (slave_eth_dev); } static void@@ -2765,7 +2765,7 @@ bond_ethdev_delayed_lsc_propagation(void *arg)if (arg ==NULL )return ; -_rte_eth_dev_callback_process ((struct rte_eth_dev *)arg, +rte_eth_dev_callback_process ((struct rte_eth_dev *)arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }@@ -2900,7 +2900,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL );@@ -2910,7 +2910,7 @@ bond_ethdev_lsc_event_callback(uint16_t port_id, enum rte_eth_event_type type, bond_ethdev_delayed_lsc_propagation, (void *)bonded_eth_dev); else -_rte_eth_dev_callback_process (bonded_eth_dev , +rte_eth_dev_callback_process (bonded_eth_dev ,RTE_ETH_EVENT_INTR_LSC ,NULL ); }drivers/net/dpaa/dpaa_ethdev.c +1
-1@@ -335,7 +335,7 @@ static void dpaa_interrupt_handler(void *param)if (bytes_read <0 )DPAA_PMD_ERR ("Error reading eventfd\n" );dpaa_eth_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int dpaa_eth_dev_start (struct rte_eth_dev *dev)drivers/net/dpaa2/dpaa2_ethdev.c +1
-2@@ -1065,8 +1065,7 @@ dpaa2_interrupt_handler(void *param) clear =DPNI_IRQ_EVENT_LINK_CHANGED ;dpaa2_dev_link_update (dev,0 );/* calling all the apps registered for link status event */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } out: ret = dpni_clear_irq_status(dpni, CMD_PRI_LOW, priv->token,drivers/net/e1000/em_ethdev.c +1
-1@@ -1630,7 +1630,7 @@ eth_em_interrupt_handler(void *param)eth_em_interrupt_get_status (dev);eth_em_interrupt_action (dev, dev->intr_handle); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static intdrivers/net/e1000/igb_ethdev.c +3
-4@@ -2920,8 +2920,7 @@ eth_igb_interrupt_action(struct rte_eth_dev *dev, pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }return 0 ;@@ -2983,8 +2982,8 @@ void igbvf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (mbx->ops.read (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }drivers/net/ena/ena_ethdev.c +2
-2@@ -1621,7 +1621,7 @@ static void ena_timer_wd_callback(__rte_unused struct rte_timer *timer,if (unlikely (adapter->trigger_reset)) {PMD_DRV_LOG (ERR ,"Trigger reset is on\n" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL ); } }@@ -2867,7 +2867,7 @@ static void ena_update_on_link_change(void *adapter_data, adapter->link_status = status;ena_link_update (eth_dev,0 ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static void ena_notification(void *data,drivers/net/enic/enic_main.c +1
-1@@ -445,7 +445,7 @@ enic_intr_handler(void *arg)vnic_intr_return_all_credits (&enic->intr[ENICPMD_LSC_INTR_OFFSET ]);enic_link_update (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );enic_log_q_error (enic);/* Re-enable irq in case of INTx */ rte_intr_ack (&enic->pdev->intr_handle);drivers/net/failsafe/failsafe_ether.c +3
-3@@ -602,9 +602,9 @@ failsafe_eth_lsc_event_callback(uint16_t port_id __rte_unused, ret = dev->dev_ops->link_update (dev,0 );/* We must pass on the LSC event */ if (ret) -return _rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +return rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );else return 0 ; }drivers/net/fm10k/fm10k_ethdev.c +4
-7@@ -2621,7 +2621,7 @@ fm10k_dev_interrupt_handler_pf(void *param) true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }@@ -2635,8 +2635,7 @@ fm10k_dev_interrupt_handler_pf(void *param)if (err ==FM10K_ERR_RESET_REQUESTED ) {PMD_INIT_LOG (INFO ,"INT: Switch is down" ); dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Handle SRAM error */ @@ -2703,8 +2702,7 @@ fm10k_dev_interrupt_handler_vf(void *param)/* Setting reset flag */ dev_info->sm_down =1 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } if (dev_info->sm_down == 1 &&@@ -2732,8 +2730,7 @@ fm10k_dev_interrupt_handler_vf(void *param)fm10k_vlan_filter_set (dev, hw->mac.default_vid, true); dev_info->sm_down =0 ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }/* Re-enable interrupt from device side */ drivers/net/hinic/base/hinic_pmd_hwdev.c +3
-3@@ -1362,9 +1362,9 @@ static void hinic_lsc_process(struct hinic_hwdev *hwdev, ret =hinic_link_event_process (hwdev, rte_dev, status);/* check if link has changed, notify callback */ if (ret ==0 ) -_rte_eth_dev_callback_process (rte_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (rte_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } void hinic_l2nic_async_event_handle(struct hinic_hwdev *hwdev,drivers/net/i40e/i40e_ethdev.c +1
-1@@ -6846,7 +6846,7 @@ i40e_dev_handle_aq_msg(struct rte_eth_dev *dev)case i40e_aqc_opc_get_link_status: ret =i40e_dev_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :drivers/net/i40e/i40e_ethdev_vf.c +2
-2@@ -1378,7 +1378,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :@@ -1425,7 +1425,7 @@ i40evf_handle_pf_event(struct rte_eth_dev *dev, uint8_t *msg, }i40evf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev, +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :drivers/net/i40e/i40e_pf.c +1
-1@@ -1363,7 +1363,7 @@ i40e_pf_host_handle_vf_msg(struct rte_eth_dev *dev,* do nothing and send not_supported to VF. As PF must send a response * to VF and ACK/NACK is not defined. */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);if (ret_param.retval !=RTE_PMD_I40E_MB_EVENT_PROCEED ) {PMD_DRV_LOG (WARNING ,"VF to PF message(%d) is not permitted!" , opcode);drivers/net/iavf/iavf_vchnl.c +2
-3@@ -187,7 +187,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg,switch (pf_msg->event) {case VIRTCHNL_EVENT_RESET_IMPENDING :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_RESET_IMPENDING event" ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET ,NULL );break ;case VIRTCHNL_EVENT_LINK_CHANGE :@@ -202,8 +202,7 @@ iavf_handle_pf_event_msg(struct rte_eth_dev *dev, uint8_t *msg, vf->link_speed =iavf_convert_link_speed (speed); }iavf_dev_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;case VIRTCHNL_EVENT_PF_DRIVER_CLOSE :PMD_DRV_LOG (DEBUG ,"VIRTCHNL_EVENT_PF_DRIVER_CLOSE event" );drivers/net/ice/ice_ethdev.c +2
-2@@ -1314,7 +1314,7 @@ ice_handle_aq_msg(struct rte_eth_dev *dev)case ice_aqc_opc_get_link_status: ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );break ;default :@@ -1379,7 +1379,7 @@ ice_interrupt_handler(void *param)PMD_DRV_LOG (INFO ,"OICR: link state change event" ); ret =ice_link_update (dev,0 );if (!ret) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev, RTE_ETH_EVENT_INTR_LSC, NULL); }#endif drivers/net/igc/igc_ethdev.c +1
-2@@ -540,8 +540,7 @@ eth_igc_interrupt_action(struct rte_eth_dev *dev) pci_dev->addr.bus, pci_dev->addr.devid, pci_dev->addr.function); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } }drivers/net/ixgbe/ixgbe_ethdev.c +4
-6@@ -4659,13 +4659,11 @@ ixgbe_dev_interrupt_delayed_handler(void *param)ixgbe_dev_link_update (dev,0 ); intr->flags &= ~IXGBE_FLAG_NEED_LINK_UPDATE ;ixgbe_dev_link_status_print (dev); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }if (intr->flags &IXGBE_FLAG_MACSEC ) { -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_MACSEC ,NULL ); intr->flags &= ~IXGBE_FLAG_MACSEC ; }@@ -8674,8 +8672,8 @@ static void ixgbevf_mbx_process(struct rte_eth_dev *dev)/* dummy mbx read to ack pf */ if (ixgbe_read_mbx (hw, &in_msg,1 ,0 ))return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , -NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RESET , +NULL ); } }drivers/net/ixgbe/ixgbe_pf.c +2
-3@@ -832,7 +832,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf) vfinfo[vf].clear_to_send = true;/* notify application about VF reset */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param);return ret; }@@ -844,8 +844,7 @@ ixgbe_rcv_msg_from_vf(struct rte_eth_dev *dev, uint16_t vf)* if 0, do nothing and send ACK to VF * if ret_param.retval > 1, do nothing and send NAK to VF */ -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , - &ret_param); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_VF_MBOX , &ret_param); retval = ret_param.retval;drivers/net/mlx4/mlx4_intr.c +5
-5@@ -124,9 +124,9 @@ mlx4_link_status_alarm(struct mlx4_priv *priv)MLX4_ASSERT (priv->intr_alarm ==1 ); priv->intr_alarm =0 ;if (intr_conf->lsc && !mlx4_link_status_check (priv)) -_rte_eth_dev_callback_process (ETH_DEV (priv), -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/** @@ -207,8 +207,8 @@ mlx4_interrupt_handler(struct mlx4_priv *priv) }for (i =0 ; i !=RTE_DIM (caught); ++i)if (caught[i]) -_rte_eth_dev_callback_process (ETH_DEV (priv), type[i], -NULL ); +rte_eth_dev_callback_process (ETH_DEV (priv), type[i], +NULL ); }/** drivers/net/mlx5/linux/mlx5_ethdev_os.c +2
-2@@ -732,7 +732,7 @@ mlx5_dev_interrupt_device_fatal(struct mlx5_dev_ctx_shared *sh) dev = &rte_eth_devices[sh->port[i].ih_port_id];MLX5_ASSERT (dev);if (dev->data->dev_conf.intr_conf.rmv) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_RMV ,NULL ); } }@@ -808,7 +808,7 @@ mlx5_dev_interrupt_handler(void *cb_arg)usleep (0 );continue ; } -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );continue ; }drivers/net/mlx5/mlx5_flow.c +1
-1@@ -6085,7 +6085,7 @@ mlx5_flow_aging_check(struct mlx5_dev_ctx_shared *sh,if (!MLX5_AGE_GET (age_info,MLX5_AGE_EVENT_NEW ))continue ;if (MLX5_AGE_GET (age_info,MLX5_AGE_TRIGGER )) -_rte_eth_dev_callback_process +rte_eth_dev_callback_process (&rte_eth_devices[sh->port[i].devx_ih_port_id],RTE_ETH_EVENT_FLOW_AGED ,NULL ); age_info->flags =0 ;drivers/net/netvsc/hn_rndis.c +1
-1@@ -292,7 +292,7 @@ static int hn_nvs_send_rndis_ctrl(struct vmbus_channel *chan,*/ static void hn_rndis_link_alarm (void *arg) { -_rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (arg,RTE_ETH_EVENT_INTR_LSC ,NULL ); }void hn_rndis_link_status (struct rte_eth_dev *dev,const void *msg)drivers/net/nfp/nfp_net.c +1
-1@@ -1460,7 +1460,7 @@ nfp_net_dev_interrupt_delayed_handler(void *param)struct rte_eth_dev *dev = (struct rte_eth_dev *)param;nfp_net_link_update (dev,0 ); -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL );nfp_net_dev_link_status_print (dev);drivers/net/octeontx/octeontx_ethdev.c +3
-3@@ -227,9 +227,9 @@ octeontx_link_status_poll(void *arg)octeontx_link_status_update (nic, &link);octeontx_link_status_print (dev, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }drivers/net/octeontx2/otx2_link.c +1
-1@@ -82,7 +82,7 @@ otx2_eth_dev_link_status_update(struct otx2_dev *dev,rte_eth_linkstatus_set (eth_dev, ð_link);/* Set the flag and execute application callbacks */ -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static intdrivers/net/qede/qede_main.c +1
-2@@ -650,8 +650,7 @@ void qed_link_update(struct ecore_hwfn *hwfn)struct rte_eth_dev *dev = (struct rte_eth_dev *)qdev->ethdev;if (!qede_link_update (dev,0 )) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); }static int qed_drain (struct ecore_dev *edev)drivers/net/sfc/sfc_intr.c +6
-6@@ -89,9 +89,9 @@ sfc_intr_line_handler(void *cb_arg)sfc_notice (sa,"link status change event: link %s" , sa->eth_dev->data->dev_link.link_status ?"UP" :"DOWN" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }@@ -131,9 +131,9 @@ sfc_intr_message_handler(void *cb_arg) exit:if (lsc_seq != sa->port.lsc_seq) {sfc_notice (sa,"link status change event" ); -_rte_eth_dev_callback_process (sa->eth_dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (sa->eth_dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }drivers/net/thunderx/nicvf_ethdev.c +3
-3@@ -83,9 +83,9 @@ nicvf_interrupt(void *arg)nicvf_link_status_update (nic, &link);rte_eth_linkstatus_set (dev, &link); -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); } }drivers/net/vhost/rte_eth_vhost.c +3
-3@@ -832,7 +832,7 @@ new_device(int vid)VHOST_LOG (INFO ,"Vhost device %d created\n" , vid); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL );return 0 ; }@@ -889,7 +889,7 @@ destroy_device(int vid)VHOST_LOG (INFO ,"Vhost device %d destroyed\n" , vid);eth_vhost_uninstall_intr (eth_dev); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_INTR_LSC ,NULL ); } static int@@ -968,7 +968,7 @@ vring_state_changed(int vid, uint16_t vring, int enable)VHOST_LOG (INFO ,"vring%u is %s\n" , vring, enable ?"enabled" :"disabled" ); -_rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL ); +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_QUEUE_STATE ,NULL );return 0 ; }drivers/net/virtio/virtio_ethdev.c +3
-3@@ -1489,9 +1489,9 @@ virtio_interrupt_handler(void *param)if (isr &VIRTIO_PCI_ISR_CONFIG ) {if (virtio_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL );if (vtpci_with_feature (hw,VIRTIO_NET_F_STATUS )) { vtpci_read_dev_config(hw,drivers/net/vmxnet3/vmxnet3_ethdev.c +3
-3@@ -1417,9 +1417,9 @@ vmxnet3_process_events(struct rte_eth_dev *dev)if (events &VMXNET3_ECR_LINK ) {PMD_DRV_LOG (DEBUG ,"Process events: VMXNET3_ECR_LINK event" );if (vmxnet3_dev_link_update (dev,0 ) ==0 ) -_rte_eth_dev_callback_process (dev, -RTE_ETH_EVENT_INTR_LSC , -NULL ); +rte_eth_dev_callback_process (dev, +RTE_ETH_EVENT_INTR_LSC , +NULL ); }/* Check if there is an error on xmit/recv queues */ lib/librte_ethdev/rte_ethdev.c +4
-4@@ -549,7 +549,7 @@ rte_eth_dev_release_port(struct rte_eth_dev *eth_dev)rte_eth_dev_shared_data_prepare ();if (eth_dev->state !=RTE_ETH_DEV_UNUSED ) -_rte_eth_dev_callback_process (eth_dev, +rte_eth_dev_callback_process (eth_dev,RTE_ETH_EVENT_DESTROY ,NULL );rte_spinlock_lock (&rte_eth_dev_shared_data->ownership_lock);@@ -1486,7 +1486,7 @@ rte_eth_dev_configure(uint16_t port_id, uint16_t nb_rx_q, uint16_t nb_tx_q, }void -_rte_eth_dev_reset (struct rte_eth_dev *dev) +rte_eth_dev_internal_reset (struct rte_eth_dev *dev) {if (dev->data->dev_started) { RTE_ETHDEV_LOG(ERR, "Port %u must be stopped to allow reset\n",@@ -4090,7 +4090,7 @@ rte_eth_dev_callback_unregister(uint16_t port_id, }int -_rte_eth_dev_callback_process (struct rte_eth_dev *dev, +rte_eth_dev_callback_process (struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param) {struct rte_eth_dev_callback *cb_lst;@@ -4122,7 +4122,7 @@ rte_eth_dev_probing_finish(struct rte_eth_dev *dev)if (dev ==NULL )return ; -_rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); +rte_eth_dev_callback_process (dev,RTE_ETH_EVENT_NEW ,NULL ); dev->state =RTE_ETH_DEV_ATTACHED ; }lib/librte_ethdev/rte_ethdev_driver.h +2
-2@@ -821,7 +821,7 @@ int rte_eth_dev_release_port(struct rte_eth_dev *eth_dev);* void */ __rte_internal -void _rte_eth_dev_reset(struct rte_eth_dev *dev); +void rte_eth_dev_internal_reset(struct rte_eth_dev *dev);/** * @internal Executes all the user application registered callbacks for @@ -841,7 +841,7 @@ void _rte_eth_dev_reset(struct rte_eth_dev *dev);* int */ __rte_internal -int _rte_eth_dev_callback_process(struct rte_eth_dev *dev, +int rte_eth_dev_callback_process(struct rte_eth_dev *dev,enum rte_eth_event_type event,void *ret_param);/** lib/librte_ethdev/rte_ethdev_version.map +2
-2@@ -228,17 +228,17 @@ EXPERIMENTAL { INTERNAL { global: - _rte_eth_dev_callback_process; - _rte_eth_dev_reset; rte_eth_dev_allocate; rte_eth_dev_allocated; rte_eth_dev_attach_secondary; + rte_eth_dev_callback_process; rte_eth_dev_create; rte_eth_dev_destroy; rte_eth_dev_is_rx_hairpin_queue; rte_eth_dev_is_tx_hairpin_queue; rte_eth_dev_probing_finish; rte_eth_dev_release_port; + rte_eth_dev_internal_reset; rte_eth_devargs_parse; rte_eth_dma_zone_free; rte_eth_dma_zone_reserve;
Re: [dpdk-dev] [PATCH v4 1/7] ethdev: deprecate descriptor status check API
In reply to Ferruh YigitQuoted 9 lines · Ferruh Yigit
Marking '
rte_eth_rx_descriptor_done()' API as deprecated. ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` APIs can be used as replacement.Plan is to remove the API on 21.11 release.
Signed-off-by Ferruh Yigit <[email protected]>Acked-by David Marchand <[email protected]>
Series applied to dpdk-next-net/main, thanks.
v3 cover cppcheck
In reply to Ferruh YigitFix a few of issues identified by cppcheck. There are more to address, cppcheck can be run as:
"cppcheck --enable=all --force ."
These are very trivial issues, I think can be postponed to next release.
Ferruh Yigit (10):
app/procinfo: fix redundant condition app/procinfo: fix negative check on unsigned variable app/procinfo: remove suspicious sizeof app/procinfo: remove useless assignment net/pcap: remove local variable shadowing outer one net/bonding: remove local variable shadowing outer one net/af_xdp: remove useless assignment net/bnxt: fix redundant return app/crypto-perf: remove always true condition net/avp: remove always true condition
app/proc-info/main.c | 16 +++++----------- app/test-crypto-perf/main.c | 4 ++-- drivers/net/af_xdp/rte_eth_af_xdp.c | 1 - drivers/net/avp/avp_ethdev.c | 2 +- drivers/net/bnxt/tf_core/tf_em_common.c | 1 - drivers/net/bonding/rte_eth_bond_8023ad.c | 6 ++---- drivers/net/pcap/rte_eth_pcap.c | 5 ++--- 7 files changed, 12 insertions(+), 23 deletions(-)
Signature · 1 line
2.26.2