CVS commit: src/external/cddl/osnet/dev/fbt/x86

2021-08-18 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Wed Aug 18 11:26:17 UTC 2021

Modified Files:
src/external/cddl/osnet/dev/fbt/x86: fbt_isa.c

Log Message:
PR/56355: Exclude the symbol trap, not all symbols other than trap.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/cddl/osnet/dev/fbt/x86/fbt_isa.c

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

Modified files:

Index: src/external/cddl/osnet/dev/fbt/x86/fbt_isa.c
diff -u src/external/cddl/osnet/dev/fbt/x86/fbt_isa.c:1.5 src/external/cddl/osnet/dev/fbt/x86/fbt_isa.c:1.6
--- src/external/cddl/osnet/dev/fbt/x86/fbt_isa.c:1.5	Sun Aug 15 16:33:57 2021
+++ src/external/cddl/osnet/dev/fbt/x86/fbt_isa.c	Wed Aug 18 11:26:17 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: fbt_isa.c,v 1.5 2021/08/15 16:33:57 christos Exp $	*/
+/*	$NetBSD: fbt_isa.c,v 1.6 2021/08/18 11:26:17 riastradh Exp $	*/
 
 /*
  * CDDL HEADER START
@@ -251,7 +251,7 @@ fbt_provide_module_cb(const char *name, 
 	/*
 	 * Exclude some more symbols which can be called from probe context.
 	 */
