From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 108111BACC for ; Fri, 11 May 2018 09:32:46 +0200 (CEST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 May 2018 00:32:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,387,1520924400"; d="scan'208";a="53385853" Received: from debian.sh.intel.com (HELO debian) ([10.67.104.164]) by fmsmga004.fm.intel.com with ESMTP; 11 May 2018 00:32:44 -0700 Date: Fri, 11 May 2018 15:33:17 +0800 From: Tiwei Bie To: Jiayu Hu Cc: dev@dpdk.org, zhiyong.yang@intel.com Message-ID: <20180511073316.isttci5kiuicuns2@debian> References: <1525767284-130484-1-git-send-email-jiayu.hu@intel.com> <1526023567-111448-1-git-send-email-jiayu.hu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1526023567-111448-1-git-send-email-jiayu.hu@intel.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH v3] net/virtio-user: fix feature setting with vhost-net backend 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: Fri, 11 May 2018 07:32:49 -0000 On Fri, May 11, 2018 at 03:26:07PM +0800, Jiayu Hu wrote: > When the backend is vhost-net, virtio-user must work in client mode and > needs to request features from the backend in virtio_user_dev_init(). > But currently, virtio-user is assigned to default features in this case. > > This patch is to fix this inappropriate feature setting. > > Fixes: bd8f50a45d0f ("net/virtio-user: support server mode") > Signed-off-by: Jiayu Hu > Tested-by: Lei Yao > --- > changes in v3: > - remove unnecessary code change. > changes in v2: > - remove unnecessary indent change. > - change commit log. > > drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c > index 38b8bc9..f8ef7e2 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c > @@ -353,7 +353,7 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, > return -1; > } > > - if (dev->vhostfd >= 0) { > + if (!dev->is_server) { > if (dev->ops->send_request(dev, VHOST_USER_SET_OWNER, > NULL) < 0) { > PMD_INIT_LOG(ERR, "set_owner fails: %s", > -- > 2.7.4 > Reviewed-by: Tiwei Bie