* [dpdk-dev] [PATCH] ethdev: fix compilation related to hairpin
@ 2019-11-05 15:32 Ori Kam
2019-11-05 17:29 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: Ori Kam @ 2019-11-05 15:32 UTC (permalink / raw)
To: Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko; +Cc: dev, orika
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] ethdev: fix compilation related to hairpin
2019-11-05 15:32 [dpdk-dev] [PATCH] ethdev: fix compilation related to hairpin Ori Kam
@ 2019-11-05 17:29 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2019-11-05 17:29 UTC (permalink / raw)
To: Ori Kam, Thomas Monjalon, Andrew Rybchenko; +Cc: dev
On 11/5/2019 3:32 PM, Ori Kam wrote:
> 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>
Squashed into relevant commit in next-net, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-05 17:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 15:32 [dpdk-dev] [PATCH] ethdev: fix compilation related to hairpin Ori Kam
2019-11-05 17:29 ` Ferruh Yigit
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).