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:
parent
c2683a8e42
commit
d391647bd0
@ -38,7 +38,7 @@ CFLAGS += -I.
|
|||||||
CFLAGS += $(ENV_CFLAGS)
|
CFLAGS += $(ENV_CFLAGS)
|
||||||
|
|
||||||
# These are the DPDK vhost files copied (for now) into SPDK
|
# 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
|
LIBNAME = rte_vhost
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ typedef void (*fd_cb)(int fd, void *dat, int *remove);
|
|||||||
struct fdentry {
|
struct fdentry {
|
||||||
int fd; /* -1 indicates this entry is empty */
|
int fd; /* -1 indicates this entry is empty */
|
||||||
fd_cb rcb; /* callback when this fd is readable. */
|
fd_cb rcb; /* callback when this fd is readable. */
|
||||||
fd_cb wcb; /* callback when this fd is writeable.*/
|
fd_cb wcb; /* callback when this fd is writeable. */
|
||||||
void *dat; /* fd context */
|
void *dat; /* fd context */
|
||||||
int busy; /* whether this entry is being used in cb. */
|
int busy; /* whether this entry is being used in cb. */
|
||||||
};
|
};
|
||||||
|
@ -180,6 +180,11 @@ send_fd_message(int sockfd, char *buf, int buflen, int *fds, int fd_num)
|
|||||||
msgh.msg_control = control;
|
msgh.msg_control = control;
|
||||||
msgh.msg_controllen = sizeof(control);
|
msgh.msg_controllen = sizeof(control);
|
||||||
cmsg = CMSG_FIRSTHDR(&msgh);
|
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_len = CMSG_LEN(fdsize);
|
||||||
cmsg->cmsg_level = SOL_SOCKET;
|
cmsg->cmsg_level = SOL_SOCKET;
|
||||||
cmsg->cmsg_type = SCM_RIGHTS;
|
cmsg->cmsg_type = SCM_RIGHTS;
|
||||||
|
@ -430,7 +430,7 @@ add_one_guest_page(struct virtio_net *dev, uint64_t guest_phys_addr,
|
|||||||
struct guest_page *page, *last_page;
|
struct guest_page *page, *last_page;
|
||||||
|
|
||||||
if (dev->nr_guest_pages == dev->max_guest_pages) {
|
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->guest_pages = realloc(dev->guest_pages,
|
||||||
dev->max_guest_pages * sizeof(*page));
|
dev->max_guest_pages * sizeof(*page));
|
||||||
}
|
}
|
||||||
@ -1036,7 +1036,6 @@ vhost_user_msg_handler(int vid, int fd)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
|
||||||
RTE_LOG(INFO, VHOST_CONFIG, "read message %s\n",
|
RTE_LOG(INFO, VHOST_CONFIG, "read message %s\n",
|
||||||
vhost_message_str[msg.request]);
|
vhost_message_str[msg.request]);
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user