Externalize TI-RPC and RPC Event Loop

Initial Ganesha integration with updated TI-RPC.  The
most visible change is a new plug-out event loop (which
internally uses EPOLL).  A set of event service threads
deal with accepting new connections and I/O events on
new connections (a starter mapping of 5 threads to channels,
with modular assignment of new connections to 2 TCP channel
threads is provided).

Internally in TI-RPC, various scaling assumptions are removed,
including fixed arrays of fds, locks, etc.

Most files are touched only to rename Ganesha's internal
wrapper "rpc.h" to "ganesha_rpc.h," since the former
overloads the public RPC header name.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add contrib-install target, and README.TIRPC.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fetch correct TI-RPC repository and branch, to the correct
location.  Calls autogen.sh.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Use new xdr_inline interface.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Replace suspect gss_release_buffer calls in Xdr_rpc_gss_unwrap_data.

With TI-RPC allocator shimmed to the Ganesha Buddy allocator, these
calls result in calls to free() on memory from the Buddy system, the
databuf.value appears to have been allocated in XDR.

Current verification:

* informal testing with krb5i and krb5p, using Linux client 3.3.0-rc7
** tested with and without BuddyMalloc enabled
* valgrind

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Initial NFSv40 Callback Channel (push 3)

Implements the following functionality:

* defines rpc call channel abstraction, for v40, linked to nfs_clientid_t
* netid and univeral address handling added, this will likely move to RPC layer
* defines nfs_compound_t and helper routines for compound construction
* adds rpc_call_t and in-line and out-of-line call dispatch models, the latter
  provides for executing an rpc call from a worker thread context, with
  call finalization by a completion function
* support for setup and dispatch of callbacks for testing from outside the
  Ganesha process using a very minimal DBUS event loop--get_client_ids and
* forged CB_RECALL examples included
* some cleanup and completion of SET_CLIENTID implementation, string termination
  problems removed by addition of strlcpy
* support for RPCSEC_GSS callback protection coded and partially verified

Current validation

* CB_NULL AUTH_NULL verified against stock Linux 2.3.30-rc7
* CB_COMPOUND AUTH_NULL verified using wire traces and Linux 2.3.30-rc7
  modified to accept callbacks over AUTH_NULL channel
* CB_NULL RPCSEC_GSS verified against stock Linux 2.3.30-rc7
* CB_COMPOUNT RPCSEC_GSS failing on reply, debugging this

Includes contributions from Lee Dobryden <lee@linuxbox.com>.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Disable AVL debug sanity lookup in set_deleted.  It's not free.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add AUTH_UNIX v40 backchannel authentication.

The change is by Marc Eshel, but the authunix_createdefault
return is checked for NULL before assignment.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Add an O(1) expected entry cache to HashTable.

A flags member is added to hash_parameter_t.  Adding flag
HASH_FLAG_CACHE enables caching of ht->parameter.cache_entry_count
entries per partition (defaults to 32K).  By default, nothing is
cached.  Caching behavior is added to the cache inode, SAL clientid
and stateid.  Caching found to be particularly UNSUITABLE for the
current TCP DRC hash table.  Cache hits, misses, and clears are
logged a FULL_DEBUG on COMPONENT_HASHTABLE_CACHE.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Avoid (unlikely) invalid access in HashTable_DeleteLatched.

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

Conflicts:

	src/HashTable/HashTable.c

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Remove last trace of xprt_copy.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix Kerberos configuration and strict compile failures

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

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix GIT repo URL & break command into clone + checkout (for
older versions of GIT).

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Update README.TIRPC.  Don't mention the libtirpc repository and
branch there, so it can't get out of sync with tirpc.sh.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Now make KRBLIBS test work again in environments where
krb5-config --libs doesn't include a link flag (now that
Adam has it working on the ones that do).

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Remove calls to svc_xprt_dump_xprts.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix two warnings, one a repeatable array bounds error.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Fix incorrect free gweakref_delete_impl.  Add an expected entry
cache to generic_weakref, closel similar to that already added
conditionally to HashTable.

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