patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 18.11] vhost: remove zero-copy and client mode restriction
@ 2020-07-01 13:52 Kevin Traynor
  2020-07-01 15:09 ` Luca Boccassi
  0 siblings, 1 reply; 3+ messages in thread
From: Kevin Traynor @ 2020-07-01 13:52 UTC (permalink / raw)
  To: stable; +Cc: Kevin Traynor, xuan.ding

Commits [1] were backported as fixes from the latest DPDK release
to the stable branches. They are detecting if vhost-user client and
zero-copy are being used together. As this can be problematic in
some cases, this combination was being rejected by those patches.

It might be ok to deprecate this combination in latest DPDK,
but for stable releases we should not remove the functionality
as it may be in use with earlier releases from the same stable branch.

In fact, we know that this functionality is used at least in OVS in
multiple releases/active branches.

This patch removes the restriction of zero-copy and client mode
and adds a warning for the user.

[1]
commit 81e025d7ed6a
("vhost: prevent zero-copy with incompatible client mode")

commit 0309429b1988
("vhost: fix zero-copy server mode")

Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
---
Cc: xuan.ding@intel.com
---
 lib/librte_vhost/socket.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
index 4819d31737..6f7142be23 100644
--- a/lib/librte_vhost/socket.c
+++ b/lib/librte_vhost/socket.c
@@ -891,10 +891,8 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
 	 */
 	if (vsocket->dequeue_zero_copy) {
-		if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
-			RTE_LOG(ERR, VHOST_CONFIG,
-			"error: zero copy is incompatible with vhost client mode\n");
-			ret = -1;
-			goto out_mutex;
-		}
+		if ((flags & RTE_VHOST_USER_CLIENT) != 0)
+			RTE_LOG(WARNING, VHOST_CONFIG,
+			"zero copy may be incompatible with vhost client mode\n");
+
 		vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER);
 		vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);
-- 
2.21.3


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

* Re: [dpdk-stable] [PATCH 18.11] vhost: remove zero-copy and client mode restriction
  2020-07-01 13:52 [dpdk-stable] [PATCH 18.11] vhost: remove zero-copy and client mode restriction Kevin Traynor
@ 2020-07-01 15:09 ` Luca Boccassi
  2020-07-02 11:57   ` Kevin Traynor
  0 siblings, 1 reply; 3+ messages in thread
From: Luca Boccassi @ 2020-07-01 15:09 UTC (permalink / raw)
  To: Kevin Traynor, stable; +Cc: xuan.ding

On Wed, 2020-07-01 at 14:52 +0100, Kevin Traynor wrote:
> Commits [1] were backported as fixes from the latest DPDK release
> to the stable branches. They are detecting if vhost-user client and
> zero-copy are being used together. As this can be problematic in
> some cases, this combination was being rejected by those patches.
> 
> It might be ok to deprecate this combination in latest DPDK,
> but for stable releases we should not remove the functionality
> as it may be in use with earlier releases from the same stable branch.
> 
> In fact, we know that this functionality is used at least in OVS in
> multiple releases/active branches.
> 
> This patch removes the restriction of zero-copy and client mode
> and adds a warning for the user.
> 
> [1]
> commit 81e025d7ed6a
> ("vhost: prevent zero-copy with incompatible client mode")
> 
> commit 0309429b1988
> ("vhost: fix zero-copy server mode")
> 
> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
> ---
> Cc: xuan.ding@intel.com
> ---
>  lib/librte_vhost/socket.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
> index 4819d31737..6f7142be23 100644
> --- a/lib/librte_vhost/socket.c
> +++ b/lib/librte_vhost/socket.c
> @@ -891,10 +891,8 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
>  	 */
>  	if (vsocket->dequeue_zero_copy) {
> -		if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
> -			RTE_LOG(ERR, VHOST_CONFIG,
> -			"error: zero copy is incompatible with vhost client mode\n");
> -			ret = -1;
> -			goto out_mutex;
> -		}
> +		if ((flags & RTE_VHOST_USER_CLIENT) != 0)
> +			RTE_LOG(WARNING, VHOST_CONFIG,
> +			"zero copy may be incompatible with vhost client mode\n");
> +
>  		vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER);
>  		vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);

Acked-by: Luca Boccassi <bluca@debian.org>

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-stable] [PATCH 18.11] vhost: remove zero-copy and client mode restriction
  2020-07-01 15:09 ` Luca Boccassi
@ 2020-07-02 11:57   ` Kevin Traynor
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Traynor @ 2020-07-02 11:57 UTC (permalink / raw)
  To: Luca Boccassi, stable; +Cc: xuan.ding

On 01/07/2020 16:09, Luca Boccassi wrote:
> On Wed, 2020-07-01 at 14:52 +0100, Kevin Traynor wrote:
>> Commits [1] were backported as fixes from the latest DPDK release
>> to the stable branches. They are detecting if vhost-user client and
>> zero-copy are being used together. As this can be problematic in
>> some cases, this combination was being rejected by those patches.
>>
>> It might be ok to deprecate this combination in latest DPDK,
>> but for stable releases we should not remove the functionality
>> as it may be in use with earlier releases from the same stable branch.
>>
>> In fact, we know that this functionality is used at least in OVS in
>> multiple releases/active branches.
>>
>> This patch removes the restriction of zero-copy and client mode
>> and adds a warning for the user.
>>
>> [1]
>> commit 81e025d7ed6a
>> ("vhost: prevent zero-copy with incompatible client mode")
>>
>> commit 0309429b1988
>> ("vhost: fix zero-copy server mode")
>>
>> Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
>> ---
>> Cc: xuan.ding@intel.com
>> ---
>>  lib/librte_vhost/socket.c | 10 ++++------
>>  1 file changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/lib/librte_vhost/socket.c b/lib/librte_vhost/socket.c
>> index 4819d31737..6f7142be23 100644
>> --- a/lib/librte_vhost/socket.c
>> +++ b/lib/librte_vhost/socket.c
>> @@ -891,10 +891,8 @@ rte_vhost_driver_register(const char *path, uint64_t flags)
>>  	 */
>>  	if (vsocket->dequeue_zero_copy) {
>> -		if ((flags & RTE_VHOST_USER_CLIENT) != 0) {
>> -			RTE_LOG(ERR, VHOST_CONFIG,
>> -			"error: zero copy is incompatible with vhost client mode\n");
>> -			ret = -1;
>> -			goto out_mutex;
>> -		}
>> +		if ((flags & RTE_VHOST_USER_CLIENT) != 0)
>> +			RTE_LOG(WARNING, VHOST_CONFIG,
>> +			"zero copy may be incompatible with vhost client mode\n");
>> +
>>  		vsocket->supported_features &= ~(1ULL << VIRTIO_F_IN_ORDER);
>>  		vsocket->features &= ~(1ULL << VIRTIO_F_IN_ORDER);
> 
> Acked-by: Luca Boccassi <bluca@debian.org>
> 

Thanks Luca, added some reported-by info and applied.


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

end of thread, other threads:[~2020-07-02 11:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01 13:52 [dpdk-stable] [PATCH 18.11] vhost: remove zero-copy and client mode restriction Kevin Traynor
2020-07-01 15:09 ` Luca Boccassi
2020-07-02 11:57   ` Kevin Traynor

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/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 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


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