From 5bdc9bebb2bcffd888e3a3e809f2b99261121ebd Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Fri, 16 Nov 2007 05:07:36 +0000 Subject: [PATCH] Nuke net/intrq.[ch] and ipintrq related bits; they were gone almost three years ago. --- sys/kern/kern_poll.c | 18 +++-- sys/net/intrq.c | 117 --------------------------------- sys/net/intrq.h | 45 ------------- sys/netgraph/fec/ng_fec.c | 3 +- sys/netinet/in.c | 6 +- sys/netinet/ip_input.c | 13 +--- sys/netproto/atalk/ddp_input.c | 3 +- sys/netproto/ipx/ipx_input.c | 3 +- 8 files changed, 15 insertions(+), 193 deletions(-) delete mode 100644 sys/net/intrq.c delete mode 100644 sys/net/intrq.h diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c index 1c1aaece40..ffc07a99a9 100644 --- a/sys/kern/kern_poll.c +++ b/sys/kern/kern_poll.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_poll.c,v 1.2.2.4 2002/06/27 23:26:33 luigi Exp $ - * $DragonFly: src/sys/kern/kern_poll.c,v 1.42 2007/11/11 07:38:29 sephe Exp $ + * $DragonFly: src/sys/kern/kern_poll.c,v 1.43 2007/11/16 05:07:36 sephe Exp $ */ #include "opt_polling.h" @@ -456,15 +456,13 @@ pollclock(systimer_t info, struct intrframe *frame __unused) * another NETISR_POLL call, or adapting the burst size for the next cycle. * * It is very bad to fetch large bursts of packets from a single card at once, - * because the burst could take a long time to be completely processed, or - * could saturate the intermediate queue (ipintrq or similar) leading to - * losses or unfairness. To reduce the problem, and also to account better for - * time spent in network-related processing, we split the burst in smaller - * chunks of fixed size, giving control to the other netisr's between chunks. - * This helps in improving the fairness, reducing livelock (because we - * emulate more closely the "process to completion" that we have with - * fastforwarding) and accounting for the work performed in low level - * handling and forwarding. + * because the burst could take a long time to be completely processed leading + * to unfairness. To reduce the problem, and also to account better for time + * spent in network-related processing, we split the burst in smaller chunks + * of fixed size, giving control to the other netisr's between chunks. This + * helps in improving the fairness, reducing livelock (because we emulate more + * closely the "process to completion" that we have with fastforwarding) and + * accounting for the work performed in low level handling and forwarding. */ /* ARGSUSED */ diff --git a/sys/net/intrq.c b/sys/net/intrq.c deleted file mode 100644 index 3f467b8d84..0000000000 --- a/sys/net/intrq.c +++ /dev/null @@ -1,117 +0,0 @@ -/*- - * Copyright (c) 2000 Brian Somers - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/net/intrq.c,v 1.3 2000/01/29 16:13:08 peter Exp $ - * $DragonFly: src/sys/net/Attic/intrq.c,v 1.6 2006/01/14 11:05:17 swildner Exp $ - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#ifdef __i386__ -#include /* XXX overkill, fixme! */ -#endif - -/* - * If the appropriate intrq_present variable is zero, don't use - * the queue (as it'll never get processed). - * When defined, each of the network stacks declares their own - * *intrq_present variable to be non-zero. - */ -const int atintrq1_present; -const int atintrq2_present; -#ifdef NETISR_ATM -const int atmintrq_present; -#endif -const int ipintrq_present; -const int ip6intrq_present; -const int ipxintrq_present; -const int natmintrq_present; -const int nsintrq_present; - -struct ifqueue atintrq1; -struct ifqueue atintrq2; -#ifdef NETISR_ATM -struct ifqueue atm_intrq; -#endif -struct ifqueue ipintrq; -struct ifqueue ip6intrq; -struct ifqueue ipxintrq; -struct ifqueue natmintrq; -struct ifqueue nsintrq; - - -static const struct { - sa_family_t family; - struct ifqueue *q; - int const *present; - int isr; -} queue[] = { -#ifdef NETISR_ATM - { AF_ATM, &atm_intrq, &atmintrq_present, NETISR_ATM }, -#endif - { AF_INET, &ipintrq, &ipintrq_present, NETISR_IP }, - { AF_INET6, &ip6intrq, &ip6intrq_present, NETISR_IPV6 }, - { AF_IPX, &ipxintrq, &ipxintrq_present, NETISR_IPX }, - { AF_NATM, &natmintrq, &natmintrq_present, NETISR_NATM }, - { AF_APPLETALK, &atintrq2, &atintrq2_present, NETISR_ATALK2 }, - { AF_NS, &nsintrq, &nsintrq_present, NETISR_NS } -}; - -int -family_enqueue(sa_family_t family, struct mbuf *m) -{ - int entry, s; - - for (entry = 0; entry < sizeof queue / sizeof queue[0]; entry++) - if (queue[entry].family == family) { - if (queue[entry].present) { - crit_enter(); - if (IF_QFULL(queue[entry].q)) { - IF_DROP(queue[entry].q); - crit_exit(); - m_freem(m); - return ENOBUFS; - } - IF_ENQUEUE(queue[entry].q, m); - crit_exit(); - schednetisr(queue[entry].isr); - return 0; - } else - break; - } - - m_freem(m); - return EAFNOSUPPORT; -} diff --git a/sys/net/intrq.h b/sys/net/intrq.h deleted file mode 100644 index 1a2f7a917f..0000000000 --- a/sys/net/intrq.h +++ /dev/null @@ -1,45 +0,0 @@ -/*- - * Copyright (c) 2000 Brian Somers - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/net/intrq.h,v 1.2 2000/01/27 23:37:39 brian Exp $ - * $DragonFly: src/sys/net/Attic/intrq.h,v 1.4 2006/05/20 02:42:08 dillon Exp $ - */ - -#ifndef _NET_INTRQ_H_ -#define _NET_INTRQ_H_ - -#ifdef _KERNEL - -#ifndef _SYS_SOCKET_H_ -#include -#endif - -struct mbuf; - -extern int family_enqueue (sa_family_t, struct mbuf *); - -#endif - -#endif /* _NET_INTRQ_H_ */ diff --git a/sys/netgraph/fec/ng_fec.c b/sys/netgraph/fec/ng_fec.c index 0126dfd0f4..2313e83da6 100644 --- a/sys/netgraph/fec/ng_fec.c +++ b/sys/netgraph/fec/ng_fec.c @@ -33,7 +33,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/netgraph/ng_fec.c,v 1.1.2.1 2002/11/01 21:39:31 julian Exp $ - * $DragonFly: src/sys/netgraph/fec/ng_fec.c,v 1.20 2007/10/13 10:50:34 sephe Exp $ + * $DragonFly: src/sys/netgraph/fec/ng_fec.c,v 1.21 2007/11/16 05:07:36 sephe Exp $ */ /* * Copyright (c) 1996-1999 Whistle Communications, Inc. @@ -106,7 +106,6 @@ #include #include #include -#include #include #include diff --git a/sys/netinet/in.c b/sys/netinet/in.c index cf8f9ce717..4e6157df1f 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -32,7 +32,7 @@ * * @(#)in.c 8.4 (Berkeley) 1/9/95 * $FreeBSD: src/sys/netinet/in.c,v 1.44.2.14 2002/11/08 00:45:50 suz Exp $ - * $DragonFly: src/sys/netinet/in.c,v 1.20 2006/09/30 22:38:21 swildner Exp $ + * $DragonFly: src/sys/netinet/in.c,v 1.21 2007/11/16 05:07:36 sephe Exp $ */ #include "opt_bootp.h" @@ -272,7 +272,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, return (ENOBUFS); bzero(ia, sizeof *ia); /* - * Protect from ipintr() traversing address list + * Protect from NETISR_IP traversing address list * while we're modifying it. */ crit_enter(); @@ -442,7 +442,7 @@ in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp, } /* - * Protect from ipintr() traversing address list while we're modifying + * Protect from NETISR_IP traversing address list while we're modifying * it. */ lwkt_serialize_enter(ifp->if_serializer); diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 6f28757215..8b3e6ce84c 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -65,7 +65,7 @@ * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 * $FreeBSD: src/sys/netinet/ip_input.c,v 1.130.2.52 2003/03/07 07:01:28 silby Exp $ - * $DragonFly: src/sys/netinet/ip_input.c,v 1.72 2007/11/16 02:45:45 sephe Exp $ + * $DragonFly: src/sys/netinet/ip_input.c,v 1.73 2007/11/16 05:07:36 sephe Exp $ */ #define _IP_VHL @@ -103,7 +103,6 @@ #include #include #include -#include #include #include @@ -203,9 +202,6 @@ SYSCTL_INT(_net_inet_ip, OID_AUTO, check_interface, CTLFLAG_RW, static int ipprintfs = 0; #endif -static struct ifqueue ipintrq; -static int ipqmaxlen = IFQ_MAXLEN; - extern struct domain inetdomain; extern struct protosw inetsw[]; u_char ip_protox[IPPROTO_MAX]; @@ -213,11 +209,6 @@ struct in_ifaddrhead in_ifaddrhead; /* first inet address */ struct in_ifaddrhashhead *in_ifaddrhashtbl; /* inet addr hash table */ u_long in_ifaddrhmask; /* mask for hash table */ -SYSCTL_INT(_net_inet_ip, IPCTL_INTRQMAXLEN, intr_queue_maxlen, CTLFLAG_RW, - &ipintrq.ifq_maxlen, 0, "Maximum size of the IP input queue"); -SYSCTL_INT(_net_inet_ip, IPCTL_INTRQDROPS, intr_queue_drops, CTLFLAG_RD, - &ipintrq.ifq_drops, 0, "Number of packets dropped from the IP input queue"); - struct ip_stats ipstats_percpu[MAXCPU]; #ifdef SMP static int @@ -251,7 +242,6 @@ SYSCTL_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW, (((((x) & 0xF) | ((((x) >> 8) & 0xF) << 4)) ^ (y)) & IPREASS_HMASK) static struct ipq ipq[IPREASS_NHASH]; -const int ipintrq_present = 1; #ifdef IPCTL_DEFMTU SYSCTL_INT(_net_inet_ip, IPCTL_DEFMTU, mtu, CTLFLAG_RW, @@ -355,7 +345,6 @@ ip_init(void) maxfragsperpacket = 16; ip_id = time_second & 0xffff; - ipintrq.ifq_maxlen = ipqmaxlen; /* * Initialize IP statistics counters for each CPU. diff --git a/sys/netproto/atalk/ddp_input.c b/sys/netproto/atalk/ddp_input.c index 3d730d21ac..40757cd795 100644 --- a/sys/netproto/atalk/ddp_input.c +++ b/sys/netproto/atalk/ddp_input.c @@ -3,7 +3,7 @@ * All Rights Reserved. See COPYRIGHT. * * $FreeBSD: src/sys/netatalk/ddp_input.c,v 1.12 2000/02/13 03:31:58 peter Exp $ - * $DragonFly: src/sys/netproto/atalk/ddp_input.c,v 1.14 2007/05/23 08:57:06 dillon Exp $ + * $DragonFly: src/sys/netproto/atalk/ddp_input.c,v 1.15 2007/11/16 05:07:36 sephe Exp $ */ #include @@ -19,7 +19,6 @@ #include #include #include -#include #include "at.h" #include "at_var.h" diff --git a/sys/netproto/ipx/ipx_input.c b/sys/netproto/ipx/ipx_input.c index 0035965813..0c58e7a966 100644 --- a/sys/netproto/ipx/ipx_input.c +++ b/sys/netproto/ipx/ipx_input.c @@ -34,7 +34,7 @@ * @(#)ipx_input.c * * $FreeBSD: src/sys/netipx/ipx_input.c,v 1.22.2.2 2001/02/22 09:44:18 bp Exp $ - * $DragonFly: src/sys/netproto/ipx/ipx_input.c,v 1.16 2007/05/23 08:57:08 dillon Exp $ + * $DragonFly: src/sys/netproto/ipx/ipx_input.c,v 1.17 2007/11/16 05:07:36 sephe Exp $ */ #include @@ -52,7 +52,6 @@ #include #include #include -#include #include "ipx.h" #include "spx.h" -- 2.41.0