DPDK patches and discussions
 help / color / Atom feed
* [dpdk-dev] [PATCH v1] vhost: dequeue zero copy with linear buffers
@ 2020-03-26  8:03 Sivaprasad Tummala
  2020-04-09 14:08 ` Maxime Coquelin
  0 siblings, 1 reply; 2+ messages in thread
From: Sivaprasad Tummala @ 2020-03-26  8:03 UTC (permalink / raw)
  To: Maxime Coquelin, Zhihong Wang, Xiaolong Ye; +Cc: dev

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(-)

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);
 
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH v1] vhost: dequeue zero copy with linear buffers
  2020-03-26  8:03 [dpdk-dev] [PATCH v1] vhost: dequeue zero copy with linear buffers Sivaprasad Tummala
@ 2020-04-09 14:08 ` Maxime Coquelin
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Coquelin @ 2020-04-09 14:08 UTC (permalink / raw)
  To: Sivaprasad Tummala, Zhihong Wang, Xiaolong Ye; +Cc: dev



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);
>  
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26  8:03 [dpdk-dev] [PATCH v1] vhost: dequeue zero copy with linear buffers Sivaprasad Tummala
2020-04-09 14:08 ` Maxime Coquelin

DPDK patches and discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox