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

Function init_vring_queue

dpdk/lib/vhost/vhost.c:597–618  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597static void
598init_vring_queue(struct virtio_net *dev __rte_unused, struct vhost_virtqueue *vq,
599 uint32_t vring_idx)
600{
601 int numa_node = SOCKET_ID_ANY;
602
603 memset(vq, 0, sizeof(struct vhost_virtqueue));
604
605 vq->index = vring_idx;
606 vq->kickfd = VIRTIO_UNINITIALIZED_EVENTFD;
607 vq->callfd = VIRTIO_UNINITIALIZED_EVENTFD;
608 vq->notif_enable = VIRTIO_UNINITIALIZED_NOTIF;
609
610#ifdef RTE_LIBRTE_VHOST_NUMA
611 if (get_mempolicy(&numa_node, NULL, 0, vq, MPOL_F_NODE | MPOL_F_ADDR)) {
612 VHOST_LOG_CONFIG(dev->ifname, ERR, "failed to query numa node: %s\n",
613 rte_strerror(errno));
614 numa_node = SOCKET_ID_ANY;
615 }
616#endif
617 vq->numa_node = numa_node;
618}
619
620static void
621reset_vring_queue(struct virtio_net *dev, struct vhost_virtqueue *vq)

Callers 2

reset_vring_queueFunction · 0.85
alloc_vring_queueFunction · 0.85

Calls 2

memsetFunction · 0.85
rte_strerrorFunction · 0.85

Tested by

no test coverage detected