Patchwork [dpdk-dev,18/30] net/sfc: remove unnecessary functions to get TxQ index

login
register
mail settings
Submitter Andrew Rybchenko
Date Feb. 7, 2019, 12:17 p.m.
Message ID <1549541873-17403-19-git-send-email-arybchenko@solarflare.com>
Download mbox | patch
Permalink /patch/720431/
State New
Headers show

Comments

Andrew Rybchenko - Feb. 7, 2019, 12:17 p.m.
TxQ index is stored in generic datapath queue structure.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ethdev.c |  2 +-
 drivers/net/sfc/sfc_tx.h     | 12 ------------
 2 files changed, 1 insertion(+), 13 deletions(-)

Patch

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index f3316e143..a00ea9ce4 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -491,7 +491,7 @@  sfc_tx_queue_release(void *queue)
 		return;
 
 	txq = sfc_txq_by_dp_txq(dp_txq);
-	sw_index = sfc_txq_sw_index(txq);
+	sw_index = dp_txq->dpq.queue_id;
 
 	SFC_ASSERT(txq->evq != NULL);
 	sa = txq->evq->sa;
diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h
index e5ea6df75..2d21e6e83 100644
--- a/drivers/net/sfc/sfc_tx.h
+++ b/drivers/net/sfc/sfc_tx.h
@@ -57,18 +57,6 @@  struct sfc_txq {
 	efx_txq_t			*common;
 };
 
-static inline unsigned int
-sfc_txq_sw_index_by_hw_index(unsigned int hw_index)
-{
-	return hw_index;
-}
-
-static inline unsigned int
-sfc_txq_sw_index(const struct sfc_txq *txq)
-{
-	return sfc_txq_sw_index_by_hw_index(txq->hw_index);
-}
-
 struct sfc_txq *sfc_txq_by_dp_txq(const struct sfc_dp_txq *dp_txq);
 
 /**