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 5F358A0613 for ; Tue, 27 Aug 2019 22:17:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CDD501C1DC; Tue, 27 Aug 2019 22:17:21 +0200 (CEST) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) by dpdk.org (Postfix) with ESMTP id 4E4BE1C1D0 for ; Tue, 27 Aug 2019 22:17:20 +0200 (CEST) Received: by mail-qk1-f195.google.com with SMTP id p13so310772qkg.13 for ; Tue, 27 Aug 2019 13:17:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cFDJSRg5AD+Qv87dB6g1uLPc7gEQJn6/MwCQhs2NtwY=; b=hK5Q5MXn36f/s8HqruqC+tA81qwjH8SjsFw33BVpWv2zpbTPa+xgHjXam3zqAb/ZxR OaQMXe4T9FapA5MMAabgh5KGIHKCFTAwYdnek463xUmnIbprZM8tv23HbRkTdq1GkOqp QmvgzBPpka6afk/4dDZNXPUgdtLgxZL2/qix7tXOOhO8aggE3usKGudnkjlGV1qubAF1 MQlRXZiywaGPslUA686lHNszGlTR703mv5qmYPVjYmdTKJgTnvcxqoKfm5tta0pCV6lU yY+GW1ivYYjF9YTyfFZOT+tRxllDbGON6yOfozlppIjsIFdpVS7MnT9h4/I6ccrjqv0y +4Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cFDJSRg5AD+Qv87dB6g1uLPc7gEQJn6/MwCQhs2NtwY=; b=MjNil0gPpvKzBmEIMWr3fHQE6dg5mpow3eXxRcAbK+wlF3rzQC4a1kXBIyuijDvfIQ OvD5oIOf84IcH95VAnS0DvqGND1gq3vgOeNe7ngIISipE9c3u2Wcg+zeX4xGT3CWrIUr CdwSiWFiC6XKakm0wUJ9grKQZwcH4VvDKLhN/xi1IfdWDasC7rkdjsMm9rxp/74L4gHu GlrlrRF/L5xapGYqrrLnp5F4xI9zK61XJW6ooWpnU0bTRHfFtcruDhZ1CybyAkffXguc mqqM/XOxtbQS8YZ2ZSuhu3RXo4D8MB8gZIk6QzpmC+1dRFBSVx3c6ve6oagy0UPkDPn/ HgDA== X-Gm-Message-State: APjAAAXE1bd3D0MwaTQXIzjDFYqHGwsPFs4ni46b8S6KzmHq5XVbVsOK SPpfbOIvGf9+Nk4CgOUmSV3fdhQFeS4= X-Google-Smtp-Source: APXvYqytBSbZQbnowo+dWMTFhBjpShqLXD9LfHEXJRZ/44s2M+YrXJm/J9/hmcWHr/EaHKEYZ1tnPQ== X-Received: by 2002:a37:a358:: with SMTP id m85mr412991qke.190.1566937039566; Tue, 27 Aug 2019 13:17:19 -0700 (PDT) Received: from xps13 (pool-96-233-168-28.spfdma.east.verizon.net. [96.233.168.28]) by smtp.gmail.com with ESMTPSA id r189sm231493qkc.60.2019.08.27.13.17.18 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Aug 2019 13:17:19 -0700 (PDT) Date: Tue, 27 Aug 2019 16:17:16 -0400 From: Stephen Hemminger To: Andrew Rybchenko Cc: Stephen Hemminger , "K. Y. Srinivasan" , Haiyang Zhang , , Ivan Ilchenko Message-ID: <20190827161716.5fc8da8c@xps13> In-Reply-To: <1566915962-5472-14-git-send-email-arybchenko@solarflare.com> References: <1566915962-5472-1-git-send-email-arybchenko@solarflare.com> <1566915962-5472-14-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 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.