These wrappers are used in single place and just complicate reading
and understanding if these ops could be supported in secondary process.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_ethdev.c | 12 ++++++++++--
drivers/net/sfc/sfc_rx.c | 22 ----------------------
drivers/net/sfc/sfc_rx.h | 4 ----
3 files changed, 10 insertions(+), 28 deletions(-)
@@ -1119,16 +1119,24 @@ static uint32_t
sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
{
struct sfc_adapter *sa = dev->data->dev_private;
+ struct sfc_rxq *rxq;
+
+ SFC_ASSERT(rx_queue_id < sa->rxq_count);
+ rxq = sa->rxq_info[rx_queue_id].rxq;
- return sfc_rx_qdesc_npending(sa, rx_queue_id);
+ if (rxq == NULL || (rxq->state & SFC_RXQ_STARTED) == 0)
+ return 0;
+
+ return sa->dp_rx->qdesc_npending(rxq->dp);
}
static int
sfc_rx_descriptor_done(void *queue, uint16_t offset)
{
struct sfc_dp_rxq *dp_rxq = queue;
+ struct sfc_rxq *rxq = sfc_rxq_by_dp_rxq(dp_rxq);
- return sfc_rx_qdesc_done(dp_rxq, offset);
+ return offset < rxq->evq->sa->dp_rx->qdesc_npending(dp_rxq);
}
static int
@@ -530,28 +530,6 @@ struct sfc_dp_rx sfc_efx_rx = {
.pkt_burst = sfc_efx_recv_pkts,
};
-unsigned int
-sfc_rx_qdesc_npending(struct sfc_adapter *sa, unsigned int sw_index)
-{
- struct sfc_rxq *rxq;
-
- SFC_ASSERT(sw_index < sa->rxq_count);
- rxq = sa->rxq_info[sw_index].rxq;
-
- if (rxq == NULL || (rxq->state & SFC_RXQ_STARTED) == 0)
- return 0;
-
- return sa->dp_rx->qdesc_npending(rxq->dp);
-}
-
-int
-sfc_rx_qdesc_done(struct sfc_dp_rxq *dp_rxq, unsigned int offset)
-{
- struct sfc_rxq *rxq = sfc_rxq_by_dp_rxq(dp_rxq);
-
- return offset < rxq->evq->sa->dp_rx->qdesc_npending(dp_rxq);
-}
-
static void
sfc_rx_qflush(struct sfc_adapter *sa, unsigned int sw_index)
{
@@ -149,10 +149,6 @@ uint64_t sfc_rx_get_queue_offload_caps(struct sfc_adapter *sa);
void sfc_rx_qflush_done(struct sfc_rxq *rxq);
void sfc_rx_qflush_failed(struct sfc_rxq *rxq);
-unsigned int sfc_rx_qdesc_npending(struct sfc_adapter *sa,
- unsigned int sw_index);
-int sfc_rx_qdesc_done(struct sfc_dp_rxq *dp_rxq, unsigned int offset);
-
int sfc_rx_hash_init(struct sfc_adapter *sa);
void sfc_rx_hash_fini(struct sfc_adapter *sa);
int sfc_rx_hf_rte_to_efx(struct sfc_adapter *sa, uint64_t rte,