* [PATCH 3/3] Eleminate HZ from ROSE kernel interfaces
@ 2006-04-29 14:19 Ralf Baechle
2006-04-30 9:35 ` Bernard Pidoux
2006-05-04 6:28 ` David S. Miller
0 siblings, 2 replies; 3+ messages in thread
From: Ralf Baechle @ 2006-04-29 14:19 UTC (permalink / raw)
To: David S. Miller, netdev, linux-hams
Convert all ROSE sysctl time values from jiffies to ms as units.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
--
include/net/rose.h | 14 +++++++-------
net/rose/af_rose.c | 10 +++++-----
net/rose/rose_link.c | 6 ++++--
3 files changed, 16 insertions(+), 14 deletions(-)
Index: linux-net.git/include/net/rose.h
===================================================================
--- linux-net.git.orig/include/net/rose.h 2006-04-29 01:43:47.000000000 +0100
+++ linux-net.git/include/net/rose.h 2006-04-29 11:37:34.000000000 +0100
@@ -49,14 +49,14 @@ enum {
ROSE_STATE_5 /* Deferred Call Acceptance */
};
-#define ROSE_DEFAULT_T0 (180 * HZ) /* Default T10 T20 value */
-#define ROSE_DEFAULT_T1 (200 * HZ) /* Default T11 T21 value */
-#define ROSE_DEFAULT_T2 (180 * HZ) /* Default T12 T22 value */
-#define ROSE_DEFAULT_T3 (180 * HZ) /* Default T13 T23 value */
-#define ROSE_DEFAULT_HB (5 * HZ) /* Default Holdback value */
-#define ROSE_DEFAULT_IDLE (0 * 60 * HZ) /* No Activity Timeout - none */
+#define ROSE_DEFAULT_T0 180000 /* Default T10 T20 value */
+#define ROSE_DEFAULT_T1 200000 /* Default T11 T21 value */
+#define ROSE_DEFAULT_T2 180000 /* Default T12 T22 value */
+#define ROSE_DEFAULT_T3 180000 /* Default T13 T23 value */
+#define ROSE_DEFAULT_HB 5000 /* Default Holdback value */
+#define ROSE_DEFAULT_IDLE 0 /* No Activity Timeout - none */
#define ROSE_DEFAULT_ROUTING 1 /* Default routing flag */
-#define ROSE_DEFAULT_FAIL_TIMEOUT (120 * HZ) /* Time until link considered usable */
+#define ROSE_DEFAULT_FAIL_TIMEOUT 120000 /* Time until link considered usable */
#define ROSE_DEFAULT_MAXVC 50 /* Maximum number of VCs per neighbour */
#define ROSE_DEFAULT_WINDOW_SIZE 7 /* Default window size */
Index: linux-net.git/net/rose/af_rose.c
===================================================================
--- linux-net.git.orig/net/rose/af_rose.c 2006-04-29 01:54:21.000000000 +0100
+++ linux-net.git/net/rose/af_rose.c 2006-04-29 11:37:34.000000000 +0100
@@ -518,11 +518,11 @@ static int rose_create(struct socket *so
init_timer(&rose->timer);
init_timer(&rose->idletimer);
- rose->t1 = sysctl_rose_call_request_timeout;
- rose->t2 = sysctl_rose_reset_request_timeout;
- rose->t3 = sysctl_rose_clear_request_timeout;
- rose->hb = sysctl_rose_ack_hold_back_timeout;
- rose->idle = sysctl_rose_no_activity_timeout;
+ rose->t1 = msecs_to_jiffies(sysctl_rose_call_request_timeout);
+ rose->t2 = msecs_to_jiffies(sysctl_rose_reset_request_timeout);
+ rose->t3 = msecs_to_jiffies(sysctl_rose_clear_request_timeout);
+ rose->hb = msecs_to_jiffies(sysctl_rose_ack_hold_back_timeout);
+ rose->idle = msecs_to_jiffies(sysctl_rose_no_activity_timeout);
rose->state = ROSE_STATE_0;
Index: linux-net.git/net/rose/rose_link.c
===================================================================
--- linux-net.git.orig/net/rose/rose_link.c 2006-04-29 01:43:47.000000000 +0100
+++ linux-net.git/net/rose/rose_link.c 2006-04-29 11:37:34.000000000 +0100
@@ -40,7 +40,8 @@ void rose_start_ftimer(struct rose_neigh
neigh->ftimer.data = (unsigned long)neigh;
neigh->ftimer.function = &rose_ftimer_expiry;
- neigh->ftimer.expires = jiffies + sysctl_rose_link_fail_timeout;
+ neigh->ftimer.expires =
+ jiffies + msecs_to_jiffies(sysctl_rose_link_fail_timeout);
add_timer(&neigh->ftimer);
}
@@ -51,7 +52,8 @@ static void rose_start_t0timer(struct ro
neigh->t0timer.data = (unsigned long)neigh;
neigh->t0timer.function = &rose_t0timer_expiry;
- neigh->t0timer.expires = jiffies + sysctl_rose_restart_request_timeout;
+ neigh->t0timer.expires =
+ jiffies + msecs_to_jiffies(sysctl_rose_restart_request_timeout);
add_timer(&neigh->t0timer);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] Eleminate HZ from ROSE kernel interfaces
2006-04-29 14:19 [PATCH 3/3] Eleminate HZ from ROSE kernel interfaces Ralf Baechle
@ 2006-04-30 9:35 ` Bernard Pidoux
2006-05-04 6:28 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: Bernard Pidoux @ 2006-04-30 9:35 UTC (permalink / raw)
To: Ralf Baechle; +Cc: David S. Miller, netdev, linux-hams
[-- Attachment #1: Type: text/plain, Size: 537 bytes --]
Ralf Baechle wrote :
> Index: linux-net.git/net/rose/af_rose.c
> ===================================================================
> --- linux-net.git.orig/net/rose/af_rose.c 2006-04-29 01:54:21.000000000 +0100
> +++ linux-net.git/net/rose/af_rose.c 2006-04-29 11:37:34.000000000 +0100
While patching af_rose.c, would you consider the following patch
ROSE/FPAC users have introduced a year ago with good success.
73 de Bernard, f6bvp
http://f6bvp.org
http://rose.fpac.free.fr/MINI-HOWTO/
http://rose.fpac.free.fr/MINI-HOWTO-FR/
[-- Attachment #2: af_rose.diff --]
[-- Type: text/x-patch, Size: 716 bytes --]
--- linux/net/rose/af_rose.c.orig 2006-04-30 11:30:48.000000000 +0200
+++ linux/net/rose/af_rose.c 2006-04-30 11:27:35.000000000 +0200
@@ -753,6 +753,7 @@
rose_insert_socket(sk); /* Finish the bind */
}
+rose_try_next_neigh:
rose->dest_addr = addr->srose_addr;
rose->dest_call = addr->srose_call;
rose->rand = ((long)rose & 0xFFFF) + rose->lci;
@@ -810,6 +811,11 @@
}
if (sk->sk_state != TCP_ESTABLISHED) {
+ /* Try next neighbour */
+ rose->neighbour = rose_get_neigh(&addr->srose_addr, &cause, &diagnostic);
+ if (rose->neighbour)
+ goto rose_try_next_neigh;
+ /* No more neighbour */
sock->state = SS_UNCONNECTED;
return sock_error(sk); /* Always set at this point */
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/3] Eleminate HZ from ROSE kernel interfaces
2006-04-29 14:19 [PATCH 3/3] Eleminate HZ from ROSE kernel interfaces Ralf Baechle
2006-04-30 9:35 ` Bernard Pidoux
@ 2006-05-04 6:28 ` David S. Miller
1 sibling, 0 replies; 3+ messages in thread
From: David S. Miller @ 2006-05-04 6:28 UTC (permalink / raw)
To: ralf; +Cc: netdev, linux-hams
From: Ralf Baechle <ralf@linux-mips.org>
Date: Sat, 29 Apr 2006 15:19:24 +0100
> Convert all ROSE sysctl time values from jiffies to ms as units.
>
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-04 6:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-29 14:19 [PATCH 3/3] Eleminate HZ from ROSE kernel interfaces Ralf Baechle
2006-04-30 9:35 ` Bernard Pidoux
2006-05-04 6:28 ` David S. Miller
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).