summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJianfeng Tan <jianfeng.tan@intel.com>2016-06-26 13:48:13 +0000
committerYuanhan Liu <yuanhan.liu@linux.intel.com>2016-06-30 07:46:29 +0200
commitd911c94d25277cc16d87b1b4bb3771a7545c647d (patch)
treef0ffead247256265051c3385b1d97f2fb457df20
parent5f05e95cd5d90c2132bbb238ef46638f68b478da (diff)
downloaddpdk-d911c94d25277cc16d87b1b4bb3771a7545c647d.zip
dpdk-d911c94d25277cc16d87b1b4bb3771a7545c647d.tar.gz
dpdk-d911c94d25277cc16d87b1b4bb3771a7545c647d.tar.xz
net/virtio-user: fix build with icc
Implicit int to enum conversion is not allowed when icc is used as the compiler. It raises the compiling error like, drivers/net/virtio/virtio_user/vhost_user.c(257): error #188: enumerated type mixed with another type msg.request = req; ^ The fix is simple, change the type of parameter req to enum vhost_user_request. Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Suggested-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
-rw-r--r--drivers/net/virtio/virtio_user/vhost.h2
-rw-r--r--drivers/net/virtio/virtio_user/vhost_user.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h
index 897042f..7adb55f 100644
--- a/drivers/net/virtio/virtio_user/vhost.h
+++ b/drivers/net/virtio/virtio_user/vhost.h
@@ -139,7 +139,7 @@ struct vhost_user_msg {
#define VHOST_USER_F_PROTOCOL_FEATURES 30
#define VHOST_USER_MQ (1ULL << VHOST_USER_F_PROTOCOL_FEATURES)
-int vhost_user_sock(int vhostfd, uint64_t req, void *arg);
+int vhost_user_sock(int vhostfd, enum vhost_user_request req, void *arg);
int vhost_user_setup(const char *path);
int vhost_user_enable_queue_pair(int vhostfd, uint16_t pair_idx, int enable);
diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c
index 95e80f8..a2b0687 100644
--- a/drivers/net/virtio/virtio_user/vhost_user.c
+++ b/drivers/net/virtio/virtio_user/vhost_user.c
@@ -240,7 +240,7 @@ static const char * const vhost_msg_strings[] = {
};
int
-vhost_user_sock(int vhostfd, uint64_t req, void *arg)
+vhost_user_sock(int vhostfd, enum vhost_user_request req, void *arg)
{
struct vhost_user_msg msg;
struct vhost_vring_file *file = 0;