[v1] vhost: dequeue zero copy with linear buffers
diff mbox series

Message ID 20200326080349.4181-1-Sivaprasad.Tummala@intel.com
State Rejected, archived
Delegated to: Maxime Coquelin
Headers show
Series
  • [v1] vhost: dequeue zero copy with linear buffers
Related show

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Sivaprasad Tummala March 26, 2020, 8:03 a.m. UTC
Removed the linear buffer and zero_copy compatibility restriction.

Applications that requires packets contained in a single buffer
will enable linear buffer in vhost library. This restriction
is not allowing zero_copy mode for such cases.

Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
---
 lib/librte_vhost/socket.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Maxime Coquelin April 9, 2020, 2:08 p.m. UTC | #1
On 3/26/20 9:03 AM, Sivaprasad Tummala wrote:
> Removed the linear buffer and zero_copy compatibility restriction.
> 
> Applications that requires packets contained in a single buffer
> will enable linear buffer in vhost library. This restriction
> is not allowing zero_copy mode for such cases.

As discussed off-list, this restriction makes sense because we cannot
control how the guest splits the packets into chained descriptors.

So as soon as the zero-copy is enabled, we cannot guarantee the
application that buffers will be linear.

Regards,
Maxime

> Signed-off-by: Sivaprasad Tummala <Sivaprasad.Tummala@intel.com>
> ---
>  lib/librte_vhost/socket.c | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
> index 7c8012179..e1afc290e 100644
> --- a/lib/librte_vhost/socket.c
> +++ b/lib/librte_vhost/socket.c
> @@ -920,12 +920,6 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
>  			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;
> -		}
>  		vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER);
>  		vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);
>  
>

Patch
diff mbox series

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 7c8012179..e1afc290e 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -920,12 +920,6 @@  rte_vhost_driver_register(const char *path, uint64_t flags)
 			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;
-		}
 		vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER);
 		vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);