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 330F2A0350 for ; Wed, 1 Jul 2020 15:53:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C3C01C2AC; Wed, 1 Jul 2020 15:53:13 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 0045A1C2AC for ; Wed, 1 Jul 2020 15:53:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593611591; 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=KtLwSXeDHWCnqGWcWke+CL+tffTXU6uNqwBXGNzJYrg=; b=EvkgiQo7IEu/DfmnaYrYj9dzKgk9I0MSq5y0JUYzgL74EK8IAxw46MalTYM3MFhPTPIeQn iJxwWeXvi3q3aY4aUawunS+OgsdbssSANraGzH2fAfQ3R4jx3KMA8/sXNfuuoxPsh9s1an RcKiMmhleXs8ghBuiTJAu/l8wgg+nt0= 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-57-S5w_4a2VNoCnpuXEUNU6fQ-1; Wed, 01 Jul 2020 09:53:09 -0400 X-MC-Unique: S5w_4a2VNoCnpuXEUNU6fQ-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 599D180183C; Wed, 1 Jul 2020 13:53:08 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F6D85C1D0; Wed, 1 Jul 2020 13:53:07 +0000 (UTC) From: Kevin Traynor To: stable@dpdk.org Cc: Kevin Traynor , xuan.ding@intel.com, bluca@debian.org Date: Wed, 1 Jul 2020 14:53:05 +0100 Message-Id: <20200701135305.20343-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 19.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 a6ae060e3995 ("vhost: prevent zero-copy with incompatible client mode") commit 1c2eaf9a9852 ("vhost: fix zero-copy server mode") Signed-off-by: Kevin Traynor --- Cc: xuan.ding@intel.com Cc: bluca@debian.org --- 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 2461549fea..dc3ee1e99d 100644 --- a/lib/librte_vhost/socket.c +++ b/lib/librte_vhost/socket.c @@ -927,10 +927,8 @@ rte_vhost_driver_register(const char *path, uint64_t flags) goto out_mutex; } - 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