-	if (strcmp(name, "trap") ||
+	if (strcmp(name, "trap") == 0 ||
 	strcmp(name, "x86_curcpu") == 0 ||
 	strcmp(name, "x86_curlwp") == 0) {
 		return 0;



CVS commit: src/sys/modules/sodium

2021-08-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 18 09:34:45 UTC 2021

Modified Files:
src/sys/modules/sodium: Makefile.sodmod

Log Message:
Don't define HAVE_TI_MODE if we don't have it.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/modules/sodium/Makefile.sodmod

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

Modified files:

Index: src/sys/modules/sodium/Makefile.sodmod
diff -u src/sys/modules/sodium/Makefile.sodmod:1.1 src/sys/modules/sodium/Makefile.sodmod:1.2
--- src/sys/modules/sodium/Makefile.sodmod:1.1	Tue Aug 17 13:29:20 2021
+++ src/sys/modules/sodium/Makefile.sodmod	Wed Aug 18 05:34:45 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.sodmod,v 1.1 2021/08/17 17:29:20 christos Exp $
+#	$NetBSD: Makefile.sodmod,v 1.2 2021/08/18 09:34:45 christos Exp $
 
 SODIUMDIR=	${S}/external/isc/libsodium
 SODIUMSRCDIR=	${SODIUMDIR}/dist/src/libsodium
@@ -49,5 +49,8 @@ CWARNFLAGS+=	-Wno-shadow
 CWARNFLAGS+=	-Wno-unused-function
 CWARNFLAGS+=	-Wno-unused-variable
 
-CPPFLAGS+=	-DHAVE_TI_MODE -I${SODIUMDIR}/include 
+.if ${MACHINE_CPU} == "x86_64"
+CPPFLAGS+=	-DHAVE_TI_MODE
+.endif
+CPPFLAGS+=	-I${SODIUMDIR}/include 
 CPPFLAGS+=	-I${SODIUMDIR}/dist/src/libsodium/include/sodium



CVS commit: src/sys/arch/evbarm/conf

2021-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug 18 09:18:09 UTC 2021

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
 It's time to add ixg(4) and ixv(4).


To generate a diff of this commit:
cvs rdiff -u -r1.179 -r1.180 src/sys/arch/evbarm/conf/GENERIC64

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

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.179 src/sys/arch/evbarm/conf/GENERIC64:1.180
--- src/sys/arch/evbarm/conf/GENERIC64:1.179	Sat Jun 26 09:29:14 2021
+++ src/sys/arch/evbarm/conf/GENERIC64	Wed Aug 18 09:18:09 2021
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.179 2021/06/26 09:29:14 nia Exp $
+#	$NetBSD: GENERIC64,v 1.180 2021/08/18 09:18:09 msaitoh Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -252,6 +252,8 @@ genet*		at fdt?
 #scx*		at fdt?
 aq*		at pci? dev ? function ?	# Aquantia AQC 10 gigabit
 ena*		at pci? dev ? function ?	# Amazon.com Elastic Network Adapter
+ixg*	at pci? dev ? function ?	# Intel 8259x 10 gigabit
+ixv*	at pci? dev ? function ?	# Intel 8259x 10G virtual function
 mcx*		at pci? dev ? function ?	# Mellanox 5th generation Ethernet
 mskc*		at pci? dev ? function ?	# Marvell Yukon 2 Gigabit Ethernet
 msk*		at mskc?



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

2021-08-18 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Aug 18 09:17:17 UTC 2021

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

Log Message:
 Refresh unrefreshed descriptors' buffers correctly.

- Update next_to_refresh at least before ixgbe_rx_unrefresed() to detect
  the unrefreshed status correctly in ixgbe_rxeof().
- next_to_refresh points to the previous entry of the first unrefreshed
  descriptor, so fix a loop variable to point to the correct one in
  ixgbe_refresh_mbufs().
- Without the above two fixes, RX ring may have some unrefreshed entries
  which have inconsistent state. On such state, "ifconfig down up" causes
  panic in bus_dmamap_sync() on aarch64.
- Tested on amd64 and aarch64. OK'd by knakahara.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 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.81 src/sys/dev/pci/ixgbe/ix_txrx.c:1.82
--- src/sys/dev/pci/ixgbe/ix_txrx.c:1.81	Wed Jul  7 08:58:19 2021
+++ src/sys/dev/pci/ixgbe/ix_txrx.c	Wed Aug 18 09:17:17 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ix_txrx.c,v 1.81 2021/07/07 08:58:19 msaitoh Exp $ */
+/* $NetBSD: ix_txrx.c,v 1.82 2021/08/18 09:17:17 msaitoh Exp $ */
 
 /**
 
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.81 2021/07/07 08:58:19 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ix_txrx.c,v 1.82 2021/08/18 09:17:17 msaitoh Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet6.h"
@@ -1336,15 +1336,15 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr,
 	struct adapter  *adapter = rxr->adapter;
 	struct ixgbe_rx_buf *rxbuf;
 	struct mbuf *mp;
-	int i, j, error;
+	int i, error;
 	boolrefreshed = false;
 
-	i = j = rxr->next_to_refresh;
-	/* Control the loop with one beyond */
-	if (++j == rxr->num_desc)
-		j = 0;
+	i = rxr->next_to_refresh;
+	/* next_to_refresh points to the previous one */
+	if (++i == rxr->num_desc)
+		i = 0;
 
-	while (j != limit) {
+	while (i != limit) {
 		rxbuf = >rx_buffers[i];
 		if (rxbuf->buf == NULL) {
 			mp = ixgbe_getjcl(>jcl_head, M_NOWAIT,
@@ -1387,11 +1387,10 @@ ixgbe_refresh_mbufs(struct rx_ring *rxr,
 		}
 
 		refreshed = true;
-		/* Next is precalculated */
-		i = j;
+		/* next_to_refresh points to the previous one */
 		rxr->next_to_refresh = i;
-		if (++j == rxr->num_desc)
-			j = 0;
+		if (++i == rxr->num_desc)
+			i = 0;
 	}
 
 update:
@@ -2090,6 +2089,7 @@ next_desc:
 		/* Advance our pointers to the next descriptor. */
 		if (++i == rxr->num_desc)
 			i = 0;
+		rxr->next_to_check = i;
 
 		/* Now send to the stack or do LRO */
 		if (sendmp != NULL) {
@@ -2107,8 +2107,6 @@ next_desc:
 	if (ixgbe_rx_unrefreshed(rxr))
 		ixgbe_refresh_mbufs(rxr, i);
 
-	rxr->next_to_check = i;
-
 	IXGBE_RX_UNLOCK(rxr);
 
 #ifdef LRO



CVS commit: src/sys/modules

2021-08-18 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 18 09:07:07 UTC 2021

Modified Files:
src/sys/modules: Makefile
Added Files:
src/sys/modules/blake2s: Makefile
Removed Files:
src/sys/modules/blakes2s: Makefile

Log Message:
Fix broken name


To generate a diff of this commit:
cvs rdiff -u -r1.253 -r1.254 src/sys/modules/Makefile
cvs rdiff -u -r0 -r1.1 src/sys/modules/blake2s/Makefile
cvs rdiff -u -r1.1 -r0 src/sys/modules/blakes2s/Makefile

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

Modified files:

Index: src/sys/modules/Makefile
diff -u src/sys/modules/Makefile:1.253 src/sys/modules/Makefile:1.254
--- src/sys/modules/Makefile:1.253	Tue Aug 17 17:39:32 2021
+++ src/sys/modules/Makefile	Wed Aug 18 05:07:07 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.253 2021/08/17 21:39:32 kre Exp $
+#	$NetBSD: Makefile,v 1.254 2021/08/18 09:07:07 christos Exp $
 
 .include 
 
@@ -27,7 +27,7 @@ SUBDIR+=	adosfs
 SUBDIR+=	aio
 SUBDIR+=	audio
 SUBDIR+=	autofs
-SUBDIR+=	blakes2s
+SUBDIR+=	blake2s
 SUBDIR+=	blowfish
 SUBDIR+=	bpf
 SUBDIR+=	bpf_filter

Added files:

Index: src/sys/modules/blake2s/Makefile
diff -u /dev/null src/sys/modules/blake2s/Makefile:1.1
--- /dev/null	Wed Aug 18 05:07:07 2021
+++ src/sys/modules/blake2s/Makefile	Wed Aug 18 05:07:07 2021
@@ -0,0 +1,13 @@
+#	$NetBSD: Makefile,v 1.1 2021/08/18 09:07:07 christos Exp $
+
+.include "../Makefile.inc"
+
+KMOD=	blake2s
+
+BLAKE2SDIR=	$S/crypto/blake2
+CPPFLAGS+=	-I${BLAKE2SDIR}
+
+.PATH: ${BLAKE2SDIR}
+SRCS+=	blake2s.c
+
+.include