From patchwork Wed Jan 29 10:19:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fan Zhang X-Patchwork-Id: 65302 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 81032A0531; Wed, 29 Jan 2020 11:20:23 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 055781BFC7; Wed, 29 Jan 2020 11:20:23 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id D36041BFC6; Wed, 29 Jan 2020 11:20:21 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Jan 2020 02:19:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,377,1574150400"; d="scan'208";a="401946862" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.136]) by orsmga005.jf.intel.com with ESMTP; 29 Jan 2020 02:19:41 -0800 From: Fan Zhang To: dev@dpdk.org Cc: maxime.coquelin@redhat.com, Fan Zhang , stable@dpdk.org Date: Wed, 29 Jan 2020 10:19:37 +0000 Message-Id: <20200129101937.57243-1-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191126095410.72395-1-roy.fan.zhang@intel.com> References: <20191126095410.72395-1-roy.fan.zhang@intel.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] vhost/crypto: fix missed user protocol flag X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: 939066d96563 ("vhost/crypto: add public function implementation") Cc: stable@dpdk.org This patch fixes the vhost crypto missed "VHOST_USER_PROTOCOL_F_CONFIG" flag problem during initialization. Newer Qemu version requires this feature enabled. Signed-off-by: Fan Zhang Reviewed-by: Maxime Coquelin --- lib/librte_vhost/rte_vhost.h | 5 +++++ lib/librte_vhost/vhost_crypto.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/rte_vhost.h b/lib/librte_vhost/rte_vhost.h index 7b5dc87c2..ad6e71702 100644 --- a/lib/librte_vhost/rte_vhost.h +++ b/lib/librte_vhost/rte_vhost.h @@ -68,6 +68,10 @@ extern "C" { #define VHOST_USER_PROTOCOL_F_PAGEFAULT 8 #endif +#ifndef VHOST_USER_PROTOCOL_F_CONFIG +#define VHOST_USER_PROTOCOL_F_CONFIG 9 +#endif + #ifndef VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD #define VHOST_USER_PROTOCOL_F_SLAVE_SEND_FD 10 #endif @@ -85,6 +89,7 @@ extern "C" { #define VHOST_USER_F_PROTOCOL_FEATURES 30 #endif + /** * Information relating to memory regions including offsets to * addresses in QEMUs memory file. diff --git a/lib/librte_vhost/vhost_crypto.c b/lib/librte_vhost/vhost_crypto.c index 684fddc30..242fa5333 100644 --- a/lib/librte_vhost/vhost_crypto.c +++ b/lib/librte_vhost/vhost_crypto.c @@ -40,7 +40,8 @@ (1 << VIRTIO_RING_F_EVENT_IDX) | \ (1 << VIRTIO_CRYPTO_SERVICE_CIPHER) | \ (1 << VIRTIO_CRYPTO_SERVICE_MAC) | \ - (1 << VIRTIO_NET_F_CTRL_VQ)) + (1 << VIRTIO_NET_F_CTRL_VQ) | \ + (1 << VHOST_USER_PROTOCOL_F_CONFIG)) #define IOVA_TO_VVA(t, r, a, l, p) \ ((t)(uintptr_t)vhost_iova_to_vva(r->dev, r->vq, a, l, p))