From patchwork Tue Nov 5 15:32:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ori Kam X-Patchwork-Id: 62475 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8898CA04A2; Tue, 5 Nov 2019 16:32:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 31DA81BFA3; Tue, 5 Nov 2019 16:32:34 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id EC07C1BF9F for ; Tue, 5 Nov 2019 16:32:31 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from orika@mellanox.com) with ESMTPS (AES256-SHA encrypted); 5 Nov 2019 17:32:30 +0200 Received: from pegasus04.mtr.labs.mlnx. (pegasus04.mtr.labs.mlnx [10.210.16.126]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id xA5FWToU027987; Tue, 5 Nov 2019 17:32:29 +0200 From: Ori Kam To: Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko Cc: dev@dpdk.org, orika@mellanox.com Date: Tue, 5 Nov 2019 15:32:22 +0000 Message-Id: <1572967943-129125-1-git-send-email-orika@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH] ethdev: fix compilation related to hairpin 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" 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 --- --- 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 /** - * @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