- /*
- * 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);
- }
-