From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <tiwei.bie@intel.com>
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
 by dpdk.org (Postfix) with ESMTP id DA55D1EE53
 for <dev@dpdk.org>; Wed, 13 Jun 2018 08:37:19 +0200 (CEST)
X-Amp-Result: UNKNOWN
X-Amp-Original-Verdict: FILE UNKNOWN
X-Amp-File-Uploaded: False
Received: from fmsmga008.fm.intel.com ([10.253.24.58])
 by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 12 Jun 2018 23:37:18 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.51,217,1526367600"; d="scan'208";a="47351516"
Received: from debian.sh.intel.com (HELO debian) ([10.67.104.228])
 by fmsmga008.fm.intel.com with ESMTP; 12 Jun 2018 23:37:17 -0700
Date: Wed, 13 Jun 2018 14:37:23 +0800
From: Tiwei Bie <tiwei.bie@intel.com>
To: Marvin Liu <yong.liu@intel.com>
Cc: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org
Message-ID: <20180613063723.GA27860@debian>
References: <20180608090724.20855-1-yong.liu@intel.com>
 <20180608090724.20855-4-yong.liu@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
In-Reply-To: <20180608090724.20855-4-yong.liu@intel.com>
User-Agent: Mutt/1.9.5 (2018-04-13)
Subject: Re: [dpdk-dev] [PATCH 3/7] net/virtio-user: add mgr_rxbuf and
 in_order vdev parameters
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 13 Jun 2018 06:37:20 -0000

On Fri, Jun 08, 2018 at 05:07:20PM +0800, Marvin Liu wrote:
[...]
> @@ -419,6 +420,12 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues,
>  		dev->device_features = VIRTIO_USER_SUPPORTED_FEATURES;
>  	}
>  
> +	if (!mrg_rxbuf)
> +		dev->device_features &= ~(1ull << VIRTIO_NET_F_MRG_RXBUF);
> +
> +	if (!in_order)
> +		dev->device_features &= ~(1ull << VIRTIO_F_IN_ORDER);

You also need to handle the server mode case.
In virtio_user_server_reconnect(),
dev->device_features will be overwritten.

Thanks