[Pkg-lustre-svn-commit] updated: [7227682] Use newer patchless support patch from upstream bugzilla - lnet part
Patrick Winnertz
winnie at debian.org
Wed Nov 26 11:11:48 UTC 2008
The following commit has been merged in the master branch:
commit 7227682c80558abbce8abc11bda78a5b82ee1570
Author: Patrick Winnertz <winnie at debian.org>
Date: Wed Nov 26 12:03:32 2008 +0100
Use newer patchless support patch from upstream bugzilla - lnet part
diff --git a/debian/patches/00list b/debian/patches/00list
index 3345d84..81f12d7 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -10,10 +10,7 @@ no-darwin.dpatch
remove-set_tunables.dpatch
libsysio.dpatch
bug12769-ql-fix.dpatch
-operation_101_unconnected_mgs.dpatch
-fix_late_release_pa_structure.dpatch
-bug16906_FULL_state_server_in_recovery.dpatch
-patchless_support_2.6.24.dpatch
+patchless_support_2.6.24_lnet_part.dpatch
# Debian patches
bash_completion.dpatch
lustre_manpage.dpatch
diff --git a/debian/patches/patchless_support_2.6.24_lnet_part.dpatch b/debian/patches/patchless_support_2.6.24_lnet_part.dpatch
new file mode 100644
index 0000000..cdd8dbe
--- /dev/null
+++ b/debian/patches/patchless_support_2.6.24_lnet_part.dpatch
@@ -0,0 +1,2306 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## posix_acl.patch by Patrick Winnertz <winnie at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Patch which will enable 2.6.24 patchless support for lustre, taken from #14250
+
+ at DPATCH@
+diff -u -p -r1.51.2.10 lustre-lnet.m4
+--- ./lnet/autoconf/lustre-lnet.m4 17 Oct 2008 21:42:10 -0000 1.51.2.10
++++ ./lnet/autoconf/lustre-lnet.m4 17 Nov 2008 07:03:41 -0000
+@@ -1290,6 +1290,58 @@ LB_LINUX_TRY_COMPILE([
+ ])
+ ])
+
++# 2.6.24 request not use real numbers for ctl_name
++AC_DEFUN([LN_SYSCTL_UNNUMBERED],
++[AC_MSG_CHECKING([for CTL_UNNUMBERED])
++LB_LINUX_TRY_COMPILE([
++ #include <linux/sysctl.h>
++],[
++ #ifndef CTL_UNNUMBERED
++ #error CTL_UNNUMBERED not exist in kernel
++ #endif
++],[
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_SYSCTL_UNNUMBERED, 1,
++ [sysctl has CTL_UNNUMBERED])
++],[
++ AC_MSG_RESULT(NO)
++])
++])
++
++# 2.6.24 lost scatterlist->page
++AC_DEFUN([LN_SCATTERLIST_SETPAGE],
++[AC_MSG_CHECKING([for exist sg_set_page])
++LB_LINUX_TRY_COMPILE([
++ #include <linux/scatterlist.h>
++],[
++ sg_set_page(NULL,NULL,0,0);
++],[
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_SCATTERLIST_SETPAGE, 1,
++ [struct scatterlist has page member])
++],[
++ AC_MSG_RESULT(NO)
++])
++])
++
++# 2.6.26 use int instead of atomic for sem.count
++AC_DEFUN([LN_SEM_COUNT],
++[AC_MSG_CHECKING([atomic sem.count])
++LB_LINUX_TRY_COMPILE([
++ #include <asm/semaphore.h>
++],[
++ struct semaphore s;
++
++ atomic_read(&s.count);
++],[
++ AC_MSG_RESULT(yes)
++ AC_DEFINE(HAVE_SEM_COUNT_ATOMIC, 1,
++ [semaphore counter is atomic])
++],[
++ AC_MSG_RESULT(NO)
++])
++])
++
+ #
+ # LN_PROG_LINUX
+ #
+@@ -1333,6 +1385,11 @@ LN_2ARGS_REGISTER_SYSCTL
+ LN_KMEM_CACHE
+ # 2.6.23
+ LN_KMEM_CACHE_CREATE_DTOR
++# 2.6.24
++LN_SYSCTL_UNNUMBERED
++LN_SCATTERLIST_SETPAGE
++# 2.6.26
++LN_SEM_COUNT
+ ])
+
+ #
+Index: lnet/include/libcfs/linux/kp30.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/include/libcfs/linux/Attic/kp30.h,v
+retrieving revision 1.15.2.4
+diff -u -p -r1.15.2.4 kp30.h
+--- ./lnet/include/libcfs/linux/kp30.h 7 Aug 2008 09:50:09 -0000 1.15.2.4
++++ ./lnet/include/libcfs/linux/kp30.h 17 Nov 2008 07:03:41 -0000
+@@ -142,6 +142,12 @@ static inline void our_cond_resched(void
+ #endif
+ #define LASSERT_SEM_LOCKED(sem) LASSERT(down_trylock(sem) != 0)
+
++#ifdef HAVE_SEM_COUNT_ATOMIC
++#define SEM_COUNT(sem) (atomic_read(&(sem)->count))
++#else
++#define SEM_COUNT(sem) ((sem)->count)
++#endif
++
+ #define LIBCFS_PANIC(msg) panic(msg)
+
+ /* ------------------------------------------------------------------- */
+Index: lnet/include/libcfs/linux/linux-prim.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/include/libcfs/linux/Attic/linux-prim.h,v
+retrieving revision 1.10.6.2
+diff -u -p -r1.10.6.2 linux-prim.h
+--- ./lnet/include/libcfs/linux/linux-prim.h 7 Aug 2008 09:50:09 -0000 1.10.6.2
++++ ./lnet/include/libcfs/linux/linux-prim.h 17 Nov 2008 07:03:41 -0000
+@@ -84,6 +84,17 @@ typedef struct ctl_table_header cfs_sys
+ #endif
+ #define cfs_unregister_sysctl_table(t) unregister_sysctl_table(t)
+
++#define DECLARE_PROC_HANDLER(name) \
++static int \
++LL_PROC_PROTO(name) \
++{ \
++ DECLARE_LL_PROC_PPOS_DECL; \
++ \
++ return proc_call_handler(table->data, write, \
++ ppos, buffer, lenp, \
++ __##name); \
++}
++
+ /*
+ * Symbol register
+ */
+Index: lnet/klnds/gmlnd/gmlnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/gmlnd/gmlnd.h,v
+retrieving revision 1.30.6.2
+diff -u -p -r1.30.6.2 gmlnd.h
+--- ./lnet/klnds/gmlnd/gmlnd.h 7 Aug 2008 09:50:20 -0000 1.30.6.2
++++ ./lnet/klnds/gmlnd/gmlnd.h 17 Nov 2008 07:03:41 -0000
+@@ -82,6 +82,7 @@
+ #include "libcfs/kp30.h"
+ #include "lnet/lnet.h"
+ #include "lnet/lib-lnet.h"
++#include "lnet/lnet-sysctl.h"
+
+ /* undefine these before including the GM headers which clash */
+ #undef PACKAGE_BUGREPORT
+Index: lnet/klnds/gmlnd/gmlnd_module.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/gmlnd/gmlnd_module.c,v
+retrieving revision 1.22.12.2
+diff -u -p -r1.22.12.2 gmlnd_module.c
+--- ./lnet/klnds/gmlnd/gmlnd_module.c 7 Aug 2008 09:50:23 -0000 1.22.12.2
++++ ./lnet/klnds/gmlnd/gmlnd_module.c 17 Nov 2008 07:03:41 -0000
+@@ -78,9 +78,34 @@ gmnal_tunables_t gmnal_tunables = {
+ };
+
+ #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
++
++#ifndef HAVE_SYSCTL_UNNUMBERED
++
++enum {
++ GMLND_PORT = 1,
++ GMLND_NTX,
++ GMLND_CREDITS,
++ GMLND_PEERCREDITS,
++ GMLND_NLARGE_TX_BUFS,
++ GMLND_NRX_SMALL,
++ GMLND_NRX_LARGE
++};
++
++#else
++
++#define GMLND_PORT CTL_UNNUMBERED
++#define GMLND_NTX CTL_UNNUMBERED
++#define GMLND_CREDITS CTL_UNNUMBERED
++#define GMLND_PEERCREDITS CTL_UNNUMBERED
++#define GMLND_NLARGE_TX_BUFS CTL_UNNUMBERED
++#define GMLND_NRX_SMALL CTL_UNNUMBERED
++#define GMLND_NRX_LARGE CTL_UNNUMBERED
++
++#endif
++
+ static cfs_sysctl_table_t gmnal_ctl_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = GMLND_PORT,
+ .procname = "port",
+ .data = &port,
+ .maxlen = sizeof (int),
+@@ -88,7 +113,7 @@ static cfs_sysctl_table_t gmnal_ctl_tabl
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = GMLND_NTX,
+ .procname = "ntx",
+ .data = &ntx,
+ .maxlen = sizeof (int),
+@@ -96,7 +121,7 @@ static cfs_sysctl_table_t gmnal_ctl_tabl
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = GMLND_CREDITS,
+ .procname = "credits",
+ .data = &credits,
+ .maxlen = sizeof (int),
+@@ -104,7 +129,7 @@ static cfs_sysctl_table_t gmnal_ctl_tabl
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = GMLND_PEERCREDITS,
+ .procname = "peer_credits",
+ .data = &peer_credits,
+ .maxlen = sizeof (int),
+@@ -112,7 +137,7 @@ static cfs_sysctl_table_t gmnal_ctl_tabl
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 5,
++ .ctl_name = GMLND_NLARGE_TX_BUFS,
+ .procname = "nlarge_tx_bufs",
+ .data = &nlarge_tx_bufs,
+ .maxlen = sizeof (int),
+@@ -120,7 +145,7 @@ static cfs_sysctl_table_t gmnal_ctl_tabl
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 6,
++ .ctl_name = GMLND_NRX_SMALL,
+ .procname = "nrx_small",
+ .data = &nrx_small,
+ .maxlen = sizeof (int),
+@@ -128,7 +153,7 @@ static cfs_sysctl_table_t gmnal_ctl_tabl
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = GMLND_NRX_LARGE,
+ .procname = "nrx_large",
+ .data = &nrx_large,
+ .maxlen = sizeof (int),
+@@ -140,7 +165,7 @@ static cfs_sysctl_table_t gmnal_ctl_tabl
+
+ static cfs_sysctl_table_t gmnal_top_ctl_table[] = {
+ {
+- .ctl_name = 207,
++ .ctl_name = CTL_GMLND,
+ .procname = "gmnal",
+ .data = NULL,
+ .maxlen = 0,
+Index: lnet/klnds/iiblnd/iiblnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/iiblnd/iiblnd.h,v
+retrieving revision 1.13.16.2
+diff -u -p -r1.13.16.2 iiblnd.h
+--- ./lnet/klnds/iiblnd/iiblnd.h 7 Aug 2008 09:50:28 -0000 1.13.16.2
++++ ./lnet/klnds/iiblnd/iiblnd.h 17 Nov 2008 07:03:41 -0000
+@@ -71,6 +71,7 @@
+ #include <libcfs/kp30.h>
+ #include <lnet/lnet.h>
+ #include <lnet/lib-lnet.h>
++#include <lnet/lnet-sysctl.h>
+
+ #include <linux/iba/ibt.h>
+
+Index: lnet/klnds/iiblnd/iiblnd_modparams.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/iiblnd/iiblnd_modparams.c,v
+retrieving revision 1.5.16.2
+diff -u -p -r1.5.16.2 iiblnd_modparams.c
+--- ./lnet/klnds/iiblnd/iiblnd_modparams.c 7 Aug 2008 09:50:31 -0000 1.5.16.2
++++ ./lnet/klnds/iiblnd/iiblnd_modparams.c 17 Nov 2008 07:03:41 -0000
+@@ -119,9 +119,47 @@ kib_tunables_t kibnal_tunables = {
+ * not to truncate the printout; it only needs to be the actual size of the
+ * string buffer if we allow writes (and we don't) */
+
++#ifdef HAVE_SYSCTL_UNNUMBERED
++
++enum {
++ IIBLND_IPIF_BASENAME = 1,
++ IIBLND_SERVICE_NAME,
++ IIBLND_SERVICE_NUMBER,
++ IIBLND_RECONNECT_MIN,
++ IIBLND_RECONNECT_MAX,
++ IIBLND_CONCURRENT_PEERS,
++ IIBLND_CKSUM,
++ IIBLND_TIMEOUT,
++ IIBLND_NTX,
++ IIBLND_CREDITS,
++ IIBLND_PEER_CREDITS,
++ IIBLND_SD_RETRIES,
++ IIBLND_KEEPALIVE,
++ IIBLND_CONCURRENT_SENDS
++};
++
++#else
++
++#define IIBLND_IPIF_BASENAME CTL_UNNUMBERED
++#define IIBLND_SERVICE_NAME CTL_UNNUMBERED
++#define IIBLND_SERVICE_NUMBER CTL_UNNUMBERED
++#define IIBLND_RECONNECT_MIN CTL_UNNUMBERED
++#define IIBLND_RECONNECT_MAX CTL_UNNUMBERED
++#define IIBLND_CONCURRENT_PEERS CTL_UNNUMBERED
++#define IIBLND_CKSUM CTL_UNNUMBERED
++#define IIBLND_TIMEOUT CTL_UNNUMBERED
++#define IIBLND_NTX CTL_UNNUMBERED
++#define IIBLND_CREDITS CTL_UNNUMBERED
++#define IIBLND_PEER_CREDITS CTL_UNNUMBERED
++#define IIBLND_SD_RETRIES CTL_UNNUMBERED
++#define IIBLND_KEEPALIVE CTL_UNNUMBERED
++#define IIBLND_CONCURRENT_SENDS CTL_UNNUMBERED
++
++#endif
++
+ static cfs_sysctl_table_t kibnal_ctl_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = IBBLND_IPIF_BASENAME,
+ .procname = "ipif_basename",
+ .data = &ipif_basename,
+ .maxlen = 1024,
+@@ -129,7 +167,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dostring
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = IIBLND_SERVICE_NAME,
+ .procname = "service_name",
+ .data = &service_name,
+ .maxlen = 1024,
+@@ -137,7 +175,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dostring
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = IIBLND_SERVICE_NUMBER,
+ .procname = "service_number",
+ .data = &service_number,
+ .maxlen = sizeof(int),
+@@ -145,7 +183,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = IIBLND_RECONNECT_MIN,
+ .procname = "min_reconnect_interval",
+ .data = &min_reconnect_interval,
+ .maxlen = sizeof(int),
+@@ -153,7 +191,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 5,
++ .ctl_name = IIBLND_RECONNECT_MAX,
+ .procname = "max_reconnect_interval",
+ .data = &max_reconnect_interval,
+ .maxlen = sizeof(int),
+@@ -161,7 +199,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 6,
++ .ctl_name = IIBLND_CONCURRENT_PEERS,
+ .procname = "concurrent_peers",
+ .data = &concurrent_peers,
+ .maxlen = sizeof(int),
+@@ -169,7 +207,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = IIBLND_CKSUM,
+ .procname = "cksum",
+ .data = &cksum,
+ .maxlen = sizeof(int),
+@@ -177,7 +215,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 8,
++ .ctl_name = IIBLND_TIMEOUT,
+ .procname = "timeout",
+ .data = &timeout,
+ .maxlen = sizeof(int),
+@@ -185,7 +223,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 9,
++ .ctl_name = IIBLND_NTX,
+ .procname = "ntx",
+ .data = &ntx,
+ .maxlen = sizeof(int),
+@@ -193,7 +231,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 10,
++ .ctl_name = IIBLND_CREDITS,
+ .procname = "credits",
+ .data = &credits,
+ .maxlen = sizeof(int),
+@@ -201,7 +239,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 11,
++ .ctl_name = IIBLND_PEER_CREDITS,
+ .procname = "peer_credits",
+ .data = &peer_credits,
+ .maxlen = sizeof(int),
+@@ -209,7 +247,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 12,
++ .ctl_name = IIBLND_SD_RETRIES,
+ .procname = "sd_retries",
+ .data = &sd_retries,
+ .maxlen = sizeof(int),
+@@ -217,7 +255,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 13,
++ .ctl_name = IIBLND_KEEPALIVE,
+ .procname = "keepalive",
+ .data = &keepalive,
+ .maxlen = sizeof(int),
+@@ -225,7 +263,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 14,
++ .ctl_name = IIBLND_CONCURRENT_SENDS,
+ .procname = "concurrent_sends",
+ .data = &concurrent_sends,
+ .maxlen = sizeof(int),
+@@ -237,7 +275,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+
+ static cfs_sysctl_table_t kibnal_top_ctl_table[] = {
+ {
+- .ctl_name = 203,
++ .ctl_name = CTL_IIBLND,
+ .procname = "openibnal",
+ .data = NULL,
+ .maxlen = 0,
+Index: lnet/klnds/mxlnd/mxlnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/mxlnd/mxlnd.h,v
+retrieving revision 1.6.6.2
+diff -u -p -r1.6.6.2 mxlnd.h
+--- ./lnet/klnds/mxlnd/mxlnd.h 7 Aug 2008 09:50:32 -0000 1.6.6.2
++++ ./lnet/klnds/mxlnd/mxlnd.h 17 Nov 2008 07:03:41 -0000
+@@ -85,6 +85,7 @@
+ #include "libcfs/kp30.h"
+ #include "lnet/lnet.h"
+ #include "lnet/lib-lnet.h"
++#include <lnet/lnet-sysctl.h>
+
+ #define MX_KERNEL 1
+ #include "mx_extensions.h"
+Index: lnet/klnds/o2iblnd/o2iblnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/o2iblnd/o2iblnd.h,v
+retrieving revision 1.10.6.3
+diff -u -p -r1.10.6.3 o2iblnd.h
+--- ./lnet/klnds/o2iblnd/o2iblnd.h 7 Aug 2008 09:50:35 -0000 1.10.6.3
++++ ./lnet/klnds/o2iblnd/o2iblnd.h 17 Nov 2008 07:03:42 -0000
+@@ -76,6 +76,7 @@
+ #include <libcfs/kp30.h>
+ #include <lnet/lnet.h>
+ #include <lnet/lib-lnet.h>
++#include <lnet/lnet-sysctl.h>
+
+ #if !HAVE_GFP_T
+ typedef int gfp_t;
+@@ -773,3 +774,14 @@ int kiblnd_send(lnet_ni_t *ni, void *pr
+ int kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed,
+ unsigned int niov, struct iovec *iov, lnet_kiov_t *kiov,
+ unsigned int offset, unsigned int mlen, unsigned int rlen);
++
++/* compat macroses */
++#ifndef HAVE_SCATTERLIST_SETPAGE
++static inline void sg_set_page(struct scatterlist *sg, struct page *page,
++ unsigned int len, unsigned int offset)
++{
++ sg->page = page;
++ sg->offset = offset;
++ sg->length = len;
++}
++#endif
+Index: lnet/klnds/o2iblnd/o2iblnd_cb.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/o2iblnd/o2iblnd_cb.c,v
+retrieving revision 1.12.6.3
+diff -u -p -r1.12.6.3 o2iblnd_cb.c
+--- ./lnet/klnds/o2iblnd/o2iblnd_cb.c 7 Aug 2008 09:50:35 -0000 1.12.6.3
++++ ./lnet/klnds/o2iblnd/o2iblnd_cb.c 17 Nov 2008 07:03:42 -0000
+@@ -643,9 +643,7 @@ kiblnd_setup_rd_iov(lnet_ni_t *ni, kib_t
+ fragnob = min((int)(iov->iov_len - offset), nob);
+ fragnob = min(fragnob, (int)PAGE_SIZE - page_offset);
+
+- sg->page = page;
+- sg->offset = page_offset;
+- sg->length = fragnob;
++ sg_set_page(sg, page, fragnob, page_offset);
+ sg++;
+
+ if (offset + fragnob < iov->iov_len) {
+@@ -708,11 +706,10 @@ kiblnd_setup_rd_kiov (lnet_ni_t *ni, kib
+ fragnob = min((int)(kiov->kiov_len - offset), nob);
+
+ memset(sg, 0, sizeof(*sg));
+- sg->page = kiov->kiov_page;
+- sg->offset = kiov->kiov_offset + offset;
+- sg->length = fragnob;
++ sg_set_page(sg, kiov->kiov_page, fragnob,
++ kiov->kiov_offset + offset);
+ sg++;
+-
++
+ offset = 0;
+ kiov++;
+ nkiov--;
+Index: lnet/klnds/o2iblnd/o2iblnd_modparams.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/o2iblnd/o2iblnd_modparams.c,v
+retrieving revision 1.5.16.2
+diff -u -p -r1.5.16.2 o2iblnd_modparams.c
+--- ./lnet/klnds/o2iblnd/o2iblnd_modparams.c 7 Aug 2008 09:50:36 -0000 1.5.16.2
++++ ./lnet/klnds/o2iblnd/o2iblnd_modparams.c 17 Nov 2008 07:03:42 -0000
+@@ -130,9 +130,48 @@ kib_tunables_t kiblnd_tunables = {
+
+ static char ipif_basename_space[32];
+
++#ifndef HAVE_SYSCTL_UNNUMBERED
++
++enum {
++ O2IBLND_SERVICE = 1,
++ O2IBLND_CKSUM,
++ O2IBLND_TIMEOUT,
++ O2IBLND_NTX,
++ O2IBLND_CREDITS,
++ O2IBLND_PEER_CREDITS,
++ O2IBLND_IPIF_BASENAME,
++ O2IBLND_RETRY_COUNT,
++ O2IBLND_RNR_RETRY_COUNT,
++ O2IBLND_KEEPALIVE,
++ O2IBLND_CONCURRENT_SENDS,
++ O2IBLND_IB_MTU,
++ O2IBLND_FMR_POOL_SIZE,
++ O2IBLND_FMR_FLUSH_TRIGGER,
++ O2IBLND_FMR_CACHE
++};
++#else
++
++#define O2IBLND_SERVICE CTL_UNNUMBERED
++#define O2IBLND_CKSUM CTL_UNNUMBERED
++#define O2IBLND_TIMEOUT CTL_UNNUMBERED
++#define O2IBLND_NTX CTL_UNNUMBERED
++#define O2IBLND_CREDITS CTL_UNNUMBERED
++#define O2IBLND_PEER_CREDITS CTL_UNNUMBERED
++#define O2IBLND_IPIF_BASENAME CTL_UNNUMBERED
++#define O2IBLND_RETRY_COUNT CTL_UNNUMBERED
++#define O2IBLND_RNR_RETRY_COUNT CTL_UNNUMBERED
++#define O2IBLND_KEEPALIVE CTL_UNNUMBERED
++#define O2IBLND_CONCURRENT_SENDS CTL_UNNUMBERED
++#define O2IBLND_IB_MTU CTL_UNNUMBERED
++#define O2IBLND_FMR_POOL_SIZE CTL_UNNUMBERED
++#define O2IBLND_FMR_FLUSH_TRIGGER CTL_UNNUMBERED
++#define O2IBLND_FMR_CACHE CTL_UNNUMBERED
++
++#endif
++
+ static cfs_sysctl_table_t kiblnd_ctl_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = O2IBLND_SERVICE,
+ .procname = "service",
+ .data = &service,
+ .maxlen = sizeof(int),
+@@ -140,7 +179,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = O2IBLND_CKSUM,
+ .procname = "cksum",
+ .data = &cksum,
+ .maxlen = sizeof(int),
+@@ -148,7 +187,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = O2IBLND_TIMEOUT,
+ .procname = "timeout",
+ .data = &timeout,
+ .maxlen = sizeof(int),
+@@ -156,7 +195,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = O2IBLND_NTX,
+ .procname = "ntx",
+ .data = &ntx,
+ .maxlen = sizeof(int),
+@@ -164,7 +203,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 5,
++ .ctl_name = O2IBLND_CREDITS,
+ .procname = "credits",
+ .data = &credits,
+ .maxlen = sizeof(int),
+@@ -172,7 +211,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 6,
++ .ctl_name = O2IBLND_PEER_CREDITS,
+ .procname = "peer_credits",
+ .data = &peer_credits,
+ .maxlen = sizeof(int),
+@@ -180,7 +219,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = O2IBLND_IPIF_BASENAME,
+ .procname = "ipif_name",
+ .data = ipif_basename_space,
+ .maxlen = sizeof(ipif_basename_space),
+@@ -188,7 +227,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dostring
+ },
+ {
+- .ctl_name = 8,
++ .ctl_name = O2IBLND_RETRY_COUNT,
+ .procname = "retry_count",
+ .data = &retry_count,
+ .maxlen = sizeof(int),
+@@ -196,7 +235,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 9,
++ .ctl_name = O2IBLND_RNR_RETRY_COUNT,
+ .procname = "rnr_retry_count",
+ .data = &rnr_retry_count,
+ .maxlen = sizeof(int),
+@@ -204,7 +243,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 10,
++ .ctl_name = O2IBLND_KEEPALIVE,
+ .procname = "keepalive",
+ .data = &keepalive,
+ .maxlen = sizeof(int),
+@@ -212,7 +251,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 11,
++ .ctl_name = O2IBLND_CONCURRENT_SENDS,
+ .procname = "concurrent_sends",
+ .data = &concurrent_sends,
+ .maxlen = sizeof(int),
+@@ -220,7 +259,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 12,
++ .ctl_name = O2IBLND_IB_MTU,
+ .procname = "ib_mtu",
+ .data = &ib_mtu,
+ .maxlen = sizeof(int),
+@@ -229,7 +268,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ },
+ #if IBLND_MAP_ON_DEMAND
+ {
+- .ctl_name = 13,
++ .ctl_name = O2IBLND_FMR_POOL_SIZE,
+ .procname = "fmr_pool_size",
+ .data = &fmr_pool_size,
+ .maxlen = sizeof(int),
+@@ -237,7 +276,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 14,
++ .ctl_name = O2IBLND_FMR_FLUSH_TRIGGER,
+ .procname = "fmr_flush_trigger",
+ .data = &fmr_flush_trigger,
+ .maxlen = sizeof(int),
+@@ -245,7 +284,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 15,
++ .ctl_name = O2IBLND_FMR_CACHE,
+ .procname = "fmr_cache",
+ .data = &fmr_cache,
+ .maxlen = sizeof(int),
+@@ -258,7 +297,7 @@ static cfs_sysctl_table_t kiblnd_ctl_tab
+
+ static cfs_sysctl_table_t kiblnd_top_ctl_table[] = {
+ {
+- .ctl_name = 203,
++ .ctl_name = CTL_O2IBLND,
+ .procname = "o2iblnd",
+ .data = NULL,
+ .maxlen = 0,
+Index: lnet/klnds/openiblnd/openiblnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/openiblnd/openiblnd.h,v
+retrieving revision 1.14.18.2
+diff -u -p -r1.14.18.2 openiblnd.h
+--- ./lnet/klnds/openiblnd/openiblnd.h 7 Aug 2008 09:50:38 -0000 1.14.18.2
++++ ./lnet/klnds/openiblnd/openiblnd.h 17 Nov 2008 07:03:42 -0000
+@@ -74,6 +74,7 @@
+ #include <libcfs/kp30.h>
+ #include <lnet/lnet.h>
+ #include <lnet/lib-lnet.h>
++#include <lnet/lnet-sysctl.h>
+
+ #include <ts_ib_core.h>
+ #include <ts_ib_cm.h>
+Index: lnet/klnds/openiblnd/openiblnd_modparams.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/openiblnd/openiblnd_modparams.c,v
+retrieving revision 1.5.16.2
+diff -u -p -r1.5.16.2 openiblnd_modparams.c
+--- ./lnet/klnds/openiblnd/openiblnd_modparams.c 7 Aug 2008 09:50:40 -0000 1.5.16.2
++++ ./lnet/klnds/openiblnd/openiblnd_modparams.c 17 Nov 2008 07:03:42 -0000
+@@ -100,9 +100,39 @@ kib_tunables_t kibnal_tunables = {
+
+ #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
+
++#ifndef HAVE_SYSCTL_UNNUMBERED
++enum {
++ KIBNAL_IPIF_BASENAME = 1,
++ KIBNAL_N_CONND,
++ KIBNAL_RECONNECT_MIN,
++ KIBNAL_RECONNECT_MAX,
++ KIBNAL_CONCURRENT_PEERS,
++ KIBNAL_CKSUM,
++ KIBNAL_TIMEOUT,
++ KIBNAL_NTX,
++ KIBNAL_CREDITS,
++ KIBNAL_PEER_CREDITS,
++ KIBNAL_KEEPALIVE
++};
++#else
++
++#define KIBNAL_IPIF_BASENAME CTL_UNNUMBERED
++#define KIBNAL_N_CONND CTL_UNNUMBERED
++#define KIBNAL_RECONNECT_MIN CTL_UNNUMBERED
++#define KIBNAL_RECONNECT_MAX CTL_UNNUMBERED
++#define KIBNAL_CONCURRENT_PEERS CTL_UNNUMBERED
++#define KIBNAL_CKSUM CTL_UNNUMBERED
++#define KIBNAL_TIMEOUT CTL_UNNUMBERED
++#define KIBNAL_NTX CTL_UNNUMBERED
++#define KIBNAL_CREDITS CTL_UNNUMBERED
++#define KIBNAL_PEER_CREDITS CTL_UNNUMBERED
++#define KIBNAL_KEEPALIVE CTL_UNNUMBERED
++
++#endif
++
+ static cfs_sysctl_table_t kibnal_ctl_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = KIBNAL_IPIF_BASENAME,
+ .procname = "ipif_basename",
+ .data = &ipif_basename,
+ .maxlen = 1024,
+@@ -110,7 +140,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dostring
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = KIBNAL_N_CONND,
+ .procname = "n_connd",
+ .data = &n_connd,
+ .maxlen = sizeof(int),
+@@ -118,7 +148,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = KIBNAL_RECONNECT_MIN,
+ .procname = "min_reconnect_interval",
+ .data = &min_reconnect_interval,
+ .maxlen = sizeof(int),
+@@ -126,7 +156,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = KIBNAL_RECONNECT_MAX,
+ .procname = "max_reconnect_interval",
+ .data = &max_reconnect_interval,
+ .maxlen = sizeof(int),
+@@ -134,7 +164,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 5,
++ .ctl_name = KIBNAL_CONCURRENT_PEERS,
+ .procname = "concurrent_peers",
+ .data = &concurrent_peers,
+ .maxlen = sizeof(int),
+@@ -142,7 +172,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 6,
++ .ctl_name = KIBNAL_CKSUM,
+ .procname = "cksum",
+ .data = &cksum,
+ .maxlen = sizeof(int),
+@@ -150,7 +180,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = KIBNAL_TIMEOUT,
+ .procname = "timeout",
+ .data = &timeout,
+ .maxlen = sizeof(int),
+@@ -158,7 +188,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 8,
++ .ctl_name = KIBNAL_NTX,
+ .procname = "ntx",
+ .data = &ntx,
+ .maxlen = sizeof(int),
+@@ -166,7 +196,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 9,
++ .ctl_name = KIBNAL_CREDITS,
+ .procname = "credits",
+ .data = &credits,
+ .maxlen = sizeof(int),
+@@ -174,7 +204,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 10,
++ .ctl_name = KIBNAL_PEER_CREDITS,
+ .procname = "peer_credits",
+ .data = &peer_credits,
+ .maxlen = sizeof(int),
+@@ -182,7 +212,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 11,
++ .ctl_name = KIBNAL_KEEPALIVE,
+ .procname = "keepalive",
+ .data = &keepalive,
+ .maxlen = sizeof(int),
+@@ -194,7 +224,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+
+ static cfs_sysctl_table_t kibnal_top_ctl_table[] = {
+ {
+- .ctl_name = 203,
++ .ctl_name = CTL_KIBNAL,
+ .procname = "openibnal",
+ .data = NULL,
+ .maxlen = 0,
+Index: lnet/klnds/ptllnd/ptllnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/ptllnd/ptllnd.h,v
+retrieving revision 1.11.6.2
+diff -u -p -r1.11.6.2 ptllnd.h
+--- ./lnet/klnds/ptllnd/ptllnd.h 7 Aug 2008 09:50:41 -0000 1.11.6.2
++++ ./lnet/klnds/ptllnd/ptllnd.h 17 Nov 2008 07:03:42 -0000
+@@ -76,6 +76,7 @@
+ #include <libcfs/kp30.h>
+ #include <lnet/lnet.h>
+ #include <lnet/lib-lnet.h>
++#include <lnet/lnet-sysctl.h>
+ #include <portals/p30.h>
+ #ifdef CRAY_XT3
+ #include <portals/ptltrace.h>
+Index: lnet/klnds/ptllnd/ptllnd_modparams.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/ptllnd/ptllnd_modparams.c,v
+retrieving revision 1.9.12.2
+diff -u -p -r1.9.12.2 ptllnd_modparams.c
+--- ./lnet/klnds/ptllnd/ptllnd_modparams.c 7 Aug 2008 09:50:42 -0000 1.9.12.2
++++ ./lnet/klnds/ptllnd/ptllnd_modparams.c 17 Nov 2008 07:03:42 -0000
+@@ -156,9 +156,51 @@ kptllnd_init_strtunable(char **str_param
+ }
+ #endif
+
++#ifndef HAVE_SYSCTL_UNNUMBERED
++
++enum {
++ KPTLLND_NTX = 1,
++ KPTLLND_MAX_NODES,
++ KPTLLND_MAX_PROC_PER_NODE,
++ KPTLLND_CHECKSUM,
++ KPTLLND_TIMEOUT,
++ KPTLLND_PORTAL,
++ KPTLLND_PID,
++ KPTLLND_RXB_PAGES,
++ KPTLLND_CREDITS,
++ KPTLLND_PEERCREDITS,
++ KPTLLND_MAX_MSG_SIZE,
++ KPTLLND_PEER_HASH_SIZE,
++ KPTLLND_RESHEDULE_LOOPS,
++ KPTLLND_ACK_PUTS,
++ KPTLLND_TRACETIMEOUT,
++ KPTLLND_TRACEBASENAME,
++ KPTLLND_SIMULATION_BITMAP
++};
++#else
++
++#define KPTLLND_NTX CTL_UNNUMBERED
++#define KPTLLND_MAX_NODES CTL_UNNUMBERED
++#define KPTLLND_MAX_PROC_PER_NODE CTL_UNNUMBERED
++#define KPTLLND_CHECKSUM CTL_UNNUMBERED
++#define KPTLLND_TIMEOUT CTL_UNNUMBERED
++#define KPTLLND_PORTAL CTL_UNNUMBERED
++#define KPTLLND_PID CTL_UNNUMBERED
++#define KPTLLND_RXB_PAGES CTL_UNNUMBERED
++#define KPTLLND_CREDITS CTL_UNNUMBERED
++#define KPTLLND_PEERCREDITS CTL_UNNUMBERED
++#define KPTLLND_MAX_MSG_SIZE CTL_UNNUMBERED
++#define KPTLLND_PEER_HASH_SIZE CTL_UNNUMBERED
++#define KPTLLND_RESHEDULE_LOOPS CTL_UNNUMBERED
++#define KPTLLND_ACK_PUTS CTL_UNNUMBERED
++#define KPTLLND_TRACETIMEOUT CTL_UNNUMBERED
++#define KPTLLND_TRACEBASENAME CTL_UNNUMBERED
++#define KPTLLND_SIMULATION_BITMAP CTL_UNNUMBERED
++#endif
++
+ static cfs_sysctl_table_t kptllnd_ctl_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = KPTLLND_NTX,
+ .procname = "ntx",
+ .data = &ntx,
+ .maxlen = sizeof(int),
+@@ -166,7 +208,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = KPTLLND_MAX_NODES,
+ .procname = "max_nodes",
+ .data = &max_nodes,
+ .maxlen = sizeof(int),
+@@ -174,7 +216,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = KPTLLND_MAX_PROC_PER_NODE,
+ .procname = "max_procs_per_node",
+ .data = &max_procs_per_node,
+ .maxlen = sizeof(int),
+@@ -182,7 +224,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = KPTLLND_CHECKSUM,
+ .procname = "checksum",
+ .data = &checksum,
+ .maxlen = sizeof(int),
+@@ -190,7 +232,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 5,
++ .ctl_name = KPTLLND_TIMEOUT,
+ .procname = "timeout",
+ .data = &timeout,
+ .maxlen = sizeof(int),
+@@ -198,7 +240,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 6,
++ .ctl_name = KPTLLND_PORTAL,
+ .procname = "portal",
+ .data = &portal,
+ .maxlen = sizeof(int),
+@@ -206,7 +248,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = KPTLLND_PID,
+ .procname = "pid",
+ .data = &pid,
+ .maxlen = sizeof(int),
+@@ -214,7 +256,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 8,
++ .ctl_name = KPTLLND_RXB_PAGES,
+ .procname = "rxb_npages",
+ .data = &rxb_npages,
+ .maxlen = sizeof(int),
+@@ -222,7 +264,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 9,
++ .ctl_name = KPTLLND_CREDITS,
+ .procname = "credits",
+ .data = &credits,
+ .maxlen = sizeof(int),
+@@ -230,7 +272,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 10,
++ .ctl_name = KPTLLND_PEERCREDITS,
+ .procname = "peercredits",
+ .data = &peercredits,
+ .maxlen = sizeof(int),
+@@ -238,7 +280,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 11,
++ .ctl_name = KPTLLND_MAX_MSG_SIZE,
+ .procname = "max_msg_size",
+ .data = &max_msg_size,
+ .maxlen = sizeof(int),
+@@ -246,7 +288,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 12,
++ .ctl_name = KPTLLND_PEER_HASH_SIZE,
+ .procname = "peer_hash_table_size",
+ .data = &peer_hash_table_size,
+ .maxlen = sizeof(int),
+@@ -254,7 +296,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 13,
++ .ctl_name = KPTLLND_RESHEDULE_LOOPS,
+ .procname = "reschedule_loops",
+ .data = &reschedule_loops,
+ .maxlen = sizeof(int),
+@@ -262,7 +304,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 14,
++ .ctl_name = KPTLLND_ACK_PUTS,
+ .procname = "ack_puts",
+ .data = &ack_puts,
+ .maxlen = sizeof(int),
+@@ -271,7 +313,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ },
+ #ifdef CRAY_XT3
+ {
+- .ctl_name = 15,
++ .ctl_name = KPTLLND_TRACETIMEOUT,
+ .procname = "ptltrace_on_timeout",
+ .data = &ptltrace_on_timeout,
+ .maxlen = sizeof(int),
+@@ -279,7 +321,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 16,
++ .ctl_name = KPTLLND_TRACEBASENAME,
+ .procname = "ptltrace_basename",
+ .data = ptltrace_basename_space,
+ .maxlen = sizeof(ptltrace_basename_space),
+@@ -290,7 +332,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+ #endif
+ #ifdef PJK_DEBUGGING
+ {
+- .ctl_name = 17,
++ .ctl_name = KPTLLND_SIMULATION_BITMAP,
+ .procname = "simulation_bitmap",
+ .data = &simulation_bitmap,
+ .maxlen = sizeof(int),
+@@ -304,7 +346,7 @@ static cfs_sysctl_table_t kptllnd_ctl_ta
+
+ static cfs_sysctl_table_t kptllnd_top_ctl_table[] = {
+ {
+- .ctl_name = 203,
++ .ctl_name = CTL_PTLLND,
+ .procname = "ptllnd",
+ .data = NULL,
+ .maxlen = 0,
+Index: lnet/klnds/qswlnd/qswlnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/qswlnd/qswlnd.h,v
+retrieving revision 1.36.6.2
+diff -u -p -r1.36.6.2 qswlnd.h
+--- ./lnet/klnds/qswlnd/qswlnd.h 7 Aug 2008 09:50:45 -0000 1.36.6.2
++++ ./lnet/klnds/qswlnd/qswlnd.h 17 Nov 2008 07:03:42 -0000
+@@ -81,6 +81,7 @@
+ #include <libcfs/kp30.h>
+ #include <lnet/lnet.h>
+ #include <lnet/lib-lnet.h>
++#include <lnet/lnet-sysctl.h>
+
+ /* fixed constants */
+ #define KQSW_SMALLMSG (4<<10) /* small/large ep receiver breakpoint */
+Index: lnet/klnds/qswlnd/qswlnd_modparams.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/qswlnd/qswlnd_modparams.c,v
+retrieving revision 1.6.16.1
+diff -u -p -r1.6.16.1 qswlnd_modparams.c
+--- ./lnet/klnds/qswlnd/qswlnd_modparams.c 25 Jul 2008 19:55:33 -0000 1.6.16.1
++++ ./lnet/klnds/qswlnd/qswlnd_modparams.c 17 Nov 2008 07:03:42 -0000
+@@ -87,9 +87,41 @@ kqswnal_tunables_t kqswnal_tunables = {
+ };
+
+ #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
++
++#ifndef HAVE_SYSCTL_UNNUMBERED
++
++enum
++ KQSWNAL_TX_MAXCONTIG = 1,
++ KQSWNAL_NTXMSG,
++ KQSWNAL_CREDITS,
++ KQSWNAL_PEERCREDITS,
++ KQSWNAL_NRXMSGS_LARGE,
++ KQSWNAL_EP_ENVELOPES_LARGE,
++ KQSWNAL_NRXMSGS_SMALL,
++ KQSWNAL_EP_ENVELOPES_SMALL,
++ KQSWNAL_OPTIMIZED_PUTS,
++ KQSWNAL_OPTIMIZED_GETS,
++ KQSWNAL_INJECT_CSUM_ERROR
++};
++#else
++
++#define KQSWNAL_TX_MAXCONTIG CTL_UNNUMBERED
++#define KQSWNAL_NTXMSG CTL_UNNUMBERED
++#define KQSWNAL_CREDITS CTL_UNNUMBERED
++#define KQSWNAL_PEERCREDITS CTL_UNNUMBERED
++#define KQSWNAL_NRXMSGS_LARGE CTL_UNNUMBERED
++#define KQSWNAL_EP_ENVELOPES_LARGE CTL_UNNUMBERED
++#define KQSWNAL_NRXMSGS_SMALL CTL_UNNUMBERED
++#define KQSWNAL_EP_ENVELOPES_SMALL CTL_UNNUMBERED
++#define KQSWNAL_OPTIMIZED_PUTS CTL_UNNUMBERED
++#define KQSWNAL_OPTIMIZED_GETS CTL_UNNUMBERED
++#define KQSWNAL_INJECT_CSUM_ERROR CTL_UNNUMBERED
++
++#endif
++
+ static cfs_sysctl_table_t kqswnal_ctl_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = KQSWNAL_TX_MAXCONTIG,
+ .procname = "tx_maxcontig",
+ .data = &tx_maxcontig,
+ .maxlen = sizeof (int),
+@@ -97,7 +129,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = KQSWNAL_NTXMSG,
+ .procname = "ntxmsgs",
+ .data = &ntxmsgs,
+ .maxlen = sizeof (int),
+@@ -105,7 +137,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = KQSWNAL_CREDITS,
+ .procname = "credits",
+ .data = &credits,
+ .maxlen = sizeof (int),
+@@ -113,7 +145,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = KQSWNAL_PEERCREDITS,
+ .procname = "peer_credits",
+ .data = &peer_credits,
+ .maxlen = sizeof (int),
+@@ -121,7 +153,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 5,
++ .ctl_name = KQSWNAL_NRXMSGS_LARGE,
+ .procname = "nrxmsgs_large",
+ .data = &nrxmsgs_large,
+ .maxlen = sizeof (int),
+@@ -129,7 +161,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 6,
++ .ctl_name = KQSWNAL_EP_ENVELOPES_LARGE,
+ .procname = "ep_envelopes_large",
+ .data = &ep_envelopes_large,
+ .maxlen = sizeof (int),
+@@ -137,7 +169,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = KQSWNAL_NRXMSGS_SMALL,
+ .procname = "nrxmsgs_small",
+ .data = &nrxmsgs_small,
+ .maxlen = sizeof (int),
+@@ -145,7 +177,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 8,
++ .ctl_name = KQSWNAL_EP_ENVELOPES_SMALL,
+ .procname = "ep_envelopes_small",
+ .data = &ep_envelopes_small,
+ .maxlen = sizeof (int),
+@@ -153,7 +185,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 9,
++ .ctl_name = KQSWNAL_OPTIMIZED_PUTS,
+ .procname = "optimized_puts",
+ .data = &optimized_puts,
+ .maxlen = sizeof (int),
+@@ -161,7 +193,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 10,
++ .ctl_name = KQSWNAL_OPTIMIZED_GETS,
+ .procname = "optimized_gets",
+ .data = &optimized_gets,
+ .maxlen = sizeof (int),
+@@ -170,7 +202,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+ },
+ #if KQSW_CKSUM
+ {
+- .ctl_name = 11,
++ .ctl_name = KQSWNAL_INJECT_CSUM_ERROR,
+ .procname = "inject_csum_error",
+ .data = &inject_csum_error,
+ .maxlen = sizeof (int),
+@@ -183,7 +215,7 @@ static cfs_sysctl_table_t kqswnal_ctl_ta
+
+ static cfs_sysctl_table_t kqswnal_top_ctl_table[] = {
+ {
+- .ctl_name = 201,
++ .ctl_name = CTL_KQSWNAL,
+ .procname = "qswnal",
+ .data = NULL,
+ .maxlen = 0,
+Index: lnet/klnds/ralnd/ralnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/ralnd/ralnd.h,v
+retrieving revision 1.17.18.2
+diff -u -p -r1.17.18.2 ralnd.h
+--- ./lnet/klnds/ralnd/ralnd.h 7 Aug 2008 09:50:46 -0000 1.17.18.2
++++ ./lnet/klnds/ralnd/ralnd.h 17 Nov 2008 07:03:43 -0000
+@@ -74,6 +74,7 @@
+ #include <libcfs/kp30.h>
+ #include <lnet/lnet.h>
+ #include <lnet/lib-lnet.h>
++#include <lnet/lnet-sysctl.h>
+
+ #include <rapl.h>
+
+Index: lnet/klnds/ralnd/ralnd_modparams.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/ralnd/ralnd_modparams.c,v
+retrieving revision 1.4.18.2
+diff -u -p -r1.4.18.2 ralnd_modparams.c
+--- ./lnet/klnds/ralnd/ralnd_modparams.c 7 Aug 2008 09:50:47 -0000 1.4.18.2
++++ ./lnet/klnds/ralnd/ralnd_modparams.c 17 Nov 2008 07:03:43 -0000
+@@ -89,9 +89,35 @@ kra_tunables_t kranal_tunables = {
+ };
+
+ #if CONFIG_SYSCTL && !CFS_SYSFS_MODULE_PARM
++
++#ifndef HAVE_SYSCTL_UNNUMBERED
++enum {
++ KRANAL_N_CONND = 1,
++ KRANAL_RECONNECT_MIN,
++ KRANAL_RECONNECT_MAX,
++ KRANAL_NTX,
++ KRANAL_CREDITS,
++ KRANAL_PEERCREDITS,
++ KRANAL_FMA_CQ_SIZE,
++ KRANAL_TIMEOUT,
++ KRANAL_IMMEDIATE_MAX
++};
++#else
++
++#define KRANAL_N_CONND CTL_UNNUMBERED
++#define KRANAL_RECONNECT_MIN CTL_UNNUMBERED
++#define KRANAL_RECONNECT_MAX CTL_UNNUMBERED
++#define KRANAL_NTX CTL_UNNUMBERED
++#define KRANAL_CREDITS CTL_UNNUMBERED
++#define KRANAL_PEERCREDITS CTL_UNNUMBERED
++#define KRANAL_FMA_CQ_SIZE CTL_UNNUMBERED
++#define KRANAL_TIMEOUT CTL_UNNUMBERED
++#define KRENAL_IMMEDIATE_MAX CTL_UNNUMBERED
++#endif
++
+ static cfs_sysctl_table_t kranal_ctl_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = KRANAL_N_CONND,
+ .procname = "n_connd",
+ .data = &n_connd,
+ .maxlen = sizeof(int),
+@@ -99,7 +125,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = KRANAL_RECONNECT_MIN,
+ .procname = "min_reconnect_interval",
+ .data = &min_reconnect_interval,
+ .maxlen = sizeof(int),
+@@ -107,7 +133,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = KRANAL_RECONNECT_MAX,
+ .procname = "max_reconnect_interval",
+ .data = &max_reconnect_interval,
+ .maxlen = sizeof(int),
+@@ -115,7 +141,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = KRANAL_NTX,
+ .procname = "ntx",
+ .data = &ntx,
+ .maxlen = sizeof(int),
+@@ -123,7 +149,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 5,
++ .ctl_name = KRANAL_CREDITS,
+ .procname = "credits",
+ .data = &credits,
+ .maxlen = sizeof(int),
+@@ -131,7 +157,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 6,
++ .ctl_name = KRANAL_PEERCREDITS,
+ .procname = "peer_credits",
+ .data = &peer_credits,
+ .maxlen = sizeof(int),
+@@ -139,7 +165,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = KRANAL_FMA_CQ_SIZE,
+ .procname = "fma_cq_size",
+ .data = &fma_cq_size,
+ .maxlen = sizeof(int),
+@@ -147,7 +173,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 8,
++ .ctl_name = KRANAL_TIMEOUT,
+ .procname = "timeout",
+ .data = &timeout,
+ .maxlen = sizeof(int),
+@@ -155,7 +181,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 9,
++ .ctl_name = KRANAL_IMMEDIATE_MAX,
+ .procname = "max_immediate",
+ .data = &max_immediate,
+ .maxlen = sizeof(int),
+@@ -167,7 +193,7 @@ static cfs_sysctl_table_t kranal_ctl_tab
+
+ static cfs_sysctl_table_t kranal_top_ctl_table[] = {
+ {
+- .ctl_name = 202,
++ .ctl_name = CTL_KRANAL,
+ .procname = "ranal",
+ .data = NULL,
+ .maxlen = 0,
+Index: lnet/klnds/socklnd/socklnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/socklnd/socklnd.h,v
+retrieving revision 1.40.6.1
+diff -u -p -r1.40.6.1 socklnd.h
+--- ./lnet/klnds/socklnd/socklnd.h 25 Jul 2008 19:55:33 -0000 1.40.6.1
++++ ./lnet/klnds/socklnd/socklnd.h 17 Nov 2008 07:03:43 -0000
+@@ -46,6 +46,7 @@
+ #include <lnet/lnet.h>
+ #include <lnet/lib-lnet.h>
+ #include <lnet/socklnd.h>
++#include <lnet/lnet-sysctl.h>
+
+ #define SOCKNAL_PEER_HASH_SIZE 101 /* # peer lists */
+ #define SOCKNAL_RESCHED 100 /* # scheduler loops before reschedule */
+Index: lnet/klnds/socklnd/socklnd_lib-linux.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/socklnd/socklnd_lib-linux.c,v
+retrieving revision 1.11.14.3
+diff -u -p -r1.11.14.3 socklnd_lib-linux.c
+--- ./lnet/klnds/socklnd/socklnd_lib-linux.c 7 Aug 2008 09:50:49 -0000 1.11.14.3
++++ ./lnet/klnds/socklnd/socklnd_lib-linux.c 17 Nov 2008 07:03:43 -0000
+@@ -37,197 +37,261 @@
+ #include "socklnd.h"
+
+ # if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
+-static cfs_sysctl_table_t ksocknal_ctl_table[21];
+
+-cfs_sysctl_table_t ksocknal_top_ctl_table[] = {
+- {
+- .ctl_name = 200,
+- .procname = "socknal",
+- .data = NULL,
+- .maxlen = 0,
+- .mode = 0555,
+- .child = ksocknal_ctl_table
+- },
+- { 0 }
++#ifndef HAVE_SYSCTL_UNNUMBERED
++
++enum {
++ SOCKLND_TIMEOUT = 1,
++ SOCKLND_CREDITS,
++ SOCKLND_PEER_CREDITS,
++ SOCKLND_NCONNDS,
++ SOCKLND_RECONNECTS_MIN,
++ SOCKLND_RECONNECTS_MAX,
++ SOCKLND_EAGER_ACK,
++ SOCKLND_ZERO_COPY,
++ SOCKLND_TYPED,
++ SOCKLND_BULK_MIN,
++ SOCKLND_RX_BUFFER_SIZE,
++ SOCKLND_TX_BUFFER_SIZE,
++ SOCKLND_NAGLE,
++ SOCKLND_IRQ_AFFINITY,
++ SOCKLND_KEEPALIVE_IDLE,
++ SOCKLND_KEEPALIVE_COUNT,
++ SOCKLND_KEEPALIVE_INTVL,
++ SOCKLND_BACKOFF_INIT,
++ SOCKLND_BACKOFF_MAX,
++ SOCKLND_PROTOCOL
+ };
++#else
+
+-int
+-ksocknal_lib_tunables_init ()
+-{
+- int i = 0;
+- int j = 1;
++#define SOCKLND_TIMEOUT CTL_UNNUMBERED
++#define SOCKLND_CREDITS CTL_UNNUMBERED
++#define SOCKLND_PEER_CREDITS CTL_UNNUMBERED
++#define SOCKLND_NCONNDS CTL_UNNUMBERED
++#define SOCKLND_RECONNECTS_MIN CTL_UNNUMBERED
++#define SOCKLND_RECONNECTS_MAX CTL_UNNUMBERED
++#define SOCKLND_EAGER_ACK CTL_UNNUMBERED
++#define SOCKLND_ZERO_COPY CTL_UNNUMBERED
++#define SOCKLND_TYPED CTL_UNNUMBERED
++#define SOCKLND_BULK_MIN CTL_UNNUMBERED
++#define SOCKLND_RX_BUFFER_SIZE CTL_UNNUMBERED
++#define SOCKLND_TX_BUFFER_SIZE CTL_UNNUMBERED
++#define SOCKLND_NAGLE CTL_UNNUMBERED
++#define SOCKLND_IRQ_AFFINITY CTL_UNNUMBERED
++#define SOCKLND_KEEPALIVE_IDLE CTL_UNNUMBERED
++#define SOCKLND_KEEPALIVE_COUNT CTL_UNNUMBERED
++#define SOCKLND_KEEPALIVE_INTVL CTL_UNNUMBERED
++#define SOCKLND_BACKOFF_INIT CTL_UNNUMBERED
++#define SOCKLND_BACKOFF_MAX CTL_UNNUMBERED
++#define SOCKLND_PROTOCOL CTL_UNNUMBERED
++#endif
+
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++static cfs_sysctl_table_t ksocknal_ctl_table[] = {
++ {
++ .ctl_name = SOCKLND_TIMEOUT,
+ .procname = "timeout",
+ .data = ksocknal_tunables.ksnd_timeout,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_CREDITS,
+ .procname = "credits",
+ .data = ksocknal_tunables.ksnd_credits,
+ .maxlen = sizeof (int),
+ .mode = 0444,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_PEER_CREDITS,
+ .procname = "peer_credits",
+ .data = ksocknal_tunables.ksnd_peercredits,
+ .maxlen = sizeof (int),
+ .mode = 0444,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_NCONNDS,
+ .procname = "nconnds",
+ .data = ksocknal_tunables.ksnd_nconnds,
+ .maxlen = sizeof (int),
+ .mode = 0444,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_RECONNECTS_MIN,
+ .procname = "min_reconnectms",
+ .data = ksocknal_tunables.ksnd_min_reconnectms,
+ .maxlen = sizeof (int),
+ .mode = 0444,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_RECONNECTS_MAX,
+ .procname = "max_reconnectms",
+ .data = ksocknal_tunables.ksnd_max_reconnectms,
+ .maxlen = sizeof (int),
+ .mode = 0444,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_EAGER_ACK,
+ .procname = "eager_ack",
+ .data = ksocknal_tunables.ksnd_eager_ack,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_ZERO_COPY,
+ .procname = "zero_copy",
+ .data = ksocknal_tunables.ksnd_zc_min_frag,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_TYPED,
+ .procname = "typed",
+ .data = ksocknal_tunables.ksnd_typed_conns,
+ .maxlen = sizeof (int),
+ .mode = 0444,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_BULK_MIN,
+ .procname = "min_bulk",
+ .data = ksocknal_tunables.ksnd_min_bulk,
+ .maxlen = sizeof (int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_RX_BUFFER_SIZE,
+ .procname = "rx_buffer_size",
+ .data = ksocknal_tunables.ksnd_rx_buffer_size,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_TX_BUFFER_SIZE,
+ .procname = "tx_buffer_size",
+ .data = ksocknal_tunables.ksnd_tx_buffer_size,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_NAGLE,
+ .procname = "nagle",
+ .data = ksocknal_tunables.ksnd_nagle,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
+ #ifdef CPU_AFFINITY
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ {
++ .ctl_name = SOCKLND_IRQ_AFFINITY,
+ .procname = "irq_affinity",
+ .data = ksocknal_tunables.ksnd_irq_affinity,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
+ #endif
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ {
++ .ctl_name = SOCKLND_KEEPALIVE_IDLE,
+ .procname = "keepalive_idle",
+ .data = ksocknal_tunables.ksnd_keepalive_idle,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_KEEPALIVE_COUNT,
+ .procname = "keepalive_count",
+ .data = ksocknal_tunables.ksnd_keepalive_count,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_KEEPALIVE_INTVL,
+ .procname = "keepalive_intvl",
+ .data = ksocknal_tunables.ksnd_keepalive_intvl,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
+ #ifdef SOCKNAL_BACKOFF
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ {
++ .ctl_name = SOCKLND_BACKOFF_INIT,
+ .procname = "backoff_init",
+ .data = ksocknal_tunables.ksnd_backoff_init,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
++ {
++ .ctl_name = SOCKLND_BACKOFF_MAX,
+ .procname = "backoff_max",
+ .data = ksocknal_tunables.ksnd_backoff_max,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
+ #endif
+ #if SOCKNAL_VERSION_DEBUG
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) {
+- .ctl_name = j++,
++ {
++ .ctl_name = SOCKLND_PROTOCOL,
+ .procname = "protocol",
+ .data = ksocknal_tunables.ksnd_protocol,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
+- };
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
++ },
+ #endif
+- ksocknal_ctl_table[i++] = (cfs_sysctl_table_t) { 0 };
++ {0}
++};
++
+
+- LASSERT (j == i);
+- LASSERT (i <= sizeof(ksocknal_ctl_table)/sizeof(ksocknal_ctl_table[0]));
++cfs_sysctl_table_t ksocknal_top_ctl_table[] = {
++ {
++ .ctl_name = CTL_SOCKLND,
++ .procname = "socknal",
++ .data = NULL,
++ .maxlen = 0,
++ .mode = 0555,
++ .child = ksocknal_ctl_table
++ },
++ { 0 }
++};
+
++int
++ksocknal_lib_tunables_init ()
++{
+ ksocknal_tunables.ksnd_sysctl =
+ cfs_register_sysctl_table(ksocknal_top_ctl_table, 0);
+
+Index: lnet/klnds/viblnd/viblnd.h
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/viblnd/viblnd.h,v
+retrieving revision 1.25.16.2
+diff -u -p -r1.25.16.2 viblnd.h
+--- ./lnet/klnds/viblnd/viblnd.h 7 Aug 2008 09:50:52 -0000 1.25.16.2
++++ ./lnet/klnds/viblnd/viblnd.h 17 Nov 2008 07:03:43 -0000
+@@ -76,6 +76,7 @@
+ #include <libcfs/kp30.h>
+ #include <lnet/lnet.h>
+ #include <lnet/lib-lnet.h>
++#include <lnet/lnet-sysctl.h>
+
+ /* CPU_{L,B}E #defines needed by Voltaire headers */
+ #include <asm/byteorder.h>
+Index: lnet/klnds/viblnd/viblnd_modparams.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/klnds/viblnd/viblnd_modparams.c,v
+retrieving revision 1.6.12.2
+diff -u -p -r1.6.12.2 viblnd_modparams.c
+--- ./lnet/klnds/viblnd/viblnd_modparams.c 7 Aug 2008 09:50:53 -0000 1.6.12.2
++++ ./lnet/klnds/viblnd/viblnd_modparams.c 17 Nov 2008 07:03:43 -0000
+@@ -142,6 +142,53 @@ kib_tunables_t kibnal_tunables = {
+ #endif
+ };
+
++#ifndef HAVE_SYSCTL_UNNUMBERED
++
++enum {
++ VIBLND_SERVICE = 1,
++ VIBLND_RECONNECT_MIN,
++ VIBLND_RECONNECT_MAX,
++ VIBLND_CONCURRENT_PEERS,
++ VIBLND_CHKSUM,
++ VIBLND_TIMEOUT,
++ VIBLND_NTX,
++ VIBLND_CREDITS,
++ VIBLND_PEER_CREDITS,
++ VIBLND_ARP_RETRIES,
++ VIBLND_HCA_BASENAME,
++ VIBLND_IPIF_BASENAME,
++ VIBLND_LOCAL_ACK_TIMEOUT,
++ VIBLND_RETRY_CNT,
++ VIBLND_RNR_CNT,
++ VIBLND_RNR_NAK_TIMER,
++ VIBLND_KEEPALIVE,
++ VIBLND_CONCURRENT_SENDS,
++ VIBLND_FMR_REMAPS
++};
++#else
++
++#define VIBLND_SERVICE CTL_UNNUMBERED
++#define VIBLND_RECONNECT_MIN CTL_UNNUMBERED
++#define VIBLND_RECONNECT_MAX CTL_UNNUMBERED
++#define VIBLND_CONCURRENT_PEERS CTL_UNNUMBERED
++#define VIBLND_CHKSUM CTL_UNNUMBERED
++#define VIBLND_TIMEOUT CTL_UNNUMBERED
++#define VIBLND_NTX CTL_UNNUMBERED
++#define VIBLND_CREDITS CTL_UNNUMBERED
++#define VIBLND_PEER_CREDITS CTL_UNNUMBERED
++#define VIBLND_ARP_RETRIES CTL_UNNUMBERED
++#define VIBLND_HCA_BASENAME CTL_UNNUMBERED
++#define VIBLND_IPIF_BASENAME CTL_UNNUMBERED
++#define VIBLND_LOCAL_ACK_TIMEOUT CTL_UNNUMBERED
++#define VIBLND_RETRY_CNT CTL_UNNUMBERED
++#define VIBLND_RNR_CNT CTL_UNNUMBERED
++#define VIBLND_RNR_NAK_TIMER CTL_UNNUMBERED
++#define VIBLND_KEEPALIVE CTL_UNNUMBERED
++#define VIBLND_CONCURRENT_SENDS CTL_UNNUMBERED
++#define VIBLND_FMR_REMAPS CTL_UNNUMBERED
++
++#endif
++
+ #if defined(CONFIG_SYSCTL) && !CFS_SYSFS_MODULE_PARM
+
+ static char hca_basename_space[32];
+@@ -149,7 +196,7 @@ static char ipif_basename_space[32];
+
+ static cfs_sysctl_table_t kibnal_ctl_table[] = {
+ {
+- .ctl_name = 1,
++ .ctl_name = VIBLND_SERVICE,
+ .procname = "service_number",
+ .data = &service_number,
+ .maxlen = sizeof(int),
+@@ -157,7 +204,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 2,
++ .ctl_name = VIBLND_RECONNECT_MIN,
+ .procname = "min_reconnect_interval",
+ .data = &min_reconnect_interval,
+ .maxlen = sizeof(int),
+@@ -165,7 +212,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 3,
++ .ctl_name = VIBLND_RECONNECT_MAX,
+ .procname = "max_reconnect_interval",
+ .data = &max_reconnect_interval,
+ .maxlen = sizeof(int),
+@@ -173,7 +220,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 4,
++ .ctl_name = VIBLND_CONCURRENT_PEERS,
+ .procname = "concurrent_peers",
+ .data = &concurrent_peers,
+ .maxlen = sizeof(int),
+@@ -181,7 +228,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 5,
++ .ctl_name = VIBLND_CHKSUM,
+ .procname = "cksum",
+ .data = &cksum,
+ .maxlen = sizeof(int),
+@@ -189,7 +236,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 6,
++ .ctl_name = VIBLND_TIMEOUT,
+ .procname = "timeout",
+ .data = &timeout,
+ .maxlen = sizeof(int),
+@@ -197,7 +244,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 7,
++ .ctl_name = VIBLND_NTX,
+ .procname = "ntx",
+ .data = &ntx,
+ .maxlen = sizeof(int),
+@@ -205,7 +252,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 8,
++ .ctl_name = VIBLND_CREDITS,
+ .procname = "credits",
+ .data = &credits,
+ .maxlen = sizeof(int),
+@@ -213,7 +260,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 9,
++ .ctl_name = VIBLND_PEER_CREDITS,
+ .procname = "peer_credits",
+ .data = &peer_credits,
+ .maxlen = sizeof(int),
+@@ -221,7 +268,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 10,
++ .ctl_name = VIBLND_ARP_RETRIES,
+ .procname = "arp_retries",
+ .data = &arp_retries,
+ .maxlen = sizeof(int),
+@@ -229,7 +276,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 11,
++ .ctl_name = VIBLND_HCA_BASENAME,
+ .procname = "hca_basename",
+ .data = hca_basename_space,
+ .maxlen = sizeof(hca_basename_space),
+@@ -237,7 +284,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dostring
+ },
+ {
+- .ctl_name = 12,
++ .ctl_name = VIBLND_IPIF_BASENAME,
+ .procname = "ipif_basename",
+ .data = ipif_basename_space,
+ .maxlen = sizeof(ipif_basename_space),
+@@ -245,7 +292,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dostring
+ },
+ {
+- .ctl_name = 13,
++ .ctl_name = VIBLND_LOCAL_ACK_TIMEOUT,
+ .procname = "local_ack_timeout",
+ .data = &local_ack_timeout,
+ .maxlen = sizeof(int),
+@@ -253,7 +300,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 14,
++ .ctl_name = VIBLND_RETRY_CNT,
+ .procname = "retry_cnt",
+ .data = &retry_cnt,
+ .maxlen = sizeof(int),
+@@ -261,7 +308,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 15,
++ .ctl_name = VIBLND_RNR_CNT,
+ .procname = "rnr_cnt",
+ .data = &rnr_cnt,
+ .maxlen = sizeof(int),
+@@ -269,7 +316,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 16,
++ .ctl_name = VIBLND_RNR_NAK_TIMER,
+ .procname = "rnr_nak_timer",
+ .data = &rnr_nak_timer,
+ .maxlen = sizeof(int),
+@@ -277,7 +324,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 17,
++ .ctl_name = VIBLND_KEEPALIVE,
+ .procname = "keepalive",
+ .data = &keepalive,
+ .maxlen = sizeof(int),
+@@ -285,7 +332,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ .proc_handler = &proc_dointvec
+ },
+ {
+- .ctl_name = 18,
++ .ctl_name = VIBLND_CONCURRENT_SENDS,
+ .procname = "concurrent_sends",
+ .data = &concurrent_sends,
+ .maxlen = sizeof(int),
+@@ -294,7 +341,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+ },
+ #if IBNAL_USE_FMR
+ {
+- .ctl_name = 19,
++ .ctl_name = VIBLND_FMR_REMAPS,
+ .procname = "fmr_remaps",
+ .data = &fmr_remaps,
+ .maxlen = sizeof(int),
+@@ -307,7 +354,7 @@ static cfs_sysctl_table_t kibnal_ctl_tab
+
+ static cfs_sysctl_table_t kibnal_top_ctl_table[] = {
+ {
+- .ctl_name = 203,
++ .ctl_name = CTL_VIBLND,
+ .procname = "vibnal",
+ .data = NULL,
+ .maxlen = 0,
+Index: lnet/libcfs/linux/linux-curproc.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/libcfs/linux/Attic/linux-curproc.c,v
+retrieving revision 1.3.44.3
+diff -u -p -r1.3.44.3 linux-curproc.c
+--- ./lnet/libcfs/linux/linux-curproc.c 15 Sep 2008 18:44:53 -0000 1.3.44.3
++++ ./lnet/libcfs/linux/linux-curproc.c 17 Nov 2008 07:03:43 -0000
+@@ -142,25 +142,29 @@ int cfs_cap_raised(cfs_cap_t cap)
+
+ void cfs_kernel_cap_pack(cfs_kernel_cap_t kcap, cfs_cap_t *cap)
+ {
+-#if _LINUX_CAPABILITY_VERSION == 0x19980330
++#if defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x19980330
+ *cap = cfs_cap_pack(kcap);
+-#elif _LINUX_CAPABILITY_VERSION == 0x20071026
++#elif defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x20071026
+ *cap = cfs_cap_pack(kcap[0]);
++#elif defined(_KERNEL_CAPABILITY_VERSION) && _KERNEL_CAPABILITY_VERSION == 0x20080522
++ /* XXX lost high byte */
++ *cap = cfs_cap_pack(kcap.cap[0]);
+ #else
+- #error "need correct _LINUX_CAPABILITY_VERSION "
++ #error "need correct _KERNEL_CAPABILITY_VERSION "
+ #endif
+ }
+
+ void cfs_kernel_cap_unpack(cfs_kernel_cap_t *kcap, cfs_cap_t cap)
+ {
+-#if _LINUX_CAPABILITY_VERSION == 0x19980330
++#if defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x19980330
+ *kcap = cfs_cap_unpack(cap);
+-#elif _LINUX_CAPABILITY_VERSION == 0x20071026
++#elif defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x20071026
+ (*kcap)[0] = cfs_cap_unpack(cap);
++#elif defined(_KERNEL_CAPABILITY_VERSION) && _KERNEL_CAPABILITY_VERSION == 0x20080522
++ kcap->cap[0] = cfs_cap_unpack(cap);
+ #else
+- #error "need correct _LINUX_CAPABILITY_VERSION "
++ #error "need correct _KERNEL_CAPABILITY_VERSION "
+ #endif
+-
+ }
+
+ cfs_cap_t cfs_curproc_cap_pack(void)
+Index: lnet/libcfs/linux/linux-proc.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/libcfs/linux/Attic/linux-proc.c,v
+retrieving revision 1.15.6.4
+diff -u -p -r1.15.6.4 linux-proc.c
+--- ./lnet/libcfs/linux/linux-proc.c 27 Aug 2008 16:30:14 -0000 1.15.6.4
++++ ./lnet/libcfs/linux/linux-proc.c 17 Nov 2008 07:03:43 -0000
+@@ -83,7 +83,8 @@ extern char lnet_upcall[1024];
+ */
+ extern char lnet_debug_log_upcall[1024];
+
+-#define PSDEV_LNET (0x100)
++#ifndef HAVE_SYSCTL_UNNUMBERED
++#define CTL_LNET (0x100)
+ enum {
+ PSDEV_DEBUG = 1, /* control debugging */
+ PSDEV_SUBSYSTEM_DEBUG, /* control debugging */
+@@ -103,6 +104,27 @@ enum {
+ PSDEV_LNET_DEBUG_MB, /* size of debug buffer */
+ PSDEV_LNET_DEBUG_LOG_UPCALL, /* debug log upcall script */
+ };
++#else
++#define CTL_LNET CTL_UNNUMBERED
++#define PSDEV_DEBUG CTL_UNNUMBERED
++#define PSDEV_SUBSYSTEM_DEBUG CTL_UNNUMBERED
++#define PSDEV_PRINTK CTL_UNNUMBERED
++#define PSDEV_CONSOLE_RATELIMIT CTL_UNNUMBERED
++#define PSDEV_CONSOLE_MAX_DELAY_CS CTL_UNNUMBERED
++#define PSDEV_CONSOLE_MIN_DELAY_CS CTL_UNNUMBERED
++#define PSDEV_CONSOLE_BACKOFF CTL_UNNUMBERED
++#define PSDEV_DEBUG_PATH CTL_UNNUMBERED
++#define PSDEV_DEBUG_DUMP_PATH CTL_UNNUMBERED
++#define PSDEV_LNET_UPCALL CTL_UNNUMBERED
++#define PSDEV_LNET_MEMUSED CTL_UNNUMBERED
++#define PSDEV_LNET_CATASTROPHE CTL_UNNUMBERED
++#define PSDEV_LNET_PANIC_ON_LBUG CTL_UNNUMBERED
++#define PSDEV_LNET_DUMP_KERNEL CTL_UNNUMBERED
++#define PSDEV_LNET_DAEMON_FILE CTL_UNNUMBERED
++#define PSDEV_LNET_DEBUG_MB CTL_UNNUMBERED
++#define PSDEV_LNET_DEBUG_LOG_UPCALL CTL_UNNUMBERED
++#endif
++
+
+ static int
+ proc_call_handler(void *data, int write,
+@@ -123,17 +145,7 @@ proc_call_handler(void *data, int write,
+ }
+ return 0;
+ }
+-
+-#define DECLARE_PROC_HANDLER(name) \
+-static int \
+-LL_PROC_PROTO(name) \
+-{ \
+- DECLARE_LL_PROC_PPOS_DECL; \
+- \
+- return proc_call_handler(table->data, write, \
+- ppos, buffer, lenp, \
+- __##name); \
+-}
++EXPORT_SYMBOL(proc_call_handler);
+
+ static int __proc_dobitmasks(void *data, int write,
+ loff_t pos, void *buffer, int nob)
+@@ -324,7 +336,7 @@ static cfs_sysctl_table_t lnet_table[] =
+ .data = &libcfs_debug,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dobitmasks
++ .proc_handler = &proc_dobitmasks,
+ },
+ {
+ .ctl_name = PSDEV_SUBSYSTEM_DEBUG,
+@@ -332,7 +344,7 @@ static cfs_sysctl_table_t lnet_table[] =
+ .data = &libcfs_subsystem_debug,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dobitmasks
++ .proc_handler = &proc_dobitmasks,
+ },
+ {
+ .ctl_name = PSDEV_PRINTK,
+@@ -340,7 +352,7 @@ static cfs_sysctl_table_t lnet_table[] =
+ .data = &libcfs_printk,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dobitmasks
++ .proc_handler = &proc_dobitmasks,
+ },
+ {
+ .ctl_name = PSDEV_CONSOLE_RATELIMIT,
+@@ -401,7 +413,8 @@ static cfs_sysctl_table_t lnet_table[] =
+ .data = (int *)&libcfs_kmemory.counter,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+- .proc_handler = &proc_dointvec
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
+ },
+ {
+ .ctl_name = PSDEV_LNET_CATASTROPHE,
+@@ -409,7 +422,8 @@ static cfs_sysctl_table_t lnet_table[] =
+ .data = &libcfs_catastrophe,
+ .maxlen = sizeof(int),
+ .mode = 0444,
+- .proc_handler = &proc_dointvec
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
+ },
+ {
+ .ctl_name = PSDEV_LNET_PANIC_ON_LBUG,
+@@ -417,11 +431,13 @@ static cfs_sysctl_table_t lnet_table[] =
+ .data = &libcfs_panic_on_lbug,
+ .maxlen = sizeof(int),
+ .mode = 0644,
+- .proc_handler = &proc_dointvec
++ .proc_handler = &proc_dointvec,
++ .strategy = &sysctl_intvec,
+ },
+ {
+ .ctl_name = PSDEV_LNET_DUMP_KERNEL,
+ .procname = "dump_kernel",
++ .maxlen = 256,
+ .mode = 0200,
+ .proc_handler = &proc_dump_kernel,
+ },
+@@ -429,6 +445,7 @@ static cfs_sysctl_table_t lnet_table[] =
+ .ctl_name = PSDEV_LNET_DAEMON_FILE,
+ .procname = "daemon_file",
+ .mode = 0644,
++ .maxlen = 256,
+ .proc_handler = &proc_daemon_file,
+ },
+ {
+@@ -440,21 +457,24 @@ static cfs_sysctl_table_t lnet_table[] =
+ {0}
+ };
+
+-static cfs_sysctl_table_t top_table[2] = {
++static cfs_sysctl_table_t top_table[] = {
+ {
+- .ctl_name = PSDEV_LNET,
++ .ctl_name = CTL_LNET,
+ .procname = "lnet",
++ .mode = 0555,
+ .data = NULL,
+ .maxlen = 0,
+- .mode = 0555,
+- .child = lnet_table
++ .child = lnet_table,
+ },
+- {0}
++ {
++ .ctl_name = 0
++ }
+ };
+
+ int insert_proc(void)
+ {
+ #ifdef CONFIG_SYSCTL
++ printk("call register\n");
+ if (lnet_table_header == NULL)
+ lnet_table_header = cfs_register_sysctl_table(top_table, 0);
+ #endif
+Index: lnet/lnet/router_proc.c
+===================================================================
+RCS file: /cvsroot/cfs/lnet/lnet/router_proc.c,v
+retrieving revision 1.5.10.1
+diff -u -p -r1.5.10.1 router_proc.c
+--- ./lnet/lnet/router_proc.c 25 Jul 2008 19:55:38 -0000 1.5.10.1
++++ ./lnet/lnet/router_proc.c 17 Nov 2008 07:03:43 -0000
+@@ -32,12 +32,13 @@
+
+ /* this is really lnet_proc.c */
+
+-#define LNET_PROC_STATS "sys/lnet/stats"
+-#define LNET_PROC_ROUTES "sys/lnet/routes"
+-#define LNET_PROC_ROUTERS "sys/lnet/routers"
+-#define LNET_PROC_PEERS "sys/lnet/peers"
+-#define LNET_PROC_BUFFERS "sys/lnet/buffers"
+-#define LNET_PROC_NIS "sys/lnet/nis"
++#define LNET_PROC_ROOT "sys/lnet"
++#define LNET_PROC_STATS LNET_PROC_ROOT"/stats"
++#define LNET_PROC_ROUTES LNET_PROC_ROOT"/routes"
++#define LNET_PROC_ROUTERS LNET_PROC_ROOT"/routers"
++#define LNET_PROC_PEERS LNET_PROC_ROOT"/peers"
++#define LNET_PROC_BUFFERS LNET_PROC_ROOT"/buffers"
++#define LNET_PROC_NIS LNET_PROC_ROOT"/nis"
+
+ static int
+ lnet_router_proc_stats_read (char *page, char **start, off_t off,
+@@ -1007,6 +1008,13 @@ lnet_proc_init(void)
+ {
+ struct proc_dir_entry *pde;
+
++#if 0
++ pde = proc_mkdir(LNET_PROC_ROOT, NULL);
++ if (pde == NULL) {
++ CERROR("couldn't create "LNET_PROC_ROOT"\n");
++ return;
++ }
++#endif
+ /* Initialize LNET_PROC_STATS */
+ pde = create_proc_entry (LNET_PROC_STATS, 0644, NULL);
+ if (pde == NULL) {
+@@ -1078,6 +1086,9 @@ lnet_proc_fini(void)
+ remove_proc_entry(LNET_PROC_PEERS, 0);
+ remove_proc_entry(LNET_PROC_BUFFERS, 0);
+ remove_proc_entry(LNET_PROC_NIS, 0);
++#if 0
++ remove_proc_entry(LNET_PROC_ROOT, 0);
++#endif
+ }
+
+ #else
--
Lustre Debian Packaging
More information about the Pkg-lustre-svn-commit
mailing list