DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dekel Peled <dekelp@mellanox.com>
To: yskoh@mellanox.com, shahafs@mellanox.com
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v3 1/4] net/mlx5: remove unused functions
Date: Sun,  5 May 2019 16:09:15 +0300	[thread overview]
Message-ID: <780207af746087618faf6203dc05d47d34e8bd57.1557061532.git.dekelp@mellanox.com> (raw)
Message-ID: <20190505130915.WBb5cWilAaCMnF3rUYHSy9YHtht5UVoRg5eI5fCIBsw@z> (raw)
In-Reply-To: <cover.1557061532.git.dekelp@mellanox.com>

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 <dekelp@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_rxq.c  | 31 -------------------------------
 drivers/net/mlx5/mlx5_rxtx.h |  4 ----
 drivers/net/mlx5/mlx5_txq.c  | 13 -------------
 3 files changed, 48 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index 0a4c02e..222fe95 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -353,24 +353,6 @@
 }
 
 /**
- * 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.
  *
  * @param dev
@@ -1111,19 +1093,6 @@ struct mlx5_rxq_ibv *
 }
 
 /**
- * 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.
  */
 static inline void
diff --git a/drivers/net/mlx5/mlx5_rxtx.h b/drivers/net/mlx5/mlx5_rxtx.h
index 4339aaf..104ba7c 100644
--- a/drivers/net/mlx5/mlx5_rxtx.h
+++ b/drivers/net/mlx5/mlx5_rxtx.h
@@ -249,7 +249,6 @@ struct mlx5_txq_ctrl {
 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_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 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 @@ struct mlx5_rxq_ctrl *mlx5_rxq_new(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_queue_setup(struct rte_eth_dev *dev, uint16_t idx, uint16_t desc,
 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 b281c45..50b1f81 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -642,19 +642,6 @@ struct mlx5_txq_ibv *
 }
 
 /**
- * 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
  *
  * @param dev
-- 
1.8.3.1


  parent reply	other threads:[~2019-05-05 13:12 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 11:00 [dpdk-dev] [PATCH 0/4] net/mlx5: code cleanup in rx and tx files Dekel Peled
2019-04-29 11:00 ` Dekel Peled
2019-04-29 11:00 ` [dpdk-dev] [PATCH 1/4] net/mlx5: remove unused functions Dekel Peled
2019-04-29 11:00   ` Dekel Peled
2019-04-29 11:00 ` [dpdk-dev] [PATCH 2/4] net/mlx5: add missing validation of null pointer Dekel Peled
2019-04-29 11:00   ` Dekel Peled
2019-04-29 11:00 ` [dpdk-dev] [PATCH 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-04-29 11:00   ` Dekel Peled
2019-04-29 11:00 ` [dpdk-dev] [PATCH 4/4] net/mlx5: move locally used functions to static Dekel Peled
2019-04-29 11:00   ` Dekel Peled
2019-05-02 14:10 ` [dpdk-dev] [PATCH 0/4] net/mlx5: code cleanup in rx and tx files Shahaf Shuler
2019-05-02 14:10   ` Shahaf Shuler
2019-05-02 15:01 ` [dpdk-dev] [PATCH v2 " Dekel Peled
2019-05-02 15:01   ` Dekel Peled
2019-05-02 15:01   ` [dpdk-dev] [PATCH v2 1/4] net/mlx5: remove unused functions Dekel Peled
2019-05-02 15:01     ` Dekel Peled
2019-05-02 18:13     ` Yongseok Koh
2019-05-02 18:13       ` Yongseok Koh
2019-05-02 15:01   ` [dpdk-dev] [PATCH v2 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-02 15:01     ` Dekel Peled
2019-05-02 18:12     ` Yongseok Koh
2019-05-02 18:12       ` Yongseok Koh
2019-05-02 15:01   ` [dpdk-dev] [PATCH v2 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-05-02 15:01     ` Dekel Peled
2019-05-02 18:13     ` Yongseok Koh
2019-05-02 18:13       ` Yongseok Koh
2019-05-02 15:01   ` [dpdk-dev] [PATCH v2 4/4] net/mlx5: move locally used functions to static Dekel Peled
2019-05-02 15:01     ` Dekel Peled
2019-05-02 18:14     ` Yongseok Koh
2019-05-02 18:14       ` Yongseok Koh
2019-05-05 13:09   ` [dpdk-dev] [PATCH v3 0/4] net/mlx5: code cleanup in rx and tx files Dekel Peled
2019-05-05 13:09     ` Dekel Peled
2019-05-05 13:09     ` Dekel Peled [this message]
2019-05-05 13:09       ` [dpdk-dev] [PATCH v3 1/4] net/mlx5: remove unused functions Dekel Peled
2019-05-05 13:09     ` [dpdk-dev] [PATCH v3 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-05 13:09       ` Dekel Peled
2019-05-05 13:09     ` [dpdk-dev] [PATCH v3 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-05-05 13:09       ` Dekel Peled
2019-05-05 13:09     ` [dpdk-dev] [PATCH v3 4/4] net/mlx5: move locally used functions to static Dekel Peled
2019-05-05 13:09       ` Dekel Peled
2019-05-08  4:43     ` [dpdk-dev] [PATCH v3 0/4] net/mlx5: code cleanup in rx and tx files Shahaf Shuler
2019-05-08  4:43       ` Shahaf Shuler
2019-05-08  8:29     ` [dpdk-dev] [PATCH v4 " Dekel Peled
2019-05-08  8:29       ` Dekel Peled
2019-05-08  8:29       ` [dpdk-dev] [PATCH v4 1/4] net/mlx5: remove unused functions Dekel Peled
2019-05-08  8:29         ` Dekel Peled
2019-05-08  8:29       ` [dpdk-dev] [PATCH v4 2/4] net/mlx5: fix missing validation of null pointer Dekel Peled
2019-05-08  8:29         ` Dekel Peled
2019-05-08  8:29       ` [dpdk-dev] [PATCH v4 3/4] net/mlx5: fix description of function return value Dekel Peled
2019-05-08  8:29         ` Dekel Peled
2019-05-08  8:29       ` [dpdk-dev] [PATCH v4 4/4] net/mlx5: move locally used functions to static Dekel Peled
2019-05-08  8:29         ` Dekel Peled
2019-05-22 20:35       ` [dpdk-dev] [PATCH v4 0/4] net/mlx5: code cleanup in rx and tx files Shahaf Shuler

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=780207af746087618faf6203dc05d47d34e8bd57.1557061532.git.dekelp@mellanox.com \
    --to=dekelp@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=shahafs@mellanox.com \
    --cc=yskoh@mellanox.com \
    /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).