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

2023-11-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 15 03:50:22 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_type.h ixv.c

Log Message:
ixgbe: Clear the WTHRESH bit field before writing it.


To generate a diff of this commit:
cvs rdiff -u -r1.347 -r1.348 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.195 -r1.196 src/sys/dev/pci/ixgbe/ixv.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/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.347 src/sys/dev/pci/ixgbe/ixgbe.c:1.348
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.347	Thu Nov  2 09:40:47 2023
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Wed Nov 15 03:50:22 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.347 2023/11/02 09:40:47 yamaguchi Exp $ */
+/* $NetBSD: ixgbe.c,v 1.348 2023/11/15 03:50:22 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.347 2023/11/02 09:40:47 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixgbe.c,v 1.348 2023/11/15 03:50:22 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -4157,6 +4157,7 @@ ixgbe_init_locked(struct ixgbe_softc *sc
 		txdctl = IXGBE_READ_REG(hw, IXGBE_TXDCTL(txr->me));
 		txdctl |= IXGBE_TXDCTL_ENABLE;
 		/* Set WTHRESH to 8, burst writeback */
+		txdctl &= ~IXGBE_TXDCTL_WTHRESH_MASK;
 		txdctl |= IXGBE_TX_WTHRESH << IXGBE_TXDCTL_WTHRESH_SHIFT;
 		/*
 		 * When the internal queue falls below PTHRESH (32),

Index: src/sys/dev/pci/ixgbe/ixgbe_type.h
diff -u src/sys/dev/pci/ixgbe/ixgbe_type.h:1.61 src/sys/dev/pci/ixgbe/ixgbe_type.h:1.62
--- src/sys/dev/pci/ixgbe/ixgbe_type.h:1.61	Wed Oct 11 09:43:17 2023
+++ src/sys/dev/pci/ixgbe/ixgbe_type.h	Wed Nov 15 03:50:22 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe_type.h,v 1.61 2023/10/11 09:43:17 msaitoh Exp $ */
+/* $NetBSD: ixgbe_type.h,v 1.62 2023/11/15 03:50:22 msaitoh Exp $ */
 
 /**
   SPDX-License-Identifier: BSD-3-Clause
@@ -2625,6 +2625,7 @@ enum {
 /* Transmit Config masks */
 #define IXGBE_TXDCTL_ENABLE		0x0200 /* Ena specific Tx Queue */
 #define IXGBE_TXDCTL_SWFLSH		0x0400 /* Tx Desc. wr-bk flushing */
+#define IXGBE_TXDCTL_WTHRESH_MASK	0x007f
 #define IXGBE_TXDCTL_WTHRESH_SHIFT	16 /* shift to WTHRESH bits */
 /* Enable short packet padding to 64 bytes */
 #define IXGBE_TX_PAD_ENABLE		0x0400

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.195 src/sys/dev/pci/ixgbe/ixv.c:1.196
--- src/sys/dev/pci/ixgbe/ixv.c:1.195	Wed Nov 15 02:43:38 2023
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Nov 15 03:50:22 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.195 2023/11/15 02:43:38 msaitoh Exp $ */
+/* $NetBSD: ixv.c,v 1.196 2023/11/15 03:50:22 msaitoh Exp $ */
 
 /**
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.195 2023/11/15 02:43:38 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.196 2023/11/15 03:50:22 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1748,6 +1748,7 @@ ixv_initialize_transmit_units(struct ixg
 
 		/* Set WTHRESH to 8, burst writeback */
 		txdctl = IXGBE_READ_REG(hw, IXGBE_VFTXDCTL(j));
+		txdctl &= ~IXGBE_TXDCTL_WTHRESH_MASK;
 		txdctl |= IXGBE_TX_WTHRESH << IXGBE_TXDCTL_WTHRESH_SHIFT;
 		IXGBE_WRITE_REG(hw, IXGBE_VFTXDCTL(j), txdctl);
 



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

2023-11-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 15 03:50:22 UTC 2023

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixgbe_type.h ixv.c

Log Message:
ixgbe: Clear the WTHRESH bit field before writing it.


To generate a diff of this commit:
cvs rdiff -u -r1.347 -r1.348 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.61 -r1.62 src/sys/dev/pci/ixgbe/ixgbe_type.h
cvs rdiff -u -r1.195 -r1.196 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/lib/libc/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:35:04 UTC 2023

Modified Files:
src/lib/libc/ssp: ssp_redirect.c

Log Message:
don't expose extra symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/ssp/ssp_redirect.c

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

Modified files:

