CVS commit: src/sys/net

2018-07-11 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Thu Jul 12 02:26:04 UTC 2018

Modified Files:
src/sys/net: if_llatbl.h route.c

Log Message:
Don't use aprint_* functions for logging unrelated to autoconf(9)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/net/if_llatbl.h
cvs rdiff -u -r1.210 -r1.211 src/sys/net/route.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_llatbl.h
diff -u src/sys/net/if_llatbl.h:1.15 src/sys/net/if_llatbl.h:1.16
--- src/sys/net/if_llatbl.h:1.15	Thu Apr 19 21:20:43 2018
+++ src/sys/net/if_llatbl.h	Thu Jul 12 02:26:04 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.h,v 1.15 2018/04/19 21:20:43 christos Exp $	*/
+/*	$NetBSD: if_llatbl.h,v 1.16 2018/07/12 02:26:04 ozaki-r Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -37,6 +37,7 @@
 #endif
 
 #include 
+#include 
 
 #include 
 
@@ -106,7 +107,7 @@ struct llentry {
 
 
 #if 0
-#define LLE_LOCK_TRACE(t, lle)	aprint_normal( \
+#define LLE_LOCK_TRACE(t, lle)	log(LOG_DEBUG, \
 "%s:%d: LOCK(" #t "): lle=%p\n", \
 __func__, __LINE__, (lle))
 #else
@@ -142,7 +143,7 @@ struct llentry {
 #define LLE_IS_VALID(lle)	(((lle) != NULL) && ((lle) != (void *)-1))
 
 #if 0
-#define LLE_REF_TRACE(t, n)	aprint_normal("%s:%d: REF(" #t "): refcnt=%d\n", \
+#define LLE_REF_TRACE(t, n)	log(LOG_DEBUG, "%s:%d: REF(" #t "): refcnt=%d\n", \
 __func__, __LINE__, (n))
 #else
 #define LLE_REF_TRACE(t, n)	do {} while (0)

Index: src/sys/net/route.c
diff -u src/sys/net/route.c:1.210 src/sys/net/route.c:1.211
--- src/sys/net/route.c:1.210	Fri Jun  1 07:13:35 2018
+++ src/sys/net/route.c	Thu Jul 12 02:26:04 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.210 2018/06/01 07:13:35 ozaki-r Exp $	*/
+/*	$NetBSD: route.c,v 1.211 2018/07/12 02:26:04 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -97,7 +97,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.210 2018/06/01 07:13:35 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: route.c,v 1.211 2018/07/12 02:26:04 ozaki-r Exp $");
 
 #include 
 #ifdef RTFLUSH_DEBUG
@@ -509,27 +509,27 @@ dump_rt(const struct rtentry *rt)
 {
 	char buf[512];
 
-	aprint_normal("rt: ");
-	aprint_normal("p=%p ", rt);
+	log(LOG_DEBUG, "rt: ");
+	log(LOG_DEBUG, "p=%p ", rt);
 	if (rt->_rt_key == NULL) {
-		aprint_normal("dst=(NULL) ");
+		log(LOG_DEBUG, "dst=(NULL) ");
 	} else {
 		sockaddr_format(rt->_rt_key, buf, sizeof(buf));
-		aprint_normal("dst=%s ", buf);
+		log(LOG_DEBUG, "dst=%s ", buf);
 	}
 	if (rt->rt_gateway == NULL) {
-		aprint_normal("gw=(NULL) ");
+		log(LOG_DEBUG, "gw=(NULL) ");
 	} else {
 		sockaddr_format(rt->_rt_key, buf, sizeof(buf));
-		aprint_normal("gw=%s ", buf);
+		log(LOG_DEBUG, "gw=%s ", buf);
 	}
-	aprint_normal("flags=%x ", rt->rt_flags);
+	log(LOG_DEBUG, "flags=%x ", rt->rt_flags);
 	if (rt->rt_ifp == NULL) {
-		aprint_normal("if=(NULL) ");
+		log(LOG_DEBUG, "if=(NULL) ");
 	} else {
-		aprint_normal("if=%s ", rt->rt_ifp->if_xname);
+		log(LOG_DEBUG, "if=%s ", rt->rt_ifp->if_xname);
 	}
-	aprint_normal("\n");
+	log(LOG_DEBUG, "\n");
 }
 #endif /* RT_DEBUG */
 



CVS commit: src/external/gpl3/binutils

2018-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Jul 12 00:16:32 UTC 2018

Modified Files:
src/external/gpl3/binutils/lib/libbfd/arch/aarch64: bfd.h bfd_stdint.h
bfdver.h config.h defs.mk
src/external/gpl3/binutils/lib/libiberty/arch/aarch64: config.h defs.mk
src/external/gpl3/binutils/lib/libopcodes/arch/aarch64: config.h
src/external/gpl3/binutils/usr.bin/common/arch/aarch64: config.h
defs.mk
src/external/gpl3/binutils/usr.bin/gas/arch/aarch64: config.h
src/external/gpl3/binutils/usr.bin/gprof/arch/aarch64: gconfig.h
src/external/gpl3/binutils/usr.bin/ld/arch/aarch64: config.h

