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

Function free_mem_region

dpdk/lib/vhost/vhost_user.c:169–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169static void
170free_mem_region(struct virtio_net *dev)
171{
172 uint32_t i;
173 struct rte_vhost_mem_region *reg;
174
175 if (!dev || !dev->mem)
176 return;
177
178 if (dev->async_copy && rte_vfio_is_enabled("vfio"))
179 async_dma_map(dev, false);
180
181 for (i = 0; i < dev->mem->nregions; i++) {
182 reg = &dev->mem->regions[i];
183 if (reg->host_user_addr) {
184 munmap(reg->mmap_addr, reg->mmap_size);
185 close(reg->fd);
186 }
187 }
188}
189
190void
191vhost_backend_cleanup(struct virtio_net *dev)

Callers 2

vhost_backend_cleanupFunction · 0.85
vhost_user_set_mem_tableFunction · 0.85

Calls 3

async_dma_mapFunction · 0.85
rte_vfio_is_enabledFunction · 0.50
closeFunction · 0.50

Tested by

no test coverage detected