change debug messages to error level messages

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
adding connection caching

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
renaming session type enum

Replace XIO_SESSION_{REQ|REP} with XIO_SESSION_{CLINET|SERVER}
Old names were left in the header file for now in order not to
break current apllications.

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
rename xio_release_connection_hello

Rename xio_release_connection_hello to xio_connection_release_hello
as all other release API have the form of xio_connection_release_XXX

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
rename conn to connection

Objects of struct xio_connection should be defined as *connection
and not *conn to prevent confusion with obect of struct xio_conn

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
Second session failed to connect when connection is cached

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
cleaning memory after allocation

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
restruct xio_session

Split xio_session.c to 3 files xio_session_server.c for
server specific code and xio_session_client for client
specific code. Common code is left in xio_session.c
A private header file xio_session_priv.h was added and
it contains the prototypes of the fuctions which are
private to the session "class". (static in one file implementation)

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
rename two connection routines

Rename xio_send_connection_hello_{req|rsp} to
xio_connection_send_hello_{req|rsp}.
This is according to all other connection send routines.

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
Event loop was exiting while the wakeup event is still in the epoll
when running the loop again, the epoll exit immidiatly.

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
second session does not change state after connect

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
Performence improvments

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
identations update

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
typo error

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
Add xio_get_timestamp().

The function returns the instantaneous value of get_cycles()
as a 64-bit integer.  This is useful for comparisons with xio
timestamps.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
CMake Build System

Allow building with CMake.  CMake builds are faster,
more portable, and don't use libtool.
Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Compile Fix.

Return error from unexpected condition in xio_on_new_message.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add xio_init() calls in hello_world_mt.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add Eyal's hello_world_mt1.

The example is intended to model the threading and
event loop style used by the Ceph Messenger.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Call xio_init().

Signed-off-by: Matt Benjamin <matt@linuxbox.com>