Log Message:
regen aarch64


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h \
src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd_stdint.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfdver.h \
src/external/gpl3/binutils/lib/libbfd/arch/aarch64/config.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/binutils/lib/libbfd/arch/aarch64/defs.mk
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/binutils/lib/libiberty/arch/aarch64/config.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/gpl3/binutils/lib/libiberty/arch/aarch64/defs.mk
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/lib/libopcodes/arch/aarch64/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/usr.bin/common/arch/aarch64/config.h \
src/external/gpl3/binutils/usr.bin/common/arch/aarch64/defs.mk
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/usr.bin/gas/arch/aarch64/config.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/usr.bin/gprof/arch/aarch64/gconfig.h
cvs rdiff -u -r1.4 -r1.5 \
src/external/gpl3/binutils/usr.bin/ld/arch/aarch64/config.h

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

Modified files:

Index: src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h
diff -u src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h:1.3 src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h:1.4
--- src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h:1.3	Sat Dec 10 20:53:43 2016
+++ src/external/gpl3/binutils/lib/libbfd/arch/aarch64/bfd.h	Wed Jul 11 20:16:32 2018
@@ -1,17 +1,17 @@
 /* This file is automatically generated.  DO NOT EDIT! */
 /* Generated from: NetBSD: mknative-binutils,v 1.9 2013/10/01 15:41:17 skrll Exp  */
-/* Generated from: NetBSD: mknative.common,v 1.11 2014/02/17 21:39:43 christos Exp  */
+/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
 
-/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
-   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", 
-   "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c", 
-   "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c", 
+/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically
+   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c",
+   "bfdio.c", "bfdwin.c", "section.c", "archures.c", "reloc.c",
+   "syms.c", "bfd.c", "archive.c", "corefile.c", "targets.c", "format.c",
"linker.c", "simple.c" and "compress.c".
Run "make headers" in your build bfd/ to regenerate.  */
 
 /* Main header file for the bfd library -- portable access to object files.
 
-   Copyright (C) 1990-2016 Free Software Foundation, Inc.
+   Copyright (C) 1990-2018 Free Software Foundation, Inc.
 
Contributed by Cygnus Support.
 
@@ -45,6 +45,7 @@ extern "C" {
 
 #include "ansidecl.h"
 #include "symcat.h"
+#include 
 #include 
 
 #if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
@@ -114,7 +115,7 @@ typedef BFD_HOST_U_64_BIT bfd_uint64_t;
 #endif
 
 /* Declaring a type wide enough to hold a host long and a host pointer.  */
-#define BFD_HOSTPTR_T	unsigned long
+#define BFD_HOSTPTR_T unsigned long
 typedef BFD_HOSTPTR_T bfd_hostptr_t;
 
 /* Forward declaration.  */
@@ -257,7 +258,7 @@ carsym;			/* To make these you call a ca
 
 /* Used in generating armaps (archive tables of contents).
Perhaps just a forward definition would do?  */
-struct orl 			/* Output ranlib.  */
+struct orl		/* Output ranlib.  */
 {
   char **name;		/* Symbol name.  */
   union
@@ -267,7 +268,7 @@ struct orl 			/* Output ranlib.  */
   } u;			/* bfd* or file position.  */
   int namidx;		/* Index into string table.  */
 };
-
+
 /* Linenumber stuff.  */
 typedef struct lineno_cache_entry
 {
@@ -275,17 +276,25 @@ typedef struct lineno_cache_entry
   union
   {
 struct bfd_symbol *sym;	/* Function name.  */
-bfd_vma offset;			/* Offset into section.  */
+bfd_vma offset;		/* Offset into section.  */
   } u;
 }
 alent;
 
 /* Object and core file sections.  */
