From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 92BF41B73E for ; Thu, 10 Jan 2019 15:42:39 +0100 (CET) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Jan 2019 06:42:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,461,1539673200"; d="scan'208";a="124999820" Received: from dpdk-tbie.sh.intel.com ([10.67.104.173]) by orsmga002.jf.intel.com with ESMTP; 10 Jan 2019 06:42:37 -0800 Date: Thu, 10 Jan 2019 22:40:25 +0800 From: Tiwei Bie To: Jens Freimann Cc: dev@dpdk.org, maxime.coquelin@redhat.com Message-ID: <20190110144024.GA27794@dpdk-tbie.sh.intel.com> References: <20190110131751.32670-1-jfreimann@redhat.com> <20190110131751.32670-3-jfreimann@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190110131751.32670-3-jfreimann@redhat.com> User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-dev] [PATCH v2 2/2] Revert "net/virtio-user: fail if cq used with packed vq" 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: , X-List-Received-Date: Thu, 10 Jan 2019 14:42:40 -0000 On Thu, Jan 10, 2019 at 02:17:51PM +0100, Jens Freimann wrote: > This reverts commit 5e4e7a7524a30c176bd6b1789ab30963f27f2681. > > Not a clean revert, I had to resolve a conflict due to > 616ea5519 net/virtio-user: fix packed vq option parsing > > Signed-off-by: Jens Freimann > --- > drivers/net/virtio/virtio_user/virtio_user_dev.c | 11 +++-------- > 1 file changed, 3 insertions(+), 8 deletions(-) > > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c > index 49fcf48b9..b7059cb1e 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c > @@ -478,15 +478,10 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, > if (!in_order) > dev->unsupported_features |= (1ull << VIRTIO_F_IN_ORDER); > > - if (packed_vq) { > - if (cq) { > - PMD_INIT_LOG(ERR, "control vq not supported yet with " > - "packed virtqueues\n"); > - return -1; > - } I think it's natural to drop above code in the same patch that introduces the control vq support. > - } else { > + if (packed_vq) > + dev->device_features |= (1ull << VIRTIO_F_RING_PACKED); We shouldn't add this bit into device_features like this. We just need this: if (!packed_vq) dev->unsupported_features |= (1ull << VIRTIO_F_RING_PACKED); > + else > dev->unsupported_features |= (1ull << VIRTIO_F_RING_PACKED); > - } > > if (dev->mac_specified) > dev->frontend_features |= (1ull << VIRTIO_NET_F_MAC); > -- > 2.17.2 >