SFC_ASSERT(added != rxq->added);
rxq->added = added;
efx_rx_qpush(rxq->common, added, &rxq->pushed);
- rxq->dp.dpq.rx_dbells++;
+ rxq->dp.dpq.dbells++;
}
static uint64_t
struct sfc_efx_rxq *rxq;
int rc;
+ rc = ENOTSUP;
+ if (info->nic_dma_info->nb_regions > 0)
+ goto fail_nic_dma;
+
rc = ENOMEM;
rxq = rte_zmalloc_socket("sfc-efx-rxq", sizeof(*rxq),
RTE_CACHE_LINE_SIZE, socket_id);
rte_free(rxq);
fail_rxq_alloc:
+fail_nic_dma:
return rc;
}
/* Make sure that end padding does not write beyond the buffer */
if (buf_aligned < nic_align_end) {
/*
- * Estimate space which can be lost. If guarnteed buffer
+ * Estimate space which can be lost. If guaranteed buffer
* size is odd, lost space is (nic_align_end - 1). More
* accurate formula is below.
*/
rxq->buf_size = buf_size;
- rc = sfc_dma_alloc(sa, "rxq", sw_index,
+ rc = sfc_dma_alloc(sa, "rxq", sw_index, EFX_NIC_DMA_ADDR_RX_RING,
efx_rxq_size(sa->nic, rxq_info->entries),
socket_id, &rxq->mem);
if (rc != 0)
info.vi_window_shift = encp->enc_vi_window_shift;
info.fcw_offset = sa->fcw_offset;
+ info.nic_dma_info = &sas->nic_dma_info;
+
rc = sa->priv.dp_rx->qcreate(sa->eth_dev->data->port_id, sw_index,
&RTE_ETH_DEV_TO_PCI(sa->eth_dev)->addr,
socket_id, &info, &rxq_info->dp);
/*
* Finalize only ethdev queues since other ones are finalized only
- * on device close and they may require additional deinitializaton.
+ * on device close and they may require additional deinitialization.
*/
ethdev_qid = sas->ethdev_rxq_count;
while (--ethdev_qid >= (int)nb_rx_queues) {
reconfigure = true;
- /* Do not ununitialize reserved queues */
+ /* Do not uninitialize reserved queues */
if (nb_rx_queues < sas->ethdev_rxq_count)
sfc_rx_fini_queues(sa, nb_rx_queues);