+typedef struct bfd_section *sec_ptr;
 
 #define	align_power(addr, align)	\
   (((addr) + ((bfd_vma) 1 << 

CVS commit: [netbsd-8] src/doc

2018-07-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 11 16:51:29 UTC 2018

Modified Files:
src/doc [netbsd-8]: CHANGES-8.0

Log Message:
Ammend ticket #918


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.223 -r1.1.2.224 src/doc/CHANGES-8.0

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

Modified files:

Index: src/doc/CHANGES-8.0
diff -u src/doc/CHANGES-8.0:1.1.2.223 src/doc/CHANGES-8.0:1.1.2.224
--- src/doc/CHANGES-8.0:1.1.2.223	Tue Jul 10 15:37:42 2018
+++ src/doc/CHANGES-8.0	Wed Jul 11 16:51:29 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.0,v 1.1.2.223 2018/07/10 15:37:42 martin Exp $
+# $NetBSD: CHANGES-8.0,v 1.1.2.224 2018/07/11 16:51:29 martin Exp $
 
 A complete list of changes from the initial NetBSD 8.0 branch on 2017-06-04
 until the 8.0 release:
@@ -14126,7 +14126,7 @@ distrib/notes/i386/prep(manually edi
 
 	Fix NetBSD.org capitalization in some URLs.
 
-sys/net/if_llatbl.c1.28,1.29
+sys/net/if_llatbl.c1.28-1.30
 
 	Don't overwrite an existing llentry on RTM_ADD to avoid race
 	conditions.



CVS commit: [netbsd-8] src/sys/net

2018-07-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 11 16:50:46 UTC 2018

Modified Files:
src/sys/net [netbsd-8]: if_llatbl.c

Log Message:
Additionally pullup src/sys/net/if_llatbl.c r1.30 to fix build fallout
from previous, requested by both ozaki-r (ticket #918) and kre (ticket #920):

Update previous so that there is no unused (but assigned) variable
left when there is no ARP.   Thanks gcc!


To generate a diff of this commit:
cvs rdiff -u -r1.18.6.6 -r1.18.6.7 src/sys/net/if_llatbl.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_llatbl.c
diff -u src/sys/net/if_llatbl.c:1.18.6.6 src/sys/net/if_llatbl.c:1.18.6.7
--- src/sys/net/if_llatbl.c:1.18.6.6	Tue Jul 10 15:31:33 2018
+++ src/sys/net/if_llatbl.c	Wed Jul 11 16:50:46 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_llatbl.c,v 1.18.6.6 2018/07/10 15:31:33 martin Exp $	*/
+/*	$NetBSD: if_llatbl.c,v 1.18.6.7 2018/07/11 16:50:46 martin Exp $	*/
 /*
  * Copyright (c) 2004 Luigi Rizzo, Alessandro Cerri. All rights reserved.
  * Copyright (c) 2004-2008 Qing Li. All rights reserved.
@@ -695,12 +695,14 @@ lla_rt_output(const u_char rtm_type, con
 		 * conditions so remove it first.
 		 */
 		if (lle != NULL) {
-			size_t pkts_dropped = llentry_free(lle);
 #if defined(INET) && NARP > 0
+			size_t pkts_dropped = llentry_free(lle);
 			if (dst->sa_family == AF_INET) {
 arp_stat_add(ARP_STAT_DFRDROPPED,
 (uint64_t)pkts_dropped);
 			}
+#else
+			(void) llentry_free(lle);
 #endif
 		}
 



CVS commit: src/external/gpl3/gdb/lib/libbfd

2018-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 14:51:34 UTC 2018

Modified Files:
src/external/gpl3/gdb/lib/libbfd: Makefile

Log Message:
it is not xx but nn that we want. also add missing dependencies.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/gpl3/gdb/lib/libbfd/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/gpl3/gdb/lib/libbfd/Makefile
diff -u src/external/gpl3/gdb/lib/libbfd/Makefile:1.8 src/external/gpl3/gdb/lib/libbfd/Makefile:1.9
--- src/external/gpl3/gdb/lib/libbfd/Makefile:1.8	Wed Jul 11 09:44:04 2018
+++ src/external/gpl3/gdb/lib/libbfd/Makefile	Wed Jul 11 10:51:34 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2018/07/11 13:44:04 christos Exp $
+#	$NetBSD: Makefile,v 1.9 2018/07/11 14:51:34 christos Exp $
 
 .include 
 .include "../Makefile.inc"
@@ -19,9 +19,11 @@ GSRCS=		${G_libbfd_la_OBJECTS:libbfd.lo=
 SRCS=		${GSRCS:.lo=.c}
 
 DPSRCS+=	elf32-target.h elf64-target.h targmatch.h \
-		elf32-ia64.c elf64-ia64.c peigen.c pex64igen.c
+		elf32-ia64.c elf64-ia64.c elf64-aarch64.c \
+		peigen.c pex64igen.c
 CLEANFILES+=	elf32-target.h elf64-target.h targmatch.h \
-		elf32-ia64.c elf64-ia64.c peigen.c pex64igen.c
+		elf32-ia64.c elf64-ia64.c elf64-aarch64.c \
+		peigen.c pex64igen.c
 
 .PATH: ${DIST}/bfd
 
@@ -52,7 +54,7 @@ elf64-ia64.c: elfxx-ia64.c
 	${_MKTARGET_CREATE}
 	${TOOL_SED} -e s/NN/64/g < $> > $@
 
-elf64-aarch64.c: elfxx-aarch64.c
+elf64-aarch64.c: elfnn-aarch64.c
 	${_MKTARGET_CREATE}
 	${TOOL_SED} -e s/NN/64/g < $> > $@
 



CVS commit: src/external/gpl3/gdb/lib/libbfd

2018-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 13:44:04 UTC 2018

Modified Files:
src/external/gpl3/gdb/lib/libbfd: Makefile

Log Message:
Add another elfxx conversion.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gdb/lib/libbfd/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/gpl3/gdb/lib/libbfd/Makefile
diff -u src/external/gpl3/gdb/lib/libbfd/Makefile:1.7 src/external/gpl3/gdb/lib/libbfd/Makefile:1.8
--- src/external/gpl3/gdb/lib/libbfd/Makefile:1.7	Fri Aug 21 04:19:28 2015
+++ src/external/gpl3/gdb/lib/libbfd/Makefile	Wed Jul 11 09:44:04 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2015/08/21 08:19:28 tron Exp $
+#	$NetBSD: Makefile,v 1.8 2018/07/11 13:44:04 christos Exp $
 
 .include 
 .include "../Makefile.inc"
@@ -52,6 +52,10 @@ elf64-ia64.c: elfxx-ia64.c
 	${_MKTARGET_CREATE}
 	${TOOL_SED} -e s/NN/64/g < $> > $@
 
+elf64-aarch64.c: elfxx-aarch64.c
+	${_MKTARGET_CREATE}
+	${TOOL_SED} -e s/NN/64/g < $> > $@
+
 peigen.c: peXXigen.c
 	${_MKTARGET_CREATE}
 	${TOOL_SED} -e s/XX/pe/g < $> > $@



CVS commit: src/external/gpl3/gdb/dist/gdb

2018-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Jul 11 13:52:35 UTC 2018

Modified Files:
src/external/gpl3/gdb/dist/gdb: aarch64-nbsd-tdep.c aarch64-tdep.c

Log Message:
fix signness issues.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c
cvs rdiff -u -r1.1.1.6 -r1.2 src/external/gpl3/gdb/dist/gdb/aarch64-tdep.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/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.2 src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.3
--- src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c:1.2	Fri Jun 22 15:41:16 2018
+++ src/external/gpl3/gdb/dist/gdb/aarch64-nbsd-tdep.c	Wed Jul 11 09:52:35 2018
@@ -118,11 +118,11 @@ static const struct tramp_frame aarch64_
   SIGTRAMP_FRAME,
   4,
   {
-{0x910003e0, -1},		/* mov  x0, sp  */
-{0x91014000, -1},		/* add  x0, x0, #SF_UC  */
-{0xd2803428, -1},		/* mov  x8, #SYS_sigreturn  */
-{0xd401, -1},		/* svc  0x0  */
-{TRAMP_SENTINEL_INSN, -1}
+{0x910003e0, (ULONGEST)-1},		/* mov  x0, sp  */
+{0x91014000, (ULONGEST)-1},		/* add  x0, x0, #SF_UC  */
+{0xd2803428, (ULONGEST)-1},		/* mov  x8, #SYS_sigreturn  */
+{0xd401, (ULONGEST)-1},		/* svc  0x0  */
+{(ULONGEST)TRAMP_SENTINEL_INSN, (ULONGEST)-1}
   },
   aarch64_nbsd_sigframe_init
 };

Index: src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c
diff -u src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c:1.1.1.6 src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c:1.2
--- src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c:1.1.1.6	Tue Nov 28 13:18:03 2017
+++ src/external/gpl3/gdb/dist/gdb/aarch64-tdep.c	Wed Jul 11 09:52:35 2018
@@ -2425,7 +2425,7 @@ aarch64_software_single_step (struct reg
   const int insn_size = 4;
   const int atomic_sequence_length = 16; /* Instruction sequence length.  */
   CORE_ADDR pc = regcache_read_pc (regcache);
-  CORE_ADDR breaks[2] = { -1, -1 };
+  CORE_ADDR breaks[2] = { (ULONGEST)-1, (ULONGEST)-1 };
   CORE_ADDR loc = pc;
   CORE_ADDR closing_insn = 0;
   uint32_t insn = read_memory_unsigned_integer (loc, insn_size,



CVS commit: src/share/man/man4

2018-07-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul 11 13:49:06 UTC 2018

Modified Files:
src/share/man/man4: qemufwcfg.4

Log Message:
.Fl prepends a dash, no need to specify another one for qemu -fw_cfg option


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/qemufwcfg.4

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

Modified files:

Index: src/share/man/man4/qemufwcfg.4
diff -u src/share/man/man4/qemufwcfg.4:1.4 src/share/man/man4/qemufwcfg.4:1.5
--- src/share/man/man4/qemufwcfg.4:1.4	Wed Jul 11 13:41:23 2018
+++ src/share/man/man4/qemufwcfg.4	Wed Jul 11 13:49:06 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: qemufwcfg.4,v 1.4 2018/07/11 13:41:23 jmcneill Exp $
+.\"	$NetBSD: qemufwcfg.4,v 1.5 2018/07/11 13:49:06 jmcneill Exp $
 .\"
 .\" Copyright (c) 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -40,7 +40,7 @@ interface allows QEMU to provide data it
 operating systems.
 .Pp
 See the
-.Fl -fw_cfg
+.Fl fw_cfg
 option in the
 .Nm qemu
 man page.



CVS commit: src/share/man/man4

2018-07-11 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Wed Jul 11 13:41:23 UTC 2018

Modified Files:
src/share/man/man4: qemufwcfg.4

Log Message:
Add qemufwcfg* at fdt? to synopsis


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/qemufwcfg.4

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

Modified files:

Index: src/share/man/man4/qemufwcfg.4
diff -u src/share/man/man4/qemufwcfg.4:1.3 src/share/man/man4/qemufwcfg.4:1.4
--- src/share/man/man4/qemufwcfg.4:1.3	Tue Nov 28 11:02:02 2017
+++ src/share/man/man4/qemufwcfg.4	Wed Jul 11 13:41:23 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: qemufwcfg.4,v 1.3 2017/11/28 11:02:02 wiz Exp $
+.\"	$NetBSD: qemufwcfg.4,v 1.4 2018/07/11 13:41:23 jmcneill Exp $
 .\"
 .\" Copyright (c) 2017 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd November 26, 2017
+.Dd July 11, 2018
 .Dt QEMUFWCFG 4
 .Os
 .Sh NAME
@@ -32,6 +32,7 @@
 .Nd QEMU Firmware Configuration device driver
 .Sh SYNOPSIS
 .Cd "qemufwcfg* at acpi?"
+.Cd "qemufwcfg* at fdt?"
 .Sh DESCRIPTION
 The
 .Nm



CVS commit: src/sys/netinet

2018-07-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Jul 11 12:48:42 UTC 2018

Modified Files:
src/sys/netinet: ip_mroute.c

Log Message:
Add missing  include.


To generate a diff of this commit:
cvs rdiff -u -r1.161 -r1.162 src/sys/netinet/ip_mroute.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/netinet/ip_mroute.c
diff -u src/sys/netinet/ip_mroute.c:1.161 src/sys/netinet/ip_mroute.c:1.162
--- src/sys/netinet/ip_mroute.c:1.161	Wed Jul 11 05:25:45 2018
+++ src/sys/netinet/ip_mroute.c	Wed Jul 11 12:48:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip_mroute.c,v 1.161 2018/07/11 05:25:45 maxv Exp $	*/
+/*	$NetBSD: ip_mroute.c,v 1.162 2018/07/11 12:48:42 martin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -93,7 +93,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.161 2018/07/11 05:25:45 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,v 1.162 2018/07/11 12:48:42 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -124,6 +124,7 @@ __KERNEL_RCSID(0, "$NetBSD: ip_mroute.c,
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 



CVS commit: src

2018-07-11 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Jul 11 11:13:17 UTC 2018

Modified Files:
src/distrib/sets/lists/comp: mi
src/sys/dist/pf/net: pf_ioctl.c
src/sys/netinet: Makefile

Log Message:
Fix build.   pf_ioctl.c needs netinet/in_offload.h (after previous change).
Because this is in a module, apparently, that means that netinet_in_offload.h
needs to get installed in /usr/include, so do that as well.

Feel free to fix this in a better way...


To generate a diff of this commit:
cvs rdiff -u -r1.2206 -r1.2207 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.53 -r1.54 src/sys/dist/pf/net/pf_ioctl.c
cvs rdiff -u -r1.28 -r1.29 src/sys/netinet/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2206 src/distrib/sets/lists/comp/mi:1.2207
--- src/distrib/sets/lists/comp/mi:1.2206	Thu Jun 28 10:14:01 2018
+++ src/distrib/sets/lists/comp/mi	Wed Jul 11 11:13:16 2018
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2206 2018/06/28 10:14:01 christos Exp $
+#	$NetBSD: mi,v 1.2207 2018/07/11 11:13:16 kre Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -2388,6 +2388,7 @@
 ./usr/include/netinet/igmp_var.h		comp-c-include
 ./usr/include/netinet/in.h			comp-c-include
 ./usr/include/netinet/in_gif.h			comp-c-include
+./usr/include/netinet/in_offload.h		comp-c-include
 ./usr/include/netinet/in_l2tp.h			comp-c-include
 ./usr/include/netinet/in_pcb.h			comp-c-include
 ./usr/include/netinet/in_pcb_hdr.h		comp-c-include

Index: src/sys/dist/pf/net/pf_ioctl.c
diff -u src/sys/dist/pf/net/pf_ioctl.c:1.53 src/sys/dist/pf/net/pf_ioctl.c:1.54
--- src/sys/dist/pf/net/pf_ioctl.c:1.53	Wed Jul 11 05:25:46 2018
+++ src/sys/dist/pf/net/pf_ioctl.c	Wed Jul 11 11:13:16 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pf_ioctl.c,v 1.53 2018/07/11 05:25:46 maxv Exp $	*/
+/*	$NetBSD: pf_ioctl.c,v 1.54 2018/07/11 11:13:16 kre Exp $	*/
 /*	$OpenBSD: pf_ioctl.c,v 1.182 2007/06/24 11:17:13 mcbride Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pf_ioctl.c,v 1.53 2018/07/11 05:25:46 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf_ioctl.c,v 1.54 2018/07/11 11:13:16 kre Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -84,6 +84,7 @@ __KERNEL_RCSID(0, "$NetBSD: pf_ioctl.c,v
 #include 
 #include 
 #else
+#include 
 #include 
 #endif /* __NetBSD__ */
 #include 

Index: src/sys/netinet/Makefile
diff -u src/sys/netinet/Makefile:1.28 src/sys/netinet/Makefile:1.29
--- src/sys/netinet/Makefile:1.28	Thu Feb 16 08:12:44 2017
+++ src/sys/netinet/Makefile	Wed Jul 11 11:13:16 2018
@@ -1,10 +1,10 @@
-#	$NetBSD: Makefile,v 1.28 2017/02/16 08:12:44 knakahara Exp $
+#	$NetBSD: Makefile,v 1.29 2018/07/11 11:13:16 kre Exp $
 
 INCSDIR= /usr/include/netinet
 
 INCS=	dccp.h icmp6.h icmp_var.h if_atm.h if_ether.h if_inarp.h igmp.h \
 	igmp_var.h in.h in_gif.h in_l2tp.h in_pcb.h in_pcb_hdr.h \
-	in_selsrc.h in_systm.h \
+	in_offload.h in_selsrc.h in_systm.h \
 	in_var.h ip.h ip_carp.h ip6.h ip_ecn.h ip_encap.h \
 	ip_icmp.h ip_mroute.h ip_var.h pim.h pim_var.h portalgo.h \
 	sctp.h sctp_uio.h \



CVS commit: src/usr.bin/netstat

2018-07-11 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jul 11 07:46:21 UTC 2018

Modified Files:
src/usr.bin/netstat: if.c

Log Message:
 Print iqdrops, too. This change also fixes a bug that Odrops prints
iqdrops when kvm read failed.


To generate a diff of this commit:
cvs rdiff -u -r1.94 -r1.95 src/usr.bin/netstat/if.c

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

Modified files:

Index: src/usr.bin/netstat/if.c
diff -u src/usr.bin/netstat/if.c:1.94 src/usr.bin/netstat/if.c:1.95
--- src/usr.bin/netstat/if.c:1.94	Thu Feb 23 07:57:10 2017
+++ src/usr.bin/netstat/if.c	Wed Jul 11 07:46:20 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if.c,v 1.94 2017/02/23 07:57:10 ozaki-r Exp $	*/
+/*	$NetBSD: if.c,v 1.95 2018/07/11 07:46:20 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from: @(#)if.c	8.2 (Berkeley) 2/21/94";
 #else
-__RCSID("$NetBSD: if.c,v 1.94 2017/02/23 07:57:10 ozaki-r Exp $");
+__RCSID("$NetBSD: if.c,v 1.95 2018/07/11 07:46:20 msaitoh Exp $");
 #endif
 #endif /* not lint */
 
@@ -152,14 +152,17 @@ intpr_header(void)
 			   "Ibytes", "Obytes");
 		} else {
 			printf("%-5.5s %-5.5s %-13.13s %-17.17s "
-			   "%8.8s %5.5s %8.8s %5.5s %5.5s",
-			   "Name", "Mtu", "Network", "Address", "Ipkts", "Ierrs",
-			   "Opkts", "Oerrs", "Colls");
+			"%8.8s %5.5s",
+			"Name", "Mtu", "Network", "Address", "Ipkts", "Ierrs");
+			if (dflag)
+printf(" %6.6s", "Idrops");
+			printf(" %8.8s %5.5s %5.5s",
+			"Opkts", "Oerrs", "Colls");
 		}
+		if (dflag)
+			printf(" %6.6s", "Odrops");
 		if (tflag)
 			printf(" %4.4s", "Time");
-		if (dflag)
-			printf(" %5.5s", "Drops");
 		putchar('\n');
 	}
 }
@@ -617,19 +620,21 @@ print_addr(const int ifindex, struct soc
 		else
 			printf("%10llu", (unsigned long long)ifd->ifi_obytes);
 	} else {
-		printf("%8llu %5llu %8llu %5llu %5llu",
+		printf("%8llu %5llu",
 			(unsigned long long)ifd->ifi_ipackets,
-			(unsigned long long)ifd->ifi_ierrors,
+			(unsigned long long)ifd->ifi_ierrors);
+		if (dflag)
+			printf(" %6" PRIu64, ifd->ifi_iqdrops);
+		printf(" %8llu %5llu %5llu",
 			(unsigned long long)ifd->ifi_opackets,
 			(unsigned long long)ifd->ifi_oerrors,
 			(unsigned long long)ifd->ifi_collisions);
 	}
+	if (dflag)
+		printf(" %6lld", ifnet ?
+		(unsigned long long)ifnet->if_snd.ifq_drops : 0);
 	if (tflag)
 		printf(" %4d", ifnet ? ifnet->if_timer : 0);
-	if (dflag)
-		printf(" %5lld", ifnet ?
-		(unsigned long long)ifnet->if_snd.ifq_drops :
-		ifd->ifi_iqdrops);
 	putchar('\n');
 }
 



CVS commit: src/sys/netinet

2018-07-11 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Jul 11 06:25:05 UTC 2018

Modified Files:
src/sys/netinet: in_offload.c

Log Message:
Add KASSERTs in in_undefer_cksum_tcpudp.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/netinet/in_offload.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/netinet/in_offload.c
diff -u src/sys/netinet/in_offload.c:1.10 src/sys/netinet/in_offload.c:1.11
--- src/sys/netinet/in_offload.c:1.10	Wed Jul 11 06:00:34 2018
+++ src/sys/netinet/in_offload.c	Wed Jul 11 06:25:05 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: in_offload.c,v 1.10 2018/07/11 06:00:34 maxv Exp $	*/
+/*	$NetBSD: in_offload.c,v 1.11 2018/07/11 06:25:05 maxv Exp $	*/
 
 /*
  * Copyright (c)2005, 2006 YAMAMOTO Takashi,
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in_offload.c,v 1.10 2018/07/11 06:00:34 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_offload.c,v 1.11 2018/07/11 06:25:05 maxv Exp $");
 
 #include 
 #include 
@@ -239,6 +239,10 @@ in_undefer_cksum_tcpudp(struct mbuf *m)
 	struct ip *ip;
 	uint16_t csum, offset;
 
+	KASSERT((m->m_flags & M_PKTHDR) != 0);
+	KASSERT((m->m_pkthdr.csum_flags & (M_CSUM_TCPv4|M_CSUM_UDPv4)) != 0);
+	KASSERT((m->m_pkthdr.csum_flags & (M_CSUM_TCPv6|M_CSUM_UDPv6)) == 0);
+
 	ip = mtod(m, struct ip *);
 	offset = ip->ip_hl << 2;
 



CVS commit: src/sys/netinet

2018-07-11 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Wed Jul 11 06:00:34 UTC 2018

Modified Files:
src/sys/netinet: in_offload.c in_offload.h

Log Message:
Style, rename 'iph' -> 'ip', and reduce the diff between
in_undefer_cksum_tcpudp and the last part of in_undefer_cksum.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/netinet/in_offload.c
cvs rdiff -u -r1.10 -r1.11 src/sys/netinet/in_offload.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/netinet/in_offload.c
diff -u src/sys/netinet/in_offload.c:1.9 src/sys/netinet/in_offload.c:1.10
--- src/sys/netinet/in_offload.c:1.9	Wed Jul 11 05:38:55 2018
+++ src/sys/netinet/in_offload.c	Wed Jul 11 06:00:34 2018
@@ -1,6 +1,6 @@
-/*	$NetBSD: in_offload.c,v 1.9 2018/07/11 05:38:55 maxv Exp $	*/
+/*	$NetBSD: in_offload.c,v 1.10 2018/07/11 06:00:34 maxv Exp $	*/
 
-/*-
+/*
  * Copyright (c)2005, 2006 YAMAMOTO Takashi,
  * All rights reserved.
  *
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in_offload.c,v 1.9 2018/07/11 05:38:55 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in_offload.c,v 1.10 2018/07/11 06:00:34 maxv Exp $");
 
 #include 
 #include 
@@ -50,11 +50,9 @@ tcp4_segment(struct ifnet *ifp, struct m
 struct rtentry *rt)
 {
 	int mss;
-	int iphlen;
-	int thlen;
-	int hlen;
-	int len;
-	struct ip *iph;
+	int iphlen, thlen;
+	int hlen, len;
+	struct ip *ip;
 	struct tcphdr *th;
 	uint16_t ipid;
 	uint32_t tcpseq;
@@ -68,21 +66,21 @@ tcp4_segment(struct ifnet *ifp, struct m
 	m->m_pkthdr.csum_flags = 0;
 
 	len = m->m_pkthdr.len;
-	KASSERT(len >= sizeof(*iph) + sizeof(*th));
+	KASSERT(len >= sizeof(*ip) + sizeof(*th));
 
-	if (m->m_len < sizeof(*iph)) {
-		m = m_pullup(m, sizeof(*iph));
+	if (m->m_len < sizeof(*ip)) {
+		m = m_pullup(m, sizeof(*ip));
 		if (m == NULL) {
 			error = ENOMEM;
 			goto quit;
 		}
 	}
-	iph = mtod(m, struct ip *);
-	iphlen = iph->ip_hl * 4;
-	KASSERT(iph->ip_v == IPVERSION);
-	KASSERT(iphlen >= sizeof(*iph));
-	KASSERT(iph->ip_p == IPPROTO_TCP);
-	ipid = ntohs(iph->ip_id);
+	ip = mtod(m, struct ip *);
+	iphlen = ip->ip_hl * 4;
+	KASSERT(ip->ip_v == IPVERSION);
+	KASSERT(iphlen >= sizeof(*ip));
+	KASSERT(ip->ip_p == IPPROTO_TCP);
+	ipid = ntohs(ip->ip_id);
 
 	hlen = iphlen + sizeof(*th);
 	if (m->m_len < hlen) {
@@ -132,14 +130,14 @@ tcp4_segment(struct ifnet *ifp, struct m
 		KASSERT(n->m_len >= hlen); /* XXX */
 
 		n->m_pkthdr.len = hlen + mss;
-		iph = mtod(n, struct ip *);
-		KASSERT(iph->ip_v == IPVERSION);
-		iph->ip_len = htons(n->m_pkthdr.len);
-		iph->ip_id = htons(ipid);
+		ip = mtod(n, struct ip *);
+		KASSERT(ip->ip_v == IPVERSION);
+		ip->ip_len = htons(n->m_pkthdr.len);
+		ip->ip_id = htons(ipid);
 		th = (void *)(mtod(n, char *) + iphlen);
 		th->th_seq = htonl(tcpseq);
-		iph->ip_sum = 0;
-		iph->ip_sum = in_cksum(n, iphlen);
+		ip->ip_sum = 0;
+		ip->ip_sum = in_cksum(n, iphlen);
 		th->th_sum = 0;
 		th->th_sum = in4_cksum(n, IPPROTO_TCP, iphlen, thlen + mss);
 
@@ -224,7 +222,7 @@ in_undefer_cksum(struct mbuf *m, size_t 
 		if (__predict_true(l4offset + sizeof(uint16_t) <= m->m_len)) {
 			*(uint16_t *)(mtod(m, char *) + l4offset) = csum;
 		} else {
-			m_copyback(m, l4offset, sizeof(csum), (void *) );
+			m_copyback(m, l4offset, sizeof(csum), (void *));
 		}
 	}
 
@@ -239,20 +237,20 @@ void
 in_undefer_cksum_tcpudp(struct mbuf *m)
 {
 	struct ip *ip;
-	u_int16_t csum, offset;
+	uint16_t csum, offset;
 
 	ip = mtod(m, struct ip *);
 	offset = ip->ip_hl << 2;
+
 	csum = in4_cksum(m, 0, offset, ntohs(ip->ip_len) - offset);
 	if (csum == 0 && (m->m_pkthdr.csum_flags & M_CSUM_UDPv4) != 0)
 		csum = 0x;
 
 	offset += M_CSUM_DATA_IPv4_OFFSET(m->m_pkthdr.csum_data);
 
-	if ((offset + sizeof(u_int16_t)) > m->m_len) {
-		/* This happens when ip options were inserted */
-		m_copyback(m, offset, sizeof(csum), (void *));
+	if ((offset + sizeof(uint16_t)) <= m->m_len) {
+		*(uint16_t *)(mtod(m, char *) + offset) = csum;
 	} else {
-		*(u_int16_t *)(mtod(m, char *) + offset) = csum;
+		m_copyback(m, offset, sizeof(csum), (void *));
 	}
 }

Index: src/sys/netinet/in_offload.h
diff -u src/sys/netinet/in_offload.h:1.10 src/sys/netinet/in_offload.h:1.11
--- src/sys/netinet/in_offload.h:1.10	Wed Jul 11 05:38:55 2018
+++ src/sys/netinet/in_offload.h	Wed Jul 11 06:00:34 2018
@@ -1,6 +1,6 @@
-/*	$NetBSD: in_offload.h,v 1.10 2018/07/11 05:38:55 maxv Exp $	*/
+/*	$NetBSD: in_offload.h,v 1.11 2018/07/11 06:00:34 maxv Exp $	*/
 
-/*-
+/*
  * Copyright (c)2005, 2006 YAMAMOTO Takashi,
  * All rights reserved.
  *
@@ -30,21 +30,19 @@
 #define	_NETINET_IN_OFFLOAD_H_
 
 /*
- * subroutines to do software-only equivalent of h/w offloading.
+ * Subroutines to do software-only equivalent of h/w offloading.
  */
-
 int ip_tso_output(struct ifnet *, struct mbuf *, const struct sockaddr *,
 struct rtentry *);
 void in_undefer_cksum(struct mbuf *, size_t, int);
 void