sockets: must include header files in tarball

The sockets provider .h files must (eventually) be listed in a
_SOURCES or EXTRA_DIST Makefile.am value so that Automake will
include them in distribution tarballs.

This commit removes the sym link for indexer.h, because there was no
-I set to prov/src/sockets to pick up that file, so the build was just
picking up include/indexer.h, anyway.

This raises another point: should indexer.c be sym linked to
prov/src/sockets?  It seems like this is another facett of the ongoing
"common sources" debate on #207.

This is part of the fix for #219.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
Makefile.am: don't distribute the DIRECT header files

Separate installing DIRECT header files from including them in the
tarball.

* By adding "nodist_" to the front of the existing
  AM_CONDITIONAL-protected rdmainclude_HEADERS AM list of DIRECT
  headers, Automake will install the headers when directed.  However,
  Automake will *not* automatically include these files in "make
  dist"-generated tarballs.
* Each provider is responsible for adding their DIRECT header files to
  EXTRA_DIST.

Each provider is responsible for adding its DIRECT header files to
EXTRA_DIST.  We can't list the parameterized list of DIRECT header
files to be installed to the dist list because the value of
$(PROVIDER_DIRECT) is irrelevant (and may well be empty).

Fixes #219

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
fi_tostr: remove trailing newlines  (fi_info already adds a newline)
Addresses #226

Signed-off-by: Reese Faucette <rfaucett@cisco.com>
verbs: DL filename should be "verbs", not "ibverbs"

The provider name is "verbs" everywhere else.  Make the DL filename
match / be consistent.
Merge pull request #230 from jsquyres/pr/verbs-updates

verbs: DL filename should be "verbs", not "ibverbs"
Merge pull request #220 from jsquyres/pr/fix-direct-make-dist

2 fixes for "make dist"
Merge pull request #228 from rfaucett/pr/tostr_no_newline

fi_tostr: remove trailing newlines  (fi_info already adds a newline)
common/rbuf: Handle ring buffer wrapping

Handle when the ring buffer wraps for reads and writes.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
common: Add write commit capability to ring buffer

The ring buffer requires that all data to be added
to a ring buffer be written with a single call.  As soon as
the data is written, a reader may extract it.  This behavior
can result in a caller needing to stage its data into a
temporary buffer until the write can be issued.

Instead, allow multiple writes to occur to the ring buffer
with a commit call being used to indicate that the newly
inserted data is now safe for reading.  This avoids the need
to use a temporary buffer, with the ring buffer updated directly.

Add an abort call for good measure.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
common: Add const to ringbuf write calls

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
prov/sockets: Implement transmit context

A transmit context is an abstraction over a ring buffer, with
the ability to wait on an fd if the ring buffer is empty, until
an item is inserted into it.

Items are inserted into the transmit context when a data transfer
is initiated by the application.  The progress engine pulls
operations from the transmit context for processing.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
include/fi.h: include string.h

ffsll requires string.h

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

include/fi.h: include string.h
prov/psm: document the assumption on the "event_in" parameter.

This parameter was added to the event creation routine to allow
the event being written to the user buffer directly, bypassing
the steps of allocating/enqueuing/dequeuing a new event. The user
buffer only has space for the CQ entry of the current CQ format.
Any provider provate information should not be written to it.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: implement cq_writeerr

Also allow writing multiple events with cq_write.

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: finish 'len' to 'count' conversion of CQ read functions

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: add count to event queue to support read threadhold

Signed-off-by: Jianxin Xiong <jianxin.xiong@intel.com>
prov/psm: allow returning multiple events in a single CQ read call

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

base socket provider TX context implementation
Makefile.am: fix "make dist"

Several files were renamed in 15352c63c239af1aad43f551123facf49448efe7
without also fixing their entries in Makefile.am.

Signed-off-by: Jeff Squyres <jsquyres@cisco.com>