diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-10-27 20:57:40 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-10-27 20:57:40 +0000 |
commit | ed398c49b0d0b4f0c075f8dff2957e10caec39bc (patch) | |
tree | a48b551f822b537d4e8953d65ced5b1503330d81 /sys/netinet | |
parent | 576f80bdb228a4db75a5ff984bd6214ca23dc3b9 (diff) |
delete UPCALL_TIMING debug code from a the dark ages
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_mroute.c | 45 | ||||
-rw-r--r-- | sys/netinet/ip_mroute.h | 5 |
2 files changed, 2 insertions, 48 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index a2c5ce349c7..d0ec3bfb52d 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_mroute.c,v 1.62 2013/10/23 15:12:42 mpi Exp $ */ +/* $OpenBSD: ip_mroute.c,v 1.63 2013/10/27 20:57:39 deraadt Exp $ */ /* $NetBSD: ip_mroute.c,v 1.85 2004/04/26 01:31:57 matt Exp $ */ /* @@ -145,9 +145,6 @@ static void update_mfc_params(struct mfc *, struct mfcctl2 *); static void init_mfc_params(struct mfc *, struct mfcctl2 *); static void expire_mfc(struct mfc *); static int add_mfc(struct mbuf *); -#ifdef UPCALL_TIMING -static void collate(struct timeval *); -#endif static int del_mfc(struct mbuf *); static int set_api_config(struct mbuf *); /* chose API capabilities */ static int get_api_support(struct mbuf *); @@ -357,10 +354,6 @@ mfc_find(struct in_addr *o, struct in_addr *g) } \ } while (/*CONSTCOND*/ 0) -#ifdef UPCALL_TIMING -u_int32_t upcall_data[51]; -#endif /* UPCALL_TIMING */ - /* * Handle MRT setsockopt commands to modify the multicast routing tables. */ @@ -1125,9 +1118,6 @@ add_mfc(struct mbuf *m) ip_mdq(rte->m, rte->ifp, rt); } m_freem(rte->m); -#ifdef UPCALL_TIMING - collate(&rte->t); -#endif /* UPCALL_TIMING */ free(rte, M_MRTABLE); } } @@ -1178,31 +1168,6 @@ add_mfc(struct mbuf *m) return (0); } -#ifdef UPCALL_TIMING -/* - * collect delay statistics on the upcalls - */ -static void -collate(struct timeval *t) -{ - u_int32_t d; - struct timeval tp; - u_int32_t delta; - - microtime(&tp); - - if (timercmp(t, &tp, <)) { - TV_DELTA(tp, *t, delta); - - d = delta >> 10; - if (d > 50) - d = 50; - - ++upcall_data[d]; - } -} -#endif /* UPCALL_TIMING */ - /* * Delete an mfc entry */ @@ -1344,11 +1309,6 @@ ip_mforward(struct mbuf *m, struct ifnet *ifp) struct rtdetq *rte; u_int32_t hash; int hlen = ip->ip_hl << 2; -#ifdef UPCALL_TIMING - struct timeval tp; - - microtime(&tp); -#endif /* UPCALL_TIMING */ ++mrtstat.mrts_mfc_misses; @@ -1491,9 +1451,6 @@ ip_mforward(struct mbuf *m, struct ifnet *ifp) rte->next = NULL; rte->m = mb0; rte->ifp = ifp; - #ifdef UPCALL_TIMING - rte->t = tp; - #endif /* UPCALL_TIMING */ splx(s); diff --git a/sys/netinet/ip_mroute.h b/sys/netinet/ip_mroute.h index a8ab635c416..5aa9d5ebdbc 100644 --- a/sys/netinet/ip_mroute.h +++ b/sys/netinet/ip_mroute.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_mroute.h,v 1.16 2013/05/02 11:54:10 mpi Exp $ */ +/* $OpenBSD: ip_mroute.h,v 1.17 2013/10/27 20:57:39 deraadt Exp $ */ /* $NetBSD: ip_mroute.h,v 1.23 2004/04/21 17:49:46 itojun Exp $ */ #ifndef _NETINET_IP_MROUTE_H_ @@ -279,9 +279,6 @@ struct igmpmsg { struct rtdetq { struct mbuf *m; /* a copy of the packet */ struct ifnet *ifp; /* interface pkt came in on */ -#ifdef UPCALL_TIMING - struct timeval t; /* timestamp */ -#endif /* UPCALL_TIMING */ struct rtdetq *next; }; |