]> git.openfabrics.org - ~shefty/librdmacm.git/commit
rsockets: Add fine grained interception mechanism for preload library
authorSreedhar Kodali <srkodali@linux.vnet.ibm.com>
Thu, 18 Sep 2014 06:03:21 +0000 (11:33 +0530)
committerSean Hefty <sean.hefty@intel.com>
Thu, 25 Sep 2014 18:24:11 +0000 (11:24 -0700)
commitaac8d6f8b1b54027a21e827d99a247036a4d9057
tree34c6603c3ab2b322cf7ca023aa3f2aba2e9f5e4b
parentded4d988b734e4cafbbbd08d9687486b02497616
rsockets: Add fine grained interception mechanism for preload library

By default the R-Sockets pre-loading library intercepts all
the stream and datagram sockets belonging to a launched
program processes and threads.

However, distributed application and database servers may
require fine grained interception to ensure that only the
processes which are listening for remote connections on the
RDMA transport need to be enabled with RDMA while remaining
can continue to use TCP as before.  This allows proper
communication happening between various server components locally.

A configuration file based mechanism is introduced to facilitate
this fine grained interception mechanism.  As part of preload
initialization, the configuration file is scanned and an
in-memory record store is created with all the entries found.
When a request is made to intercept a socket, its attributes
are cross checked with stored records to see whether we
should proceed with rsocket switch over.

Note: Right now, the fine grained interception mechanism is
enabled only for newly created sockets.  Going forward,
this can be extened to select connections based on the
specified host/IP addresses and ports as well.

"preload_config" is the name of the configuration file which
should exist in the default configuration location
(usually the full path to this configuration file is:
<install-root>/etc/rdma/rsocket/preload_config)
of an installed rsocket library.

The sample format for this configuration file is shown below:

# Sample config file for preloading in a program specific way
#
# Each line entry should have the following format:
#
#   program domain type protocol
#
# where,
#
# program    - program or command name (string without spaces)
# domain     - the socket domain: AF_INET / AF_INET6 / AF_IB
# type       - the socket type: SOCK_STREAM / SOCK_DGRAM
# protocol   - the socket protocol: IPPROTO_TCP / IPPROTO_UDP
#
# The wildcard value of '*' is supported for any
#
# Note:
#  Lines beginning with '#' character are treated as comments.

Signed-off-by: Sreedhar Kodali <srkodali@linux.vnet.ibm.com>
Reviewed-by: Pradeep Satyanarayana <pradeeps@linux.vnet.ibm.com>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
src/preload.c