From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH] vhost: refine the vhost_new_device Date: Fri, 8 Jun 2018 16:05:11 +0200 Message-ID: References: <1528449484-8664-1-git-send-email-xiangxia.m.yue@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: xiangxia.m.yue@gmail.com, dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id C0F425F5D for ; Fri, 8 Jun 2018 16:05:13 +0200 (CEST) In-Reply-To: <1528449484-8664-1-git-send-email-xiangxia.m.yue@gmail.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 06/08/2018 11:18 AM, xiangxia.m.yue@gmail.com wrote: > From: Tonghao Zhang > > Make sure find avalid device id before allocating > virtio_net, if not, return directly. It may avoid > allocating and freeing virtio_net when there is > not valid device id. > > Signed-off-by: Tonghao Zhang > --- > lib/librte_vhost/vhost.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > Reviewed-by: Maxime Coquelin