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 8D1FCA3295 for ; Wed, 23 Oct 2019 16:38:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 720601C02E; Wed, 23 Oct 2019 16:38:22 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 01D0B1C02E for ; Wed, 23 Oct 2019 16:38:20 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Oct 2019 07:38:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,221,1569308400"; d="scan'208";a="399408908" Received: from silpixa00398673.ir.intel.com (HELO silpixa00398673.ger.corp.intel.com) ([10.237.223.136]) by fmsmga006.fm.intel.com with ESMTP; 23 Oct 2019 07:38:09 -0700 From: Fan Zhang To: dev@dpdk.rog Cc: maxime.coquelin@redhat.com, Fan Zhang , stable@dpdk.org Date: Wed, 23 Oct 2019 15:38:07 +0100 Message-Id: <20191023143807.42528-1-roy.fan.zhang@intel.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] [PATCH] vhost/crypto: fix missed user protocol flag 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" 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 --- 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)) -- 2.20.1