Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Initialize dom_mowner for MBUFTRACE



details:   https://anonhg.NetBSD.org/src/rev/e0c3f8470fc4
branches:  trunk
changeset: 453588:e0c3f8470fc4
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Aug 19 03:23:30 2019 +0000

description:
Initialize dom_mowner for MBUFTRACE

diffstat:

 sys/net/rtsock_shared.c |  11 +++++++++--
 sys/netinet/if_arp.c    |  11 +++++++++--
 2 files changed, 18 insertions(+), 4 deletions(-)

diffs (76 lines):

diff -r 65c22ac8dbf6 -r e0c3f8470fc4 sys/net/rtsock_shared.c
--- a/sys/net/rtsock_shared.c   Mon Aug 19 03:22:47 2019 +0000
+++ b/sys/net/rtsock_shared.c   Mon Aug 19 03:23:30 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock_shared.c,v 1.9 2019/05/03 02:10:58 pgoyette Exp $       */
+/*     $NetBSD: rtsock_shared.c,v 1.10 2019/08/19 03:23:30 ozaki-r Exp $       */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.9 2019/05/03 02:10:58 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock_shared.c,v 1.10 2019/08/19 03:23:30 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1646,6 +1646,10 @@
        ri->ri_sih = softint_establish(SOFTINT_NET | SOFTINT_MPSAFE,
            COMPATNAME(route_intr), NULL);
        IFQ_LOCK_INIT(&ri->ri_intrq);
+
+#ifdef MBUFTRACE
+       MOWNER_ATTACH(&COMPATNAME(routedomain).dom_mowner);
+#endif
 }
 
 /*
@@ -1698,4 +1702,7 @@
        .dom_protosw = COMPATNAME(route_protosw),
        .dom_protoswNPROTOSW =
            &COMPATNAME(route_protosw)[__arraycount(COMPATNAME(route_protosw))],
+#ifdef MBUFTRACE
+       .dom_mowner = MOWNER_INIT("route", "rtm"),
+#endif
 };
diff -r 65c22ac8dbf6 -r e0c3f8470fc4 sys/netinet/if_arp.c
--- a/sys/netinet/if_arp.c      Mon Aug 19 03:22:47 2019 +0000
+++ b/sys/netinet/if_arp.c      Mon Aug 19 03:23:30 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_arp.c,v 1.282 2019/04/29 16:12:30 roy Exp $ */
+/*     $NetBSD: if_arp.c,v 1.283 2019/08/19 03:23:30 ozaki-r Exp $     */
 
 /*
  * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc.
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.282 2019/04/29 16:12:30 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_arp.c,v 1.283 2019/08/19 03:23:30 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -247,6 +247,9 @@
        .dom_name = "arp",
        .dom_protosw = arpsw,
        .dom_protoswNPROTOSW = &arpsw[__arraycount(arpsw)],
+#ifdef MBUFTRACE
+       .dom_mowner = MOWNER_INIT("internet", "arp"),
+#endif
 };
 
 static void sysctl_net_inet_arp_setup(struct sysctllog **);
@@ -258,6 +261,10 @@
        sysctl_net_inet_arp_setup(NULL);
        arpstat_percpu = percpu_alloc(sizeof(uint64_t) * ARP_NSTATS);
        IFQ_LOCK_INIT(&arpintrq);
+
+#ifdef MBUFTRACE
+       MOWNER_ATTACH(&arpdomain.dom_mowner);
+#endif
 }
 
 static void



Home | Main Index | Thread Index | Old Index