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

Function vhost_user_iotlb_share_page

dpdk/lib/vhost/iotlb.c:37–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static bool
38vhost_user_iotlb_share_page(struct vhost_iotlb_entry *a, struct vhost_iotlb_entry *b)
39{
40 uint64_t a_start, a_end, b_start;
41
42 if (a == NULL || b == NULL)
43 return false;
44
45 a_start = a->uaddr + a->uoffset;
46 b_start = b->uaddr + b->uoffset;
47
48 /* Assumes entry a lower than entry b */
49 RTE_ASSERT(a_start < b_start);
50 a_end = RTE_ALIGN_CEIL(a_start + a->size, RTE_BIT64(a->page_shift));
51 b_start = RTE_ALIGN_FLOOR(b_start, RTE_BIT64(b->page_shift));
52
53 return a_end > b_start;
54}
55
56static void
57vhost_user_iotlb_set_dump(struct vhost_iotlb_entry *node)

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected