[ofa-general] [PATCH 1/8]: RDS: Fix IB max_unacked_* sysctls
Olaf Kirch
okir at lst.de
Thu Apr 24 02:09:40 PDT 2008
From 4c378d81c2348ac13300d033f306bfd20e65eb76 Mon Sep 17 00:00:00 2001
From: Olaf Kirch <olaf.kirch at oracle.com>
Date: Thu, 24 Apr 2008 00:27:05 -0700
Subject: [PATCH] RDS: Fix IB max_unacked_* sysctls
The sysctl variables max_unacked_{bytes,packets} are defined as unsigned
longs, but the sysctl table specifies proc_dointvec as the handler.
Change the variables to unsigned ints - the type is big enough.
Signed-off-by: Olaf Kirch <olaf.kirch at oracle.com>
---
net/rds/rds.h | 4 ++--
net/rds/sysctl.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/net/rds/rds.h b/net/rds/rds.h
index 2d4600a..dc1ab4c 100644
--- a/net/rds/rds.h
+++ b/net/rds/rds.h
@@ -667,8 +667,8 @@ extern unsigned long rds_sysctl_sndbuf_default;
extern unsigned long rds_sysctl_sndbuf_max;
extern unsigned long rds_sysctl_reconnect_min_jiffies;
extern unsigned long rds_sysctl_reconnect_max_jiffies;
-extern unsigned long rds_sysctl_max_unacked_packets;
-extern unsigned long rds_sysctl_max_unacked_bytes;
+extern unsigned int rds_sysctl_max_unacked_packets;
+extern unsigned int rds_sysctl_max_unacked_bytes;
/* threads.c */
int __init rds_threads_init(void);
diff --git a/net/rds/sysctl.c b/net/rds/sysctl.c
index bb0fa46..5f7ce37 100644
--- a/net/rds/sysctl.c
+++ b/net/rds/sysctl.c
@@ -44,8 +44,8 @@ static unsigned long rds_sysctl_reconnect_max = ~0UL;
unsigned long rds_sysctl_reconnect_min_jiffies;
unsigned long rds_sysctl_reconnect_max_jiffies = HZ;
-unsigned long rds_sysctl_max_unacked_packets = 16;
-unsigned long rds_sysctl_max_unacked_bytes = (16 << 20);
+unsigned int rds_sysctl_max_unacked_packets = 16;
+unsigned int rds_sysctl_max_unacked_bytes = (16 << 20);
/*
* These can change over time until they're official. Until that time we'll
@@ -95,7 +95,7 @@ static ctl_table rds_sysctl_rds_table[] = {
.ctl_name = 8,
.procname = "max_unacked_packets",
.data = &rds_sysctl_max_unacked_packets,
- .maxlen = sizeof(int),
+ .maxlen = sizeof(unsigned long),
.mode = 0644,
.proc_handler = &proc_dointvec,
},
@@ -103,7 +103,7 @@ static ctl_table rds_sysctl_rds_table[] = {
.ctl_name = 9,
.procname = "max_unacked_bytes",
.data = &rds_sysctl_max_unacked_bytes,
- .maxlen = sizeof(int),
+ .maxlen = sizeof(unsigned long),
.mode = 0644,
.proc_handler = &proc_dointvec,
},
--
1.5.4.rc3
--
Olaf Kirch | --- o --- Nous sommes du soleil we love when we play
okir at lst.de | / | \ sol.dhoop.naytheet.ah kin.ir.samse.qurax
More information about the general
mailing list