CVS commit: src/sys/dev/pci/ixgbe

2023-11-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 16 05:39:08 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
ixgbe: Modify for the readability. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/ixgbe/ix_txrx.c
diff -u src/sys/dev/pci/ixgbe/ix_txrx.c:1.107 src/sys/dev/pci/ixgbe/ix_txrx.c:1.108
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.107	Tue Nov 14 03:03:18 2023
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Thu Nov 16 05:39:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.107 2023/11/14 03:03:18 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.108 2023/11/16 05:39:08 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.107 2023/11/14 03:03:18 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.108 2023/11/16 05:39:08 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1506,10 +1506,10 @@ ixgbe_setup_receive_ring(struct rx_ring 
 	ixgbe_free_receive_ring(rxr);
 
 	/* Now replenish the mbufs */
-	for (int j = 0; j != rxr->num_desc; ++j) {
+	for (int i = 0; i < rxr->num_desc; i++) {
 		struct mbuf *mp;
 
-		rxbuf = >rx_buffers[j];
+		rxbuf = >rx_buffers[i];
 
 #ifdef DEV_NETMAP
 		/*
@@ -1520,14 +1520,14 @@ ixgbe_setup_receive_ring(struct rx_ring 
 		 * an mbuf, so end the block with a continue;
 		 */
 		if ((sc->feat_en & IXGBE_FEATURE_NETMAP) && slot) {
-			int sj = netmap_idx_n2k(na->rx_rings[rxr->me], j);
+			int sj = netmap_idx_n2k(na->rx_rings[rxr->me], i);
 			uint64_t paddr;
 			void *addr;
 
 			addr = PNMB(na, slot + sj, );
 			netmap_load_map(na, rxr->ptag, rxbuf->pmap, addr);
 			/* Update descriptor and the cached value */
-			rxr->rx_base[j].read.pkt_addr = htole64(paddr);
+			rxr->rx_base[i].read.pkt_addr = htole64(paddr);
 			rxbuf->addr = htole64(paddr);
 			continue;
 		}
@@ -1559,7 +1559,7 @@ ixgbe_setup_receive_ring(struct rx_ring 
 		bus_dmamap_sync(rxr->ptag->dt_dmat, rxbuf->pmap,
 		0, mp->m_pkthdr.len, BUS_DMASYNC_PREREAD);
 		/* Update the descriptor and the cached value */
-		rxr->rx_base[j].read.pkt_addr =
+		rxr->rx_base[i].read.pkt_addr =
 		htole64(rxbuf->pmap->dm_segs[0].ds_addr);
 		rxbuf->addr = htole64(rxbuf->pmap->dm_segs[0].ds_addr);
 	}



CVS commit: src/sys/dev/pci/ixgbe

2023-11-15 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Nov 16 05:39:08 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ix_txrx.c

Log Message:
ixgbe: Modify for the readability. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/dev/pci/ixgbe/ix_txrx.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [thorpej-ifq] src/sys

2023-11-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Nov 16 05:13:14 UTC 2023

Modified Files:
src/sys/dev/usb [thorpej-ifq]: if_umb.c if_upl.c
src/sys/net [thorpej-ifq]: if.c if.h if_bridge.c if_gif.c
if_ieee1394subr.c if_loop.c if_spppsubr.c if_vlan.c
src/sys/net/lagg [thorpej-ifq]: if_laggproto.h

Log Message:
if_transmit_lock() and if_enqueue() are equivalent.  if_enqueue() is
a better name, so collapse everything down to that and garbage-collect
if_transmit_lock().


To generate a diff of this commit:
cvs rdiff -u -r1.25.8.1 -r1.25.8.2 src/sys/dev/usb/if_umb.c
cvs rdiff -u -r1.77.8.1 -r1.77.8.2 src/sys/dev/usb/if_upl.c
cvs rdiff -u -r1.529.2.1.2.3 -r1.529.2.1.2.4 src/sys/net/if.c
cvs rdiff -u -r1.305.2.1.2.4 -r1.305.2.1.2.5 src/sys/net/if.h
cvs rdiff -u -r1.189.6.1.2.1 -r1.189.6.1.2.2 src/sys/net/if_bridge.c
cvs rdiff -u -r1.157.8.1 -r1.157.8.2 src/sys/net/if_gif.c
cvs rdiff -u -r1.69.8.1 -r1.69.8.2 src/sys/net/if_ieee1394subr.c
cvs rdiff -u -r1.118.8.1 -r1.118.8.2 src/sys/net/if_loop.c
cvs rdiff -u -r1.267.4.2 -r1.267.4.3 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.171.2.1.2.1 -r1.171.2.1.2.2 src/sys/net/if_vlan.c
cvs rdiff -u -r1.18 -r1.18.8.1 src/sys/net/lagg/if_laggproto.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/if_umb.c
diff -u src/sys/dev/usb/if_umb.c:1.25.8.1 src/sys/dev/usb/if_umb.c:1.25.8.2
--- src/sys/dev/usb/if_umb.c:1.25.8.1	Thu Nov 16 04:30:21 2023
+++ src/sys/dev/usb/if_umb.c	Thu Nov 16 05:13:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_umb.c,v 1.25.8.1 2023/11/16 04:30:21 thorpej Exp $ */
+/*	$NetBSD: if_umb.c,v 1.25.8.2 2023/11/16 05:13:13 thorpej Exp $ */
 /*	$OpenBSD: if_umb.c,v 1.20 2018/09/10 17:00:45 gerhard Exp $ */
 
 /*
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.25.8.1 2023/11/16 04:30:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_umb.c,v 1.25.8.2 2023/11/16 05:13:13 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -879,7 +879,7 @@ umb_output(struct ifnet *ifp, struct mbu
 	 * Queue message on interface, and start output if interface
 	 * not yet active.
 	 */
-	error = if_transmit_lock(ifp, m);
+	error = if_enqueue(ifp, m);
 
 	return error;
 }

Index: src/sys/dev/usb/if_upl.c
diff -u src/sys/dev/usb/if_upl.c:1.77.8.1 src/sys/dev/usb/if_upl.c:1.77.8.2
--- src/sys/dev/usb/if_upl.c:1.77.8.1	Thu Nov 16 04:30:21 2023
+++ src/sys/dev/usb/if_upl.c	Thu Nov 16 05:13:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_upl.c,v 1.77.8.1 2023/11/16 04:30:21 thorpej Exp $	*/
+/*	$NetBSD: if_upl.c,v 1.77.8.2 2023/11/16 05:13:13 thorpej Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.77.8.1 2023/11/16 04:30:21 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.77.8.2 2023/11/16 05:13:13 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -276,7 +276,7 @@ upl_output(struct ifnet *ifp, struct mbu
 	 * Queue message on interface, and start output if interface
 	 * not yet active.
 	 */
-	return if_transmit_lock(ifp, m);
+	return if_enqueue(ifp, m);
 }
 
 static void

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.529.2.1.2.3 src/sys/net/if.c:1.529.2.1.2.4
--- src/sys/net/if.c:1.529.2.1.2.3	Wed Nov 15 02:19:00 2023
+++ src/sys/net/if.c	Thu Nov 16 05:13:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.529.2.1.2.3 2023/11/15 02:19:00 thorpej Exp $	*/
+/*	$NetBSD: if.c,v 1.529.2.1.2.4 2023/11/16 05:13:13 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2008, 2023 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.529.2.1.2.3 2023/11/15 02:19:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.529.2.1.2.4 2023/11/16 05:13:13 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -3796,31 +3796,6 @@ out:
 	return error;
 }
 
-int
-if_transmit_lock(struct ifnet *ifp, struct mbuf *m)
-{
-	int error;
-
-	kmsan_check_mbuf(m);
-
-#ifdef ALTQ
-	KERNEL_LOCK(1, NULL);
-	if (ALTQ_IS_ENABLED(>if_snd)) {
-		error = if_transmit(ifp, m);
-		KERNEL_UNLOCK_ONE(NULL);
-	} else {
-		KERNEL_UNLOCK_ONE(NULL);
-		error = (*ifp->if_transmit)(ifp, m);
-		/* mbuf is already freed */
-	}
-#else /* !ALTQ */
-	error = (*ifp->if_transmit)(ifp, m);
-	/* mbuf is already freed */
-#endif /* !ALTQ */
-
-	return error;
-}
-
 /*
  * ifq_init --
  *
@@ -4426,17 +4401,6 @@ ifq_classify_packet(struct ifqueue * con
 #endif /* ALTQ */
 }
 
