Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Enable some sysctl knobs on rump kernels for ifmcstat
details: https://anonhg.NetBSD.org/src/rev/21e78e1c3bd1
branches: trunk
changeset: 350308:21e78e1c3bd1
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Jan 10 05:42:34 2017 +0000
description:
Enable some sysctl knobs on rump kernels for ifmcstat
diffstat:
sys/net/if.c | 26 ++++++++++++++++----------
sys/net/if_ethersubr.c | 9 ++++++---
sys/netinet6/in6.c | 6 ++++--
sys/netinet6/in6_var.h | 4 +++-
sys/netinet6/mld6.c | 7 ++++---
5 files changed, 33 insertions(+), 19 deletions(-)
diffs (175 lines):
diff -r 1ee77d5af90e -r 21e78e1c3bd1 sys/net/if.c
--- a/sys/net/if.c Tue Jan 10 05:40:59 2017 +0000
+++ b/sys/net/if.c Tue Jan 10 05:42:34 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.369 2016/12/26 23:21:49 christos Exp $ */
+/* $NetBSD: if.c,v 1.370 2017/01/10 05:42:34 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.369 2016/12/26 23:21:49 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.370 2017/01/10 05:42:34 ozaki-r Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -238,6 +238,8 @@
static void sysctl_net_pktq_setup(struct sysctllog **, int);
#endif
+static void if_sysctl_setup(struct sysctllog **);
+
/*
* Pointer to stub or real compat_cvtcmd() depending on presence of
* the compat module
@@ -286,13 +288,8 @@
void
ifinit(void)
{
-#if defined(INET)
- sysctl_net_pktq_setup(NULL, PF_INET);
-#endif
-#ifdef INET6
- if (in6_present)
- sysctl_net_pktq_setup(NULL, PF_INET6);
-#endif
+
+ if_sysctl_setup(NULL);
#if (defined(INET) || defined(INET6)) && !defined(IPSEC)
encapinit();
@@ -3555,7 +3552,8 @@
return error;
}
-SYSCTL_SETUP(sysctl_net_sdl_setup, "sysctl net.sdl subtree setup")
+static void
+if_sysctl_setup(struct sysctllog **clog)
{
const struct sysctlnode *rnode = NULL;
@@ -3565,4 +3563,12 @@
SYSCTL_DESCR("Get active link-layer address"),
if_sdl_sysctl, 0, NULL, 0,
CTL_NET, CTL_CREATE, CTL_EOL);
+
+#if defined(INET)
+ sysctl_net_pktq_setup(NULL, PF_INET);
+#endif
+#ifdef INET6
+ if (in6_present)
+ sysctl_net_pktq_setup(NULL, PF_INET6);
+#endif
}
diff -r 1ee77d5af90e -r 21e78e1c3bd1 sys/net/if_ethersubr.c
--- a/sys/net/if_ethersubr.c Tue Jan 10 05:40:59 2017 +0000
+++ b/sys/net/if_ethersubr.c Tue Jan 10 05:42:34 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ethersubr.c,v 1.233 2017/01/10 05:40:59 ozaki-r Exp $ */
+/* $NetBSD: if_ethersubr.c,v 1.234 2017/01/10 05:42:34 ozaki-r Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.233 2017/01/10 05:40:59 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.234 2017/01/10 05:42:34 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1620,7 +1620,8 @@
return error;
}
-SYSCTL_SETUP(sysctl_net_ether_setup, "sysctl net.ether subtree setup")
+static void
+ether_sysctl_setup(struct sysctllog **clog)
{
const struct sysctlnode *rnode = NULL;
@@ -1642,5 +1643,7 @@
void
etherinit(void)
{
+
mutex_init(&bigpktpps_lock, MUTEX_DEFAULT, IPL_NET);
+ ether_sysctl_setup(NULL);
}
diff -r 1ee77d5af90e -r 21e78e1c3bd1 sys/netinet6/in6.c
--- a/sys/netinet6/in6.c Tue Jan 10 05:40:59 2017 +0000
+++ b/sys/netinet6/in6.c Tue Jan 10 05:42:34 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6.c,v 1.230 2017/01/04 19:37:14 christos Exp $ */
+/* $NetBSD: in6.c,v 1.231 2017/01/10 05:42:34 ozaki-r Exp $ */
/* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */
/*
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.230 2017/01/04 19:37:14 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6.c,v 1.231 2017/01/10 05:42:34 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -162,6 +162,8 @@
PSLIST_INIT(&in6_ifaddr_list);
mutex_init(&in6_ifaddr_lock, MUTEX_DEFAULT, IPL_NONE);
+
+ in6_sysctl_multicast_setup(NULL);
}
/*
diff -r 1ee77d5af90e -r 21e78e1c3bd1 sys/netinet6/in6_var.h
--- a/sys/netinet6/in6_var.h Tue Jan 10 05:40:59 2017 +0000
+++ b/sys/netinet6/in6_var.h Tue Jan 10 05:42:34 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: in6_var.h,v 1.88 2017/01/04 19:37:14 christos Exp $ */
+/* $NetBSD: in6_var.h,v 1.89 2017/01/10 05:42:34 ozaki-r Exp $ */
/* $KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $ */
/*
@@ -820,6 +820,8 @@
#define LLTABLE6(ifp) (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->lltable)
+void in6_sysctl_multicast_setup(struct sysctllog **);
+
#endif /* _KERNEL */
#endif /* !_NETINET6_IN6_VAR_H_ */
diff -r 1ee77d5af90e -r 21e78e1c3bd1 sys/netinet6/mld6.c
--- a/sys/netinet6/mld6.c Tue Jan 10 05:40:59 2017 +0000
+++ b/sys/netinet6/mld6.c Tue Jan 10 05:42:34 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mld6.c,v 1.75 2016/11/18 06:50:04 knakahara Exp $ */
+/* $NetBSD: mld6.c,v 1.76 2017/01/10 05:42:34 ozaki-r Exp $ */
/* $KAME: mld6.c,v 1.25 2001/01/16 14:14:18 itojun Exp $ */
/*
@@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.75 2016/11/18 06:50:04 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mld6.c,v 1.76 2017/01/10 05:42:34 ozaki-r Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -1099,7 +1099,8 @@
return error;
}
-SYSCTL_SETUP(sysctl_in6_mklude_setup, "sysctl net.inet6.multicast_kludge subtree setup")
+void
+in6_sysctl_multicast_setup(struct sysctllog **clog)
{
sysctl_createv(clog, 0, NULL, NULL,
Home |
Main Index |
Thread Index |
Old Index