Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Revert "Pull if_drain routine out of m_reclaim"
details: https://anonhg.NetBSD.org/src/rev/26c834cc8dcb
branches: trunk
changeset: 334692:26c834cc8dcb
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Tue Dec 02 04:43:35 2014 +0000
description:
Revert "Pull if_drain routine out of m_reclaim"
The commit broke dlopen()'d rumpnet on platforms where ld.so does not
override weak aliases (e.g. musl, Solaris, potentially OS X, ...).
Requested by pooka@.
diffstat:
sys/kern/uipc_mbuf.c | 10 +++++++---
sys/net/if.c | 15 ++-------------
sys/net/if.h | 3 +--
sys/rump/librump/rumpnet/net_stub.c | 6 ++----
4 files changed, 12 insertions(+), 22 deletions(-)
diffs (119 lines):
diff -r ab9bbd627784 -r 26c834cc8dcb sys/kern/uipc_mbuf.c
--- a/sys/kern/uipc_mbuf.c Tue Dec 02 03:51:48 2014 +0000
+++ b/sys/kern/uipc_mbuf.c Tue Dec 02 04:43:35 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_mbuf.c,v 1.159 2014/11/27 03:15:51 ozaki-r Exp $ */
+/* $NetBSD: uipc_mbuf.c,v 1.160 2014/12/02 04:43:35 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2001 The NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.159 2014/11/27 03:15:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_mbuf.c,v 1.160 2014/12/02 04:43:35 ozaki-r Exp $");
#include "opt_mbuftrace.h"
#include "opt_nmbclusters.h"
@@ -543,6 +543,7 @@
{
struct domain *dp;
const struct protosw *pr;
+ struct ifnet *ifp;
int s;
KERNEL_LOCK(1, NULL);
@@ -553,7 +554,10 @@
if (pr->pr_drain)
(*pr->pr_drain)();
}
- if_drain_all();
+ IFNET_FOREACH(ifp) {
+ if (ifp->if_drain)
+ (*ifp->if_drain)(ifp);
+ }
splx(s);
mbstat.m_drain++;
KERNEL_UNLOCK_ONE(NULL);
diff -r ab9bbd627784 -r 26c834cc8dcb sys/net/if.c
--- a/sys/net/if.c Tue Dec 02 03:51:48 2014 +0000
+++ b/sys/net/if.c Tue Dec 02 04:43:35 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.302 2014/12/01 07:15:42 ozaki-r Exp $ */
+/* $NetBSD: if.c,v 1.303 2014/12/02 04:43:35 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.302 2014/12/01 07:15:42 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.303 2014/12/02 04:43:35 ozaki-r Exp $");
#include "opt_inet.h"
@@ -2329,17 +2329,6 @@
return rc;
}
-void
-if_drain_all(void)
-{
- struct ifnet *ifp;
-
- IFNET_FOREACH(ifp) {
- if (ifp->if_drain)
- (*ifp->if_drain)(ifp);
- }
-}
-
static void
sysctl_sndq_setup(struct sysctllog **clog, const char *ifname,
struct ifaltq *ifq)
diff -r ab9bbd627784 -r 26c834cc8dcb sys/net/if.h
--- a/sys/net/if.h Tue Dec 02 03:51:48 2014 +0000
+++ b/sys/net/if.h Tue Dec 02 04:43:35 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.182 2014/12/01 07:15:42 ozaki-r Exp $ */
+/* $NetBSD: if.h,v 1.183 2014/12/02 04:43:35 ozaki-r Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -962,7 +962,6 @@
extern struct ifnet *lo0ifp;
ifnet_t * if_byindex(u_int);
-void if_drain_all(void);
/*
* ifq sysctl support
diff -r ab9bbd627784 -r 26c834cc8dcb sys/rump/librump/rumpnet/net_stub.c
--- a/sys/rump/librump/rumpnet/net_stub.c Tue Dec 02 03:51:48 2014 +0000
+++ b/sys/rump/librump/rumpnet/net_stub.c Tue Dec 02 04:43:35 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: net_stub.c,v 1.19 2014/11/27 03:15:51 ozaki-r Exp $ */
+/* $NetBSD: net_stub.c,v 1.20 2014/12/02 04:43:35 ozaki-r Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.19 2014/11/27 03:15:51 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.20 2014/12/02 04:43:35 ozaki-r Exp $");
#include <sys/param.h>
#include <sys/protosw.h>
@@ -61,9 +61,7 @@
__weak_alias(ieee8023ad_lacp_input,rumpnet_stub);
__weak_alias(ieee8023ad_marker_input,rumpnet_stub);
-/* if */
struct ifnet_head ifnet_list;
-__weak_alias(if_drain_all,rumpnet_stub);
int
compat_ifconf(u_long cmd, void *data)
Home |
Main Index |
Thread Index |
Old Index