[dpdk-dev] [PATCH v3 01/10] table: added structure for storing table stats

Stephen Hemminger stephen at networkplumber.org
Thu May 28 23:41:17 CEST 2015


On Thu, 28 May 2015 19:32:32 +0000
"Dumitrescu, Cristian" <cristian.dumitrescu at intel.com> 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)
	}


More information about the dev mailing list