fabric: Return open fabric/domain object from fi_getinfo

If an application makes a call to fi_getinfo and an existing
fabric/domain has been opened against the getinfo
output data, return the exising objects to the user.

This simplifies things for the app trying to determine if
it has already opened the returned fabric or domain.  Instead of
needing to search based on the fabric/domain string, it is given
a pointer to the opened objects.  The app is free to ignore the
returned value and open a new object.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
fabric: Add CQ writerr routine

Clarify the behavior of CQ write() and provide a separate routine
for inserting errors into the CQ.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Merge pull request #183 from pmmccorm/master

Fix dlopen configure switch.
Based on my reading of the autoconf manual, AC_ARG_WITH is to be used with external packages, so I believe that this change is desired anyway, versus using AC_ARG_ENABLE.
fabric: Convert CQ len from byte to count

Now that the CQ has been separated from the EQ, it actually makes
more sense to have it accept and return a count of entries found,
rather than the size, since each entry is a fixed size.

This fixes a quirk in the API with fi_cq_readfrom, where len
applies to the buf, but the number of src_addr's is unknown.  Now
the count will apply to both fields.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
man: Spell check update

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
fi_tostr: add print support for FI_MSG_PREFIX

Signed-off-by: Reese Faucette <rfaucett@cisco.com>
Merge pull request #184 from rfaucett/tostr

fi_tostr: add print support for FI_MSG_PREFIX
Merge branch 'dev'
compiler: do not use symbols with beginning with __

Symbols beginning with double underscore are in the namespace of the
compiler.  Rename:

* __fi_allocinfo --> fi_allocinfo_internal
* __fi_freeinfo --> fi_freeinfo_internal
* __fi_datatype_size --> fi_datatype_size_table
fabric/cq: Rename FI_ADDR_UNSPEC to FI_ADDR_NOTAVAIL

"UNSPEC" is used in other places for an app to signal that they
have not selected a specific value.  In the case of cq readfrom,
we're really wanting to return that no address is available, not
that is is unspecified.

FI_ADDR_UNSPEC will be added back in a later patch, but with
a meaning that aligns with other use cases for 'UNSPEC'.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
fabric/wait: Rename FI_WAIT_UNSPECIFIED to FI_WAIT_UNSPEC

Keep consistent naming across interfaces.  UNSPEC is used
elsewhere.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
fabric/eq: Replace enum in EQ read/write calls with uint32_t

Vendor and user defined event types are supported through the EQ.
Replace the use of enum fi_eq_event with a uint32_t to allow
the use of non-enum values for events.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
prov/psm: remove the now unused constant PSMX_OUI_INTEL

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/verbs: Return ENODATA if no verbs device

If the verbs provider is enabled, but no verbs device is
present, return ENODATA from fi_getinfo.  We need to trap
for ENODEV from rdma_getaddrinfo() and convert it to
ENODATA, so that the next app will be called.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
fabric/av: Replace FI_ADDR_PROTO with FI_ADDR_UNSPEC

Allow apps to indicate that they don't care what address
format is used, and that the provider should indicate
the actual format.  Provider specific formats are usable
by setting the upper bit in the address format.  This
eliminates the need for FI_ADDR_PROTO.  Apps can still
treat the address as opaque if they care, but now the
real address format is provided back by the provider.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
prov/psm: use a global structure for environment settings

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: rework the tag bit reservation algorithm

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
Merge pull request #186 from jsquyres/topic/compiler-namespace-fixes

compiler: do not use symbols with beginning with __
Merge pull request #188 from shefty/master

Updates to CQ APIs
Merge branch 'master' of ssh://github.com/ofiwg/libfabric