From: Dekel Peled Date: Wed, 8 May 2019 08:29:38 +0000 (+0300) Subject: net/mlx5: remove unused functions X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a65c2d6637859fb6ed242e3f74239b05f80443a7;p=dpdk.git net/mlx5: remove unused functions Functions implemented but never called: mlx5_rxq_ibv_releasable() mlx5_rxq_cleanup() mlx5_txq_ibv_releasable() Function declared but not implemented: rxq_alloc_mprq_buf() This patch removes these functions from code and header file. Signed-off-by: Dekel Peled Acked-by: Shahaf Shuler Acked-by: Yongseok Koh --- diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c index a00cb12980..83ba525e67 100644 --- a/drivers/net/mlx5/mlx5_rxq.c +++ b/drivers/net/mlx5/mlx5_rxq.c @@ -352,24 +352,6 @@ rxq_free_elts(struct mlx5_rxq_ctrl *rxq_ctrl) rxq_free_elts_sprq(rxq_ctrl); } -/** - * Clean up a RX queue. - * - * Destroy objects, free allocated memory and reset the structure for reuse. - * - * @param rxq_ctrl - * Pointer to RX queue structure. - */ -void -mlx5_rxq_cleanup(struct mlx5_rxq_ctrl *rxq_ctrl) -{ - DRV_LOG(DEBUG, "port %u cleaning up Rx queue %u", - PORT_ID(rxq_ctrl->priv), rxq_ctrl->rxq.idx); - if (rxq_ctrl->ibv) - mlx5_rxq_ibv_release(rxq_ctrl->ibv); - memset(rxq_ctrl, 0, sizeof(*rxq_ctrl)); -} - /** * Returns the per-queue supported offloads. * @@ -1111,19 +1093,6 @@ mlx5_rxq_ibv_verify(struct rte_eth_dev *dev) return ret; } -/** - * Return true if a single reference exists on the object. - * - * @param rxq_ibv - * Verbs Rx queue object. - */ -int -mlx5_rxq_ibv_releasable(struct mlx5_rxq_ibv *rxq_ibv) -{ - assert(rxq_ibv); - return (rte_atomic32_read(&rxq_ibv->refcnt) == 1); -} - /** * Callback function to initialize mbufs for Multi-Packet RQ. */ diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h index 2676634956..40e9a1b6c4 100644 --- a/drivers/net/mlx5/mlx5_rxtx.h +++ b/drivers/net/mlx5/mlx5_rxtx.h @@ -249,7 +249,6 @@ int mlx5_rxq_mprq_enabled(struct mlx5_rxq_data *rxq); int mlx5_mprq_enabled(struct rte_eth_dev *dev); int mlx5_mprq_free_mp(struct rte_eth_dev *dev); int mlx5_mprq_alloc_mp(struct rte_eth_dev *dev); -void mlx5_rxq_cleanup(struct mlx5_rxq_ctrl *rxq_ctrl); int mlx5_rx_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, unsigned int socket, const struct rte_eth_rxconf *conf, struct rte_mempool *mp); @@ -261,7 +260,6 @@ int mlx5_rx_intr_disable(struct rte_eth_dev *dev, uint16_t rx_queue_id); struct mlx5_rxq_ibv *mlx5_rxq_ibv_new(struct rte_eth_dev *dev, uint16_t idx); struct mlx5_rxq_ibv *mlx5_rxq_ibv_get(struct rte_eth_dev *dev, uint16_t idx); int mlx5_rxq_ibv_release(struct mlx5_rxq_ibv *rxq_ibv); -int mlx5_rxq_ibv_releasable(struct mlx5_rxq_ibv *rxq_ibv); struct mlx5_rxq_ibv *mlx5_rxq_ibv_drop_new(struct rte_eth_dev *dev); void mlx5_rxq_ibv_drop_release(struct rte_eth_dev *dev); int mlx5_rxq_ibv_verify(struct rte_eth_dev *dev); @@ -274,7 +272,6 @@ int mlx5_rxq_release(struct rte_eth_dev *dev, uint16_t idx); int mlx5_rxq_releasable(struct rte_eth_dev *dev, uint16_t idx); int mlx5_rxq_verify(struct rte_eth_dev *dev); int rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl); -int rxq_alloc_mprq_buf(struct mlx5_rxq_ctrl *rxq_ctrl); struct mlx5_ind_table_ibv *mlx5_ind_table_ibv_new(struct rte_eth_dev *dev, const uint16_t *queues, uint32_t queues_n); @@ -311,7 +308,6 @@ int mlx5_tx_uar_init_secondary(struct rte_eth_dev *dev, int fd); struct mlx5_txq_ibv *mlx5_txq_ibv_new(struct rte_eth_dev *dev, uint16_t idx); struct mlx5_txq_ibv *mlx5_txq_ibv_get(struct rte_eth_dev *dev, uint16_t idx); int mlx5_txq_ibv_release(struct mlx5_txq_ibv *txq_ibv); -int mlx5_txq_ibv_releasable(struct mlx5_txq_ibv *txq_ibv); int mlx5_txq_ibv_verify(struct rte_eth_dev *dev); struct mlx5_txq_ctrl *mlx5_txq_new(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc, unsigned int socket, diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index b281c45027..50b1f810a2 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -641,19 +641,6 @@ mlx5_txq_ibv_release(struct mlx5_txq_ibv *txq_ibv) return 1; } -/** - * Return true if a single reference exists on the object. - * - * @param txq_ibv - * Verbs Tx queue object. - */ -int -mlx5_txq_ibv_releasable(struct mlx5_txq_ibv *txq_ibv) -{ - assert(txq_ibv); - return (rte_atomic32_read(&txq_ibv->refcnt) == 1); -} - /** * Verify the Verbs Tx queue list is empty *