include: optional function availability by macros

Some functions - inject, eq_readfrom, etc. are optional for
providers. This patch introduces macros that enable applications
to check if these functions are available.

Signed-off-by: Sayantan Sur <sayantan.sur@intel.com>
Merge pull request #65 from sayantansur/fi-optional-functions

include: optional function availability by macros
Merge pull request #74 from shefty/master

Expand endpoint and domain attributes
prov/psm: set funcptr to NULL for unsupported optional functions

This is required by the FI_CHECK_OP macro. Non-optional functions
continue to use the return value -ENOSYS to indicate unsupported
status.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: decouple domain creation from ep_cap

Some domain features are optional. Their settings depend on the
capabilities of the endpoints being opened. This patch allows
these optional features be turned on incrementallys, at the
time of endpoint opening.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: prevent the creation of EPs with resource confliction

Due to the limitation of PSM, all EPs share a single PSM endpoint
and PSM message queue. Two EPs exposing the same communication
interface would have confliction when accessing the shared PSM
resource. For example, we can't prevent a tagged message meant
to sent to one EP from being received by another instead.

To ensure correctness, we allow multiple EPs only if they don't
expose overlapping communication interface. For example, it is
allowed to have one EP for tagged messaging, another EP for
regular message queue, and yet another EP for RMA and atomics.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: remove the global psmx_ep_cap that is no longer used

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Merge pull request #75 from j-xiong/master

prov/psm: cleanup after the domain attr change; multiple EPs; FI_CHECK_OP support
fabric: Add fi_addr_t datatype for mapped addresses

Introduce a new datatype for addresses that have been mapped
by an AV.  fi_addr_t is a 64-bit address, which is returned by
an AV insert or map call.  Update all unconnected data transfer
calls to accept this address type as input.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
man: Update man pages to reflect changes to fi_addr_t

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
fabric: Modify EQ readfrom to return fi_addr_t

Update EQ completions to return source addressing data in
the form of fi_addr_t.  This allows the source address to be
used in a response.

To support this change, define that connectionless EPs must
be bound to an AV.  Also allow the app to specify is source
addressing data is required, or if the provider can indicate
if it exists.

The EQ readfrom call is no longer listed as optional, however,
whether source data is available is now endpoint dependent.  When
an event is read from an EQ and no source data is available, the
EQ will return FI_ADDR_UNSPEC.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
fabric: Merge fi_info addr format fields

Now that we have fi_addr_t defined for data transfers and event
completions, we can eliminate the addr_format field from fi_info.
"Rename" info_addr_format to just addr_format.  And allow a single
address format to be used for all calls which specify an address:
connect, join, getname, getpeer, AV insert, etc.

We still support opaque protocol specific address formats for
applications that communicate addressing data out of band.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>