/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
* vim:expandtab:shiftwidth=8:tabstop=8:
*
- * Copyright (C) 2001, 2002 Cluster File Systems, Inc.
* Author: Zach Brown <zab@zabbo.net>
* Author: Peter J. Braam <braam@clusterfs.com>
* Author: Phil Schwan <phil@clusterfs.com>
* Author: Eric Barton <eric@bartonsoftware.com>
*
- * This file is part of Portals, http://www.sf.net/projects/lustre/
+ * This file is part of Lustre, http://www.lustre.org
*
* Portals is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
#include <asm/segment.h>
#include <asm/div64.h>
-#define DEBUG_SUBSYSTEM S_SOCKNAL
+#define DEBUG_SUBSYSTEM S_NAL
#include <linux/kp30.h>
#include <linux/portals_compat25.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_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_IDLE 30 /* # 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_KEEPALIVE_INTVL 2 /* seconds between probes */
#define SOCKNAL_PEER_HASH_SIZE 101 /* # peer lists */
#define SOCKNAL_TX_LOW_WATER(sk) (((sk)->sk_sndbuf*8)/10)
+#define SOCKNAL_SINGLE_FRAG_TX 0 /* disable multi-fragment sends */
+#define SOCKNAL_SINGLE_FRAG_RX 0 /* disable multi-fragment receives */
+
+/* risk kmap deadlock on multi-frag I/O (backs off to single-frag if disabled).
+ * no risk if we're not running on a CONFIG_HIGHMEM platform. */
+#ifdef CONFIG_HIGHMEM
+# define SOCKNAL_RISK_KMAP_DEADLOCK 0
+#else
+# define SOCKNAL_RISK_KMAP_DEADLOCK 1
+#endif
+
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,72))
# define sk_allocation allocation
# define sk_data_ready data_ready
atomic_t ksnc_tx_nob; /* # bytes queued */
int ksnc_tx_ready; /* write space */
int ksnc_tx_scheduled; /* being progressed */
+
+#if !SOCKNAL_SINGLE_FRAG_RX
+ struct iovec ksnc_rx_scratch_iov[PTL_MD_MAX_IOV];
+#endif
+#if !SOCKNAL_SINGLE_FRAG_TX
+ struct iovec ksnc_tx_scratch_iov[PTL_MD_MAX_IOV];
+#endif
} ksock_conn_t;
#define KSNR_TYPED_ROUTES ((1 << SOCKNAL_CONN_CONTROL) | \