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

Function rte_eth_dma_zone_reserve

dpdk/lib/ethdev/ethdev_driver.c:550–583  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

548}
549
550const struct rte_memzone *
551rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,
552 uint16_t queue_id, size_t size, unsigned int align,
553 int socket_id)
554{
555 char z_name[RTE_MEMZONE_NAMESIZE];
556 const struct rte_memzone *mz;
557 int rc;
558
559 rc = eth_dev_dma_mzone_name(z_name, sizeof(z_name), dev->data->port_id,
560 queue_id, ring_name);
561 if (rc >= RTE_MEMZONE_NAMESIZE) {
562 RTE_ETHDEV_LOG(ERR, "ring name too long\n");
563 rte_errno = ENAMETOOLONG;
564 return NULL;
565 }
566
567 mz = rte_memzone_lookup(z_name);
568 if (mz) {
569 if ((socket_id != SOCKET_ID_ANY && socket_id != mz->socket_id) ||
570 size > mz->len ||
571 ((uintptr_t)mz->addr & (align - 1)) != 0) {
572 RTE_ETHDEV_LOG(ERR,
573 "memzone %s does not justify the requested attributes\n",
574 mz->name);
575 return NULL;
576 }
577
578 return mz;
579 }
580
581 return rte_memzone_reserve_aligned(z_name, size, socket_id,
582 RTE_MEMZONE_IOVA_CONTIG, align);
583}
584
585int
586rte_eth_hairpin_queue_peer_bind(uint16_t cur_port, uint16_t cur_queue,

Callers 15

atl_rx_queue_setupFunction · 0.85
atl_tx_queue_setupFunction · 0.85
eth_em_tx_queue_setupFunction · 0.85
eth_em_rx_queue_setupFunction · 0.85
eth_igb_tx_queue_setupFunction · 0.85
eth_igb_rx_queue_setupFunction · 0.85
otx_ep_init_instr_queueFunction · 0.85
otx_ep_init_droqFunction · 0.85
otx_ep_ism_setupFunction · 0.85
ionic_qcq_allocFunction · 0.85
ionic_lif_allocFunction · 0.85
ionic_lif_rss_setupFunction · 0.85

Calls 3

eth_dev_dma_mzone_nameFunction · 0.85
rte_memzone_lookupFunction · 0.85

Tested by

no test coverage detected