From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v3 01/10] table: added structure for storing table stats Date: Thu, 28 May 2015 14:41:17 -0700 Message-ID: <20150528144117.4d58fada@urahara> References: <1432643987-8916-1-git-send-email-maciejx.t.gajdzica@intel.com> <1432643987-8916-2-git-send-email-maciejx.t.gajdzica@intel.com> <20150526075754.791473f6@urahara> <3EB4FA525960D640B5BDFFD6A3D891263236CA8C@IRSMSX108.ger.corp.intel.com> <20150526145732.022b5a41@urahara> <3EB4FA525960D640B5BDFFD6A3D891263236E6E6@IRSMSX108.ger.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: "dev@dpdk.org" To: "Dumitrescu, Cristian" Return-path: Received: from mail-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by dpdk.org (Postfix) with ESMTP id A63C6CF9 for ; Thu, 28 May 2015 23:41:14 +0200 (CEST) Received: by pdfh10 with SMTP id h10so50574931pdf.3 for ; Thu, 28 May 2015 14:41:14 -0700 (PDT) In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D891263236E6E6@IRSMSX108.ger.corp.intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 28 May 2015 19:32:32 +0000 "Dumitrescu, Cristian" wrote: > This is just adding a new field at the end of an API data structure. Based on input from multiple people and after reviewing the rules listed on http://dpdk.org/doc/guides/rel_notes/abi.html , I think this is an acceptable change. There are other patches in flight on this mailing list that are in the same situation. Any typical/well behaved application will not break due to this change. Expanding a structure can be okay but: 1. The allocation will have to always take within the library. If you let application put structure on stack or allocate on it's own, the ABI would break. 2. The structure must not be used as a return by reference. For example, this would break if sizeof(struct my_stats) changed. void foo() { struct my_stats stats; int i_will_get_clobbered; ... rte_dpdk_get_stats(obj, &stats) }