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

Function vhost_memory_changed

dpdk/lib/vhost/vhost_user.c:1093–1115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1091#endif
1092
1093static bool
1094vhost_memory_changed(struct VhostUserMemory *new,
1095 struct rte_vhost_memory *old)
1096{
1097 uint32_t i;
1098
1099 if (new->nregions != old->nregions)
1100 return true;
1101
1102 for (i = 0; i < new->nregions; ++i) {
1103 VhostUserMemoryRegion *new_r = &new->regions[i];
1104 struct rte_vhost_mem_region *old_r = &old->regions[i];
1105
1106 if (new_r->guest_phys_addr != old_r->guest_phys_addr)
1107 return true;
1108 if (new_r->memory_size != old_r->size)
1109 return true;
1110 if (new_r->userspace_addr != old_r->guest_user_addr)
1111 return true;
1112 }
1113
1114 return false;
1115}
1116
1117#ifdef RTE_LIBRTE_VHOST_POSTCOPY
1118static int

Callers 1

vhost_user_set_mem_tableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected