From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id D9BC31B13B for ; Fri, 28 Sep 2018 09:49:46 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2BDA14E902; Fri, 28 Sep 2018 07:49:46 +0000 (UTC) Received: from [10.36.112.48] (ovpn-112-48.ams2.redhat.com [10.36.112.48]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A1ABE1042558; Fri, 28 Sep 2018 07:49:43 +0000 (UTC) To: Ye Xiaolong Cc: dev@dpdk.org, Tiwei Bie , Zhihong Wang , xiao.w.wang@intel.com, Rami Rosen , Wang Haiyue References: <20180926090638.4705-1-xiaolong.ye@intel.com> <20180928112344.42791-1-xiaolong.ye@intel.com> <20180928112344.42791-3-xiaolong.ye@intel.com> <20180928143353.GA44187@intel.com> From: Maxime Coquelin Message-ID: Date: Fri, 28 Sep 2018 09:49:41 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180928143353.GA44187@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 28 Sep 2018 07:49:46 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v7 2/2] examples/vdpa: introduce a new sample for vDPA 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, 28 Sep 2018 07:49:47 -0000 On 09/28/2018 04:33 PM, Ye Xiaolong wrote: > On 09/28, Maxime Coquelin wrote: >>> + ret = rte_eal_init(argc, argv); >>> + if (ret < 0) >>> + rte_exit(EXIT_FAILURE, "eal init failed\n"); >>> + argc -= ret; >>> + argv += ret; >>> + >>> + data_init(); >> >> You need to check return from data_init(). >> If this is fine for you, I can change to below code when applying: >> >> ret = data_init(); >> if (ret < 0) >> rte_exit(EXIT_FAILURE, "data init failed\n"); >> >> > > I'm fine with this change. Or even better, get rid of data_init and call rte_vdpa_get_device_num(); in main directly. > Thanks, > Xiaolong >