Index: src/lib/libc/ssp/ssp_redirect.c
diff -u src/lib/libc/ssp/ssp_redirect.c:1.1 src/lib/libc/ssp/ssp_redirect.c:1.2
--- src/lib/libc/ssp/ssp_redirect.c:1.1	Tue Nov 14 22:15:28 2023
+++ src/lib/libc/ssp/ssp_redirect.c	Tue Nov 14 22:35:04 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssp_redirect.c,v 1.1 2023/11/15 03:15:28 christos Exp $	*/
+/*	$NetBSD: ssp_redirect.c,v 1.2 2023/11/15 03:35:04 christos Exp $	*/
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -34,17 +34,16 @@
 #define __ssp_inline
 
 #include 
-__RCSID("$NetBSD: ssp_redirect.c,v 1.1 2023/11/15 03:15:28 christos Exp $");
+__RCSID("$NetBSD: ssp_redirect.c,v 1.2 2023/11/15 03:35:04 christos Exp $");
 
 #include 
 
-int ssp_use(void);
 
 /*
  * Provide definitions of the redirect functions in libc.
  */
-int
-ssp_use(void)
+static int __used
+__ssp_use(void)
 {
 	if (getcwd(NULL, 0) == NULL)
 		return -1;



CVS commit: src/lib/libc/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:35:04 UTC 2023

Modified Files:
src/lib/libc/ssp: ssp_redirect.c

Log Message:
don't expose extra symbols.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/lib/libc/ssp/ssp_redirect.c

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



Re: CVS commit: src/lib/libc/ssp

2023-11-14 Thread Jörg Sonnenberger
On Wednesday, November 15, 2023 4:15:28 AM CET you wrote:
> Module Name:  src
> Committed By: christos
> Date: Wed Nov 15 03:15:28 UTC 2023
> 
> Modified Files:
>   src/lib/libc/ssp: Makefile.inc
> Added Files:
>   src/lib/libc/ssp: ssp_redirect.c
> 
> Log Message:
> provide materialized functions for the ssp overriden inlines

The functions are supposed to be transparent and they used to be. Can we 
please just go back to the working state before? IMO wanting to overriding 
getcwd is absolutely no justification for this. If the prototype (and inline 
function) is visible from the header, userland should *not* be abled to 
interpose it. If it is not visible due to standard headers, there was no 
problem in first place.

Joerg




CVS commit: src/lib/libc/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:15:28 UTC 2023

Modified Files:
src/lib/libc/ssp: Makefile.inc
Added Files:
src/lib/libc/ssp: ssp_redirect.c

Log Message:
provide materialized functions for the ssp overriden inlines


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/ssp/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/ssp/ssp_redirect.c

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

Modified files:

Index: src/lib/libc/ssp/Makefile.inc
diff -u src/lib/libc/ssp/Makefile.inc:1.5 src/lib/libc/ssp/Makefile.inc:1.6
--- src/lib/libc/ssp/Makefile.inc:1.5	Sun Apr  6 15:29:37 2014
+++ src/lib/libc/ssp/Makefile.inc	Tue Nov 14 22:15:28 2023
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile.inc,v 1.5 2014/04/06 19:29:37 christos Exp $
+#	$NetBSD: Makefile.inc,v 1.6 2023/11/15 03:15:28 christos Exp $
 
 .PATH: ${.CURDIR}/ssp
 
 SSP_SRCS=	gets_chk.c fgets_chk.c memcpy_chk.c memmove_chk.c memset_chk.c \
 		snprintf_chk.c sprintf_chk.c stpcpy_chk.c stpncpy_chk.c \
 		strcat_chk.c strcpy_chk.c strncat_chk.c strncpy_chk.c \
-		vsnprintf_chk.c vsprintf_chk.c
+		vsnprintf_chk.c vsprintf_chk.c ssp_redirect.c
 
 .for i in ${SSP_SRCS}
 SRCS+=${i}

Added files:

Index: src/lib/libc/ssp/ssp_redirect.c
diff -u /dev/null src/lib/libc/ssp/ssp_redirect.c:1.1
--- /dev/null	Tue Nov 14 22:15:28 2023
+++ src/lib/libc/ssp/ssp_redirect.c	Tue Nov 14 22:15:28 2023
@@ -0,0 +1,56 @@
+/*	$NetBSD: ssp_redirect.c,v 1.1 2023/11/15 03:15:28 christos Exp $	*/
+
+/*-
+ * Copyright (c) 2023 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Christos Zoulas.
+ *
+ * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ */
+
+#undef _FORTIFY_SOURCE
+#define _FORTIFY_SOURCE 2
+#define __ssp_inline
+
+#include 
+__RCSID("$NetBSD: ssp_redirect.c,v 1.1 2023/11/15 03:15:28 christos Exp $");
+
+#include 
+
+int ssp_use(void);
+
+/*
+ * Provide definitions of the redirect functions in libc.
+ */
+int
+ssp_use(void)
+{
+	if (getcwd(NULL, 0) == NULL)
+		return -1;
+	if (read(-1, NULL, 0) == -1)
+		return -1;
+	if (readlink(NULL, NULL, 0) == -1)
+		return -1;
+	return 0;
+}



CVS commit: src/lib/libc/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:15:28 UTC 2023

Modified Files:
src/lib/libc/ssp: Makefile.inc
Added Files:
src/lib/libc/ssp: ssp_redirect.c

Log Message:
provide materialized functions for the ssp overriden inlines


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libc/ssp/Makefile.inc
cvs rdiff -u -r0 -r1.1 src/lib/libc/ssp/ssp_redirect.c

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



CVS commit: src/include/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:14:16 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
Allow __ssp_inline to be overriden


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/include/ssp/ssp.h

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



CVS commit: src/include/ssp

2023-11-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Nov 15 03:14:16 UTC 2023

Modified Files:
src/include/ssp: ssp.h

Log Message:
Allow __ssp_inline to be overriden


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/include/ssp/ssp.h

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

Modified files:

Index: src/include/ssp/ssp.h
diff -u src/include/ssp/ssp.h:1.15 src/include/ssp/ssp.h:1.16
--- src/include/ssp/ssp.h:1.15	Fri Nov 10 18:03:37 2023
+++ src/include/ssp/ssp.h	Tue Nov 14 22:14:16 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ssp.h,v 1.15 2023/11/10 23:03:37 christos Exp $	*/
+/*	$NetBSD: ssp.h,v 1.16 2023/11/15 03:14:16 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2011, 2023 The NetBSD Foundation, Inc.
@@ -58,8 +58,10 @@
 #endif
 #define __ssp_real(fun)		__ssp_real_(fun)
 
+#ifndef __ssp_inline
 #define __ssp_inline extern __inline \
 __attribute__((__always_inline__, __gnu_inline__))
+#endif
 
 #if __SSP_FORTIFY_LEVEL > 2
 # define __ssp_bos(ptr) __builtin_dynamic_object_size(ptr, 1)



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

2023-11-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 15 02:43:38 UTC 2023

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

Log Message:
ixv(4): Remove unused IFF_OACTIVE. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/sys/dev/pci/ixgbe/ixv.c

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



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

2023-11-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Nov 15 02:43:38 UTC 2023

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

Log Message:
ixv(4): Remove unused IFF_OACTIVE. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.194 -r1.195 src/sys/dev/pci/ixgbe/ixv.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/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.194 src/sys/dev/pci/ixgbe/ixv.c:1.195
--- src/sys/dev/pci/ixgbe/ixv.c:1.194	Thu Nov  2 09:40:47 2023
+++ src/sys/dev/pci/ixgbe/ixv.c	Wed Nov 15 02:43:38 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ixv.c,v 1.194 2023/11/02 09:40:47 yamaguchi Exp $ */
+/* $NetBSD: ixv.c,v 1.195 2023/11/15 02:43:38 msaitoh Exp $ */
 
 /**
 
@@ -35,7 +35,7 @@
 /*$FreeBSD: head/sys/dev/ixgbe/if_ixv.c 331224 2018-03-19 20:55:05Z erj $*/
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.194 2023/11/02 09:40:47 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ixv.c,v 1.195 2023/11/15 02:43:38 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -830,7 +830,6 @@ ixv_init_locked(struct ixgbe_softc *sc)
 
 	/* Inform the stack we're ready */
 	ifp->if_flags |= IFF_RUNNING;
-	ifp->if_flags &= ~IFF_OACTIVE;
 
 	/* And now turn on interrupts */
 	ixv_enable_intr(sc);
@@ -1495,7 +1494,7 @@ ixv_stop_locked(void *arg)
 	ixv_disable_intr(sc);
 
 	/* Tell the stack that the interface is no longer active */
-	ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+	ifp->if_flags &= ~IFF_RUNNING;
 
 	hw->mac.ops.reset_hw(hw);
 	sc->hw.adapter_stopped = FALSE;



CVS commit: src/usr.sbin/altq/altqd

2023-11-14 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed Nov 15 02:23:52 UTC 2023

Modified Files:
src/usr.sbin/altq/altqd: altqd.8

Log Message:
altqd.8: grammar tweak (verb phrase)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/altq/altqd/altqd.8

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

Modified files:

Index: src/usr.sbin/altq/altqd/altqd.8
diff -u src/usr.sbin/altq/altqd/altqd.8:1.11 src/usr.sbin/altq/altqd/altqd.8:1.12
--- src/usr.sbin/altq/altqd/altqd.8:1.11	Sat Dec 23 08:25:44 2006
+++ src/usr.sbin/altq/altqd/altqd.8	Wed Nov 15 02:23:52 2023
@@ -1,4 +1,4 @@
-.\"	$NetBSD: altqd.8,v 1.11 2006/12/23 08:25:44 wiz Exp $
+.\"	$NetBSD: altqd.8,v 1.12 2023/11/15 02:23:52 gutteridge Exp $
 .\"	$KAME: altqd.8,v 1.9 2002/01/23 06:56:27 itojun Exp $
 .\"
 .\" Copyright (C) 2000
@@ -47,7 +47,7 @@ The signals
 .Dv SIGINT
 or
 .Dv SIGTERM
-will shutdown
+will shut down
 .Nm ,
 and the signal
 .Dv SIGHUP



CVS commit: src/usr.sbin/altq/altqd

2023-11-14 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Wed Nov 15 02:23:52 UTC 2023

Modified Files:
src/usr.sbin/altq/altqd: altqd.8

Log Message:
altqd.8: grammar tweak (verb phrase)


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/altq/altqd/altqd.8

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-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 15 02:19:00 UTC 2023

Modified Files:
src/sys/altq [thorpej-ifq]: altq_cdnr.c altq_subr.c
src/sys/net [thorpej-ifq]: if.c if.h

Log Message:
Protect the ALTQ state that's exposed to the ifqueue if the ifq->ifq_lock.
This requires exposing some implementation details to ALTQ, which is guarded
by an __IFQ_PRIVATE define.


To generate a diff of this commit:
cvs rdiff -u -r1.22.6.1 -r1.22.6.1.2.1 src/sys/altq/altq_cdnr.c
cvs rdiff -u -r1.33.46.1 -r1.33.46.1.2.1 src/sys/altq/altq_subr.c
cvs rdiff -u -r1.529.2.1.2.2 -r1.529.2.1.2.3 src/sys/net/if.c
cvs rdiff -u -r1.305.2.1.2.2 -r1.305.2.1.2.3 src/sys/net/if.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-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 15 02:19:00 UTC 2023

Modified Files:
src/sys/altq [thorpej-ifq]: altq_cdnr.c altq_subr.c
src/sys/net [thorpej-ifq]: if.c if.h

Log Message:
Protect the ALTQ state that's exposed to the ifqueue if the ifq->ifq_lock.
This requires exposing some implementation details to ALTQ, which is guarded
by an __IFQ_PRIVATE define.


To generate a diff of this commit:
cvs rdiff -u -r1.22.6.1 -r1.22.6.1.2.1 src/sys/altq/altq_cdnr.c
cvs rdiff -u -r1.33.46.1 -r1.33.46.1.2.1 src/sys/altq/altq_subr.c
cvs rdiff -u -r1.529.2.1.2.2 -r1.529.2.1.2.3 src/sys/net/if.c
cvs rdiff -u -r1.305.2.1.2.2 -r1.305.2.1.2.3 src/sys/net/if.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/altq/altq_cdnr.c
diff -u src/sys/altq/altq_cdnr.c:1.22.6.1 src/sys/altq/altq_cdnr.c:1.22.6.1.2.1
--- src/sys/altq/altq_cdnr.c:1.22.6.1	Sat Nov 11 13:16:30 2023
+++ src/sys/altq/altq_cdnr.c	Wed Nov 15 02:19:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: altq_cdnr.c,v 1.22.6.1 2023/11/11 13:16:30 thorpej Exp $	*/
+/*	$NetBSD: altq_cdnr.c,v 1.22.6.1.2.1 2023/11/15 02:19:00 thorpej Exp $	*/
 /*	$KAME: altq_cdnr.c,v 1.15 2005/04/13 03:44:24 suz Exp $	*/
 
 /*
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: altq_cdnr.c,v 1.22.6.1 2023/11/11 13:16:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_cdnr.c,v 1.22.6.1.2.1 2023/11/15 02:19:00 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altq.h"
@@ -138,11 +138,16 @@ altq_cdnr_input(struct mbuf *m, int af)
 	struct tc_action	*tca;
 	struct cdnr_block	*cb;
 	struct cdnr_pktinfo	pktinfo;
+	bool			is_cnding = false;
 
 	ifp = m_get_rcvif_NOMPSAFE(m);
-	if (!ALTQ_IS_CNDTNING(&ifp->if_snd))
+	mutex_enter(ifp->if_snd.ifq_lock);
+	is_cnding = ALTQ_IS_CNDTNING(&ifp->if_snd);
+	mutex_exit(ifp->if_snd.ifq_lock);
+	if (!is_cnding) {
 		/* traffic conditioner is not enabled on this interface */
 		return (1);
+	}
 
 	top = ifp->if_snd.ifq_altq->altq_cdnr;
 
