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

Function rte_eth_dma_zone_free

dpdk/lib/ethdev/ethdev_driver.c:526–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524}
525
526int
527rte_eth_dma_zone_free(const struct rte_eth_dev *dev, const char *ring_name,
528 uint16_t queue_id)
529{
530 char z_name[RTE_MEMZONE_NAMESIZE];
531 const struct rte_memzone *mz;
532 int rc = 0;
533
534 rc = eth_dev_dma_mzone_name(z_name, sizeof(z_name), dev->data->port_id,
535 queue_id, ring_name);
536 if (rc >= RTE_MEMZONE_NAMESIZE) {
537 RTE_ETHDEV_LOG(ERR, "ring name too long\n");
538 return -ENAMETOOLONG;
539 }
540
541 mz = rte_memzone_lookup(z_name);
542 if (mz)
543 rc = rte_memzone_free(mz);
544 else
545 rc = -ENOENT;
546
547 return rc;
548}
549
550const struct rte_memzone *
551rte_eth_dma_zone_reserve(const struct rte_eth_dev *dev, const char *ring_name,

Callers 8

otx_ep_dev_closeFunction · 0.85
nfp_net_rx_queue_releaseFunction · 0.85
nfp_net_tx_queue_releaseFunction · 0.85
t4_free_sge_resourcesFunction · 0.85
cnxk_nix_timesync_enableFunction · 0.85

Calls 3

eth_dev_dma_mzone_nameFunction · 0.85
rte_memzone_lookupFunction · 0.85
rte_memzone_freeFunction · 0.85

Tested by

no test coverage detected