Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src Pull up following revision(s) (requested by rmind in tick...
details: https://anonhg.NetBSD.org/src/rev/ac5013e1749f
branches: netbsd-6
changeset: 775442:ac5013e1749f
user: riz <riz%NetBSD.org@localhost>
date: Sun Nov 18 21:45:08 2012 +0000
description:
Pull up following revision(s) (requested by rmind in ticket #678):
sys/rump/librump/rumpkern/rump.c: revision 1.243
sys/rump/librump/rumpkern/rump.c: revision 1.244
sys/rump/librump/rumpkern/rump.c: revision 1.245
sys/rump/librump/rumpkern/rump.c: revision 1.246
usr.sbin/npf/npftest/npftest.c: revision 1.5
usr.sbin/npf/npftest/README: revision 1.2
usr.sbin/npf/npftest/npftest.h: revision 1.5
sys/rump/net/Makefile.rumpnetcomp: revision 1.5
sys/rump/net/lib/libnpf/shlib_version: revision 1.1
sys/net/npf/npf_impl.h: revision 1.22
sys/rump/dev/lib/libnpf/Makefile: file removal
usr.sbin/npf/npftest/Makefile: revision 1.3
sys/rump/dev/lib/libnpf/component.c: file removal
sys/rump/dev/lib/libnpf/shlib_version: file removal
sys/net/npf/npf_state.c: revision 1.12
sys/rump/net/lib/libnpf/component.c: revision 1.1
usr.sbin/npf/npftest/libnpftest/npf_test_subr.c: revision 1.4
usr.sbin/npf/npftest/libnpftest/npf_test.h: revision 1.6
sys/rump/net/lib/libnpf/Makefile: revision 1.1
Move and rename librumpdev_npf to librumpnet_npf.
Enable the build of librumpnet_npf.
Add npf_state_setsampler() for _NPF_TESTING case. This also fixes the build.
Call pserialize_init() during rump start-up, since librump/net/npf
uses it.
It helps to include the declaration of the routine being called.
We also need kcpuset_init() now.
Use correct routine name - kcpuset_sysinit() vs kcpuset_init()
diffstat:
sys/net/npf/npf_impl.h | 10 +-----
sys/net/npf/npf_state.c | 22 ++++++++++++++-
sys/rump/dev/lib/libnpf/Makefile | 24 -----------------
sys/rump/dev/lib/libnpf/component.c | 35 -------------------------
sys/rump/dev/lib/libnpf/shlib_version | 4 --
sys/rump/librump/rumpkern/rump.c | 8 ++++-
sys/rump/net/Makefile.rumpnetcomp | 4 +-
sys/rump/net/lib/libnpf/Makefile | 24 +++++++++++++++++
sys/rump/net/lib/libnpf/component.c | 34 ++++++++++++++++++++++++
sys/rump/net/lib/libnpf/shlib_version | 4 ++
usr.sbin/npf/npftest/Makefile | 2 +-
usr.sbin/npf/npftest/README | 4 +-
usr.sbin/npf/npftest/libnpftest/npf_test.h | 1 +
usr.sbin/npf/npftest/libnpftest/npf_test_subr.c | 12 +++++++-
usr.sbin/npf/npftest/npftest.c | 4 ++-
usr.sbin/npf/npftest/npftest.h | 1 +
16 files changed, 110 insertions(+), 83 deletions(-)
diffs (truncated from 392 to 300 lines):
diff -r c281fb5a2a13 -r ac5013e1749f sys/net/npf/npf_impl.h
--- a/sys/net/npf/npf_impl.h Sun Nov 18 19:16:29 2012 +0000
+++ b/sys/net/npf/npf_impl.h Sun Nov 18 21:45:08 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_impl.h,v 1.10.2.7 2012/08/13 17:49:52 riz Exp $ */
+/* $NetBSD: npf_impl.h,v 1.10.2.8 2012/11/18 21:45:08 riz Exp $ */
/*-
* Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -122,13 +122,6 @@
npf_tcpstate_t nst_tcpst[2];
} npf_state_t;
-#if defined(_NPF_TESTING)
-void npf_state_sample(npf_state_t *, bool);
-#define NPF_STATE_SAMPLE(n, r) npf_state_sample(n, r)
-#else
-#define NPF_STATE_SAMPLE(n, r)
-#endif
-
/*
* INTERFACES.
*/
@@ -332,5 +325,6 @@
void npf_sessions_dump(void);
void npf_state_dump(const npf_state_t *);
void npf_nat_dump(const npf_nat_t *);
+void npf_state_setsampler(void (*)(npf_state_t *, bool));
#endif /* _NPF_IMPL_H_ */
diff -r c281fb5a2a13 -r ac5013e1749f sys/net/npf/npf_state.c
--- a/sys/net/npf/npf_state.c Sun Nov 18 19:16:29 2012 +0000
+++ b/sys/net/npf/npf_state.c Sun Nov 18 21:45:08 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: npf_state.c,v 1.6.4.5 2012/08/13 17:49:52 riz Exp $ */
+/* $NetBSD: npf_state.c,v 1.6.4.6 2012/11/18 21:45:08 riz Exp $ */
/*-
* Copyright (c) 2010-2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_state.c,v 1.6.4.5 2012/08/13 17:49:52 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_state.c,v 1.6.4.6 2012/11/18 21:45:08 riz Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -75,6 +75,16 @@
};
/*
+ * State sampler for debugging.
+ */
+#if defined(_NPF_TESTING)
+static void (*npf_state_sample)(npf_state_t *, bool) = NULL;
+#define NPF_STATE_SAMPLE(n, r) if (npf_state_sample) (*npf_state_sample)(n, r);
+#else
+#define NPF_STATE_SAMPLE(n, r)
+#endif
+
+/*
* npf_state_init: initialise the state structure.
*
* Should normally be called on a first packet, which also determines the
@@ -195,3 +205,11 @@
);
#endif
}
+
+#if defined(_NPF_TESTING)
+void
+npf_state_setsampler(void (*func)(npf_state_t *, bool))
+{
+ npf_state_sample = func;
+}
+#endif
diff -r c281fb5a2a13 -r ac5013e1749f sys/rump/dev/lib/libnpf/Makefile
--- a/sys/rump/dev/lib/libnpf/Makefile Sun Nov 18 19:16:29 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +0,0 @@
-# $NetBSD: Makefile,v 1.1.18.2 2012/07/16 22:13:29 riz Exp $
-#
-# Public Domain.
-#
-
-.PATH: ${.CURDIR}/../../../../net/npf
-
-LIB= rumpdev_npf
-
-SRCS= npf.c npf_alg.c npf_ctl.c npf_handler.c
-SRCS+= npf_inet.c npf_instr.c npf_log.c npf_mbuf.c npf_nat.c
-SRCS+= npf_processor.c npf_ruleset.c npf_rproc.c npf_sendpkt.c
-SRCS+= npf_session.c npf_state.c npf_state_tcp.c
-SRCS+= npf_tableset.c npf_tableset_ptree.c
-
-SRCS+= component.c
-
-WARNS= 4
-
-CPPFLAGS+= -D_NPF_TESTING
-CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpvfs
-
-.include <bsd.lib.mk>
-.include <bsd.klinks.mk>
diff -r c281fb5a2a13 -r ac5013e1749f sys/rump/dev/lib/libnpf/component.c
--- a/sys/rump/dev/lib/libnpf/component.c Sun Nov 18 19:16:29 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/* $NetBSD: component.c,v 1.1 2010/10/14 22:39:30 haad Exp $ */
-
-/*
- * Public Domain.
- */
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.1 2010/10/14 22:39:30 haad Exp $");
-
-#include <sys/param.h>
-#include <sys/conf.h>
-#include <sys/device.h>
-#include <sys/stat.h>
-
-#include "rump_private.h"
-#include "rump_dev_private.h"
-#include "rump_vfs_private.h"
-
-extern const struct cdevsw npf_cdevsw;
-
-RUMP_COMPONENT(RUMP_COMPONENT_DEV)
-{
- devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR;
- int error;
-
- error = devsw_attach("npf", NULL, &bmajor, &npf_cdevsw, &cmajor);
- if (error) {
- panic("npf attaching failed: %d", error);
- }
-
- error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/npf", cmajor, 0);
- if (error) {
- panic("npf device node creation failed: %d", error);
- }
-}
diff -r c281fb5a2a13 -r ac5013e1749f sys/rump/dev/lib/libnpf/shlib_version
--- a/sys/rump/dev/lib/libnpf/shlib_version Sun Nov 18 19:16:29 2012 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-# $NetBSD: shlib_version,v 1.1 2010/10/14 22:39:30 haad Exp $
-#
-major=0
-minor=0
diff -r c281fb5a2a13 -r ac5013e1749f sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Sun Nov 18 19:16:29 2012 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Sun Nov 18 21:45:08 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rump.c,v 1.240 2012/02/04 10:02:25 njoly Exp $ */
+/* $NetBSD: rump.c,v 1.240.2.1 2012/11/18 21:45:08 riz Exp $ */
/*
* Copyright (c) 2007-2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.240 2012/02/04 10:02:25 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.240.2.1 2012/11/18 21:45:08 riz Exp $");
#include <sys/systm.h>
#define ELFSIZE ARCH_ELFSIZE
@@ -44,6 +44,7 @@
#include <sys/filedesc.h>
#include <sys/iostat.h>
#include <sys/kauth.h>
+#include <sys/kcpuset.h>
#include <sys/kernel.h>
#include <sys/kmem.h>
#include <sys/kprintf.h>
@@ -56,6 +57,7 @@
#include <sys/percpu.h>
#include <sys/pipe.h>
#include <sys/pool.h>
+#include <sys/pserialize.h>
#include <sys/queue.h>
#include <sys/reboot.h>
#include <sys/resourcevar.h>
@@ -296,6 +298,7 @@
uvm_init();
evcnt_init();
+ kcpuset_sysinit();
once_init();
kernconfig_lock_init();
prop_kern_init();
@@ -309,6 +312,7 @@
callout_startup();
kprintf_init();
+ pserialize_init();
loginit();
kauth_init();
diff -r c281fb5a2a13 -r ac5013e1749f sys/rump/net/Makefile.rumpnetcomp
--- a/sys/rump/net/Makefile.rumpnetcomp Sun Nov 18 19:16:29 2012 +0000
+++ b/sys/rump/net/Makefile.rumpnetcomp Sun Nov 18 21:45:08 2012 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile.rumpnetcomp,v 1.4 2010/12/08 20:20:16 pooka Exp $
+# $NetBSD: Makefile.rumpnetcomp,v 1.4.16.1 2012/11/18 21:45:08 riz Exp $
#
-RUMPNETCOMP= agr bridge net net80211 netbt netinet local shmif virtif
+RUMPNETCOMP= agr bridge net net80211 netbt netinet npf local shmif virtif
RUMPNETSOCKIN= sockin
diff -r c281fb5a2a13 -r ac5013e1749f sys/rump/net/lib/libnpf/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libnpf/Makefile Sun Nov 18 21:45:08 2012 +0000
@@ -0,0 +1,24 @@
+# $NetBSD: Makefile,v 1.2.4.2 2012/11/18 21:45:08 riz Exp $
+#
+# Public Domain.
+#
+
+.PATH: ${.CURDIR}/../../../../net/npf
+
+LIB= rumpnet_npf
+
+SRCS= npf.c npf_alg.c npf_ctl.c npf_handler.c
+SRCS+= npf_inet.c npf_instr.c npf_log.c npf_mbuf.c npf_nat.c
+SRCS+= npf_processor.c npf_ruleset.c npf_rproc.c npf_sendpkt.c
+SRCS+= npf_session.c npf_state.c npf_state_tcp.c
+SRCS+= npf_tableset.c npf_tableset_ptree.c
+
+SRCS+= component.c
+
+WARNS= 4
+
+CPPFLAGS+= -D_NPF_TESTING
+CPPFLAGS+= -I${.CURDIR}/../../../librump/rumpvfs
+
+.include <bsd.lib.mk>
+.include <bsd.klinks.mk>
diff -r c281fb5a2a13 -r ac5013e1749f sys/rump/net/lib/libnpf/component.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libnpf/component.c Sun Nov 18 21:45:08 2012 +0000
@@ -0,0 +1,34 @@
+/* $NetBSD: component.c,v 1.1.6.2 2012/11/18 21:45:08 riz Exp $ */
+
+/*
+ * Public Domain.
+ */
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.1.6.2 2012/11/18 21:45:08 riz Exp $");
+
+#include <sys/param.h>
+#include <sys/conf.h>
+#include <sys/device.h>
+#include <sys/stat.h>
+
+#include "rump_private.h"
+#include "rump_vfs_private.h"
+
+extern const struct cdevsw npf_cdevsw;
+
+RUMP_COMPONENT(RUMP_COMPONENT_DEV)
+{
+ devmajor_t bmajor = NODEVMAJOR, cmajor = NODEVMAJOR;
+ int error;
+
+ error = devsw_attach("npf", NULL, &bmajor, &npf_cdevsw, &cmajor);
+ if (error) {
+ panic("npf attach failed: %d", error);
+ }
+
+ error = rump_vfs_makeonedevnode(S_IFCHR, "/dev/npf", cmajor, 0);
+ if (error) {
+ panic("npf device node creation failed: %d", error);
+ }
+}
diff -r c281fb5a2a13 -r ac5013e1749f sys/rump/net/lib/libnpf/shlib_version
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libnpf/shlib_version Sun Nov 18 21:45:08 2012 +0000
@@ -0,0 +1,4 @@
+# $NetBSD: shlib_version,v 1.1.6.2 2012/11/18 21:45:08 riz Exp $
+#
+major=0
+minor=0
diff -r c281fb5a2a13 -r ac5013e1749f usr.sbin/npf/npftest/Makefile
--- a/usr.sbin/npf/npftest/Makefile Sun Nov 18 19:16:29 2012 +0000
+++ b/usr.sbin/npf/npftest/Makefile Sun Nov 18 21:45:08 2012 +0000
@@ -12,7 +12,7 @@
DPADD+= ${LIBNPFTEST}/libnpftest.a
LDADD+= -L${LIBNPFTEST} -lnpftest
-LDADD+= -lrump -lrumpvfs -lrumpnet -lrumpnet_net -lrumpdev_npf
+LDADD+= -lrump -lrumpvfs -lrumpnet -lrumpnet_net -lrumpnet_npf
LDADD+= -lpcap -lprop -lpthread
Home |
Main Index |
Thread Index |
Old Index