X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_vhost%2Fsocket.c;h=0169d364813de21bc6c74108bd26c68a6242f7f1;hb=e2a94f9ad3ef949c0df3e63699bd4e381b5003d9;hp=c4626d2c46845bf162ab3b10dec25c5e1c63b9ad;hpb=78639d54563a42150fe6e85977f06a6db55d3a06;p=dpdk.git diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c index c4626d2c46..0169d36481 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -37,7 +37,6 @@ struct vhost_user_socket { struct sockaddr_un un; bool is_server; bool reconnect; - bool dequeue_zero_copy; bool iommu_support; bool use_builtin_virtio_net; bool extbuf; @@ -229,9 +228,6 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket) vhost_attach_vdpa_device(vid, vsocket->vdpa_dev); - if (vsocket->dequeue_zero_copy) - vhost_enable_dequeue_zero_copy(vid); - if (vsocket->extbuf) vhost_enable_extbuf(vid); @@ -710,7 +706,7 @@ rte_vhost_driver_get_features(const char *path, uint64_t *features) } vdpa_dev = vsocket->vdpa_dev; - if (!vdpa_dev || !vdpa_dev->ops->get_features) { + if (!vdpa_dev) { *features = vsocket->features; goto unlock_exit; } @@ -763,7 +759,7 @@ rte_vhost_driver_get_protocol_features(const char *path, } vdpa_dev = vsocket->vdpa_dev; - if (!vdpa_dev || !vdpa_dev->ops->get_protocol_features) { + if (!vdpa_dev) { *protocol_features = vsocket->protocol_features; goto unlock_exit; } @@ -803,7 +799,7 @@ rte_vhost_driver_get_queue_num(const char *path, uint32_t *queue_num) } vdpa_dev = vsocket->vdpa_dev; - if (!vdpa_dev || !vdpa_dev->ops->get_queue_num) { + if (!vdpa_dev) { *queue_num = VHOST_MAX_QUEUE_PAIRS; goto unlock_exit; } @@ -878,18 +874,8 @@ rte_vhost_driver_register(const char *path, uint64_t flags) goto out_free; } vsocket->vdpa_dev = NULL; - vsocket->dequeue_zero_copy = flags & RTE_VHOST_USER_DEQUEUE_ZERO_COPY; vsocket->extbuf = flags & RTE_VHOST_USER_EXTBUF_SUPPORT; vsocket->linearbuf = flags & RTE_VHOST_USER_LINEARBUF_SUPPORT; - - if (vsocket->dequeue_zero_copy && - (flags & RTE_VHOST_USER_IOMMU_SUPPORT)) { - VHOST_LOG_CONFIG(ERR, - "error: enabling dequeue zero copy and IOMMU features " - "simultaneously is not supported\n"); - goto out_mutex; - } - vsocket->async_copy = flags & RTE_VHOST_USER_ASYNC_COPY; if (vsocket->async_copy && @@ -918,39 +904,6 @@ rte_vhost_driver_register(const char *path, uint64_t flags) vsocket->features = VIRTIO_NET_SUPPORTED_FEATURES; vsocket->protocol_features = VHOST_USER_PROTOCOL_FEATURES; - /* - * Dequeue zero copy can't assure descriptors returned in order. - * Also, it requires that the guest memory is populated, which is - * not compatible with postcopy. - */ - if (vsocket->dequeue_zero_copy) { - if (vsocket->extbuf) { - VHOST_LOG_CONFIG(ERR, - "error: zero copy is incompatible with external buffers\n"); - ret = -1; - goto out_mutex; - } - if (vsocket->linearbuf) { - VHOST_LOG_CONFIG(ERR, - "error: zero copy is incompatible with linear buffers\n"); - ret = -1; - goto out_mutex; - } - if ((flags & RTE_VHOST_USER_CLIENT) != 0) { - VHOST_LOG_CONFIG(ERR, - "error: zero copy is incompatible with vhost client mode\n"); - ret = -1; - goto out_mutex; - } - vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER); - vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER); - - VHOST_LOG_CONFIG(INFO, - "Dequeue zero copy requested, disabling postcopy support\n"); - vsocket->protocol_features &= - ~(1ULL << VHOST_USER_PROTOCOL_F_PAGEFAULT); - } - if (vsocket->async_copy) { vsocket->supported_features &= ~(1ULL << VHOST_F_LOG_ALL); vsocket->features &= ~(1ULL << VHOST_F_LOG_ALL);