From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 326B3A0613 for ; Wed, 28 Aug 2019 09:06:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A557D1C210; Wed, 28 Aug 2019 09:06:50 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [148.163.129.52]) by dpdk.org (Postfix) with ESMTP id 9C67E1C209 for ; Wed, 28 Aug 2019 09:06:49 +0200 (CEST) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id BDD4448006A; Wed, 28 Aug 2019 07:06:47 +0000 (UTC) Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 28 Aug 2019 08:06:41 +0100 To: Stephen Hemminger CC: Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , , Ivan Ilchenko References: <1566915962-5472-1-git-send-email-arybchenko@solarflare.com> <1566915962-5472-14-git-send-email-arybchenko@solarflare.com> <20190827161716.5fc8da8c@xps13> From: Andrew Rybchenko Message-ID: Date: Wed, 28 Aug 2019 10:06:37 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190827161716.5fc8da8c@xps13> Content-Language: en-GB X-Originating-IP: [91.220.146.112] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24874.003 X-TM-AS-Result: No-10.005500-8.000000-10 X-TMASE-MatchedRID: byfwvk+IcRm8rRvefcjeTSZ6hERbr2kd69aS+7/zbj+qvcIF1TcLYH1p a9OL1UpK1bNT+YxZ+GC9y8dYwYlbb8x079ojRyOifJy8LojR0khLXPA26IG0hN9RlPzeVuQQ0iS XG6dWPlt6MQBmHY4qa+xk8J0aUVvvgf/08QmpVvoylU6xjA3vwzVfUuzvrtymdow3WKW6wpmjRg atoYtnQLqKFeQ6Aaust6rTa1SV7RPfiuiwHuy4JHCO70QAsBdCyeUl7aCTy8iL/1VAwTdz//NO7 flRFqXmiZmfBZYgGr83zrYamgehbiwwtxRkxyN3aFAKyqG5M2IVbsuWE4d/t8O/l0Ny5PZ5VS7h 0xs0g5n90P+j55yfoB3DeMfpbWC9rHiuTc6rhYYHGzB42DcRoYWQKSQHRQw2myiLZetSf8nJ4y0 wP1A6AKEwgORH8p/AIhDmZnlKoc+Y4yy6eyR5mLxD1cPepb7a/pPMaFnMbr9rxjIsXS6L3cxUaZ DnPznLcHvB9CgMDK+R5/FWC34n++WE1p6fN1gK4i7TxVNrMrNfCOKFKuVYGg== X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--10.005500-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24874.003 X-MDID: 1566976009-uTKxxup1strU Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH 13/51] net/netvsc: check status of getting ethdev info 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 8/27/19 11:17 PM, Stephen Hemminger wrote: > On Tue, 27 Aug 2019 15:25:24 +0100 > Andrew Rybchenko wrote: > >> From: Ivan Ilchenko >> >> rte_eth_dev_info_get() return value was changed from void to int, >> so this patch modify rte_eth_dev_info_get() usage across >> net/netvsc according to its new return type. >> >> Signed-off-by: Ivan Ilchenko >> Signed-off-by: Andrew Rybchenko >> --- >> drivers/net/netvsc/hn_vf.c | 10 +++++++++- >> 1 file changed, 9 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/netvsc/hn_vf.c b/drivers/net/netvsc/hn_vf.c >> index 03f855b..b6b1e5d 100644 >> --- a/drivers/net/netvsc/hn_vf.c >> +++ b/drivers/net/netvsc/hn_vf.c >> @@ -176,8 +176,16 @@ static void hn_vf_info_merge(struct rte_eth_dev *vf_dev, >> struct rte_eth_dev_info *info) >> { >> struct rte_eth_dev_info vf_info; >> + int ret; >> + >> + ret = rte_eth_dev_info_get(vf_dev->data->port_id, &vf_info); >> + if (ret != 0) { >> + PMD_DRV_LOG(ERR, >> + "Error during getting device (port %u) info: %s\n", >> + vf_dev->data->port_id, strerror(-ret)); >> >> - rte_eth_dev_info_get(vf_dev->data->port_id, &vf_info); >> + return; >> + } >> > I would prefer that the driver api callback change to return an > error and not add more log messages. > > Or maybe this patch is temporary until you get there in the patchset. Got it. We'll change hn_vf_info_merge() and hn_vf_info_get() to return int in this patch, but the return value will be ignored hn_dev_info_get() before the patch which changes dev_infos_get prototype to return int (that patch will be huge since it should update all drivers at once, so it is better to preparation here). Thanks.