From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 76866A04BF; Thu, 3 Sep 2020 23:10:12 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C535A1BEAF; Thu, 3 Sep 2020 23:10:11 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 56BD8DE0 for ; Thu, 3 Sep 2020 23:10:07 +0200 (CEST) IronPort-SDR: sBt+c/xR8j/yYXuFS3+ko3dUVgtSkHzrbTwGRipslKCeVZ5N04hyYDWQksheEG8+1qYta1hohK I6pxBWJKsVPg== X-IronPort-AV: E=McAfee;i="6000,8403,9733"; a="156922008" X-IronPort-AV: E=Sophos;i="5.76,387,1592895600"; d="scan'208";a="156922008" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Sep 2020 14:10:06 -0700 IronPort-SDR: xwcXQzGyWa2NdJhCTvb1W2hO8lkvPhtbr8cgu+ejRm49WFgr0lPIJWeEFtigpvUMEE8yGYsh63 qOG60cNo/txQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,387,1592895600"; d="scan'208";a="339426985" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.180]) by FMSMGA003.fm.intel.com with ESMTP; 03 Sep 2020 14:10:02 -0700 From: Ferruh Yigit To: dev@dpdk.org, John McNamara , Marko Kovacevic , Ray Kinsella , Neil Horman , Wei Zhao , Jeff Guo , John Daley , Hyong Youb Kim , Qi Zhang , Xiao Wang , Beilei Xing , Jerin Jacob , Nithin Dabilpuram , Kiran Kumar K , Andrew Rybchenko , Maxime Coquelin , Chenbo Xia , Zhihong Wang , Thomas Monjalon Cc: Ferruh Yigit Date: Thu, 3 Sep 2020 22:09:53 +0100 Message-Id: <20200903211000.244931-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20200824094021.2323605-1-ferruh.yigit@intel.com> References: <20200824094021.2323605-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 1/7] ethdev: remove legacy descriptor status check API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Removing 'rte_eth_rx_descriptor_done()' API and relevant 'rx_descriptor_done' function pointer from 'struct eth_dev_ops'. Deprecation notice is to deprecate the API in 20.11 and remove one year later, this is useful to prevent new applications use the API but keep the support for old application. But since 20.11 have the ABI break and most of the applications need to re-compile anyway will prevent them to use the API, the affect will be same as removing the API. So removing it in the 20.11 to reduce the churn. 'rx_descriptor_done' implementations removed from PMDs. Signed-off-by: Ferruh Yigit Reviewed-by: Andrew Rybchenko --- doc/guides/nics/features.rst | 6 +----- doc/guides/rel_notes/deprecation.rst | 5 ----- drivers/net/e1000/e1000_ethdev.h | 4 ---- drivers/net/e1000/em_ethdev.c | 1 - drivers/net/e1000/em_rxtx.c | 17 ---------------- drivers/net/e1000/igb_ethdev.c | 2 -- drivers/net/e1000/igb_rxtx.c | 17 ---------------- drivers/net/enic/enic_ethdev.c | 1 - drivers/net/fm10k/fm10k.h | 3 --- drivers/net/fm10k/fm10k_ethdev.c | 1 - drivers/net/fm10k/fm10k_rxtx.c | 25 ------------------------ drivers/net/i40e/i40e_ethdev.c | 1 - drivers/net/i40e/i40e_ethdev_vf.c | 1 - drivers/net/i40e/i40e_rxtx.c | 26 ------------------------- drivers/net/i40e/i40e_rxtx.h | 1 - drivers/net/igc/igc_ethdev.c | 1 - drivers/net/igc/igc_txrx.c | 18 ----------------- drivers/net/igc/igc_txrx.h | 2 -- drivers/net/ixgbe/ixgbe_ethdev.c | 2 -- drivers/net/ixgbe/ixgbe_ethdev.h | 2 -- drivers/net/ixgbe/ixgbe_rxtx.c | 18 ----------------- drivers/net/octeontx2/otx2_ethdev.c | 1 - drivers/net/octeontx2/otx2_ethdev.h | 1 - drivers/net/octeontx2/otx2_ethdev_ops.c | 12 ------------ drivers/net/sfc/sfc_ethdev.c | 17 ---------------- drivers/net/virtio/virtio_ethdev.c | 1 - drivers/net/virtio/virtio_ethdev.h | 2 -- drivers/net/virtio/virtio_rxtx.c | 9 --------- lib/librte_ethdev/rte_ethdev.h | 25 ------------------------ lib/librte_ethdev/rte_ethdev_core.h | 4 ---- 30 files changed, 1 insertion(+), 225 deletions(-) diff --git a/doc/guides/nics/features.rst b/doc/guides/nics/features.rst index edd21c4d8e..701c592b26 100644 --- a/doc/guides/nics/features.rst +++ b/doc/guides/nics/features.rst @@ -642,14 +642,10 @@ Rx descriptor status -------------------- Supports check the status of a Rx descriptor. When ``rx_descriptor_status`` is -used, status can be "Available", "Done" or "Unavailable". When -``rx_descriptor_done`` is used, status can be "DD bit is set" or "DD bit is -not set". +used, status can be "Available", "Done" or "Unavailable". * **[implements] eth_dev_ops**: ``rx_descriptor_status``. * **[related] API**: ``rte_eth_rx_descriptor_status()``. -* **[implements] eth_dev_ops**: ``rx_descriptor_done``. -* **[related] API**: ``rte_eth_rx_descriptor_done()``. .. _nic_features_tx_descriptor_status: diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 345c38d5b6..811eaad6ce 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -220,11 +220,6 @@ Deprecation Notices for HW. This change is planned for 20.11. For more details: https://mails.dpdk.org/archives/dev/2020-July/176135.html. -* ethdev: ``rx_descriptor_done`` dev_ops and ``rte_eth_rx_descriptor_done`` - will be deprecated in 20.11 and will be removed in 21.11. - Existing ``rte_eth_rx_descriptor_status`` and ``rte_eth_tx_descriptor_status`` - APIs can be used as replacement. - * ethdev: The port mirroring API can be replaced with a more fine grain flow API. The structs ``rte_eth_mirror_conf``, ``rte_eth_vlan_mirror`` and the functions ``rte_eth_mirror_rule_set``, ``rte_eth_mirror_rule_reset`` will be marked diff --git a/drivers/net/e1000/e1000_ethdev.h b/drivers/net/e1000/e1000_ethdev.h index 1e41ae9de1..dce365226b 100644 --- a/drivers/net/e1000/e1000_ethdev.h +++ b/drivers/net/e1000/e1000_ethdev.h @@ -384,8 +384,6 @@ int eth_igb_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint32_t eth_igb_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id); -int eth_igb_rx_descriptor_done(void *rx_queue, uint16_t offset); - int eth_igb_rx_descriptor_status(void *rx_queue, uint16_t offset); int eth_igb_tx_descriptor_status(void *tx_queue, uint16_t offset); @@ -461,8 +459,6 @@ int eth_em_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint32_t eth_em_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id); -int eth_em_rx_descriptor_done(void *rx_queue, uint16_t offset); - int eth_em_rx_descriptor_status(void *rx_queue, uint16_t offset); int eth_em_tx_descriptor_status(void *tx_queue, uint16_t offset); diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c index 902b1cdca0..32872db9c2 100644 --- a/drivers/net/e1000/em_ethdev.c +++ b/drivers/net/e1000/em_ethdev.c @@ -177,7 +177,6 @@ static const struct eth_dev_ops eth_em_ops = { .rx_queue_setup = eth_em_rx_queue_setup, .rx_queue_release = eth_em_rx_queue_release, .rx_queue_count = eth_em_rx_queue_count, - .rx_descriptor_done = eth_em_rx_descriptor_done, .rx_descriptor_status = eth_em_rx_descriptor_status, .tx_descriptor_status = eth_em_tx_descriptor_status, .tx_queue_setup = eth_em_tx_queue_setup, diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c index 67a271e8ce..2ffc31b41d 100644 --- a/drivers/net/e1000/em_rxtx.c +++ b/drivers/net/e1000/em_rxtx.c @@ -1511,23 +1511,6 @@ eth_em_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) return desc; } -int -eth_em_rx_descriptor_done(void *rx_queue, uint16_t offset) -{ - volatile struct e1000_rx_desc *rxdp; - struct em_rx_queue *rxq = rx_queue; - uint32_t desc; - - if (unlikely(offset >= rxq->nb_rx_desc)) - return 0; - desc = rxq->rx_tail + offset; - if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; - return !!(rxdp->status & E1000_RXD_STAT_DD); -} - int eth_em_rx_descriptor_status(void *rx_queue, uint16_t offset) { diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index a5551e8175..aec79c6ceb 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -381,7 +381,6 @@ static const struct eth_dev_ops eth_igb_ops = { .rx_queue_intr_disable = eth_igb_rx_queue_intr_disable, .rx_queue_release = eth_igb_rx_queue_release, .rx_queue_count = eth_igb_rx_queue_count, - .rx_descriptor_done = eth_igb_rx_descriptor_done, .rx_descriptor_status = eth_igb_rx_descriptor_status, .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, @@ -441,7 +440,6 @@ static const struct eth_dev_ops igbvf_eth_dev_ops = { .dev_supported_ptypes_get = eth_igb_supported_ptypes_get, .rx_queue_setup = eth_igb_rx_queue_setup, .rx_queue_release = eth_igb_rx_queue_release, - .rx_descriptor_done = eth_igb_rx_descriptor_done, .rx_descriptor_status = eth_igb_rx_descriptor_status, .tx_descriptor_status = eth_igb_tx_descriptor_status, .tx_queue_setup = eth_igb_tx_queue_setup, diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index dd520cd82c..d313893c3a 100644 --- a/drivers/net/e1000/igb_rxtx.c +++ b/drivers/net/e1000/igb_rxtx.c @@ -1791,23 +1791,6 @@ eth_igb_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) return desc; } -int -eth_igb_rx_descriptor_done(void *rx_queue, uint16_t offset) -{ - volatile union e1000_adv_rx_desc *rxdp; - struct igb_rx_queue *rxq = rx_queue; - uint32_t desc; - - if (unlikely(offset >= rxq->nb_rx_desc)) - return 0; - desc = rxq->rx_tail + offset; - if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; - return !!(rxdp->wb.upper.status_error & E1000_RXD_STAT_DD); -} - int eth_igb_rx_descriptor_status(void *rx_queue, uint16_t offset) { diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c index ca75919ee2..1316c5c739 100644 --- a/drivers/net/enic/enic_ethdev.c +++ b/drivers/net/enic/enic_ethdev.c @@ -1142,7 +1142,6 @@ static const struct eth_dev_ops enicpmd_eth_dev_ops = { .rx_queue_setup = enicpmd_dev_rx_queue_setup, .rx_queue_release = enicpmd_dev_rx_queue_release, .rx_queue_count = enicpmd_dev_rx_queue_count, - .rx_descriptor_done = NULL, .tx_queue_setup = enicpmd_dev_tx_queue_setup, .tx_queue_release = enicpmd_dev_tx_queue_release, .rx_queue_intr_enable = enicpmd_dev_rx_queue_intr_enable, diff --git a/drivers/net/fm10k/fm10k.h b/drivers/net/fm10k/fm10k.h index 916b856acc..2e47ada829 100644 --- a/drivers/net/fm10k/fm10k.h +++ b/drivers/net/fm10k/fm10k.h @@ -326,9 +326,6 @@ uint16_t fm10k_recv_scattered_pkts(void *rx_queue, uint32_t fm10k_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id); -int -fm10k_dev_rx_descriptor_done(void *rx_queue, uint16_t offset); - int fm10k_dev_rx_descriptor_status(void *rx_queue, uint16_t offset); diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index fd927923da..56e2425e47 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -2856,7 +2856,6 @@ static const struct eth_dev_ops fm10k_eth_dev_ops = { .tx_queue_setup = fm10k_tx_queue_setup, .tx_queue_release = fm10k_tx_queue_release, .rx_queue_count = fm10k_dev_rx_queue_count, - .rx_descriptor_done = fm10k_dev_rx_descriptor_done, .rx_descriptor_status = fm10k_dev_rx_descriptor_status, .tx_descriptor_status = fm10k_dev_tx_descriptor_status, .rx_queue_intr_enable = fm10k_dev_rx_queue_intr_enable, diff --git a/drivers/net/fm10k/fm10k_rxtx.c b/drivers/net/fm10k/fm10k_rxtx.c index 4accaa2cd6..399bb3da19 100644 --- a/drivers/net/fm10k/fm10k_rxtx.c +++ b/drivers/net/fm10k/fm10k_rxtx.c @@ -393,31 +393,6 @@ fm10k_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) return desc; } -int -fm10k_dev_rx_descriptor_done(void *rx_queue, uint16_t offset) -{ - volatile union fm10k_rx_desc *rxdp; - struct fm10k_rx_queue *rxq = rx_queue; - uint16_t desc; - int ret; - - if (unlikely(offset >= rxq->nb_desc)) { - PMD_DRV_LOG(ERR, "Invalid RX descriptor offset %u", offset); - return 0; - } - - desc = rxq->next_dd + offset; - if (desc >= rxq->nb_desc) - desc -= rxq->nb_desc; - - rxdp = &rxq->hw_ring[desc]; - - ret = !!(rxdp->w.status & - rte_cpu_to_le_16(FM10K_RXD_STATUS_DD)); - - return ret; -} - int fm10k_dev_rx_descriptor_status(void *rx_queue, uint16_t offset) { diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 11c02b1888..f8ed4a0b36 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -475,7 +475,6 @@ static const struct eth_dev_ops i40e_eth_dev_ops = { .rx_queue_intr_disable = i40e_dev_rx_queue_intr_disable, .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_count = i40e_dev_rx_queue_count, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, .rx_descriptor_status = i40e_dev_rx_descriptor_status, .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index b4e42939e6..d32e655d90 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -199,7 +199,6 @@ static const struct eth_dev_ops i40evf_eth_dev_ops = { .rx_queue_release = i40e_dev_rx_queue_release, .rx_queue_intr_enable = i40evf_dev_rx_queue_intr_enable, .rx_queue_intr_disable = i40evf_dev_rx_queue_intr_disable, - .rx_descriptor_done = i40e_dev_rx_descriptor_done, .rx_descriptor_status = i40e_dev_rx_descriptor_status, .tx_descriptor_status = i40e_dev_tx_descriptor_status, .tx_queue_setup = i40e_dev_tx_queue_setup, diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c index fe7f9200c1..645fbf401c 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c @@ -2032,32 +2032,6 @@ i40e_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) return desc; } -int -i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset) -{ - volatile union i40e_rx_desc *rxdp; - struct i40e_rx_queue *rxq = rx_queue; - uint16_t desc; - int ret; - - if (unlikely(offset >= rxq->nb_rx_desc)) { - PMD_DRV_LOG(ERR, "Invalid RX descriptor id %u", offset); - return 0; - } - - desc = rxq->rx_tail + offset; - if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &(rxq->rx_ring[desc]); - - ret = !!(((rte_le_to_cpu_64(rxdp->wb.qword1.status_error_len) & - I40E_RXD_QW1_STATUS_MASK) >> I40E_RXD_QW1_STATUS_SHIFT) & - (1 << I40E_RX_DESC_STATUS_DD_SHIFT)); - - return ret; -} - int i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset) { diff --git a/drivers/net/i40e/i40e_rxtx.h b/drivers/net/i40e/i40e_rxtx.h index 57d7b4160b..925f3d853d 100644 --- a/drivers/net/i40e/i40e_rxtx.h +++ b/drivers/net/i40e/i40e_rxtx.h @@ -221,7 +221,6 @@ void i40e_rx_queue_release_mbufs(struct i40e_rx_queue *rxq); uint32_t i40e_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id); -int i40e_dev_rx_descriptor_done(void *rx_queue, uint16_t offset); int i40e_dev_rx_descriptor_status(void *rx_queue, uint16_t offset); int i40e_dev_tx_descriptor_status(void *tx_queue, uint16_t offset); diff --git a/drivers/net/igc/igc_ethdev.c b/drivers/net/igc/igc_ethdev.c index 6ab3ee909d..ace6b3fb3d 100644 --- a/drivers/net/igc/igc_ethdev.c +++ b/drivers/net/igc/igc_ethdev.c @@ -273,7 +273,6 @@ static const struct eth_dev_ops eth_igc_ops = { .rx_queue_setup = eth_igc_rx_queue_setup, .rx_queue_release = eth_igc_rx_queue_release, .rx_queue_count = eth_igc_rx_queue_count, - .rx_descriptor_done = eth_igc_rx_descriptor_done, .rx_descriptor_status = eth_igc_rx_descriptor_status, .tx_descriptor_status = eth_igc_tx_descriptor_status, .tx_queue_setup = eth_igc_tx_queue_setup, diff --git a/drivers/net/igc/igc_txrx.c b/drivers/net/igc/igc_txrx.c index 4654ec41f0..f3962533d5 100644 --- a/drivers/net/igc/igc_txrx.c +++ b/drivers/net/igc/igc_txrx.c @@ -756,24 +756,6 @@ uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev, return desc; } -int eth_igc_rx_descriptor_done(void *rx_queue, uint16_t offset) -{ - volatile union igc_adv_rx_desc *rxdp; - struct igc_rx_queue *rxq = rx_queue; - uint32_t desc; - - if (unlikely(!rxq || offset >= rxq->nb_rx_desc)) - return 0; - - desc = rxq->rx_tail + offset; - if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; - return !!(rxdp->wb.upper.status_error & - rte_cpu_to_le_32(IGC_RXD_STAT_DD)); -} - int eth_igc_rx_descriptor_status(void *rx_queue, uint16_t offset) { struct igc_rx_queue *rxq = rx_queue; diff --git a/drivers/net/igc/igc_txrx.h b/drivers/net/igc/igc_txrx.h index f2b2d75bbc..d6f3799639 100644 --- a/drivers/net/igc/igc_txrx.h +++ b/drivers/net/igc/igc_txrx.h @@ -25,8 +25,6 @@ int eth_igc_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint32_t eth_igc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id); -int eth_igc_rx_descriptor_done(void *rx_queue, uint16_t offset); - int eth_igc_rx_descriptor_status(void *rx_queue, uint16_t offset); int eth_igc_tx_descriptor_status(void *tx_queue, uint16_t offset); diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index fd0cb9b0e2..f536ca61cf 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -546,7 +546,6 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = { .rx_queue_intr_disable = ixgbe_dev_rx_queue_intr_disable, .rx_queue_release = ixgbe_dev_rx_queue_release, .rx_queue_count = ixgbe_dev_rx_queue_count, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, @@ -622,7 +621,6 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = { .vlan_offload_set = ixgbevf_vlan_offload_set, .rx_queue_setup = ixgbe_dev_rx_queue_setup, .rx_queue_release = ixgbe_dev_rx_queue_release, - .rx_descriptor_done = ixgbe_dev_rx_descriptor_done, .rx_descriptor_status = ixgbe_dev_rx_descriptor_status, .tx_descriptor_status = ixgbe_dev_tx_descriptor_status, .tx_queue_setup = ixgbe_dev_tx_queue_setup, diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h index 9bdef87fbd..b0e2b2452f 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.h +++ b/drivers/net/ixgbe/ixgbe_ethdev.h @@ -602,8 +602,6 @@ int ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id, uint32_t ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id); -int ixgbe_dev_rx_descriptor_done(void *rx_queue, uint16_t offset); - int ixgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset); int ixgbe_dev_tx_descriptor_status(void *tx_queue, uint16_t offset); diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index 977ecf5137..5254fe3738 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -3216,24 +3216,6 @@ ixgbe_dev_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) return desc; } -int -ixgbe_dev_rx_descriptor_done(void *rx_queue, uint16_t offset) -{ - volatile union ixgbe_adv_rx_desc *rxdp; - struct ixgbe_rx_queue *rxq = rx_queue; - uint32_t desc; - - if (unlikely(offset >= rxq->nb_rx_desc)) - return 0; - desc = rxq->rx_tail + offset; - if (desc >= rxq->nb_rx_desc) - desc -= rxq->nb_rx_desc; - - rxdp = &rxq->rx_ring[desc]; - return !!(rxdp->wb.upper.status_error & - rte_cpu_to_le_32(IXGBE_RXDADV_STAT_DD)); -} - int ixgbe_dev_rx_descriptor_status(void *rx_queue, uint16_t offset) { diff --git a/drivers/net/octeontx2/otx2_ethdev.c b/drivers/net/octeontx2/otx2_ethdev.c index 33b72bd4db..b5d25fe68e 100644 --- a/drivers/net/octeontx2/otx2_ethdev.c +++ b/drivers/net/octeontx2/otx2_ethdev.c @@ -2273,7 +2273,6 @@ static const struct eth_dev_ops otx2_eth_dev_ops = { .rx_burst_mode_get = otx2_rx_burst_mode_get, .tx_burst_mode_get = otx2_tx_burst_mode_get, .rx_queue_count = otx2_nix_rx_queue_count, - .rx_descriptor_done = otx2_nix_rx_descriptor_done, .rx_descriptor_status = otx2_nix_rx_descriptor_status, .tx_descriptor_status = otx2_nix_tx_descriptor_status, .tx_done_cleanup = otx2_nix_tx_done_cleanup, diff --git a/drivers/net/octeontx2/otx2_ethdev.h b/drivers/net/octeontx2/otx2_ethdev.h index e9efe52bb0..10bcd1b6a4 100644 --- a/drivers/net/octeontx2/otx2_ethdev.h +++ b/drivers/net/octeontx2/otx2_ethdev.h @@ -412,7 +412,6 @@ int otx2_tx_burst_mode_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_burst_mode *mode); uint32_t otx2_nix_rx_queue_count(struct rte_eth_dev *eth_dev, uint16_t qidx); int otx2_nix_tx_done_cleanup(void *txq, uint32_t free_cnt); -int otx2_nix_rx_descriptor_done(void *rxq, uint16_t offset); int otx2_nix_rx_descriptor_status(void *rx_queue, uint16_t offset); int otx2_nix_tx_descriptor_status(void *tx_queue, uint16_t offset); diff --git a/drivers/net/octeontx2/otx2_ethdev_ops.c b/drivers/net/octeontx2/otx2_ethdev_ops.c index faecf216c1..6c6a4f35e9 100644 --- a/drivers/net/octeontx2/otx2_ethdev_ops.c +++ b/drivers/net/octeontx2/otx2_ethdev_ops.c @@ -371,18 +371,6 @@ nix_offset_has_packet(uint32_t head, uint32_t tail, uint16_t offset) return 0; } -int -otx2_nix_rx_descriptor_done(void *rx_queue, uint16_t offset) -{ - struct otx2_eth_rxq *rxq = rx_queue; - uint32_t head, tail; - - nix_rx_head_tail_get(otx2_eth_pmd_priv(rxq->eth_dev), - &head, &tail, rxq->rq); - - return nix_offset_has_packet(head, tail, offset); -} - int otx2_nix_rx_descriptor_status(void *rx_queue, uint16_t offset) { diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c index acee3e48e4..65e0ff7d48 100644 --- a/drivers/net/sfc/sfc_ethdev.c +++ b/drivers/net/sfc/sfc_ethdev.c @@ -1221,21 +1221,6 @@ sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id) return sap->dp_rx->qdesc_npending(rxq_info->dp); } -/* - * The function is used by the secondary process as well. It must not - * use any process-local pointers from the adapter data. - */ -static int -sfc_rx_descriptor_done(void *queue, uint16_t offset) -{ - struct sfc_dp_rxq *dp_rxq = queue; - const struct sfc_dp_rx *dp_rx; - - dp_rx = sfc_dp_rx_by_dp_rxq(dp_rxq); - - return offset < dp_rx->qdesc_npending(dp_rxq); -} - /* * The function is used by the secondary process as well. It must not * use any process-local pointers from the adapter data. @@ -1820,7 +1805,6 @@ static const struct eth_dev_ops sfc_eth_dev_ops = { .rx_queue_setup = sfc_rx_queue_setup, .rx_queue_release = sfc_rx_queue_release, .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, .rx_descriptor_status = sfc_rx_descriptor_status, .tx_descriptor_status = sfc_tx_descriptor_status, .rx_queue_intr_enable = sfc_rx_queue_intr_enable, @@ -2018,7 +2002,6 @@ sfc_eth_dev_clear_ops(struct rte_eth_dev *dev) static const struct eth_dev_ops sfc_eth_dev_secondary_ops = { .dev_supported_ptypes_get = sfc_dev_supported_ptypes_get, .rx_queue_count = sfc_rx_queue_count, - .rx_descriptor_done = sfc_rx_descriptor_done, .rx_descriptor_status = sfc_rx_descriptor_status, .tx_descriptor_status = sfc_tx_descriptor_status, .reta_query = sfc_dev_rss_reta_query, diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index dc0093bdf0..8658b6f2f0 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -920,7 +920,6 @@ static const struct eth_dev_ops virtio_eth_dev_ops = { .rx_queue_intr_enable = virtio_dev_rx_queue_intr_enable, .rx_queue_intr_disable = virtio_dev_rx_queue_intr_disable, .rx_queue_release = virtio_dev_queue_release, - .rx_descriptor_done = virtio_dev_rx_queue_done, .tx_queue_setup = virtio_dev_tx_queue_setup, .tx_queue_release = virtio_dev_queue_release, /* collect stats per queue */ diff --git a/drivers/net/virtio/virtio_ethdev.h b/drivers/net/virtio/virtio_ethdev.h index b7d52d497f..c93f320f83 100644 --- a/drivers/net/virtio/virtio_ethdev.h +++ b/drivers/net/virtio/virtio_ethdev.h @@ -60,8 +60,6 @@ void virtio_dev_cq_start(struct rte_eth_dev *dev); * RX/TX function prototypes */ -int virtio_dev_rx_queue_done(void *rxq, uint16_t offset); - int virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, uint16_t rx_queue_id, uint16_t nb_rx_desc, unsigned int socket_id, const struct rte_eth_rxconf *rx_conf, diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index f915b8a2c9..043788876e 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -39,15 +39,6 @@ #define VIRTIO_DUMP_PACKET(m, len) do { } while (0) #endif -int -virtio_dev_rx_queue_done(void *rxq, uint16_t offset) -{ - struct virtnet_rx *rxvq = rxq; - struct virtqueue *vq = rxvq->vq; - - return virtqueue_nused(vq) >= offset; -} - void vq_ring_free_inorder(struct virtqueue *vq, uint16_t desc_idx, uint16_t num) { diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h index 70295d7ab7..b52b04f7e0 100644 --- a/lib/librte_ethdev/rte_ethdev.h +++ b/lib/librte_ethdev/rte_ethdev.h @@ -4552,31 +4552,6 @@ rte_eth_rx_queue_count(uint16_t port_id, uint16_t queue_id) return (int)(*dev->dev_ops->rx_queue_count)(dev, queue_id); } -/** - * Check if the DD bit of the specific RX descriptor in the queue has been set - * - * @param port_id - * The port identifier of the Ethernet device. - * @param queue_id - * The queue id on the specific port. - * @param offset - * The offset of the descriptor ID from tail. - * @return - * - (1) if the specific DD bit is set. - * - (0) if the specific DD bit is not set. - * - (-ENODEV) if *port_id* invalid. - * - (-ENOTSUP) if the device does not support this function - */ -static inline int -rte_eth_rx_descriptor_done(uint16_t port_id, uint16_t queue_id, uint16_t offset) -{ - struct rte_eth_dev *dev = &rte_eth_devices[port_id]; - RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, -ENODEV); - RTE_FUNC_PTR_OR_ERR_RET(*dev->dev_ops->rx_descriptor_done, -ENOTSUP); - return (*dev->dev_ops->rx_descriptor_done)( \ - dev->data->rx_queues[queue_id], offset); -} - #define RTE_ETH_RX_DESC_AVAIL 0 /**< Desc available for hw. */ #define RTE_ETH_RX_DESC_DONE 1 /**< Desc done, filled by hw. */ #define RTE_ETH_RX_DESC_UNAVAIL 2 /**< Desc used by driver or hw. */ diff --git a/lib/librte_ethdev/rte_ethdev_core.h b/lib/librte_ethdev/rte_ethdev_core.h index 32407dd418..292a6423c4 100644 --- a/lib/librte_ethdev/rte_ethdev_core.h +++ b/lib/librte_ethdev/rte_ethdev_core.h @@ -287,9 +287,6 @@ typedef uint32_t (*eth_rx_queue_count_t)(struct rte_eth_dev *dev, uint16_t rx_queue_id); /**< @internal Get number of used descriptors on a receive queue. */ -typedef int (*eth_rx_descriptor_done_t)(void *rxq, uint16_t offset); -/**< @internal Check DD bit of specific RX descriptor */ - typedef int (*eth_rx_descriptor_status_t)(void *rxq, uint16_t offset); /**< @internal Check the status of a Rx descriptor */ @@ -662,7 +659,6 @@ struct eth_dev_ops { eth_queue_release_t rx_queue_release; /**< Release RX queue. */ eth_rx_queue_count_t rx_queue_count; /**< Get the number of used RX descriptors. */ - eth_rx_descriptor_done_t rx_descriptor_done; /**< Check rxd DD bit. */ eth_rx_descriptor_status_t rx_descriptor_status; /**< Check the status of a Rx descriptor. */ eth_tx_descriptor_status_t tx_descriptor_status; -- 2.25.4