DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ori Kam <orika@mellanox.com>
To: Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>,
	Andrew Rybchenko <arybchenko@solarflare.com>
Cc: dev@dpdk.org, orika@mellanox.com
Subject: [dpdk-dev] [PATCH] ethdev: fix compilation related to hairpin
Date: Tue,  5 Nov 2019 15:32:22 +0000	[thread overview]
Message-ID: <1572967943-129125-1-git-send-email-orika@mellanox.com> (raw)

This patch solves a compilation issue that is caused due to using
internal function (is_rx_hairpin_queue) inside inline function.

The solution is to remove the usage of the functions
from the burst functions.

Fixes: 60b476d5da3c ("ethdev: add support for hairpin queue")
Cc: orika@mellanox.com

Signed-off-by: Ori Kam <orika@mellanox.com>
---

---
 lib/librte_ethdev/rte_ethdev.h        | 40 -----------------------------------
 lib/librte_ethdev/rte_ethdev_driver.h | 28 ++++++++++++++++++++++++
 2 files changed, 28 insertions(+), 40 deletions(-)

diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index e6ef4b4..f0df03d 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -4259,36 +4259,6 @@ int rte_eth_dev_hairpin_capability_get(uint16_t port_id,
 #include <rte_ethdev_core.h>
 
 /**
- * @internal
- * Check if the selected Rx queue is hairpin queue.
- *
- * @param dev
- *  Pointer to the selected device.
- * @param queue_id
- *  The selected queue.
- *
- * @return
- *   - (1) if the queue is hairpin queue, 0 otherwise.
- */
-int
-rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
-
-/**
- * @internal
- * Check if the selected Tx queue is hairpin queue.
- *
- * @param dev
- *  Pointer to the selected device.
- * @param queue_id
- *  The selected queue.
- *
- * @return
- *   - (1) if the queue is hairpin queue, 0 otherwise.
- */
-int
-rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
-
-/**
  *
  * Retrieve a burst of input packets from a receive queue of an Ethernet
  * device. The retrieved packets are stored in *rte_mbuf* structures whose
@@ -4385,11 +4355,6 @@ int rte_eth_dev_hairpin_capability_get(uint16_t port_id,
 		RTE_ETHDEV_LOG(ERR, "Invalid RX queue_id=%u\n", queue_id);
 		return 0;
 	}
-	if (rte_eth_dev_is_rx_hairpin_queue(dev, queue_id)) {
-		RTE_ETHDEV_LOG(ERR, "Rx burst failed, queue_id=%u is hairpin queue\n",
-			       queue_id);
-		return 0;
-	}
 #endif
 	nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
 				     rx_pkts, nb_pkts);
@@ -4656,11 +4621,6 @@ static inline int rte_eth_tx_descriptor_status(uint16_t port_id,
 		RTE_ETHDEV_LOG(ERR, "Invalid TX queue_id=%u\n", queue_id);
 		return 0;
 	}
-	if (rte_eth_dev_is_tx_hairpin_queue(dev, queue_id)) {
-		RTE_ETHDEV_LOG(ERR, "Tx burst failed, queue_id=%u is hairpin queue\n",
-			       queue_id);
-		return 0;
-	}
 #endif
 
 #ifdef RTE_ETHDEV_RXTX_CALLBACKS
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 59d4c01..99d4cd6 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -30,6 +30,34 @@
 
 /**
  * @internal
+ * Check if the selected Rx queue is hairpin queue.
+ *
+ * @param dev
+ *  Pointer to the selected device.
+ * @param queue_id
+ *  The selected queue.
+ *
+ * @return
+ *   - (1) if the queue is hairpin queue, 0 otherwise.
+ */
+int rte_eth_dev_is_rx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
+
+/**
+ * @internal
+ * Check if the selected Tx queue is hairpin queue.
+ *
+ * @param dev
+ *  Pointer to the selected device.
+ * @param queue_id
+ *  The selected queue.
+ *
+ * @return
+ *   - (1) if the queue is hairpin queue, 0 otherwise.
+ */
+int rte_eth_dev_is_tx_hairpin_queue(struct rte_eth_dev *dev, uint16_t queue_id);
+
+/**
+ * @internal
  * Returns a ethdev slot specified by the unique identifier name.
  *
  * @param	name
-- 
1.8.3.1


             reply	other threads:[~2019-11-05 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05 15:32 Ori Kam [this message]
2019-11-05 17:29 ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1572967943-129125-1-git-send-email-orika@mellanox.com \
    --to=orika@mellanox.com \
    --cc=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).