ethdev: fix compilation related to hairpin
Checks
Commit Message
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(-)
Comments
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.
@@ -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
@@ -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