@@ -428,9 +433,11 @@ top_destroy(struct top_cdnr *top)
 {
 	struct cdnr_block *cb;
 
+	mutex_enter(top->tc_ifq->altq_ifq->ifq_lock);
 	if (ALTQ_IS_CNDTNING(top->tc_ifq))
 		ALTQ_CLEAR_CNDTNING(top->tc_ifq);
 	top->tc_ifq->altq_cdnr = NULL;
+	mutex_exit(top->tc_ifq->altq_ifq->ifq_lock);
 
 	/*
 	 * destroy all the conditioner elements belonging to this interface
@@ -448,10 +455,17 @@ top_destroy(struct top_cdnr *top)
 
 	/* if there is no active conditioner, remove the input hook */
 	if (altq_input != NULL) {
-		LIST_FOREACH(top, &tcb_list, tc_next)
+		bool is_cnding = false;
+
+		LIST_FOREACH(top, &tcb_list, tc_next) {
+			mutex_enter(top->tc_ifq->altq_ifq->ifq_lock);
 			if (ALTQ_IS_CNDTNING(top->tc_ifq))
+is_cnding = true;
+			mutex_exit(top->tc_ifq->altq_ifq->ifq_lock);
+			if (is_cnding)
 break;
-		if (top == NULL)
+		}
+		if (!is_cnding)
 			altq_input = NULL;
 	}
 
@@ -1220,19 +1234,30 @@ cdnrioctl(dev_t dev, ioctlcmd_t cmd, voi
 		switch (cmd) {
 
 		case CDNR_ENABLE:
+			mutex_enter(top->tc_ifq->altq_ifq->ifq_lock);
 			ALTQ_SET_CNDTNING(top->tc_ifq);
+			mutex_exit(top->tc_ifq->altq_ifq->ifq_lock);
 			if (altq_input == NULL)
 altq_input = altq_cdnr_input;
 			break;
 
-		case CDNR_DISABLE:
+		case CDNR_DISABLE: {
+			bool is_cnding = false;
+			mutex_enter(top->tc_ifq->altq_ifq->ifq_lock);
 			ALTQ_CLEAR_CNDTNING(top->tc_ifq);
-			LIST_FOREACH(top, &tcb_list, tc_next)
+			mutex_exit(top->tc_ifq->altq_ifq->ifq_lock);
+			LIST_FOREACH(top, &tcb_list, tc_next) {
+mutex_enter(top->tc_ifq->altq_ifq->ifq_lock);
 if (ALTQ_IS_CNDTNING(top->tc_ifq))
+	is_cnding = true;
+mutex_exit(top->tc_ifq->altq_ifq->ifq_lock);
+if (is_cnding)
 	break;
-			if (top == NULL)
+			}
+			if (!is_cnding)
 altq_input = NULL;
 			break;
+		}
 		}
 		break;
 

Index: src/sys/altq/altq_subr.c
diff -u src/sys/altq/altq_subr.c:1.33.46.1 src/sys/altq/altq_subr.c:1.33.46.1.2.1
--- src/sys/altq/altq_subr.c:1.33.46.1	Sat Nov 11 13:16:30 2023
+++ src/sys/altq/altq_subr.c	Wed Nov 15 02:19:00 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: altq_subr.c,v 1.33.46.1 2023/11/11 13:16:30 thorpej Exp $	*/
+/*	$NetBSD: altq_subr.c,v 1.33.46.1.2.1 2023/11/15 02:19:00 thorpej Exp $	*/
 /*	$KAME: altq_subr.c,v 1.24 2005/04/13 03:44:25 suz Exp $	*/
 
 /*
@@ -28,7 +28,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: altq_subr.c,v 1.33.46.1 2023/11/11 13:16:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: altq_subr.c,v 1.33.46.1.2.1 2023/11/15 02:19:00 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altq.h"
@@ -36,6 +36,8 @@ __KERNEL_RCSID(0, "$NetBSD: altq_subr.c,
 #include "pf.h"
 #endif
 
+#define	__IFQ_PRIVATE
+
 #include 
 #include 
 #include 
@@ -140,6 +142,13 @@ void
 altq_free(struct ifqueue *ifq)
 {
 	if (ifq->ifq_altq != NULL) {
+		/*
+		 * No need to pre-flight these calls; both can handle
+		 * the not-enabled / not-attached scenarios.
+		 */
+		altq_disable(ifq->ifq_altq);
+	

CVS commit: [thorpej-ifq] src/sys

2023-11-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 15 02:08:34 UTC 2023

Modified Files:
src/sys/dev/pci [thorpej-ifq]: xmm7360.c
src/sys/dev/usb [thorpej-ifq]: uhso.c
src/sys/net [thorpej-ifq]: if.c if.h if_arcsubr.c if_ethersubr.c
if_ppp.c if_sl.c if_spppsubr.c
src/sys/netcan [thorpej-ifq]: can.c

Log Message:
Rename ifq_enqueue() -> if_enqueue(), ifq_enqueue2() -> if_enqueue2().


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.6.1 src/sys/dev/pci/xmm7360.c
cvs rdiff -u -r1.37 -r1.37.6.1 src/sys/dev/usb/uhso.c
cvs rdiff -u -r1.529.2.1.2.1 -r1.529.2.1.2.2 src/sys/net/if.c
cvs rdiff -u -r1.305.2.1.2.1 -r1.305.2.1.2.2 src/sys/net/if.h
cvs rdiff -u -r1.85 -r1.85.8.1 src/sys/net/if_arcsubr.c
cvs rdiff -u -r1.326.2.1 -r1.326.2.1.2.1 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.172 -r1.172.8.1 src/sys/net/if_ppp.c
cvs rdiff -u -r1.136 -r1.136.6.1 src/sys/net/if_sl.c
cvs rdiff -u -r1.267 -r1.267.4.1 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.13 -r1.13.6.1 src/sys/netcan/can.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/xmm7360.c
diff -u src/sys/dev/pci/xmm7360.c:1.17 src/sys/dev/pci/xmm7360.c:1.17.6.1
--- src/sys/dev/pci/xmm7360.c:1.17	Thu Oct 27 00:01:07 2022
+++ src/sys/dev/pci/xmm7360.c	Wed Nov 15 02:08:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: xmm7360.c,v 1.17 2022/10/27 00:01:07 riastradh Exp $	*/
+/*	$NetBSD: xmm7360.c,v 1.17.6.1 2023/11/15 02:08:33 thorpej Exp $	*/
 
 /*
  * Device driver for Intel XMM7360 LTE modems, eg. Fibocom L850-GL.
@@ -75,7 +75,7 @@ MODULE_DEVICE_TABLE(pci, xmm7360_ids);
 #include "opt_gateway.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: xmm7360.c,v 1.17 2022/10/27 00:01:07 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xmm7360.c,v 1.17.6.1 2023/11/15 02:08:33 thorpej Exp $");
 #endif
 
 #include 
@@ -257,7 +257,6 @@ typedef struct kmutex spinlock_t;
 #define ifq_clr_oactive(ifq)		/* nothing to do */
 #define ifq_empty(ifq)			IFQ_IS_EMPTY(ifq)
 #define ifq_purge(ifq)			IF_PURGE(ifq)
-#define if_enqueue(ifp, m)		ifq_enqueue(ifp, m)
 #define if_ih_insert(ifp, func, arg)	(ifp)->_if_input = (func)
 #define if_ih_remove(ifp, func, arg)	/* nothing to do */
 #define if_hardmtu			if_mtu

Index: src/sys/dev/usb/uhso.c
diff -u src/sys/dev/usb/uhso.c:1.37 src/sys/dev/usb/uhso.c:1.37.6.1
--- src/sys/dev/usb/uhso.c:1.37	Wed Oct 26 23:53:03 2022
+++ src/sys/dev/usb/uhso.c	Wed Nov 15 02:08:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhso.c,v 1.37 2022/10/26 23:53:03 riastradh Exp $	*/
+/*	$NetBSD: uhso.c,v 1.37.6.1 2023/11/15 02:08:33 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.37 2022/10/26 23:53:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.37.6.1 2023/11/15 02:08:33 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -2358,7 +2358,7 @@ uhso_ifnet_output(struct ifnet *ifp, str
 	switch (dst->sa_family) {
 #ifdef INET
 	case AF_INET:
-		error = ifq_enqueue(ifp, m);
+		error = if_enqueue(ifp, m);
 		break;
 #endif
 

Index: src/sys/net/if.c
diff -u src/sys/net/if.c:1.529.2.1.2.1 src/sys/net/if.c:1.529.2.1.2.2
--- src/sys/net/if.c:1.529.2.1.2.1	Tue Nov 14 14:47:03 2023
+++ src/sys/net/if.c	Wed Nov 15 02:08:33 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.529.2.1.2.1 2023/11/14 14:47:03 thorpej Exp $	*/
+/*	$NetBSD: if.c,v 1.529.2.1.2.2 2023/11/15 02:08:33 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.1 2023/11/14 14:47:03 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.529.2.1.2.2 2023/11/15 02:08:33 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -4415,11 +4415,9 @@ ifq_classify_packet(struct ifqueue * con
 /*
  * Queue message on interface, and start output if interface
  * not yet active.
- *
- * XXX Should be renamed if_enqueue().
  */
 int
-ifq_enqueue(struct ifnet *ifp, struct mbuf *m)
+if_enqueue(struct ifnet *ifp, struct mbuf *m)
 {
 
 	return if_transmit_lock(ifp, m);
@@ -4445,11 +4443,9 @@ ifq_lock2(struct ifqueue * const ifq0, s
  *
  * N.B. Unlike ifq_enqueue(), this does *not* start transmission on
  * the interface.
- *
- * XXX Should be renamed if_enqueue2().
  */
 int
-ifq_enqueue2(struct ifnet *ifp, struct ifqueue *ifq, struct mbuf *m)
+if_enqueue2(struct ifnet *ifp, struct ifqueue *ifq, struct mbuf *m)
 {
 	struct ifqueue * const ifq0 = &ifp->if_snd;
 	int error = 0;

Index: src/sys/net/if.h
diff -u src/sys/net/if.h:1.305.2.1.2.1 src/sys/net/if.h:1.305.2.1.2.2
--- src/sys/net/if.h:1.305.2.1.2.1	Tue Nov 14 14:47:03 2023
+++ src/sys/net/if.h	Wed Nov 15 02:08:34 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.h,v 1.305.2.1.2.1 2023/11/14 14:47:03 thorpej Exp $	*/
+/*	$NetBSD: if.h,v 1.305.2.1.2.2 2023/11/15 02:08:34 thorpej Exp $	*/
 
 /*-
  * 

CVS commit: [thorpej-ifq] src/sys

2023-11-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Wed Nov 15 02:08:34 UTC 2023

Modified Files:
src/sys/dev/pci [thorpej-ifq]: xmm7360.c
src/sys/dev/usb [thorpej-ifq]: uhso.c
src/sys/net [thorpej-ifq]: if.c if.h if_arcsubr.c if_ethersubr.c
if_ppp.c if_sl.c if_spppsubr.c
src/sys/netcan [thorpej-ifq]: can.c

Log Message:
Rename ifq_enqueue() -> if_enqueue(), ifq_enqueue2() -> if_enqueue2().


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.6.1 src/sys/dev/pci/xmm7360.c
cvs rdiff -u -r1.37 -r1.37.6.1 src/sys/dev/usb/uhso.c
cvs rdiff -u -r1.529.2.1.2.1 -r1.529.2.1.2.2 src/sys/net/if.c
cvs rdiff -u -r1.305.2.1.2.1 -r1.305.2.1.2.2 src/sys/net/if.h
cvs rdiff -u -r1.85 -r1.85.8.1 src/sys/net/if_arcsubr.c
cvs rdiff -u -r1.326.2.1 -r1.326.2.1.2.1 src/sys/net/if_ethersubr.c
cvs rdiff -u -r1.172 -r1.172.8.1 src/sys/net/if_ppp.c
cvs rdiff -u -r1.136 -r1.136.6.1 src/sys/net/if_sl.c
cvs rdiff -u -r1.267 -r1.267.4.1 src/sys/net/if_spppsubr.c
cvs rdiff -u -r1.13 -r1.13.6.1 src/sys/netcan/can.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-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 14 14:47:04 UTC 2023

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

Log Message:
New network interface output queue API.


To generate a diff of this commit:
cvs rdiff -u -r1.529.2.1 -r1.529.2.1.2.1 src/sys/net/if.c
cvs rdiff -u -r1.305.2.1 -r1.305.2.1.2.1 src/sys/net/if.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/net/if.c
diff -u src/sys/net/if.c:1.529.2.1 src/sys/net/if.c:1.529.2.1.2.1
--- src/sys/net/if.c:1.529.2.1	Sat Nov 11 13:16:30 2023
+++ src/sys/net/if.c	Tue Nov 14 14:47:03 2023
@@ -1,7 +1,7 @@
-/*	$NetBSD: if.c,v 1.529.2.1 2023/11/11 13:16:30 thorpej Exp $	*/
+/*	$NetBSD: if.c,v 1.529.2.1.2.1 2023/11/14 14:47:03 thorpej Exp $	*/
 
 /*-
- * Copyright (c) 1999, 2000, 2001, 2008 The NetBSD Foundation, Inc.
+ * Copyright (c) 1999, 2000, 2001, 2008, 2023 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -90,7 +90,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.529.2.1 2023/11/11 13:16:30 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if.c,v 1.529.2.1.2.1 2023/11/14 14:47:03 thorpej Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_inet.h"
@@ -105,6 +105,7 @@ __KERNEL_RCSID(0, "$NetBSD: if.c,v 1.529
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -199,6 +200,7 @@ static struct workqueue		*ifnet_link_sta
 static struct workqueue		*if_slowtimo_wq __read_mostly;
 
 static kmutex_t			if_clone_mtx;
+static kcondvar_t		ifq_stop_cond;
 
 struct ifnet *lo0ifp;
 int	ifqmaxlen = IFQ_MAXLEN;
@@ -330,6 +332,7 @@ ifinit1(void)
 #endif
 
 	mutex_init(&if_clone_mtx, MUTEX_DEFAULT, IPL_NONE);
+	cv_init(&ifq_stop_cond, "ifq_stop");
 
 	TAILQ_INIT(&ifnet_list);
 	mutex_init(&ifnet_mtx, MUTEX_DEFAULT, IPL_NONE);
@@ -728,9 +731,6 @@ if_initialize(ifnet_t *ifp)
 	 * if_alloc_sadl().
 	 */
 
-	if (ifp->if_snd.ifq_maxlen == 0)
-		ifp->if_snd.ifq_maxlen = ifqmaxlen;
-
 	ifp->if_broadcastaddr = 0; /* reliably crash if used uninitialized */
 
 	ifp->if_link_state = LINK_STATE_UNKNOWN;
@@ -745,7 +745,10 @@ if_initialize(ifnet_t *ifp)
 	altq_alloc(&ifp->if_snd, ifp);
 #endif
 
-	IFQ_LOCK_INIT(&ifp->if_snd);
+	if (ifp->if_snd.ifq_lock == NULL) {
+		ifq_init(&ifp->if_snd, ifqmaxlen);
+	}
+	KASSERT(ifp->if_snd.ifq_lock != NULL);
 
 	ifp->if_pfil = pfil_head_create(PFIL_TYPE_IFNET, ifp);
 	pfil_run_ifhooks(if_pfil, PFIL_IFNET_ATTACH, ifp);
@@ -1535,7 +1538,7 @@ restart:
 
 	mutex_obj_free(ifp->if_ioctl_lock);
 	ifp->if_ioctl_lock = NULL;
-	mutex_obj_free(ifp->if_snd.ifq_lock);
+	ifq_fini(&ifp->if_snd);
 	if_stats_fini(ifp);
 	KASSERT(!simplehook_has_hooks(ifp->if_linkstate_hooks));
 	simplehook_destroy(ifp->if_linkstate_hooks);
@@ -3821,8 +3824,599 @@ if_transmit_lock(struct ifnet *ifp, stru
 }
 
 /*
+ * ifq_init --
+ *
+ *	Initialize an interface queue.
+ */
+void
+ifq_init(struct ifqueue * const ifq, unsigned int maxqlen)
+{
+#ifdef ALTQ
+	/*
+	 * ALTQ data can be allocated via IFQ_SET_READY() which
+	 * can be called before if_initialize(), which in turn
+	 * calls ifq_init().  Preserve it.
+	 */
+	struct ifaltq *altq = ifq->ifq_altq;
+#endif
+
+	/*
+	 * XXX Temporary measure to handle drivers that set ifq_maxqlen
+	 * XXX before calling if_attach().
+	 */
+	if (ifq->ifq_maxlen != 0) {
+		maxqlen = ifq->ifq_maxlen;
+	}
+
+	memset(ifq, 0, sizeof(*ifq));
+#ifdef ALTQ
+	ifq->ifq_altq = altq;
+#endif
+	ifq->ifq_lock = mutex_obj_alloc(MUTEX_DEFAULT, IPL_NET);
+	ifq_set_maxlen(ifq, maxqlen);
+	ifq->ifq_state = IFQ_STATE_INVALID;	/* transitional */
+}
+
+/*
+ * ifq_fini --
+ *
+ *	Tear down an interface queue.
+ */
+void
+ifq_fini(struct ifqueue * const ifq)
+{
+	if (ifq->ifq_lock != NULL) {
+		ifq_purge(ifq);
+		mutex_obj_free(ifq->ifq_lock);
+		ifq->ifq_lock = NULL;
+	}
+	ifq->ifq_state = IFQ_STATE_DEAD;
+}
+
+/*
+ * ifq_start --
+ *
+ *	Record that the Tx process is ready to run.  Called from
+ *	an interface's init routine.
+ */
+void
+ifq_start(struct ifqueue * const ifq)
+{
+	mutex_enter(ifq->ifq_lock);
+	KASSERT(ifq->ifq_state == IFQ_STATE_STOPPED ||
+		ifq->ifq_state == IFQ_STATE_INVALID);
+	ifq->ifq_state = IFQ_STATE_READY;
+	mutex_exit(ifq->ifq_lock);
+}
+
+/*
+ * ifq_stop --
+ *
+ *	Request that the Tx process stop and wait for it to do so.
+ *	Called from an interface's stop routine.
+ */
+void
+ifq_stop(struct ifqueue * const ifq)
+{
+	ASSERT_SLEEPABLE();
+
+	mutex_enter(ifq->ifq_lock);
+	switch (ifq->ifq_state) {
+	case IFQ_STATE_INVALID:		/* transitional */
+	case IFQ_STATE_STOPPED:
+		break;
+
+	case IFQ_STATE_READY:
+		ifq->ifq_state = IFQ_STATE_STOPPED;
+		break;
+
+	case IFQ_STATE_BUSY:
+		ifq->ifq_state = IFQ_STATE_WAIT_STOP;
+		/* FALLTHROUGH */
+
+	default:
+		KASSERT(ifq->ifq_state == IFQ_STATE_WAIT_STOP);
+		while (ifq->ifq_state != IFQ_STATE_STOPPED) {
+			cv_wait(&ifq_stop_cond, ifq->ifq_lock);
+		}

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

2023-11-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Nov 14 14:47:04 UTC 2023

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

Log Message:
New network interface output queue API.


To generate a diff of this commit:
cvs rdiff -u -r1.529.2.1 -r1.529.2.1.2.1 src/sys/net/if.c
cvs rdiff -u -r1.305.2.1 -r1.305.2.1.2.1 src/sys/net/if.h

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