-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/smp_lock.h>
-#include <linux/unistd.h>
-#include <net/sock.h>
-#include <net/tcp.h>
-#include <linux/uio.h>
-
-#include <asm/system.h>
-#include <asm/uaccess.h>
-#include <asm/irq.h>
-
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/file.h>
-#include <linux/stat.h>
-#include <linux/list.h>
-#include <linux/kmod.h>
-#include <linux/sysctl.h>
-#include <asm/uaccess.h>
-#include <asm/segment.h>
-#include <asm/div64.h>
-
-#define DEBUG_SUBSYSTEM S_SOCKNAL
-
-#include <linux/kp30.h>
-#include <linux/portals_compat25.h>
-#include <linux/kpr.h>
-#include <portals/p30.h>
-#include <portals/lib-p30.h>
-#include <portals/nal.h>
-#include <portals/socknal.h>
-#include <linux/lustre_idl.h>
-
-#include <linux/lustre_idl.h>
-#define SOCKNAL_N_AUTOCONNECTD 4 /* # socknal autoconnect daemons */
-
-#define SOCKNAL_MIN_RECONNECT_INTERVAL HZ /* first failed connection retry... */
-#define SOCKNAL_MAX_RECONNECT_INTERVAL (60*HZ) /* ...exponentially increasing to this */
-
-/* default vals for runtime tunables */
-#define SOCKNAL_IO_TIMEOUT 50 /* default comms timeout (seconds) */
-#define SOCKNAL_EAGER_ACK 0 /* default eager ack (boolean) */
-#define SOCKNAL_TYPED_CONNS 1 /* unidirectional large, bidirectional small? */
-#define SOCKNAL_ZC_MIN_FRAG (2<<10) /* default smallest zerocopy fragment */
-#define SOCKNAL_MIN_BULK (1<<10) /* smallest "large" message */
-#define SOCKNAL_BUFFER_SIZE (8<<20) /* default socket buffer size */
-#define SOCKNAL_NAGLE 0 /* enable/disable NAGLE? */
-#define SOCKNAL_IRQ_AFFINITY 1 /* enable/disable IRQ affinity? */
-#define SOCKNAL_KEEPALIVE_IDLE 0 /* # seconds idle before 1st probe */
-#define SOCKNAL_KEEPALIVE_COUNT 10 /* # unanswered probes to determine peer death */
-#define SOCKNAL_KEEPALIVE_INTVL 1 /* seconds between probes */
-
-#define SOCKNAL_PEER_HASH_SIZE 101 /* # peer lists */
-
-#define SOCKNAL_SMALL_FWD_NMSGS 128 /* # small messages I can be forwarding at any time */
-#define SOCKNAL_LARGE_FWD_NMSGS 64 /* # large messages I can be forwarding at any time */
-
-#define SOCKNAL_SMALL_FWD_PAGES 1 /* # pages in a small message fwd buffer */
-
-#define SOCKNAL_LARGE_FWD_PAGES (PAGE_ALIGN(PTL_MTU) >> PAGE_SHIFT)
- /* # pages in a large message fwd buffer */