From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 5F61B5398 for ; Wed, 12 Jul 2017 16:36:23 +0200 (CEST) Received: from pure.maildistiller.com (unknown [10.110.50.29]) by dispatch1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTP id 688DF6005A; Wed, 12 Jul 2017 14:36:23 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx5-us1.ppe-hosted.com (unknown [10.110.49.251]) by pure.maildistiller.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 8884F6006A; Wed, 12 Jul 2017 14:36:21 +0000 (UTC) Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx5-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id D0AF46000AC; Wed, 12 Jul 2017 14:36:21 +0000 (UTC) Received: from [192.168.239.128] (85.187.13.33) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 12 Jul 2017 15:36:15 +0100 To: Remy Horton , CC: Ivan Malov References: <1499528715-1510-1-git-send-email-arybchenko@solarflare.com> From: Andrew Rybchenko Message-ID: <917d8ca3-055f-6f5c-bb6c-aa48671c5cca@solarflare.com> Date: Wed, 12 Jul 2017 17:36:09 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.33] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23190.003 X-TM-AS-Result: No--2.244500-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1499870182-zhyz7bQ0C+nV Subject: Re: [dpdk-dev] [PATCH] net/sfc: add support for xstats retrieval by ID 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: Wed, 12 Jul 2017 14:36:23 -0000 On 07/12/2017 05:18 PM, Remy Horton wrote: > > On 08/07/2017 16:45, Andrew Rybchenko wrote: >> From: Ivan Malov >> >> Signed-off-by: Ivan Malov >> Signed-off-by: Andrew Rybchenko > [..] > > Reviewed-by: Remy Horton > > >> + rc = sfc_port_update_mac_stats(sa); >> + if (rc != 0) { >> + SFC_ASSERT(rc > 0); >> + ret = -rc; > > sfc_port_update_mac_stats() really ought to be returning -EINVAL or > -ENOMEM rather than EINVAL/ENOMEM then doing a negation here. It is the decision made on driver implementation to convert to negative errno at rte_eth_dev_ops return. Inside the driver we use positive errno since base driver uses positive errno and a number of places where base driver API is called (and conversion would be required) is significantly bigger than a number of rte_eth_dev_ops. > Other than that, code seems OK.. Many thanks for the review.