#include <unistd.h>
#include <pthread.h>
#include <fcntl.h>
+#include <string.h>
#include <sys/ioctl.h>
#include <sys/epoll.h>
#include <linux/virtio_net.h>
struct ifcvf_hw *hw = &internal->hw;
uint32_t i;
int vid;
- uint64_t features;
- uint64_t log_base, log_size;
+ uint64_t features = 0;
+ uint64_t log_base = 0, log_size = 0;
uint64_t len;
vid = internal->vid;
struct rte_vhost_vring vring;
int fd;
+ vring.callfd = -1;
+
nr_vring = rte_vhost_get_vring_num(internal->vid);
irq_set = (struct vfio_irq_set *)irq_set_buf;
}
internal->epfd = epfd;
+ vring.kickfd = -1;
for (qid = 0; qid < q_num; qid++) {
ev.events = EPOLLIN | EPOLLPRI;
rte_vhost_get_vhost_vring(internal->vid, qid, &vring);
uint64_t size;
uint64_t gpa;
+ memset(&vq, 0, sizeof(vq));
vid = internal->vid;
nr_vring = rte_vhost_get_vring_num(vid);
rte_vhost_get_negotiated_features(vid, &hw->req_features);
}
internal->epfd = epfd;
+ vring.kickfd = -1;
for (qid = 0; qid < q_num; qid++) {
ev.events = EPOLLIN | EPOLLPRI;
rte_vhost_get_vhost_vring(vid, qid, &vring);
static int
ifcvf_set_features(int vid)
{
- uint64_t features;
+ uint64_t features = 0;
int did;
struct internal_list *list;
struct ifcvf_internal *internal;
- uint64_t log_base, log_size;
+ uint64_t log_base = 0, log_size = 0;
did = rte_vhost_get_vdpa_device_id(vid);
list = find_internal_resource_by_did(did);