From patchwork Wed Jun 21 02:57:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 25524 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 129BE7CE3; Wed, 21 Jun 2017 05:00:14 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 66A26567F for ; Wed, 21 Jun 2017 04:59:39 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP; 20 Jun 2017 19:59:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,367,1493708400"; d="scan'208";a="101830324" Received: from dpdk25.sh.intel.com ([10.67.111.75]) by orsmga002.jf.intel.com with ESMTP; 20 Jun 2017 19:59:38 -0700 From: Tiwei Bie To: dev@dpdk.org Date: Wed, 21 Jun 2017 10:57:53 +0800 Message-Id: <1498013885-102779-18-git-send-email-tiwei.bie@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498013885-102779-1-git-send-email-tiwei.bie@intel.com> References: <1498013885-102779-1-git-send-email-tiwei.bie@intel.com> Subject: [dpdk-dev] [RFC 17/29] net/virtio: fix virtio1.1 feature negotiation 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" Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 3ff6a05..e3471d1 100644 --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c @@ -333,7 +333,8 @@ virtio_user_dev_setup(struct virtio_user_dev *dev) 1ULL << VIRTIO_NET_F_GUEST_CSUM | \ 1ULL << VIRTIO_NET_F_GUEST_TSO4 | \ 1ULL << VIRTIO_NET_F_GUEST_TSO6 | \ - 1ULL << VIRTIO_F_VERSION_1) + 1ULL << VIRTIO_F_VERSION_1 | \ + 1ULL << VIRTIO_F_VERSION_1_1) int virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, @@ -368,9 +369,9 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, } if (version_1_1) - dev->features |= (1ull << VIRTIO_F_VERSION_1_1); + dev->device_features |= (1ull << VIRTIO_F_VERSION_1_1); else - dev->features &= ~(1ull << VIRTIO_F_VERSION_1_1); + dev->device_features &= ~(1ull << VIRTIO_F_VERSION_1_1); if (dev->mac_specified) dev->device_features |= (1ull << VIRTIO_NET_F_MAC);