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

Function __vhost_log_write

dpdk/lib/vhost/vhost.c:147–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void
148__vhost_log_write(struct virtio_net *dev, uint64_t addr, uint64_t len)
149{
150 uint64_t page;
151
152 if (unlikely(!dev->log_base || !len))
153 return;
154
155 if (unlikely(dev->log_size <= ((addr + len - 1) / VHOST_LOG_PAGE / 8)))
156 return;
157
158 /* To make sure guest memory updates are committed before logging */
159 rte_atomic_thread_fence(rte_memory_order_release);
160
161 page = addr / VHOST_LOG_PAGE;
162 while (page * VHOST_LOG_PAGE < addr + len) {
163 vhost_log_page((uint8_t *)(uintptr_t)dev->log_base, page);
164 page += 1;
165 }
166}
167
168void
169__vhost_log_write_iova(struct virtio_net *dev, struct vhost_virtqueue *vq,

Callers 4

__vhost_log_write_iovaFunction · 0.85
vhost_log_writeFunction · 0.85
vhost_log_used_vringFunction · 0.85
vhost.hFile · 0.85

Calls 2

vhost_log_pageFunction · 0.85
rte_atomic_thread_fenceFunction · 0.50

Tested by

no test coverage detected