-/*
- * Queue message on interface, and start output if interface
- * not yet active.
- */
-int
-if_enqueue(struct ifnet *ifp, struct mbuf *m)
-{
-
-	return if_transmit_lock(ifp, m);
-}
-
 #ifdef ALTQ
 static void
 ifq_lock2(struct ifqueue * const ifq0, struct ifqueue * const ifq1)
@@ -4453,6 +4417,35 @@ ifq_lock2(struct ifqueue * const ifq0, s
 #endif /* ALTQ */
 
 /*
+ * Queue message on interface, and 

CVS commit: [thorpej-ifq] src/sys

2023-11-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Nov 16 05:13:14 UTC 2023

Modified Files:
src/sys/dev/usb [thorpej-ifq]: if_umb.c if_upl.c
src/sys/net [thorpej-ifq]: if.c if.h if_bridge.c if_gif.c
if_ieee1394subr.c if_loop.c if_spppsubr.c if_vlan.c
src/sys/net/lagg [thorpej-ifq]: if_laggproto.h

Log Message:
if_transmit_lock() and if_enqueue() are equivalent.  if_enqueue() is
a better name, so collapse everything down to that and garbage-collect
if_transmit_lock().


To generate a diff of this commit:
cvs rdiff -u -r1.25.8.1 -r1.25.8.2 src/sys/dev/usb/if_umb.c
cvs rdiff -u -r1.77.8.1 -r1.77.8.2 src/sys/dev/usb/if_upl.c
cvs rdiff -u -r1.529.2.1.2.3 -r1.529.2.1.2.4 src/sys/net/if.c
cvs rdiff -u -r1.305.2.1.2.4 -r1.305.2.1.2.5 src/sys/net/if.h
cvs rdiff -u -r1.189.6.1.2.1 -r1.189.6.1.2.2 src/sys/net/if_bridge.c
cvs rdiff -u -r1.157.8.1 -r1.157.8.2 src/sys/net/if_gif.c
cvs rdiff -u -r1.69.8.1 -r1.69.8.2 src/sys/net/if_ieee1394subr.c
cvs rdiff -u -r1.118.8.1 -r1.118.8.2 src/sys/net/if_loop.c
cvs rdiff -u -r1.267.4.2 -r1.267.4.3 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.171.2.1.2.1 -r1.171.2.1.2.2 src/sys/net/if_vlan.c
cvs rdiff -u -r1.18 -r1.18.8.1 src/sys/net/lagg/if_laggproto.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [thorpej-ifq] src/sys

2023-11-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Nov 16 05:02:23 UTC 2023

Modified Files:
src/sys/altq [thorpej-ifq]: if_altq.h
src/sys/net [thorpej-ifq]: if_bridge.c if_ethersubr.c if_vlan.c
src/sys/net80211 [thorpej-ifq]: ieee80211_input.c

Log Message:
Clean up the locking protocol around altq_etherclassify().  It's no longer
required to acquire KERNEL_LOCK *just* because ALTQ is compiled into the
kernel; you only have to acquire it if ALTQ is enabled on the interface
in question.


To generate a diff of this commit:
cvs rdiff -u -r1.16.4.1 -r1.16.4.1.2.1 src/sys/altq/if_altq.h
cvs rdiff -u -r1.189.6.1 -r1.189.6.1.2.1 src/sys/net/if_bridge.c
cvs rdiff -u -r1.326.2.1.2.1 -r1.326.2.1.2.2 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.171.2.1 -r1.171.2.1.2.1 src/sys/net/if_vlan.c
cvs rdiff -u -r1.117.4.1 -r1.117.4.1.2.1 src/sys/net80211/ieee80211_input.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/altq/if_altq.h
diff -u src/sys/altq/if_altq.h:1.16.4.1 src/sys/altq/if_altq.h:1.16.4.1.2.1
--- src/sys/altq/if_altq.h:1.16.4.1	Sat Nov 11 13:16:30 2023
+++ src/sys/altq/if_altq.h	Thu Nov 16 05:02:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_altq.h,v 1.16.4.1 2023/11/11 13:16:30 thorpej Exp $	*/
+/*	$NetBSD: if_altq.h,v 1.16.4.1.2.1 2023/11/16 05:02:23 thorpej Exp $	*/
 /*	$KAME: if_altq.h,v 1.12 2005/04/13 03:44:25 suz Exp $	*/
 
 /*
@@ -188,7 +188,7 @@ extern int altq_disable(struct ifaltq *)
 extern struct mbuf *tbr_dequeue(struct ifaltq *, int);
 extern int (*altq_input)(struct mbuf *, int);
 #if 1 /* ALTQ3_CLFIER_COMPAT */
-void altq_etherclassify(struct ifaltq *, struct mbuf *);
+void altq_etherclassify(struct ifqueue *, struct mbuf *);
 #endif
 #endif /* _KERNEL */
 

Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.189.6.1 src/sys/net/if_bridge.c:1.189.6.1.2.1
--- src/sys/net/if_bridge.c:1.189.6.1	Sat Nov 11 13:16:30 2023
+++ src/sys/net/if_bridge.c	Thu Nov 16 05:02:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bridge.c,v 1.189.6.1 2023/11/11 13:16:30 thorpej Exp $	*/
+/*	$NetBSD: if_bridge.c,v 1.189.6.1.2.1 2023/11/16 05:02:23 thorpej Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.189.6.1 2023/11/11 13:16:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.189.6.1.2.1 2023/11/16 05:02:23 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1488,18 +1488,18 @@ bridge_enqueue(struct bridge_softc *sc, 
 	}
 
 #ifdef ALTQ
-	KERNEL_LOCK(1, NULL);
 	/*
 	 * If ALTQ is enabled on the member interface, do
 	 * classification; the queueing discipline might
 	 * not require classification, but might require
 	 * the address family/header pointer in the pktattr.
 	 */
+	mutex_enter(dst_ifp->if_snd.ifq_lock);
 	if (ALTQ_IS_ENABLED(_ifp->if_snd)) {
 		/* XXX IFT_ETHER */
-		altq_etherclassify(dst_ifp->if_snd.ifq_altq, m);
+		altq_etherclassify(_ifp->if_snd, m);
 	}
-	KERNEL_UNLOCK_ONE(NULL);
+	mutex_exit(dst_ifp->if_snd.ifq_lock);
 #endif /* ALTQ */
 
 	if (vlan_has_tag(m) &&

Index: src/sys/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.326.2.1.2.1 src/sys/net/if_ethersubr.c:1.326.2.1.2.2
--- src/sys/net/if_ethersubr.c:1.326.2.1.2.1	Wed Nov 15 02:08:34 2023
+++ src/sys/net/if_ethersubr.c	Thu Nov 16 05:02:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.326.2.1.2.1 2023/11/15 02:08:34 thorpej Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.326.2.1.2.2 2023/11/16 05:02:23 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.326.2.1.2.1 2023/11/15 02:08:34 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.326.2.1.2.2 2023/11/16 05:02:23 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -447,16 +447,16 @@ ether_output(struct ifnet * const ifp0, 
 #endif
 
 #ifdef ALTQ
-	KERNEL_LOCK(1, NULL);
 	/*
 	 * If ALTQ is enabled on the parent interface, do
 	 * classification; the queueing discipline might not
 	 * require classification, but might require the
 	 * address family/header pointer in the pktattr.
 	 */
+	mutex_enter(ifp->if_snd.ifq_lock);
 	if (ALTQ_IS_ENABLED(>if_snd))
-		altq_etherclassify(ifp->if_snd.ifq_altq, m);
-	KERNEL_UNLOCK_ONE(NULL);
+		altq_etherclassify(>if_snd, m);
+	mutex_exit(ifp->if_snd.ifq_lock);
 #endif
 	return if_enqueue(ifp, m);
 
@@ -477,8 +477,9 @@ bad:
  * is indeed contiguous, then to read the LLC and so on.
  */
 void
-altq_etherclassify(struct ifaltq *ifq, struct mbuf *m)
+altq_etherclassify(struct ifqueue *ifq, struct mbuf *m)
 {
+	struct ifaltq *altq = ifq->ifq_altq;
 	struct ether_header *eh;
 	struct mbuf *mtop = m;
 	uint16_t ether_type;
@@ -487,6 +488,18 @@ altq_etherclassify(struct ifaltq *ifq, s
 
 	KASSERT((mtop->m_flags & M_PKTHDR) != 0);
 
+	/*
+	 * Release the ifqueue lock 

CVS commit: [thorpej-ifq] src/sys

2023-11-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Nov 16 05:02:23 UTC 2023

Modified Files:
src/sys/altq [thorpej-ifq]: if_altq.h
src/sys/net [thorpej-ifq]: if_bridge.c if_ethersubr.c if_vlan.c
src/sys/net80211 [thorpej-ifq]: ieee80211_input.c

Log Message:
Clean up the locking protocol around altq_etherclassify().  It's no longer
required to acquire KERNEL_LOCK *just* because ALTQ is compiled into the
kernel; you only have to acquire it if ALTQ is enabled on the interface
in question.


To generate a diff of this commit:
cvs rdiff -u -r1.16.4.1 -r1.16.4.1.2.1 src/sys/altq/if_altq.h
cvs rdiff -u -r1.189.6.1 -r1.189.6.1.2.1 src/sys/net/if_bridge.c
cvs rdiff -u -r1.326.2.1.2.1 -r1.326.2.1.2.2 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.171.2.1 -r1.171.2.1.2.1 src/sys/net/if_vlan.c
cvs rdiff -u -r1.117.4.1 -r1.117.4.1.2.1 src/sys/net80211/ieee80211_input.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [thorpej-ifq] src/sys

2023-11-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Nov 16 04:30:22 UTC 2023

Modified Files:
src/sys/dev/ic [thorpej-ifq]: hd64570.c
src/sys/dev/ppbus [thorpej-ifq]: if_plip.c
src/sys/dev/qbus [thorpej-ifq]: if_dmc.c
src/sys/dev/usb [thorpej-ifq]: if_umb.c if_upl.c uhso.c
src/sys/net [thorpej-ifq]: if.h if_arcsubr.c if_gif.c if_ieee1394subr.c
if_ipsec.c if_l2tp.c if_loop.c if_ppp.c if_sl.c if_spppsubr.c
if_tun.c

Log Message:
IFQ_CLASSIFY() -> ifq_classify_packet().


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.8.1 src/sys/dev/ic/hd64570.c
cvs rdiff -u -r1.38 -r1.38.8.1 src/sys/dev/ppbus/if_plip.c
cvs rdiff -u -r1.29 -r1.29.8.1 src/sys/dev/qbus/if_dmc.c
cvs rdiff -u -r1.25 -r1.25.8.1 src/sys/dev/usb/if_umb.c
cvs rdiff -u -r1.77 -r1.77.8.1 src/sys/dev/usb/if_upl.c
cvs rdiff -u -r1.37.6.1 -r1.37.6.2 src/sys/dev/usb/uhso.c
cvs rdiff -u -r1.305.2.1.2.3 -r1.305.2.1.2.4 src/sys/net/if.h
cvs rdiff -u -r1.85.8.1 -r1.85.8.2 src/sys/net/if_arcsubr.c
cvs rdiff -u -r1.157 -r1.157.8.1 src/sys/net/if_gif.c
cvs rdiff -u -r1.69 -r1.69.8.1 src/sys/net/if_ieee1394subr.c
cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/net/if_ipsec.c
cvs rdiff -u -r1.49 -r1.49.4.1 src/sys/net/if_l2tp.c
cvs rdiff -u -r1.118 -r1.118.8.1 src/sys/net/if_loop.c
cvs rdiff -u -r1.172.8.1 -r1.172.8.2 src/sys/net/if_ppp.c
cvs rdiff -u -r1.136.6.1 -r1.136.6.2 src/sys/net/if_sl.c
cvs rdiff -u -r1.267.4.1 -r1.267.4.2 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.173 -r1.173.8.1 src/sys/net/if_tun.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/hd64570.c
diff -u src/sys/dev/ic/hd64570.c:1.57 src/sys/dev/ic/hd64570.c:1.57.8.1
--- src/sys/dev/ic/hd64570.c:1.57	Sat Sep  3 02:48:00 2022
+++ src/sys/dev/ic/hd64570.c	Thu Nov 16 04:30:21 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: hd64570.c,v 1.57 2022/09/03 02:48:00 thorpej Exp $	*/
+/*	$NetBSD: hd64570.c,v 1.57.8.1 2023/11/16 04:30:21 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1999 Christian E. Hopps
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.57 2022/09/03 02:48:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd64570.c,v 1.57.8.1 2023/11/16 04:30:21 thorpej Exp $");
 
 #include "opt_inet.h"
 
@@ -811,7 +811,7 @@ sca_output(
 	 * If the queueing discipline needs packet classification,
 	 * do it before prepending link headers.
 	 */
-	IFQ_CLASSIFY(>if_snd, m, dst->sa_family);
+	ifq_classify_packet(>if_snd, m, dst->sa_family);
 
 	/*
 	 * determine address family, and priority for this packet

Index: src/sys/dev/ppbus/if_plip.c
diff -u src/sys/dev/ppbus/if_plip.c:1.38 src/sys/dev/ppbus/if_plip.c:1.38.8.1
--- src/sys/dev/ppbus/if_plip.c:1.38	Sun Sep  4 15:59:08 2022
+++ src/sys/dev/ppbus/if_plip.c	Thu Nov 16 04:30:21 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: if_plip.c,v 1.38 2022/09/04 15:59:08 rjs Exp $ */
+/* $NetBSD: if_plip.c,v 1.38.8.1 2023/11/16 04:30:21 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1997 Poul-Henning Kamp
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.38 2022/09/04 15:59:08 rjs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.38.8.1 2023/11/16 04:30:21 thorpej Exp $");
 
 /*
  * Parallel port TCP/IP interfaces added.  I looked at the driver from
@@ -730,7 +730,7 @@ lpoutput(struct ifnet *ifp, struct mbuf 
 		goto endoutput;
 	}
 
-	IFQ_CLASSIFY(>if_snd, m, dst->sa_family);
+	ifq_classify_packet(>if_snd, m, dst->sa_family);
 	IFQ_ENQUEUE(>if_snd, m, err);
 	if (err == 0) {
 		if ((ifp->if_flags & IFF_OACTIVE) == 0)

Index: src/sys/dev/qbus/if_dmc.c
diff -u src/sys/dev/qbus/if_dmc.c:1.29 src/sys/dev/qbus/if_dmc.c:1.29.8.1
--- src/sys/dev/qbus/if_dmc.c:1.29	Mon Apr  4 19:33:45 2022
+++ src/sys/dev/qbus/if_dmc.c	Thu Nov 16 04:30:21 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_dmc.c,v 1.29 2022/04/04 19:33:45 andvar Exp $	*/
+/*	$NetBSD: if_dmc.c,v 1.29.8.1 2023/11/16 04:30:21 thorpej Exp $	*/
 /*
  * Copyright (c) 1982, 1986 Regents of the University of California.
  * All rights reserved.
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.29 2022/04/04 19:33:45 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_dmc.c,v 1.29.8.1 2023/11/16 04:30:21 thorpej Exp $");
 
 #undef DMCDEBUG	/* for base table dump on fatal error */
 
@@ -771,7 +771,7 @@ dmcoutput(struct ifnet *ifp, struct mbuf
 		goto bad;
 	}
 
-	IFQ_CLASSIFY(>if_snd, m, dst->sa_family);
+	ifq_classify_packet(>if_snd, m, dst->sa_family);
 
 	switch (dst->sa_family) {
 #ifdef	INET

Index: src/sys/dev/usb/if_umb.c
diff -u src/sys/dev/usb/if_umb.c:1.25 src/sys/dev/usb/if_umb.c:1.25.8.1
--- src/sys/dev/usb/if_umb.c:1.25	Sat Aug 20 11:32:08 2022
+++ src/sys/dev/usb/if_umb.c	Thu Nov 16 04:30:21 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_umb.c,v 1.25 2022/08/20 11:32:08 riastradh Exp $ */
+/*	$NetBSD: if_umb.c,v 1.25.8.1 2023/11/16 04:30:21 thorpej Exp $ */
 /*	$OpenBSD: if_umb.c,v 1.20 2018/09/10 

CVS commit: [thorpej-ifq] src/sys

2023-11-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Nov 16 04:30:22 UTC 2023

Modified Files:
src/sys/dev/ic [thorpej-ifq]: hd64570.c
src/sys/dev/ppbus [thorpej-ifq]: if_plip.c
src/sys/dev/qbus [thorpej-ifq]: if_dmc.c
src/sys/dev/usb [thorpej-ifq]: if_umb.c if_upl.c uhso.c
src/sys/net [thorpej-ifq]: if.h if_arcsubr.c if_gif.c if_ieee1394subr.c
if_ipsec.c if_l2tp.c if_loop.c if_ppp.c if_sl.c if_spppsubr.c
if_tun.c

Log Message:
IFQ_CLASSIFY() -> ifq_classify_packet().


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.57.8.1 src/sys/dev/ic/hd64570.c
cvs rdiff -u -r1.38 -r1.38.8.1 src/sys/dev/ppbus/if_plip.c
cvs rdiff -u -r1.29 -r1.29.8.1 src/sys/dev/qbus/if_dmc.c
cvs rdiff -u -r1.25 -r1.25.8.1 src/sys/dev/usb/if_umb.c
cvs rdiff -u -r1.77 -r1.77.8.1 src/sys/dev/usb/if_upl.c
cvs rdiff -u -r1.37.6.1 -r1.37.6.2 src/sys/dev/usb/uhso.c
cvs rdiff -u -r1.305.2.1.2.3 -r1.305.2.1.2.4 src/sys/net/if.h
cvs rdiff -u -r1.85.8.1 -r1.85.8.2 src/sys/net/if_arcsubr.c
cvs rdiff -u -r1.157 -r1.157.8.1 src/sys/net/if_gif.c
cvs rdiff -u -r1.69 -r1.69.8.1 src/sys/net/if_ieee1394subr.c
cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/net/if_ipsec.c
cvs rdiff -u -r1.49 -r1.49.4.1 src/sys/net/if_l2tp.c
cvs rdiff -u -r1.118 -r1.118.8.1 src/sys/net/if_loop.c
cvs rdiff -u -r1.172.8.1 -r1.172.8.2 src/sys/net/if_ppp.c
cvs rdiff -u -r1.136.6.1 -r1.136.6.2 src/sys/net/if_sl.c
cvs rdiff -u -r1.267.4.1 -r1.267.4.2 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.173 -r1.173.8.1 src/sys/net/if_tun.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ppp/usr.sbin/plugins

2023-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 22:11:38 UTC 2023

Added Files:
src/external/bsd/ppp/usr.sbin/plugins: Makefile.inc

Log Message:
Centralize the location of pppd


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/ppp/usr.sbin/plugins/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/external/bsd/ppp/usr.sbin/plugins/Makefile.inc
diff -u /dev/null src/external/bsd/ppp/usr.sbin/plugins/Makefile.inc:1.1
--- /dev/null	Wed Nov 15 17:11:38 2023
+++ src/external/bsd/ppp/usr.sbin/plugins/Makefile.inc	Wed Nov 15 17:11:38 2023
@@ -0,0 +1,2 @@
+#	$NetBSD: Makefile.inc,v 1.1 2023/11/15 22:11:38 christos Exp $
+PPPD=${NETBSDSRCDIR}/external/bsd/ppp/dist/pppd



CVS commit: src/external/bsd/ppp/usr.sbin/plugins

2023-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 22:11:38 UTC 2023

Added Files:
src/external/bsd/ppp/usr.sbin/plugins: Makefile.inc

Log Message:
Centralize the location of pppd


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/external/bsd/ppp/usr.sbin/plugins/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/external/bsd/ppp/usr.sbin/plugins

2023-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 22:11:17 UTC 2023

Modified Files:
src/external/bsd/ppp/usr.sbin/plugins/minconn: Makefile
src/external/bsd/ppp/usr.sbin/plugins/passwordfd: Makefile
src/external/bsd/ppp/usr.sbin/plugins/status: Makefile

Log Message:
simplify


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/ppp/usr.sbin/plugins/minconn/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/ppp/usr.sbin/plugins/passwordfd/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/ppp/usr.sbin/plugins/status/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/ppp/usr.sbin/plugins/minconn/Makefile
diff -u src/external/bsd/ppp/usr.sbin/plugins/minconn/Makefile:1.1 src/external/bsd/ppp/usr.sbin/plugins/minconn/Makefile:1.2
--- src/external/bsd/ppp/usr.sbin/plugins/minconn/Makefile:1.1	Thu Nov 28 17:33:43 2013
+++ src/external/bsd/ppp/usr.sbin/plugins/minconn/Makefile	Wed Nov 15 17:11:16 2023
@@ -1,14 +1,14 @@
-#	$NetBSD: Makefile,v 1.1 2013/11/28 22:33:43 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2023/11/15 22:11:16 christos Exp $
 
 NOLINT=	# defined
 
 .include 
 
-.PATH: ${NETBSDSRCDIR}/dist/pppd/pppd/plugins
+.PATH: ${PPPD}/plugins
 
 LIB=minconn
 SRCS=minconn.c
-CPPFLAGS+=-I${NETBSDSRCDIR}/dist/pppd/pppd
+CPPFLAGS+=-I${PPPD}
 
 LIBPREFIX=
 SHLIB_FULLVERSION=

Index: src/external/bsd/ppp/usr.sbin/plugins/passwordfd/Makefile
diff -u src/external/bsd/ppp/usr.sbin/plugins/passwordfd/Makefile:1.1 src/external/bsd/ppp/usr.sbin/plugins/passwordfd/Makefile:1.2
--- src/external/bsd/ppp/usr.sbin/plugins/passwordfd/Makefile:1.1	Thu Nov 28 17:33:43 2013
+++ src/external/bsd/ppp/usr.sbin/plugins/passwordfd/Makefile	Wed Nov 15 17:11:17 2023
@@ -1,14 +1,14 @@
-#	$NetBSD: Makefile,v 1.1 2013/11/28 22:33:43 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2023/11/15 22:11:17 christos Exp $
 
 NOLINT=	# defined
 
 .include 
 
-.PATH: ${NETBSDSRCDIR}/dist/pppd/pppd/plugins
+.PATH: ${PPPD}/plugins
 
 LIB=passwordfd
 SRCS=passwordfd.c
-CPPFLAGS+=-I${NETBSDSRCDIR}/dist/pppd/pppd
+CPPFLAGS+=-I${PPPD}
 
 LIBPREFIX=
 SHLIB_FULLVERSION=

Index: src/external/bsd/ppp/usr.sbin/plugins/status/Makefile
diff -u src/external/bsd/ppp/usr.sbin/plugins/status/Makefile:1.1 src/external/bsd/ppp/usr.sbin/plugins/status/Makefile:1.2
--- src/external/bsd/ppp/usr.sbin/plugins/status/Makefile:1.1	Thu Nov 28 17:33:43 2013
+++ src/external/bsd/ppp/usr.sbin/plugins/status/Makefile	Wed Nov 15 17:11:17 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2013/11/28 22:33:43 christos Exp $
+#	$NetBSD: Makefile,v 1.2 2023/11/15 22:11:17 christos Exp $
 
 NOLINT=	# defined
 
@@ -6,7 +6,7 @@ NOLINT=	# defined
 
 LIB=status
 SRCS=status.c
-CPPFLAGS+=-I${NETBSDSRCDIR}/dist/pppd/pppd
+CPPFLAGS+=-I${PPPD}
 
 LIBPREFIX=
 SHLIB_FULLVERSION=



CVS commit: src/external/bsd/ppp/usr.sbin/plugins

2023-11-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 22:11:17 UTC 2023

Modified Files:
src/external/bsd/ppp/usr.sbin/plugins/minconn: Makefile
src/external/bsd/ppp/usr.sbin/plugins/passwordfd: Makefile
src/external/bsd/ppp/usr.sbin/plugins/status: Makefile

Log Message:
simplify


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/ppp/usr.sbin/plugins/minconn/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/ppp/usr.sbin/plugins/passwordfd/Makefile
cvs rdiff -u -r1.1 -r1.2 \
src/external/bsd/ppp/usr.sbin/plugins/status/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/share/misc

2023-11-15 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed Nov 15 14:03:19 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
+NTA  negative trust anchor
(DNSSEC, RFC7646)


To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/share/misc/acronyms.comp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.377 src/share/misc/acronyms.comp:1.378
--- src/share/misc/acronyms.comp:1.377	Fri Oct 27 21:28:14 2023
+++ src/share/misc/acronyms.comp	Wed Nov 15 14:03:19 2023
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.377 2023/10/27 21:28:14 jschauma Exp $
+$NetBSD: acronyms.comp,v 1.378 2023/11/15 14:03:19 jschauma Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1132,6 +1132,7 @@ NRZ	non-return to zero
 NSA	nation-state adversary
 NSA	no such agency
 NSA	National Security Agency
+NTA	negative trust anchor
 NTM	non-deterministic Turing machine
 NTP	Network Time Protocol
 NUMA	non-uniform memory access



CVS commit: src/share/misc

2023-11-15 Thread Jan Schaumann
Module Name:src
Committed By:   jschauma
Date:   Wed Nov 15 14:03:19 UTC 2023

Modified Files:
src/share/misc: acronyms.comp

Log Message:
+NTA  negative trust anchor
(DNSSEC, RFC7646)


To generate a diff of this commit:
cvs rdiff -u -r1.377 -r1.378 src/share/misc/acronyms.comp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [thorpej-ifq] src/sys/net

2023-11-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 15 12:39:46 UTC 2023

Modified Files:
src/sys/net [thorpej-ifq]: if_wg.c

Log Message:
wg_output(): Use ifq_classify_packet(), and let that function check
for ALTQ-enabled.  Acquire KERNEL_LOCK before calling ALTQ_ENQUEUE().
XXX The ALTQ integration here is a mess.


To generate a diff of this commit:
cvs rdiff -u -r1.77.2.1 -r1.77.2.1.2.1 src/sys/net/if_wg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: [thorpej-ifq] src/sys/net

2023-11-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 15 12:39:46 UTC 2023

Modified Files:
src/sys/net [thorpej-ifq]: if_wg.c

Log Message:
wg_output(): Use ifq_classify_packet(), and let that function check
for ALTQ-enabled.  Acquire KERNEL_LOCK before calling ALTQ_ENQUEUE().
XXX The ALTQ integration here is a mess.


To generate a diff of this commit:
cvs rdiff -u -r1.77.2.1 -r1.77.2.1.2.1 src/sys/net/if_wg.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/net/if_wg.c
diff -u src/sys/net/if_wg.c:1.77.2.1 src/sys/net/if_wg.c:1.77.2.1.2.1
--- src/sys/net/if_wg.c:1.77.2.1	Tue Nov 14 02:29:11 2023
+++ src/sys/net/if_wg.c	Wed Nov 15 12:39:46 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wg.c,v 1.77.2.1 2023/11/14 02:29:11 thorpej Exp $	*/
+/*	$NetBSD: if_wg.c,v 1.77.2.1.2.1 2023/11/15 12:39:46 thorpej Exp $	*/
 
 /*
  * Copyright (C) Ryota Ozaki 
@@ -41,7 +41,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.77.2.1 2023/11/14 02:29:11 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wg.c,v 1.77.2.1.2.1 2023/11/15 12:39:46 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altq_enabled.h"
@@ -3851,12 +3851,7 @@ wg_output(struct ifnet *ifp, struct mbuf
 		goto out0;
 	}
 
-#ifdef ALTQ
-	bool altq = atomic_load_relaxed(>if_snd.ifq_altq->altq_flags)
-	& ALTQF_ENABLED;
-	if (altq)
-		IFQ_CLASSIFY(>if_snd, m, dst->sa_family);
-#endif
+	ifq_classify_packet(>if_snd, m, dst->sa_family);
 
 	bpf_mtap_af(ifp, dst->sa_family, m, BPF_D_OUT);
 
@@ -3896,18 +3891,24 @@ wg_output(struct ifnet *ifp, struct mbuf
 
 	/* There's an established session.  Toss it in the queue.  */
 #ifdef ALTQ
-	if (altq) {
+	/* XXX This is a mess. */
+	mutex_enter(ifp->if_snd.ifq_lock);
+	if (ALTQ_IS_ENABLED(>if_snd)) {
+		struct ifqueue * const ifq = >if_snd;
+		mutex_exit(ifp->if_snd.ifq_lock);
+		KERNEL_LOCK(1, NULL);
 		mutex_enter(ifp->if_snd.ifq_lock);
-		if (ALTQ_IS_ENABLED(>if_snd)) {
+		if (ALTQ_IS_ENABLED(ifq)) {
 			M_SETCTX(m, wgp);
 			ALTQ_ENQUEUE(>if_snd, m, error);
 			m = NULL; /* consume */
 		}
-		mutex_exit(ifp->if_snd.ifq_lock);
-		if (m == NULL) {
-			wg_start(ifp);
-			goto out2;
-		}
+		KERNEL_UNLOCK_ONE(NULL);
+	}
+	mutex_exit(ifp->if_snd.ifq_lock);
+	if (m == NULL) {
+		wg_start(ifp);
+		goto out2;
 	}
 #endif
 	kpreempt_disable();