From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 34EF3A0350 for ; Wed, 1 Jul 2020 15:53:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 004301C2AC; Wed, 1 Jul 2020 15:53:00 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by dpdk.org (Postfix) with ESMTP id BF58F1C2AC for ; Wed, 1 Jul 2020 15:52:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593611579; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CIO1f1IZvVoBZ4/36xgmq+E9V+d0PuFC8xbAj1Yh7e0=; b=AzqKO+0gPwaS+q1ZrTyw6xk/SHH3VxTB+xWX3kTIexhAJcZAui0oJFOPGpgZ70C2KquNJh jTzDFEz4MGsZGDCMKzXVlap1PajgbH4BzwcaZsclm4QGWwWAkmp+g4ouHdHvGjt9n8JAf8 4jzCpT8HcwEs7EKBrVTuKIxNGH/Te7I= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-113-btU_AN_vOTCbfk5aoNkr5w-1; Wed, 01 Jul 2020 09:52:56 -0400 X-MC-Unique: btU_AN_vOTCbfk5aoNkr5w-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7602FEC1AC; Wed, 1 Jul 2020 13:52:55 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 855505C1C5; Wed, 1 Jul 2020 13:52:54 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: Kevin Traynor , xuan.ding@intel.com Date: Wed, 1 Jul 2020 14:52:50 +0100 Message-Id: <20200701135250.20262-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH 18.11] vhost: remove zero-copy and client mode restriction X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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