aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/virtio/vhost_user_api.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-08-31 17:17:16 +0200
committerDamjan Marion <dmarion@me.com>2020-09-04 13:34:20 +0000
commita7a2281732b926df139b0fd946a084299d813654 (patch)
tree9e6eb7d5a2774c62e1d84041fe0b01182b0ab087 /src/vnet/devices/virtio/vhost_user_api.c
parentf1cd3da20f1a5a7ed94a18b6d7ea4bf9d491a7d3 (diff)
virtio: remove kernel virtio header dependencies
Type: refactor tap, virtio and vhost use virtio/vhost header files from linux kernel. Different features are supported on different kernel versions, making it difficult to use those in VPP. This patch removes virtio/vhost based header dependencies to local header files. Change-Id: I064a8adb5cd9753c986b6f224bb075200b3856af Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'src/vnet/devices/virtio/vhost_user_api.c')
-rw-r--r--src/vnet/devices/virtio/vhost_user_api.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/vnet/devices/virtio/vhost_user_api.c b/src/vnet/devices/virtio/vhost_user_api.c
index 80fe5548efd..ec335c529f2 100644
--- a/src/vnet/devices/virtio/vhost_user_api.c
+++ b/src/vnet/devices/virtio/vhost_user_api.c
@@ -65,10 +65,10 @@ vl_api_create_vhost_user_if_t_handler (vl_api_create_vhost_user_if_t * mp)
u8 *mac_p = NULL;
if (mp->disable_mrg_rxbuf)
- disabled_features = (1ULL << FEAT_VIRTIO_NET_F_MRG_RXBUF);
+ disabled_features = VIRTIO_FEATURE (VIRTIO_NET_F_MRG_RXBUF);
if (mp->disable_indirect_desc)
- disabled_features |= (1ULL << FEAT_VIRTIO_F_INDIRECT_DESC);
+ disabled_features |= VIRTIO_FEATURE (VIRTIO_RING_F_INDIRECT_DESC);
/*
* GSO and PACKED are not supported by feature mask via binary API. We
@@ -76,7 +76,7 @@ vl_api_create_vhost_user_if_t_handler (vl_api_create_vhost_user_if_t * mp)
* explicitly via enable_gso and enable_packed argument
*/
disabled_features |= FEATURE_VIRTIO_NET_F_HOST_GUEST_TSO_FEATURE_BITS |
- (1ULL << FEAT_VIRTIO_F_RING_PACKED);
+ VIRTIO_FEATURE (VIRTIO_F_RING_PACKED);
features &= ~disabled_features;
if (mp->use_custom_mac)
@@ -129,7 +129,7 @@ vl_api_modify_vhost_user_if_t_handler (vl_api_modify_vhost_user_if_t * mp)
* explicitly via enable_gso and enable_packed argument
*/
disabled_features |= FEATURE_VIRTIO_NET_F_HOST_GUEST_TSO_FEATURE_BITS |
- (1ULL << FEAT_VIRTIO_F_RING_PACKED);
+ VIRTIO_FEATURE (VIRTIO_F_RING_PACKED);
features &= ~disabled_features;
rv = vhost_user_modify_if (vnm, vm, (char *) mp->sock_filename,