MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ixgbe_alloc_rx_queue_mbufs

Function ixgbe_alloc_rx_queue_mbufs

dpdk/drivers/net/ixgbe/ixgbe_rxtx.c:4551–4581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4549}
4550
4551static int __rte_cold
4552ixgbe_alloc_rx_queue_mbufs(struct ixgbe_rx_queue *rxq)
4553{
4554 struct ixgbe_rx_entry *rxe = rxq->sw_ring;
4555 uint64_t dma_addr;
4556 unsigned int i;
4557
4558 /* Initialize software ring entries */
4559 for (i = 0; i < rxq->nb_rx_desc; i++) {
4560 volatile union ixgbe_adv_rx_desc *rxd;
4561 struct rte_mbuf *mbuf = rte_mbuf_raw_alloc(rxq->mb_pool);
4562
4563 if (mbuf == NULL) {
4564 PMD_INIT_LOG(ERR, "RX mbuf alloc failed queue_id=%u",
4565 (unsigned) rxq->queue_id);
4566 return -ENOMEM;
4567 }
4568
4569 mbuf->data_off = RTE_PKTMBUF_HEADROOM;
4570 mbuf->port = rxq->port_id;
4571
4572 dma_addr =
4573 rte_cpu_to_le_64(rte_mbuf_data_iova_default(mbuf));
4574 rxd = &rxq->rx_ring[i];
4575 rxd->read.hdr_addr = 0;
4576 rxd->read.pkt_addr = dma_addr;
4577 rxe[i].mbuf = mbuf;
4578 }
4579
4580 return 0;
4581}
4582
4583static int
4584ixgbe_config_vf_rss(struct rte_eth_dev *dev)

Callers 2

ixgbe_dev_rx_queue_startFunction · 0.85
ixgbevf_dev_rx_initFunction · 0.85

Calls 2

rte_mbuf_raw_allocFunction · 0.85

Tested by

no test coverage detected