linux-hams.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/3] Eleminate HZ from NET/ROM kernel interfaces
@ 2006-04-29 14:16 Ralf Baechle
  2006-04-30 19:34 ` Bernard Pidoux
  2006-05-04  6:27 ` David S. Miller
  0 siblings, 2 replies; 7+ messages in thread
From: Ralf Baechle @ 2006-04-29 14:16 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-hams

Convert all NET/ROM sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

--

 include/net/netrom.h   |    8 ++++----
 net/netrom/af_netrom.c |   15 ++++++++++-----
 2 files changed, 14 insertions(+), 9 deletions(-)

Index: linux-net.git/include/net/netrom.h
===================================================================
--- linux-net.git.orig/include/net/netrom.h	2006-04-29 01:43:48.000000000 +0100
+++ linux-net.git/include/net/netrom.h	2006-04-29 11:37:27.000000000 +0100
@@ -42,11 +42,11 @@ enum {
 #define	NR_COND_PEER_RX_BUSY		0x04
 #define	NR_COND_OWN_RX_BUSY		0x08
 
-#define NR_DEFAULT_T1			(120 * HZ)	/* Outstanding frames - 120 seconds */
-#define NR_DEFAULT_T2			(5   * HZ)	/* Response delay     - 5 seconds */
+#define NR_DEFAULT_T1			120000		/* Outstanding frames - 120 seconds */
+#define NR_DEFAULT_T2			5000		/* Response delay     - 5 seconds */
 #define NR_DEFAULT_N2			3		/* Number of Retries - 3 */
-#define	NR_DEFAULT_T4			(180 * HZ)	/* Busy Delay - 180 seconds */
-#define	NR_DEFAULT_IDLE			(0 * 60 * HZ)	/* No Activity Timeout - none */
+#define	NR_DEFAULT_T4			180000		/* Busy Delay - 180 seconds */
+#define	NR_DEFAULT_IDLE			0		/* No Activity Timeout - none */
 #define	NR_DEFAULT_WINDOW		4		/* Default Window Size - 4 */
 #define	NR_DEFAULT_OBS			6		/* Default Obsolescence Count - 6 */
 #define	NR_DEFAULT_QUAL			10		/* Default Neighbour Quality - 10 */
Index: linux-net.git/net/netrom/af_netrom.c
===================================================================
--- linux-net.git.orig/net/netrom/af_netrom.c	2006-04-29 01:54:21.000000000 +0100
+++ linux-net.git/net/netrom/af_netrom.c	2006-04-29 11:37:27.000000000 +0100
@@ -425,11 +425,16 @@ static int nr_create(struct socket *sock
 
 	nr_init_timers(sk);
 
-	nr->t1     = sysctl_netrom_transport_timeout;
-	nr->t2     = sysctl_netrom_transport_acknowledge_delay;
-	nr->n2     = sysctl_netrom_transport_maximum_tries;
-	nr->t4     = sysctl_netrom_transport_busy_delay;
-	nr->idle   = sysctl_netrom_transport_no_activity_timeout;
+	nr->t1     =
+		msecs_to_jiffies(sysctl_netrom_transport_timeout);
+	nr->t2     =
+		msecs_to_jiffies(sysctl_netrom_transport_acknowledge_delay);
+	nr->n2     =
+		msecs_to_jiffies(sysctl_netrom_transport_maximum_tries);
+	nr->t4     =
+		msecs_to_jiffies(sysctl_netrom_transport_busy_delay);
+	nr->idle   =
+		msecs_to_jiffies(sysctl_netrom_transport_no_activity_timeout);
 	nr->window = sysctl_netrom_transport_requested_window_size;
 
 	nr->bpqext = 1;

^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 2/3] Eleminate HZ from NET/ROM kernel interfaces
@ 2005-08-18 18:13 Ralf Baechle DL5RB
  0 siblings, 0 replies; 7+ messages in thread
From: Ralf Baechle DL5RB @ 2005-08-18 18:13 UTC (permalink / raw)
  To: linux-hams

Convert all NET/ROM sysctl time values from jiffies to ms as units.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

 include/net/netrom.h   |    8 ++++----
 net/netrom/af_netrom.c |   15 ++++++++++-----
 2 files changed, 14 insertions(+), 9 deletions(-)

Index: linux-cvs/include/net/netrom.h
===================================================================
--- linux-cvs.orig/include/net/netrom.h
+++ linux-cvs/include/net/netrom.h
@@ -42,11 +42,11 @@ enum {
 #define	NR_COND_PEER_RX_BUSY		0x04
 #define	NR_COND_OWN_RX_BUSY		0x08
 
-#define NR_DEFAULT_T1			(120 * HZ)	/* Outstanding frames - 120 seconds */
-#define NR_DEFAULT_T2			(5   * HZ)	/* Response delay     - 5 seconds */
+#define NR_DEFAULT_T1			120000		/* Outstanding frames - 120 seconds */
+#define NR_DEFAULT_T2			5000		/* Response delay     - 5 seconds */
 #define NR_DEFAULT_N2			3		/* Number of Retries - 3 */
-#define	NR_DEFAULT_T4			(180 * HZ)	/* Busy Delay - 180 seconds */
-#define	NR_DEFAULT_IDLE			(0 * 60 * HZ)	/* No Activity Timeout - none */
+#define	NR_DEFAULT_T4			180000		/* Busy Delay - 180 seconds */
+#define	NR_DEFAULT_IDLE			0		/* No Activity Timeout - none */
 #define	NR_DEFAULT_WINDOW		4		/* Default Window Size - 4 */
 #define	NR_DEFAULT_OBS			6		/* Default Obsolescence Count - 6 */
 #define	NR_DEFAULT_QUAL			10		/* Default Neighbour Quality - 10 */
Index: linux-cvs/net/netrom/af_netrom.c
===================================================================
--- linux-cvs.orig/net/netrom/af_netrom.c
+++ linux-cvs/net/netrom/af_netrom.c
@@ -424,11 +424,16 @@ static int nr_create(struct socket *sock
 
 	nr_init_timers(sk);
 
-	nr->t1     = sysctl_netrom_transport_timeout;
-	nr->t2     = sysctl_netrom_transport_acknowledge_delay;
-	nr->n2     = sysctl_netrom_transport_maximum_tries;
-	nr->t4     = sysctl_netrom_transport_busy_delay;
-	nr->idle   = sysctl_netrom_transport_no_activity_timeout;
+	nr->t1     =
+		msecs_to_jiffies(sysctl_netrom_transport_timeout);
+	nr->t2     =
+		msecs_to_jiffies(sysctl_netrom_transport_acknowledge_delay);
+	nr->n2     =
+		msecs_to_jiffies(sysctl_netrom_transport_maximum_tries);
+	nr->t4     =
+		msecs_to_jiffies(sysctl_netrom_transport_busy_delay);
+	nr->idle   =
+		msecs_to_jiffies(sysctl_netrom_transport_no_activity_timeout);
 	nr->window = sysctl_netrom_transport_requested_window_size;
 
 	nr->bpqext = 1;

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-05-06  0:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-29 14:16 [PATCH 2/3] Eleminate HZ from NET/ROM kernel interfaces Ralf Baechle
2006-04-30 19:34 ` Bernard Pidoux
2006-05-01  0:21   ` David S. Miller
2006-05-01 23:52     ` Ralf Baechle
2006-05-06  0:19       ` David S. Miller
2006-05-04  6:27 ` David S. Miller
  -- strict thread matches above, loose matches on Subject: below --
2005-08-18 18:13 Ralf Baechle DL5RB

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).