return B_FALSE;
}
+static boolean_t
+sfc_ev_dp_tx(void *arg, __rte_unused uint32_t label, uint32_t id)
+{
+ struct sfc_evq *evq = arg;
+ struct sfc_dp_txq *dp_txq;
+
+ dp_txq = evq->dp_txq;
+ SFC_ASSERT(dp_txq != NULL);
+
+ SFC_ASSERT(evq->sa->dp_tx->qtx_ev != NULL);
+ return evq->sa->dp_tx->qtx_ev(dp_txq, id);
+}
+
static boolean_t
sfc_ev_exception(void *arg, __rte_unused uint32_t code,
__rte_unused uint32_t data)
static const efx_ev_callbacks_t sfc_ev_callbacks_dp_tx = {
.eec_initialized = sfc_ev_initialized,
.eec_rx = sfc_ev_nop_rx,
- .eec_tx = sfc_ev_nop_tx,
+ .eec_tx = sfc_ev_dp_tx,
.eec_exception = sfc_ev_exception,
.eec_rxq_flush_done = sfc_ev_nop_rxq_flush_done,
.eec_rxq_flush_failed = sfc_ev_nop_rxq_flush_failed,
SFC_ASSERT(entries <= evq_info->max_entries);
evq_info->entries = entries;
+ rc = ENOMEM;
evq = rte_zmalloc_socket("sfc-evq", sizeof(*evq), RTE_CACHE_LINE_SIZE,
socket_id);
if (evq == NULL)
- return ENOMEM;
+ goto fail_evq_alloc;
evq->sa = sa;
evq->evq_index = sw_index;
rc = sfc_dma_alloc(sa, "evq", sw_index, EFX_EVQ_SIZE(evq_info->entries),
socket_id, &evq->mem);
if (rc != 0)
- return rc;
+ goto fail_dma_alloc;
evq->init_state = SFC_EVQ_INITIALIZED;
evq_info->evq = evq;
return 0;
+
+fail_dma_alloc:
+ rte_free(evq);
+
+fail_evq_alloc:
+
+ sfc_log_init(sa, "failed %d", rc);
+ return rc;
}
void