vhost/rte_vhost: fix scan build and comment formatting issues

vhost_net.c file is not needed and fail scan build so remove it.

Change-Id: I5817201373f7253cc8bc1a9bdc5884197e166a14
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
This commit is contained in:
Pawel Wodkowski 2017-05-08 09:43:13 -07:00 committed by Jim Harris
parent c2683a8e42
commit d391647bd0
5 changed files with 8 additions and 1168 deletions

View File

@ -38,7 +38,7 @@ CFLAGS += -I.
CFLAGS += $(ENV_CFLAGS)
# These are the DPDK vhost files copied (for now) into SPDK
C_SRCS += fd_man.c socket.c vhost_user.c virtio_net.c vhost.c
C_SRCS += fd_man.c socket.c vhost_user.c vhost.c
LIBNAME = rte_vhost

View File

@ -180,6 +180,11 @@ send_fd_message(int sockfd, char *buf, int buflen, int *fds, int fd_num)
msgh.msg_control = control;
msgh.msg_controllen = sizeof(control);
cmsg = CMSG_FIRSTHDR(&msgh);
if (cmsg == NULL) {
RTE_LOG(ERR, VHOST_CONFIG, "cmsg == NULL\n");
errno = EINVAL;
return -1;
}
cmsg->cmsg_len = CMSG_LEN(fdsize);
cmsg->cmsg_level = SOL_SOCKET;
cmsg->cmsg_type = SCM_RIGHTS;

View File

@ -430,7 +430,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
struct guest_page *page, *last_page;
if (dev->nr_guest_pages == dev->max_guest_pages) {
dev->max_guest_pages *= 2;
dev->max_guest_pages = RTE_MAX(8U, dev->max_guest_pages * 2);
dev->guest_pages = realloc(dev->guest_pages,
dev->max_guest_pages * sizeof(*page));
}
@ -1036,7 +1036,6 @@ vhost_user_msg_handler(int vid, int fd)
return -1;
}
ret = 0;
RTE_LOG(INFO, VHOST_CONFIG, "read message %s\n",
vhost_message_str[msg.request]);

File diff suppressed because it is too large Load Diff