Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net Rename if_watchdog to if_slowtimo
details: https://anonhg.NetBSD.org/src/rev/96a94c475fac
branches: trunk
changeset: 334007:96a94c475fac
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Wed Nov 26 07:22:05 2014 +0000
description:
Rename if_watchdog to if_slowtimo
if_watchdog callbacks do a little more than what "watchdog" suggests.
Discussed with uebayasi@ (the idea originally from openbsd-tech).
diffstat:
sys/net/if.c | 14 +++++++-------
sys/net/if.h | 10 ++++++----
2 files changed, 13 insertions(+), 11 deletions(-)
diffs (95 lines):
diff -r 03b5e6389cd0 -r 96a94c475fac sys/net/if.c
--- a/sys/net/if.c Wed Nov 26 07:06:03 2014 +0000
+++ b/sys/net/if.c Wed Nov 26 07:22:05 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.294 2014/11/26 07:06:03 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.295 2014/11/26 07:22:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.294 2014/11/26 07:06:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.295 2014/11/26 07:22:05 ozaki-r Exp $");
#include "opt_inet.h"
@@ -338,7 +338,7 @@
}
void
-if_nullwatchdog(struct ifnet *ifp)
+if_nullslowtimo(struct ifnet *ifp)
{
/* Nothing. */
@@ -688,7 +688,7 @@
ifp->if_ioctl = if_nullioctl;
ifp->if_init = if_nullinit;
ifp->if_stop = if_nullstop;
- ifp->if_watchdog = if_nullwatchdog;
+ ifp->if_slowtimo = if_nullslowtimo;
ifp->if_drain = if_nulldrain;
/* No more packets may be enqueued. */
@@ -1494,7 +1494,7 @@
}
/*
- * Handle interface watchdog timer routines. Called
+ * Handle interface slowtimo timer routines. Called
* from softclock, we decrement timers (if set) and
* call the appropriate interface routine on expiration.
*/
@@ -1507,8 +1507,8 @@
IFNET_FOREACH(ifp) {
if (ifp->if_timer == 0 || --ifp->if_timer)
continue;
- if (ifp->if_watchdog != NULL)
- (*ifp->if_watchdog)(ifp);
+ if (ifp->if_slowtimo != NULL)
+ (*ifp->if_slowtimo)(ifp);
}
splx(s);
callout_reset(&if_slowtimo_ch, hz / IFNET_SLOWHZ, if_slowtimo, NULL);
diff -r 03b5e6389cd0 -r 96a94c475fac sys/net/if.h
--- a/sys/net/if.h Wed Nov 26 07:06:03 2014 +0000
+++ b/sys/net/if.h Wed Nov 26 07:22:05 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.176 2014/11/26 07:06:03 ozaki-r Exp $ */
+/* $NetBSD: if.h,v 1.177 2014/11/26 07:22:05 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -253,7 +253,7 @@
int if_pcount; /* number of promiscuous listeners */
struct bpf_if *if_bpf; /* packet filter structure */
u_short if_index; /* numeric abbreviation for this if */
- short if_timer; /* time 'til if_watchdog called */
+ short if_timer; /* time 'til if_slowtimo called */
short if_flags; /* up/down, broadcast, etc. */
short if__pad1; /* be nice to m68k ports */
struct if_data if_data; /* statistics and other data about if */
@@ -274,8 +274,9 @@
(struct ifnet *);
void (*if_stop) /* stop routine */
(struct ifnet *, int);
- void (*if_watchdog) /* timer routine */
+ void (*if_slowtimo) /* timer routine */
(struct ifnet *);
+#define if_watchdog if_slowtimo
void (*if_drain) /* routine to release resources */
(struct ifnet *);
struct ifaltq if_snd; /* output queue (includes altq) */
@@ -925,7 +926,8 @@
int if_nullioctl(struct ifnet *, u_long, void *);
int if_nullinit(struct ifnet *);
void if_nullstop(struct ifnet *, int);
-void if_nullwatchdog(struct ifnet *);
+void if_nullslowtimo(struct ifnet *);
+#define if_nullwatchdog if_nullslowtimo
void if_nulldrain(struct ifnet *);
#else
struct if_nameindex {
Home |
Main Index |
Thread Index |
Old Index