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

Function hua_to_alignment

dpdk/lib/vhost/vhost_user.c:746–763  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

744}
745
746static uint64_t
747hua_to_alignment(struct rte_vhost_memory *mem, void *ptr)
748{
749 struct rte_vhost_mem_region *r;
750 uint32_t i;
751 uintptr_t hua = (uintptr_t)ptr;
752
753 for (i = 0; i < mem->nregions; i++) {
754 r = &mem->regions[i];
755 if (hua >= r->host_user_addr &&
756 hua < r->host_user_addr + r->size) {
757 return get_blk_size(r->fd);
758 }
759 }
760
761 /* If region isn't found, don't align at all */
762 return 1;
763}
764
765void
766mem_set_dump(void *ptr, size_t size, bool enable, uint64_t pagesz)

Callers 2

translate_ring_addressesFunction · 0.85
vhost_user_iotlb_msgFunction · 0.85

Calls 1

get_blk_sizeFunction · 0.85

Tested by

no test coverage detected