From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yw0-f182.google.com (mail-yw0-f182.google.com [209.85.161.182]) by dpdk.org (Postfix) with ESMTP id E41222B88 for ; Tue, 8 Aug 2017 13:03:43 +0200 (CEST) Received: by mail-yw0-f182.google.com with SMTP id u207so18846395ywc.3 for ; Tue, 08 Aug 2017 04:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=T+g4YkDtyxVamGpDMylZ8zlgsfdhlF8eLYSJgKer+0M=; b=xo36GejhhoyRmKwn8GbnNPChkky8JsnHXfHrkCHRn6ynAVqQ7Uc6DmIyRk4QYOVEAx LcKF4oa+t4uWNo8Ozgfqfrjy/hcENRj9YtMV8tRYaCnzRNmimFPuJGswYMBbNUqrbnSM jVQJbCVgztkXlPUROOvhVKqIboslaEWlwlbgHnNqM1mvTNG5kYERFqmCS191o9TAuqiM 7zrr5gGc1IV80CC+1zyPu3DfDfDucktW2IdCfL47prB4l12czBTvYCONoaVbrvnKJt1h K4rysbgfcU08NpZRz2OwZ6dPx/4484NOLw0bWPyx45M8pHjeQe89lYLZzt+65n78yxaN avNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=T+g4YkDtyxVamGpDMylZ8zlgsfdhlF8eLYSJgKer+0M=; b=qYZ4d2TLz7JhnL8ef7Lt1ZeeBbPqJCPTNmoYdyCvKGuynyboQGQcjtV+OVjnS18VZV BefmvrSnBxTG1imFQfyX3fRwo1Q6K8k+jLZoOiCwdk7HcU/2jVLzzFaIDyTg7QJaoCM4 phlHPVtaQ69x9JF0zTqFkGFfHPbPHH1s+jN3tnQb3Z07keXFOWbFt2og966AZK0vRc+I BLYFe3+yldQENpOwudoKPQQekFhtotuO34RwN86iYGRNGv0xydlzSGEIK6Mf3fcwSRZj f4AmDzGFZTDMkQTAsMoyHoo81KD6t6rpFpkIEU/TxBjGgWZ579UxyzsxpDugh6dsSGkU IX/g== X-Gm-Message-State: AHYfb5iqDDeQwgTq6UGkc72YJydKTmQWgEPDsJmFDzQiGC9veJfYcMhV O9Cq3LHIwvR2Q4bd89fEoeR/Djc+eAsk X-Received: by 10.37.214.214 with SMTP id n205mr3099596ybg.233.1502190223201; Tue, 08 Aug 2017 04:03:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.13.239.71 with HTTP; Tue, 8 Aug 2017 04:03:12 -0700 (PDT) In-Reply-To: References: <20170807173914.36750-1-dharton@cisco.com> From: Christian Ehrhardt Date: Tue, 8 Aug 2017 13:03:12 +0200 Message-ID: To: "Van Haaren, Harry" Cc: David Harton , "thomas@monjalon.net" , "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3] ethdev: add return code to rte_eth_stats_reset() 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: Tue, 08 Aug 2017 11:03:44 -0000 On Tue, Aug 8, 2017 at 11:02 AM, Van Haaren, Harry < harry.van.haaren@intel.com> wrote: > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of David Harton > > Sent: Monday, August 7, 2017 6:39 PM > > To: thomas@monjalon.net > > Cc: dev@dpdk.org; David Harton > > Subject: [dpdk-dev] [PATCH v3] ethdev: add return code to > rte_eth_stats_reset() > > > > Some devices do not support reset of eth stats. An application may > > need to know not to clear shadow stats if the device cannot. > > > > rte_eth_stats_reset is updated to provide a return code to share > > whether the device supports reset or not. > > > > Signed-off-by: David Harton > > --- > > Hi, > > As far as I know changing the return type (void to int) of a function does > *not* break ABI, but does "break" API as the application code should now > check the return value. In theory the application could ignore the return > value and current behavior is maintained. > After discussing with Harry on IRC it turns out we both ended up checking the same online sources to verify our thoughts, like [1]. Given this and several other sources it seems to be as outlined above an API but not ABI break. I'm not an expert and this is mostly opinion, but my personal rule mostly is: "if in doubt bump it". Running similar issues I was the one providing [2] for a reason, with this here being a case that appears safe but there eventually always seems to come up an architecture or alternative compiler which does some arcane register juggling differently and makes those "safe" changes breaking people after the fact. [1]: https://stackoverflow.com/questions/15626579/c-abi-is-it-safe-to-change-void-function-to-return-int [2]: http://dpdk.org/doc/guides/contributing/versioning.html#setting-a-major-abi-version