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 30A35A046B for ; Tue, 23 Jul 2019 14:16:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 184F81C012; Tue, 23 Jul 2019 14:16:20 +0200 (CEST) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 6AF621BFE7; Tue, 23 Jul 2019 14:16:16 +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-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 6A25178006B; Tue, 23 Jul 2019 12:16:15 +0000 (UTC) Received: from [192.168.1.11] (85.187.13.152) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 23 Jul 2019 13:16:09 +0100 To: Ferruh Yigit , Thomas Monjalon CC: , References: <1563873208-5096-1-git-send-email-arybchenko@solarflare.com> <09016541-b6d3-61b0-bfbe-8af4394a3b45@intel.com> From: Andrew Rybchenko Message-ID: <580e3eb6-6011-307c-5480-ffd9c7539b53@solarflare.com> Date: Tue, 23 Jul 2019 15:16:06 +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: <09016541-b6d3-61b0-bfbe-8af4394a3b45@intel.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [85.187.13.152] 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-24788.000 X-TM-AS-Result: No-3.795600-8.000000-10 X-TMASE-MatchedRID: O/y65JfDwwvmLzc6AOD8DfHkpkyUphL9IrMoP5XxqGfg91xayX4L81Zd F0VJxFbiJxk8LaZtmm3jIoyR5q0xuTwe897U/PjCGUlF/M3Dxp9XjjsM2/Dfxg+uQqaGoL3/KNB KgNd80HPsUYQXO6Ssxj6i1GghXe9IkfRhdidsajM5f9Xw/xqKXZwhktVkBBrQxq9PbUOwsP9QSF bL1bvQAVgXepbcl7r7In+2kwYVl1BETKEzj1evLzgGXXDImUxTSABg0RmfpYM+7GHt2J8H7/CzW HMLEBcOP6qnFRP5QyuX8Ke3TcsbZZ6vRsOVCEqI8B1+fkPI48NcLq4mdz+nRKyCWSW0HzF0amjO S5qVJMM7pyVyc/F9UH7cGd19dSFd X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--3.795600-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24788.000 X-MDID: 1563884176-uKQIidyek87n Subject: Re: [dpdk-stable] [PATCH] ethdev: avoid usage of uninit device info in bad port case X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On 7/23/19 1:40 PM, Ferruh Yigit wrote: > On 7/23/2019 10:13 AM, Andrew Rybchenko wrote: >> rte_eth_dev_info_get() returns void and caller does know if the function >> does its job or not. Changing of the return value to int would be >> API/ABI breakage which requires deprecation process and cannot be >> backported to stable branches. For now, make sure that device info is >> initialized even in the case of invalid port ID. > +1 to return a status from function for long term. Thomas, what do you think? Should we finally fix it? I think it is almost harmless API/ABI breakage. If yes, I'll send deprecation notice to do it in v19.11. > But someone looks below code can think we are doing an unnecessary memset for > the error case, and will fix it :) > What do you think adding a comment to prevent this? See v2.