Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Garbage-collect the remaining vestiges of netisr.
details: https://anonhg.NetBSD.org/src/rev/ee9d5ad78423
branches: trunk
changeset: 369834:ee9d5ad78423
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat Sep 03 02:47:59 2022 +0000
description:
Garbage-collect the remaining vestiges of netisr.
diffstat:
distrib/sets/lists/comp/mi | 4 +-
sys/dev/ic/hd64570.c | 28 +---
sys/dev/pci/if_vte.c | 5 +-
sys/dev/usb/uhso.c | 8 +-
sys/kern/kern_softint.c | 29 +----
sys/net/Makefile | 4 +-
sys/net/if.c | 5 +-
sys/net/if.h | 16 +--
sys/net/if_arcsubr.c | 5 +-
sys/net/if_ethersubr.c | 5 +-
sys/net/if_faith.c | 5 +-
sys/net/if_gif.c | 5 +-
sys/net/if_gre.c | 5 +-
sys/net/if_ieee1394subr.c | 5 +-
sys/net/if_l2tp.c | 5 +-
sys/net/if_loop.c | 6 +-
sys/net/if_media.c | 5 +-
sys/net/if_mpls.c | 5 +-
sys/net/if_ppp.c | 5 +-
sys/net/if_sl.c | 5 +-
sys/net/if_spppsubr.c | 34 +-----
sys/net/if_stf.c | 5 +-
sys/net/netisr.h | 121 ----------------------
sys/net/netisr_dispatch.h | 30 -----
sys/netatalk/ddp_input.c | 5 +-
sys/netcan/if_canloop.c | 6 +-
sys/rump/include/rump-sys/net.h | 4 +-
sys/rump/librump/rumpnet/netisr.c | 66 ------------
sys/rump/net/lib/libnetcan/netcan_component.c | 5 +-
sys/rump/net/lib/libnetinet/netinet_component.c | 5 +-
sys/rump/net/lib/libnetinet6/netinet6_component.c | 5 +-
sys/rump/net/lib/libnetmpls/netmpls_component.c | 5 +-
32 files changed, 70 insertions(+), 381 deletions(-)
diffs (truncated from 1124 to 300 lines):
diff -r 65b314f521c7 -r ee9d5ad78423 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Sat Sep 03 02:24:59 2022 +0000
+++ b/distrib/sets/lists/comp/mi Sat Sep 03 02:47:59 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.2418 2022/08/27 08:31:58 christos Exp $
+# $NetBSD: mi,v 1.2419 2022/09/03 02:47:59 thorpej Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
./etc/mtree/set.comp comp-sys-root
@@ -2638,7 +2638,7 @@
./usr/include/net/if_wg.h comp-c-include
./usr/include/net/nd.h comp-c-include
./usr/include/net/net_stats.h comp-c-include
-./usr/include/net/netisr.h comp-c-include
+./usr/include/net/netisr.h comp-obsolete obsolete
./usr/include/net/npf.h comp-c-include
./usr/include/net/npf_ncode.h comp-obsolete obsolete
./usr/include/net/pfil.h comp-c-include
diff -r 65b314f521c7 -r ee9d5ad78423 sys/dev/ic/hd64570.c
--- a/sys/dev/ic/hd64570.c Sat Sep 03 02:24:59 2022 +0000
+++ b/sys/dev/ic/hd64570.c Sat Sep 03 02:47:59 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: hd64570.c,v 1.56 2021/08/17 22:00:31 andvar Exp $ */
+/* $NetBSD: hd64570.c,v 1.57 2022/09/03 02:48:00 thorpej Exp $ */
/*
* Copyright (c) 1999 Christian E. Hopps
@@ -65,7 +65,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.56 2021/08/17 22:00:31 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.57 2022/09/03 02:48:00 thorpej Exp $");
#include "opt_inet.h"
@@ -79,7 +79,6 @@
#include <net/if.h>
#include <net/if_types.h>
-#include <net/netisr.h>
#if defined(INET) || defined(INET6)
#include <netinet/in.h>
@@ -1533,7 +1532,6 @@
sca_frame_process(sca_port_t *scp)
{
pktqueue_t *pktq = NULL;
- struct ifqueue *ifq = NULL;
struct hdlc_header *hdlc;
struct cisco_pkt *cisco;
sca_desc_t *desc;
@@ -1541,7 +1539,6 @@
u_int8_t *bufp;
u_int16_t len;
u_int32_t t;
- int isr = 0;
t = time_uptime * 1000;
desc = &scp->sp_rxdesc[scp->sp_rxstart];
@@ -1659,12 +1656,11 @@
cisco->time0 = htons((u_int16_t)(t >> 16));
cisco->time1 = htons((u_int16_t)(t & 0x0000ffff));
- ifq = &scp->linkq;
- if (IF_QFULL(ifq)) {
- IF_DROP(ifq);
+ if (IF_QFULL(&scp->linkq)) {
+ IF_DROP(&scp->linkq);
goto dropit;
}
- IF_ENQUEUE(ifq, m);
+ IF_ENQUEUE(&scp->linkq, m);
sca_start(&scp->sp_if);
@@ -1693,18 +1689,8 @@
}
/* Queue the packet */
- if (__predict_true(pktq)) {
- if (__predict_false(!pktq_enqueue(pktq, m, 0))) {
- if_statinc(&scp->sp_if, if_iqdrops);
- goto dropit;
- }
- return;
- }
- if (!IF_QFULL(ifq)) {
- IF_ENQUEUE(ifq, m);
- schednetisr(isr);
- } else {
- IF_DROP(ifq);
+ KASSERT(pktq != NULL);
+ if (__predict_false(!pktq_enqueue(pktq, m, 0))) {
if_statinc(&scp->sp_if, if_iqdrops);
goto dropit;
}
diff -r 65b314f521c7 -r ee9d5ad78423 sys/dev/pci/if_vte.c
--- a/sys/dev/pci/if_vte.c Sat Sep 03 02:24:59 2022 +0000
+++ b/sys/dev/pci/if_vte.c Sat Sep 03 02:47:59 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vte.c,v 1.32 2021/08/30 20:09:22 andvar Exp $ */
+/* $NetBSD: if_vte.c,v 1.33 2022/09/03 02:48:00 thorpej Exp $ */
/*
* Copyright (c) 2011 Manuel Bouyer. All rights reserved.
@@ -55,7 +55,7 @@
/* Driver for DM&P Electronics, Inc, Vortex86 RDC R6040 FastEthernet. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vte.c,v 1.32 2021/08/30 20:09:22 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vte.c,v 1.33 2022/09/03 02:48:00 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -74,7 +74,6 @@
#include <net/if_types.h>
#include <net/if_dl.h>
#include <net/route.h>
-#include <net/netisr.h>
#include <net/bpf.h>
#include <sys/rndsource.h>
diff -r 65b314f521c7 -r ee9d5ad78423 sys/dev/usb/uhso.c
--- a/sys/dev/usb/uhso.c Sat Sep 03 02:24:59 2022 +0000
+++ b/sys/dev/usb/uhso.c Sat Sep 03 02:47:59 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhso.c,v 1.35 2021/06/13 09:27:20 mlelstv Exp $ */
+/* $NetBSD: uhso.c,v 1.36 2022/09/03 02:48:00 thorpej Exp $ */
/*-
* Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.35 2021/06/13 09:27:20 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.36 2022/09/03 02:48:00 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -64,8 +64,8 @@
#include <net/if.h>
#include <net/if_dl.h>
#include <net/if_types.h>
-#include <net/netisr.h>
-
+
+#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
#include <netinet/ip.h>
diff -r 65b314f521c7 -r ee9d5ad78423 sys/kern/kern_softint.c
--- a/sys/kern/kern_softint.c Sat Sep 03 02:24:59 2022 +0000
+++ b/sys/kern/kern_softint.c Sat Sep 03 02:47:59 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_softint.c,v 1.70 2022/03/30 17:02:02 riastradh Exp $ */
+/* $NetBSD: kern_softint.c,v 1.71 2022/09/03 02:48:00 thorpej Exp $ */
/*-
* Copyright (c) 2007, 2008, 2019, 2020 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.70 2022/03/30 17:02:02 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_softint.c,v 1.71 2022/09/03 02:48:00 thorpej Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -183,8 +183,7 @@
#include <sys/evcnt.h>
#include <sys/cpu.h>
#include <sys/xcall.h>
-
-#include <net/netisr.h>
+#include <sys/psref.h>
#include <uvm/uvm_extern.h>
@@ -223,7 +222,6 @@
u_int softint_timing;
static u_int softint_max;
static kmutex_t softint_lock;
-static void *softint_netisrs[NETISR_MAX];
/*
* softint_init_isr:
@@ -317,15 +315,6 @@
&sc->sc_int[sh->sh_flags & SOFTINT_LVLMASK];
}
mutex_exit(&softint_lock);
- } else {
- /*
- * Establish handlers for legacy net interrupts.
- * XXX Needs to go away.
- */
-#define DONETISR(n, f) \
- softint_netisrs[(n)] = softint_establish(SOFTINT_NET|SOFTINT_MPSAFE,\
- (void (*)(void *))(f), NULL)
-#include <net/netisr_dispatch.h>
}
}
@@ -609,18 +598,6 @@
si->si_evcnt_block.ev_count++;
}
-/*
- * schednetisr:
- *
- * Trigger a legacy network interrupt. XXX Needs to go away.
- */
-void
-schednetisr(int isr)
-{
-
- softint_schedule(softint_netisrs[isr]);
-}
-
#ifndef __HAVE_FAST_SOFTINTS
#ifdef __HAVE_PREEMPTION
diff -r 65b314f521c7 -r ee9d5ad78423 sys/net/Makefile
--- a/sys/net/Makefile Sat Sep 03 02:24:59 2022 +0000
+++ b/sys/net/Makefile Sat Sep 03 02:47:59 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2021/05/17 04:07:43 yamaguchi Exp $
+# $NetBSD: Makefile,v 1.46 2022/09/03 02:47:59 thorpej Exp $
INCSDIR= /usr/include/net
@@ -7,7 +7,7 @@
if_gre.h if_ieee1394.h if_ipsec.h if_llc.h if_media.h if_mpls.h \
if_pflog.h if_ppp.h if_pppoe.h if_l2tp.h if_sppp.h if_srt.h if_stats.h \
if_stf.h if_tap.h if_tun.h if_types.h if_vlanvar.h if_wg.h \
- nd.h net_stats.h netisr.h \
+ nd.h net_stats.h \
pfil.h pfkeyv2.h pfvar.h ppp-comp.h ppp_defs.h radix.h \
raw_cb.h route.h slcompress.h slip.h zlib.h
diff -r 65b314f521c7 -r ee9d5ad78423 sys/net/if.c
--- a/sys/net/if.c Sat Sep 03 02:24:59 2022 +0000
+++ b/sys/net/if.c Sat Sep 03 02:47:59 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.523 2022/09/02 05:50:36 thorpej Exp $ */
+/* $NetBSD: if.c,v 1.524 2022/09/03 02:47:59 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.523 2022/09/02 05:50:36 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.524 2022/09/03 02:47:59 thorpej Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -132,7 +132,6 @@
#include <net80211/ieee80211_ioctl.h>
#include <net/if_types.h>
#include <net/route.h>
-#include <net/netisr.h>
#include <sys/module.h>
#ifdef NETATALK
#include <netatalk/at_extern.h>
diff -r 65b314f521c7 -r ee9d5ad78423 sys/net/if.h
--- a/sys/net/if.h Sat Sep 03 02:24:59 2022 +0000
+++ b/sys/net/if.h Sat Sep 03 02:47:59 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.h,v 1.300 2022/08/20 11:09:24 riastradh Exp $ */
+/* $NetBSD: if.h,v 1.301 2022/09/03 02:47:59 thorpej Exp $ */
/*-
* Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -1088,20 +1088,6 @@
#define IFQ_INC_DROPS(ifq) ((ifq)->ifq_drops++)
#define IFQ_SET_MAXLEN(ifq, len) ((ifq)->ifq_maxlen = (len))
-#define IFQ_ENQUEUE_ISR(ifq, m, isr) \
-do { \
- IFQ_LOCK(inq); \
- if (IF_QFULL(inq)) { \
- IF_DROP(inq); \
- IFQ_UNLOCK(inq); \
- m_freem(m); \
- } else { \
- IF_ENQUEUE(inq, m); \
- IFQ_UNLOCK(inq); \
- schednetisr(isr); \
- } \
-} while (/*CONSTCOND*/ 0)
-
#include <sys/mallocvar.h>
MALLOC_DECLARE(M_IFADDR);
MALLOC_DECLARE(M_IFMADDR);
diff -r 65b314f521c7 -r ee9d5ad78423 sys/net/if_arcsubr.c
--- a/sys/net/if_arcsubr.c Sat Sep 03 02:24:59 2022 +0000
+++ b/sys/net/if_arcsubr.c Sat Sep 03 02:47:59 2022 +0000
Home |
Main Index |
Thread Index |
Old Index