[ofiwg] thoughts on initializing libfabric structs

Hefty, Sean sean.hefty at intel.com
Mon Jul 28 14:34:12 PDT 2014


Thanks, Bob, for looking into this.

> In practice, you'd want to exactly preserves each structure as it was
> at each release:
> 
>  struct fabric_foo_rel1 {...};
>  struct fabric_foo_rel2 {...};
>  struct fabric_foo_rel3 {...};
>  typedef fabric_foo_rel3 fabric_foo;

I was starting to reach this same conclusion.

With libibverbs, we were restricted by backwards compatibility.  A new library doesn't have that restriction, so we should be able to define a simple, reasonable model up front.

I was wondering if we even needed version information stored per structure.  libfabric has what is essentially an initial entry point (fi_getinfo).  We could add a version parameter (corresponds to minor version number) to that call, which could be used by provider to select the correct data structures known to the app.  Providers that don't support the specified version would simply fail the call.

Expanding any data structure would bump the minor version number, and we could use the mechanism suggested above whenever a structure is modified.

- Sean



More information about the ofiwg mailing list