Garbage-collect everything related to struct domain::dom_ifqueues
(except dom_ifqueues itself, until the next kernel version bump). It's no longer used now that nothing uses the legacy netisr mechanism.
This commit is contained in:
parent
6ffff4f242
commit
97fd514741
47
sys/net/if.c
47
sys/net/if.c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if.c,v 1.524 2022/09/03 02:47:59 thorpej Exp $ */
|
||||
/* $NetBSD: if.c,v 1.525 2022/09/03 02:53:18 thorpej 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.524 2022/09/03 02:47:59 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.525 2022/09/03 02:53:18 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_inet.h"
|
||||
|
@ -219,7 +219,6 @@ pfil_head_t * if_pfil __read_mostly;
|
|||
static kauth_listener_t if_listener;
|
||||
|
||||
static int doifioctl(struct socket *, u_long, void *, struct lwp *);
|
||||
static void if_detach_queues(struct ifnet *, struct ifqueue *);
|
||||
static void sysctl_sndq_setup(struct sysctllog **, const char *,
|
||||
struct ifaltq *);
|
||||
static void if_slowtimo_intr(void *);
|
||||
|
@ -1397,19 +1396,6 @@ if_detach(struct ifnet *ifp)
|
|||
carp_ifdetach(ifp);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* remove packets that came from ifp, from software interrupt queues.
|
||||
*/
|
||||
DOMAIN_FOREACH(dp) {
|
||||
for (i = 0; i < __arraycount(dp->dom_ifqueues); i++) {
|
||||
struct ifqueue *iq = dp->dom_ifqueues[i];
|
||||
if (iq == NULL)
|
||||
break;
|
||||
dp->dom_ifqueues[i] = NULL;
|
||||
if_detach_queues(ifp, iq);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Ensure that all packets on protocol input pktqueues have been
|
||||
* processed, or, at least, removed from the queues.
|
||||
|
@ -1559,35 +1545,6 @@ restart:
|
|||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
if_detach_queues(struct ifnet *ifp, struct ifqueue *q)
|
||||
{
|
||||
struct mbuf *m, *prev, *next;
|
||||
|
||||
prev = NULL;
|
||||
for (m = q->ifq_head; m != NULL; m = next) {
|
||||
KASSERT((m->m_flags & M_PKTHDR) != 0);
|
||||
|
||||
next = m->m_nextpkt;
|
||||
if (m->m_pkthdr.rcvif_index != ifp->if_index) {
|
||||
prev = m;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (prev != NULL)
|
||||
prev->m_nextpkt = m->m_nextpkt;
|
||||
else
|
||||
q->ifq_head = m->m_nextpkt;
|
||||
if (q->ifq_tail == m)
|
||||
q->ifq_tail = prev;
|
||||
q->ifq_len--;
|
||||
|
||||
m->m_nextpkt = NULL;
|
||||
m_freem(m);
|
||||
IF_DROP(q);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Callback for a radix tree walk to delete all references to an
|
||||
* ifnet.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: in_proto.c,v 1.130 2018/09/14 05:09:51 maxv Exp $ */
|
||||
/* $NetBSD: in_proto.c,v 1.131 2022/09/03 02:53:18 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
|
||||
|
@ -61,7 +61,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.130 2018/09/14 05:09:51 maxv Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: in_proto.c,v 1.131 2022/09/03 02:53:18 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_mrouting.h"
|
||||
|
@ -486,7 +486,6 @@ struct domain inetdomain = {
|
|||
.dom_ifattach = in_domifattach,
|
||||
.dom_ifdetach = in_domifdetach,
|
||||
.dom_if_link_state_change = in_if_link_state_change,
|
||||
.dom_ifqueues = { NULL, NULL },
|
||||
.dom_link = { NULL },
|
||||
.dom_mowner = MOWNER_INIT("",""),
|
||||
.dom_sa_cmpofs = offsetof(struct sockaddr_in, sin_addr),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: in6_proto.c,v 1.128 2020/06/12 11:04:45 roy Exp $ */
|
||||
/* $NetBSD: in6_proto.c,v 1.129 2022/09/03 02:53:18 thorpej Exp $ */
|
||||
/* $KAME: in6_proto.c,v 1.66 2000/10/10 15:35:47 itojun Exp $ */
|
||||
|
||||
/*
|
||||
|
@ -62,7 +62,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.128 2020/06/12 11:04:45 roy Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: in6_proto.c,v 1.129 2022/09/03 02:53:18 thorpej Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_gateway.h"
|
||||
|
@ -495,7 +495,6 @@ struct domain inet6domain = {
|
|||
.dom_if_up = in6_if_up, .dom_if_down = in6_if_down,
|
||||
.dom_ifattach = in6_domifattach, .dom_ifdetach = in6_domifdetach,
|
||||
.dom_if_link_state_change = in6_if_link_state_change,
|
||||
.dom_ifqueues = { NULL, NULL },
|
||||
.dom_link = { NULL },
|
||||
.dom_mowner = MOWNER_INIT("",""),
|
||||
.dom_sa_cmpofs = offsetof(struct sockaddr_in6, sin6_addr),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sockin.c,v 1.66 2018/06/26 06:48:03 msaitoh Exp $ */
|
||||
/* $NetBSD: sockin.c,v 1.67 2022/09/03 02:53:18 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008, 2009 Antti Kantee. All Rights Reserved.
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.66 2018/06/26 06:48:03 msaitoh Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sockin.c,v 1.67 2022/09/03 02:53:18 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/condvar.h>
|
||||
|
@ -159,7 +159,6 @@ struct domain sockindomain = {
|
|||
.dom_maxrtkey = sizeof(struct sockaddr_in),
|
||||
.dom_ifattach = NULL,
|
||||
.dom_ifdetach = NULL,
|
||||
.dom_ifqueues = { NULL },
|
||||
.dom_link = { NULL },
|
||||
.dom_mowner = MOWNER_INIT("",""),
|
||||
.dom_sockaddr_cmp = NULL
|
||||
|
@ -177,7 +176,6 @@ struct domain sockin6domain = {
|
|||
.dom_maxrtkey = sizeof(struct sockaddr_in6),
|
||||
.dom_ifattach = NULL,
|
||||
.dom_ifdetach = NULL,
|
||||
.dom_ifqueues = { NULL },
|
||||
.dom_link = { NULL },
|
||||
.dom_mowner = MOWNER_INIT("",""),
|
||||
.dom_sockaddr_cmp = NULL
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: domain.h,v 1.34 2018/01/10 02:50:26 ozaki-r Exp $ */
|
||||
/* $NetBSD: domain.h,v 1.35 2022/09/03 02:53:18 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1993
|
||||
|
@ -85,7 +85,7 @@ struct domain {
|
|||
socklen_t,
|
||||
const struct sockaddr *);
|
||||
const struct sockaddr *dom_sa_any;
|
||||
struct ifqueue *dom_ifqueues[2]; /* ifqueue for domain */
|
||||
struct ifqueue *dom_ifqueues[2]; /* XXX G/C ifqueue for domain */
|
||||
STAILQ_ENTRY(domain) dom_link;
|
||||
struct mowner dom_mowner;
|
||||
uint_fast8_t dom_sa_cmpofs;
|
||||
|
|
Loading…
Reference in New Issue