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

Function vhost_user_iotlb_clear_dump

dpdk/lib/vhost/iotlb.c:65–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65static void
66vhost_user_iotlb_clear_dump(struct vhost_iotlb_entry *node,
67 struct vhost_iotlb_entry *prev, struct vhost_iotlb_entry *next)
68{
69 uint64_t start, end;
70
71 start = node->uaddr + node->uoffset;
72 end = start + node->size;
73
74 /* Skip first page if shared with previous entry. */
75 if (vhost_user_iotlb_share_page(prev, node))
76 start = RTE_ALIGN_CEIL(start, RTE_BIT64(node->page_shift));
77
78 /* Skip last page if shared with next entry. */
79 if (vhost_user_iotlb_share_page(node, next))
80 end = RTE_ALIGN_FLOOR(end, RTE_BIT64(node->page_shift));
81
82 if (end > start)
83 mem_set_dump((void *)(uintptr_t)start, end - start, false,
84 RTE_BIT64(node->page_shift));
85}
86
87static struct vhost_iotlb_entry *
88vhost_user_iotlb_pool_get(struct virtio_net *dev)

Calls 2

mem_set_dumpFunction · 0.85

Tested by

no test coverage detected