CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Tue Sep 26 03:43:27 UTC 2023 Modified Files: src/sys/net: if_ipsec.c Log Message: Use unit id instead of if_index to reduce fixed_reqid space. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/net/if_ipsec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/net
Module Name:src Committed By: knakahara Date: Tue Sep 26 03:43:27 UTC 2023 Modified Files: src/sys/net: if_ipsec.c Log Message: Use unit id instead of if_index to reduce fixed_reqid space. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/net/if_ipsec.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_ipsec.c diff -u src/sys/net/if_ipsec.c:1.34 src/sys/net/if_ipsec.c:1.35 --- src/sys/net/if_ipsec.c:1.34 Tue Oct 11 09:51:47 2022 +++ src/sys/net/if_ipsec.c Tue Sep 26 03:43:27 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ipsec.c,v 1.34 2022/10/11 09:51:47 knakahara Exp $ */ +/* $NetBSD: if_ipsec.c,v 1.35 2023/09/26 03:43:27 knakahara Exp $ */ /* * Copyright (c) 2017 Internet Initiative Japan Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.34 2022/10/11 09:51:47 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ipsec.c,v 1.35 2023/09/26 03:43:27 knakahara Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -1798,9 +1798,10 @@ if_ipsec_get_reqids(struct ipsec_variant mutex_enter(_softcs.lock); if (ipsec_softcs.use_fixed_reqid) { - uint32_t reqid_base; + uint32_t unit, reqid_base; - reqid_base = ipsec_softcs.reqid_base + ifp->if_index * 2; + unit = strtoul(ifp->if_xname + sizeof("ipsec") - 1, NULL, 10); + reqid_base = ipsec_softcs.reqid_base + unit * 2; if (reqid_base + 1 > ipsec_softcs.reqid_last) { log(LOG_ERR, "%s: invalid fixed reqid(%"PRIu32"), "
CVS commit: src
Module Name:src Committed By: oster Date: Mon Sep 25 21:59:39 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c src/sys/dev/raidframe: files.raidframe rf_decluster.c rf_driver.c rf_netbsdkintf.c rf_paritymap.c rf_raid.h src/sys/modules/raid: Makefile src/sys/rump/dev/lib/libraidframe: Makefile Removed Files: src/sys/dev/raidframe: rf_copyback.c rf_copyback.h Log Message: We no longer need the deprecated copyback functionality now that incorporating a used spare is automatic. Copyback has always been an issue, as to do a copyback all IO to the array had to be suspended, and so was very, very unlikely to have been used in anything resembling a production system. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sbin/raidctl/raidctl.8 \ src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/files.raidframe \ src/sys/dev/raidframe/rf_paritymap.c cvs rdiff -u -r1.55 -r0 src/sys/dev/raidframe/rf_copyback.c cvs rdiff -u -r1.6 -r0 src/sys/dev/raidframe/rf_copyback.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/raidframe/rf_decluster.c cvs rdiff -u -r1.141 -r1.142 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.414 -r1.415 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/raidframe/rf_raid.h cvs rdiff -u -r1.6 -r1.7 src/sys/modules/raid/Makefile cvs rdiff -u -r1.13 -r1.14 src/sys/rump/dev/lib/libraidframe/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/raidctl/raidctl.8 diff -u src/sbin/raidctl/raidctl.8:1.81 src/sbin/raidctl/raidctl.8:1.82 --- src/sbin/raidctl/raidctl.8:1.81 Thu Sep 21 01:40:44 2023 +++ src/sbin/raidctl/raidctl.8 Mon Sep 25 21:59:38 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: raidctl.8,v 1.81 2023/09/21 01:40:44 oster Exp $ +.\" $NetBSD: raidctl.8,v 1.82 2023/09/25 21:59:38 oster Exp $ .\" .\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -53,7 +53,7 @@ .\" any improvements or extensions that they make and grant Carnegie the .\" rights to redistribute these changes. .\" -.Dd September 20, 2023 +.Dd September 25, 2023 .Dt RAIDCTL 8 .Os .Sh NAME @@ -73,9 +73,6 @@ .Fl a Ar component Ar dev .Nm .Op Fl v -.Fl B Ar dev -.Nm -.Op Fl v .Fl C Ar config_file Ar dev .Nm .Op Fl v @@ -223,11 +220,6 @@ component within a particular RAID set) hot spare after it has been used and are not required for .Ar component before it is used. -.It Fl B Ar dev -Initiate a copyback of reconstructed data from a spare disk to -its original disk. -This is performed after a component has failed, -and the failed drive has been reconstructed onto a spare drive. .It Fl C Ar config_file Ar dev As for .Fl c , @@ -351,8 +343,7 @@ Remove the specified from the RAID. The component must be in the failed, spare, or spared state in order to be removed. .It Fl S Ar dev -Check the status of parity re-writing, component reconstruction, and -component copyback. +Check the status of parity re-writing and component reconstruction. The output indicates the amount of progress achieved in each of these areas. .It Fl s Ar dev @@ -374,9 +365,8 @@ Unconfigure the RAIDframe device. This does not remove any component labels or change any configuration settings (e.g. auto-configuration settings) for the RAID set. .It Fl v -Be more verbose. -For operations such as reconstructions, parity -re-writing, and copybacks, provide a progress indicator. +Be more verbose, and provide a progress indicator for operations such +as reconstructions and parity re-writing. .El .Pp The device used by @@ -965,7 +955,6 @@ Component label for /dev/sd3e: Parity status: clean Reconstruction is 100% complete. Parity Re-write is 100% complete. -Copyback is 100% complete. .Ed .Pp This indicates that all is well with the RAID set. @@ -1051,7 +1040,6 @@ Spares: Parity status: clean Reconstruction is 10% complete. Parity Re-write is 100% complete. -Copyback is 100% complete. .Ed .Pp This indicates that a reconstruction is in progress. @@ -1073,7 +1061,6 @@ No spares. Parity status: clean Reconstruction is 100% complete. Parity Re-write is 100% complete. -Copyback is 100% complete. .Ed .Pp as Index: src/sbin/raidctl/raidctl.c diff -u src/sbin/raidctl/raidctl.c:1.81 src/sbin/raidctl/raidctl.c:1.82 --- src/sbin/raidctl/raidctl.c:1.81 Thu Sep 21 01:48:41 2023 +++ src/sbin/raidctl/raidctl.c Mon Sep 25 21:59:38 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: raidctl.c,v 1.81 2023/09/21 01:48:41 oster Exp $ */ +/* $NetBSD: raidctl.c,v 1.82 2023/09/25 21:59:38 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -39,7 +39,7 @@ #include #ifndef lint -__RCSID("$NetBSD: raidctl.c,v 1.81 2023/09/21 01:48:41 oster Exp $"); +__RCSID("$NetBSD: raidctl.c,v 1.82 2023/09/25 21:59:38 oster Exp $"); #endif @@
CVS commit: src
Module Name:src Committed By: oster Date: Mon Sep 25 21:59:39 UTC 2023 Modified Files: src/sbin/raidctl: raidctl.8 raidctl.c src/sys/dev/raidframe: files.raidframe rf_decluster.c rf_driver.c rf_netbsdkintf.c rf_paritymap.c rf_raid.h src/sys/modules/raid: Makefile src/sys/rump/dev/lib/libraidframe: Makefile Removed Files: src/sys/dev/raidframe: rf_copyback.c rf_copyback.h Log Message: We no longer need the deprecated copyback functionality now that incorporating a used spare is automatic. Copyback has always been an issue, as to do a copyback all IO to the array had to be suspended, and so was very, very unlikely to have been used in anything resembling a production system. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sbin/raidctl/raidctl.8 \ src/sbin/raidctl/raidctl.c cvs rdiff -u -r1.10 -r1.11 src/sys/dev/raidframe/files.raidframe \ src/sys/dev/raidframe/rf_paritymap.c cvs rdiff -u -r1.55 -r0 src/sys/dev/raidframe/rf_copyback.c cvs rdiff -u -r1.6 -r0 src/sys/dev/raidframe/rf_copyback.h cvs rdiff -u -r1.26 -r1.27 src/sys/dev/raidframe/rf_decluster.c cvs rdiff -u -r1.141 -r1.142 src/sys/dev/raidframe/rf_driver.c cvs rdiff -u -r1.414 -r1.415 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.52 -r1.53 src/sys/dev/raidframe/rf_raid.h cvs rdiff -u -r1.6 -r1.7 src/sys/modules/raid/Makefile cvs rdiff -u -r1.13 -r1.14 src/sys/rump/dev/lib/libraidframe/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Mon Sep 25 18:55:53 UTC 2023 Modified Files: src/sys/sys: sleepq.h Log Message: sys/sleepq.h: Fix more syncobj_t creep. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/sys/sleepq.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/sys/sleepq.h diff -u src/sys/sys/sleepq.h:1.37 src/sys/sys/sleepq.h:1.38 --- src/sys/sys/sleepq.h:1.37 Sat Sep 23 18:48:05 2023 +++ src/sys/sys/sleepq.h Mon Sep 25 18:55:53 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sleepq.h,v 1.37 2023/09/23 18:48:05 ad Exp $ */ +/* $NetBSD: sleepq.h,v 1.38 2023/09/25 18:55:53 riastradh Exp $ */ /*- * Copyright (c) 2002, 2006, 2007, 2008, 2009, 2019, 2020, 2023 @@ -38,22 +38,24 @@ #include #include #include -#include +#include /* XXX remove me */ #include +struct syncobj; + /* * Generic sleep queues. */ typedef struct sleepq sleepq_t; -typedef struct syncobj const syncobj_t; void sleepq_init(sleepq_t *); void sleepq_remove(sleepq_t *, lwp_t *); void sleepq_enter(sleepq_t *, lwp_t *, kmutex_t *); -void sleepq_enqueue(sleepq_t *, wchan_t, const char *, syncobj_t *, bool); +void sleepq_enqueue(sleepq_t *, wchan_t, const char *, + const struct syncobj *, bool); void sleepq_transfer(lwp_t *, sleepq_t *, sleepq_t *, wchan_t, const char *, - syncobj_t *, kmutex_t *, bool); + const struct syncobj *, kmutex_t *, bool); void sleepq_uncatch(lwp_t *); void sleepq_unsleep(lwp_t *, bool); void sleepq_timeout(void *); @@ -61,7 +63,7 @@ void sleepq_wake(sleepq_t *, wchan_t, u_ int sleepq_abort(kmutex_t *, int); void sleepq_changepri(lwp_t *, pri_t); void sleepq_lendpri(lwp_t *, pri_t); -int sleepq_block(int, bool, syncobj_t *); +int sleepq_block(int, bool, const struct syncobj *); #ifdef _KERNEL
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Mon Sep 25 18:55:53 UTC 2023 Modified Files: src/sys/sys: sleepq.h Log Message: sys/sleepq.h: Fix more syncobj_t creep. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/sys/sleepq.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Mon Sep 25 18:30:44 UTC 2023 Modified Files: src/sys/sys: lwp.h Log Message: sys/lwp.h: Oops -- l_syncobj needs const now. To generate a diff of this commit: cvs rdiff -u -r1.223 -r1.224 src/sys/sys/lwp.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/sys/lwp.h diff -u src/sys/sys/lwp.h:1.223 src/sys/sys/lwp.h:1.224 --- src/sys/sys/lwp.h:1.223 Mon Sep 25 17:09:27 2023 +++ src/sys/sys/lwp.h Mon Sep 25 18:30:44 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: lwp.h,v 1.223 2023/09/25 17:09:27 riastradh Exp $ */ +/* $NetBSD: lwp.h,v 1.224 2023/09/25 18:30:44 riastradh Exp $ */ /* * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020, 2023 @@ -130,7 +130,7 @@ struct lwp { kcpuset_t *l_affinity; /* l: CPU set for affinity */ /* Synchronisation. */ - struct syncobj *l_syncobj; /* l: sync object operations set */ + const struct syncobj *l_syncobj;/* l: sync object operations set */ LIST_ENTRY(lwp) l_sleepchain; /* l: sleep queue */ wchan_t l_wchan; /* l: sleep address */ const char *l_wmesg; /* l: reason for sleep */
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Mon Sep 25 18:30:44 UTC 2023 Modified Files: src/sys/sys: lwp.h Log Message: sys/lwp.h: Oops -- l_syncobj needs const now. To generate a diff of this commit: cvs rdiff -u -r1.223 -r1.224 src/sys/sys/lwp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Mon Sep 25 17:09:27 UTC 2023 Modified Files: src/sys/sys: lwp.h Log Message: sys/lwp.h: Revert unnecessary style- and build-breaking change. Broke the clang builds because of duplicate syncobj_t definitions. Just use `struct syncobj'; the `syncobj_t' alias causes more trouble than it's worth -- KNF now advises against it and I see no compelling reason to make an exception here. To generate a diff of this commit: cvs rdiff -u -r1.222 -r1.223 src/sys/sys/lwp.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: riastradh Date: Mon Sep 25 17:09:27 UTC 2023 Modified Files: src/sys/sys: lwp.h Log Message: sys/lwp.h: Revert unnecessary style- and build-breaking change. Broke the clang builds because of duplicate syncobj_t definitions. Just use `struct syncobj'; the `syncobj_t' alias causes more trouble than it's worth -- KNF now advises against it and I see no compelling reason to make an exception here. To generate a diff of this commit: cvs rdiff -u -r1.222 -r1.223 src/sys/sys/lwp.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/sys/lwp.h diff -u src/sys/sys/lwp.h:1.222 src/sys/sys/lwp.h:1.223 --- src/sys/sys/lwp.h:1.222 Sat Sep 23 20:23:07 2023 +++ src/sys/sys/lwp.h Mon Sep 25 17:09:27 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: lwp.h,v 1.222 2023/09/23 20:23:07 ad Exp $ */ +/* $NetBSD: lwp.h,v 1.223 2023/09/25 17:09:27 riastradh Exp $ */ /* * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010, 2019, 2020, 2023 @@ -81,7 +81,6 @@ static __inline struct cpu_info *lwp_get #include -typedef struct syncobj const syncobj_t; struct lockdebug; struct sysent; @@ -131,7 +130,7 @@ struct lwp { kcpuset_t *l_affinity; /* l: CPU set for affinity */ /* Synchronisation. */ - syncobj_t *l_syncobj; /* l: sync object operations set */ + struct syncobj *l_syncobj; /* l: sync object operations set */ LIST_ENTRY(lwp) l_sleepchain; /* l: sleep queue */ wchan_t l_wchan; /* l: sleep address */ const char *l_wmesg; /* l: reason for sleep */
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Sep 25 16:16:50 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_disks.c Log Message: snprintf() should really include a format. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/dev/raidframe/rf_disks.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/raidframe/rf_disks.c diff -u src/sys/dev/raidframe/rf_disks.c:1.94 src/sys/dev/raidframe/rf_disks.c:1.95 --- src/sys/dev/raidframe/rf_disks.c:1.94 Sun Sep 17 20:07:39 2023 +++ src/sys/dev/raidframe/rf_disks.c Mon Sep 25 16:16:50 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.94 2023/09/17 20:07:39 oster Exp $ */ +/* $NetBSD: rf_disks.c,v 1.95 2023/09/25 16:16:50 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -60,7 +60,7 @@ ***/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.94 2023/09/17 20:07:39 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_disks.c,v 1.95 2023/09/25 16:16:50 oster Exp $"); #include @@ -1269,9 +1269,9 @@ rf_swap_components(RF_Raid_t *raidPtr, i RF_ASSERT(raidPtr->accesses_suspended == 0); /* Swap the component names... */ - snprintf(tmpdevname, sizeof(tmpdevname),raidPtr->Disks[a].devname); - snprintf(raidPtr->Disks[a].devname, sizeof(raidPtr->Disks[a].devname), raidPtr->Disks[b].devname); - snprintf(raidPtr->Disks[b].devname, sizeof(raidPtr->Disks[b].devname), tmpdevname); + snprintf(tmpdevname, sizeof(tmpdevname), "%s", raidPtr->Disks[a].devname); + snprintf(raidPtr->Disks[a].devname, sizeof(raidPtr->Disks[a].devname), "%s", raidPtr->Disks[b].devname); + snprintf(raidPtr->Disks[b].devname, sizeof(raidPtr->Disks[b].devname), "%s", tmpdevname); /* and the vp */ tmp_ci_vp = raidPtr->raid_cinfo[a].ci_vp;
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Mon Sep 25 16:16:50 UTC 2023 Modified Files: src/sys/dev/raidframe: rf_disks.c Log Message: snprintf() should really include a format. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/sys/dev/raidframe/rf_disks.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sbmips/include
Module Name:src Committed By: riastradh Date: Mon Sep 25 14:56:56 UTC 2023 Modified Files: src/sys/arch/sbmips/include: systemsw.h Log Message: sbmips/systemsw.h: sys/stdbool.h for bool. XXX sys/types.h should bring this in too, but that doesn't happen in the crash(8) build, perhaps because sys/types.h only includes sys/stdbool.h under _KERNEL or _STANDALONE but not _KMEMUSER -- maybe we should fix that but this is a lower-risk change for now to fix a build problem. Found by Jan-Benedict Glaw. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sbmips/include/systemsw.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/sbmips/include
Module Name:src Committed By: riastradh Date: Mon Sep 25 14:56:56 UTC 2023 Modified Files: src/sys/arch/sbmips/include: systemsw.h Log Message: sbmips/systemsw.h: sys/stdbool.h for bool. XXX sys/types.h should bring this in too, but that doesn't happen in the crash(8) build, perhaps because sys/types.h only includes sys/stdbool.h under _KERNEL or _STANDALONE but not _KMEMUSER -- maybe we should fix that but this is a lower-risk change for now to fix a build problem. Found by Jan-Benedict Glaw. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sbmips/include/systemsw.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/arch/sbmips/include/systemsw.h diff -u src/sys/arch/sbmips/include/systemsw.h:1.9 src/sys/arch/sbmips/include/systemsw.h:1.10 --- src/sys/arch/sbmips/include/systemsw.h:1.9 Sun Feb 20 07:47:38 2011 +++ src/sys/arch/sbmips/include/systemsw.h Mon Sep 25 14:56:56 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: systemsw.h,v 1.9 2011/02/20 07:47:38 matt Exp $ */ +/* $NetBSD: systemsw.h,v 1.10 2023/09/25 14:56:56 riastradh Exp $ */ /* * Copyright 2000, 2001 @@ -37,6 +37,8 @@ #include +#include + struct systemsw { /* ordered to match likely locality. */ void (*s_cpu_intr)(int, vaddr_t, uint32_t);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: rin Date: Mon Sep 25 09:15:48 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Replace /* nothing */ to __nothing for evcnt macros Prevent empty if bodies for !WM_EVENT_COUNTERS. To generate a diff of this commit: cvs rdiff -u -r1.788 -r1.789 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.788 src/sys/dev/pci/if_wm.c:1.789 --- src/sys/dev/pci/if_wm.c:1.788 Mon Sep 25 08:18:13 2023 +++ src/sys/dev/pci/if_wm.c Mon Sep 25 09:15:48 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.788 2023/09/25 08:18:13 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.789 2023/09/25 09:15:48 rin Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.788 2023/09/25 08:18:13 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.789 2023/09/25 09:15:48 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_if_wm.h" @@ -779,13 +779,13 @@ do { \ #define WM_Q_EVCNT_ADD(qname, evname, val) \ WM_EVCNT_ADD(&(qname)->qname##_ev_##evname, (val)) #else /* !WM_EVENT_COUNTERS */ -#define WM_EVCNT_INCR(ev) /* nothing */ -#define WM_EVCNT_STORE(ev, val) /* nothing */ -#define WM_EVCNT_ADD(ev, val) /* nothing */ - -#define WM_Q_EVCNT_INCR(qname, evname) /* nothing */ -#define WM_Q_EVCNT_STORE(qname, evname, val) /* nothing */ -#define WM_Q_EVCNT_ADD(qname, evname, val) /* nothing */ +#define WM_EVCNT_INCR(ev) __nothing +#define WM_EVCNT_STORE(ev, val) __nothing +#define WM_EVCNT_ADD(ev, val) __nothing + +#define WM_Q_EVCNT_INCR(qname, evname) __nothing +#define WM_Q_EVCNT_STORE(qname, evname, val) __nothing +#define WM_Q_EVCNT_ADD(qname, evname, val) __nothing #endif /* !WM_EVENT_COUNTERS */ #define CSR_READ(sc, reg) \
CVS commit: src/sys/dev/pci
Module Name:src Committed By: rin Date: Mon Sep 25 09:15:48 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Replace /* nothing */ to __nothing for evcnt macros Prevent empty if bodies for !WM_EVENT_COUNTERS. To generate a diff of this commit: cvs rdiff -u -r1.788 -r1.789 src/sys/dev/pci/if_wm.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
Module Name:src Committed By: macallan Date: Mon Sep 25 08:42:05 UTC 2023 Modified Files: src/sys/dev: files.audio Log Message: defflag AUDIO_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/files.audio Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev
Module Name:src Committed By: macallan Date: Mon Sep 25 08:42:05 UTC 2023 Modified Files: src/sys/dev: files.audio Log Message: defflag AUDIO_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/dev/files.audio 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/files.audio diff -u src/sys/dev/files.audio:1.16 src/sys/dev/files.audio:1.17 --- src/sys/dev/files.audio:1.16 Sat Jun 4 20:12:10 2022 +++ src/sys/dev/files.audio Mon Sep 25 08:42:05 2023 @@ -1,6 +1,7 @@ -# $NetBSD: files.audio,v 1.16 2022/06/04 20:12:10 pgoyette Exp $ +# $NetBSD: files.audio,v 1.17 2023/09/25 08:42:05 macallan Exp $ defparam opt_audio.h AUDIO_BLK_MS +defflag opt_audio.h AUDIO_DEBUG define audiobus { } define midibus { }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Sep 25 08:18:14 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Modify descriptions of flow control related event counters. To generate a diff of this commit: cvs rdiff -u -r1.787 -r1.788 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.787 src/sys/dev/pci/if_wm.c:1.788 --- src/sys/dev/pci/if_wm.c:1.787 Mon Sep 25 07:12:25 2023 +++ src/sys/dev/pci/if_wm.c Mon Sep 25 08:18:13 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.787 2023/09/25 07:12:25 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.788 2023/09/25 08:18:13 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.787 2023/09/25 07:12:25 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.788 2023/09/25 08:18:13 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_if_wm.h" @@ -3308,15 +3308,15 @@ alloc_retry: if (sc->sc_type >= WM_T_82542_2_1) { evcnt_attach_dynamic(>sc_ev_tx_xoff, EVCNT_TYPE_MISC, - NULL, xname, "tx_xoff"); + NULL, xname, "XOFF Transmitted"); evcnt_attach_dynamic(>sc_ev_tx_xon, EVCNT_TYPE_MISC, - NULL, xname, "tx_xon"); + NULL, xname, "XON Transmitted"); evcnt_attach_dynamic(>sc_ev_rx_xoff, EVCNT_TYPE_MISC, - NULL, xname, "rx_xoff"); + NULL, xname, "XOFF Received"); evcnt_attach_dynamic(>sc_ev_rx_xon, EVCNT_TYPE_MISC, - NULL, xname, "rx_xon"); + NULL, xname, "XON Received"); evcnt_attach_dynamic(>sc_ev_rx_macctl, EVCNT_TYPE_MISC, - NULL, xname, "rx_macctl"); + NULL, xname, "FC Received Unsupported"); } evcnt_attach_dynamic(>sc_ev_scc, EVCNT_TYPE_MISC,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Sep 25 08:18:14 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Modify descriptions of flow control related event counters. To generate a diff of this commit: cvs rdiff -u -r1.787 -r1.788 src/sys/dev/pci/if_wm.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
Module Name:src Committed By: msaitoh Date: Mon Sep 25 07:12:25 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): the IAC(Interrupt Assertion Count) register is for 82571 and newer. To generate a diff of this commit: cvs rdiff -u -r1.786 -r1.787 src/sys/dev/pci/if_wm.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
Module Name:src Committed By: msaitoh Date: Mon Sep 25 07:12:25 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): the IAC(Interrupt Assertion Count) register is for 82571 and newer. To generate a diff of this commit: cvs rdiff -u -r1.786 -r1.787 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.786 src/sys/dev/pci/if_wm.c:1.787 --- src/sys/dev/pci/if_wm.c:1.786 Mon Sep 25 07:11:08 2023 +++ src/sys/dev/pci/if_wm.c Mon Sep 25 07:12:25 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.786 2023/09/25 07:11:08 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.787 2023/09/25 07:12:25 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.786 2023/09/25 07:11:08 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.787 2023/09/25 07:12:25 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_if_wm.h" @@ -3400,8 +3400,9 @@ alloc_retry: NULL, xname, "Multicast Packets Tx"); evcnt_attach_dynamic(>sc_ev_bptc, EVCNT_TYPE_MISC, NULL, xname, "Broadcast Packets Tx"); - evcnt_attach_dynamic(>sc_ev_iac, EVCNT_TYPE_MISC, - NULL, xname, "Interrupt Assertion"); + if (sc->sc_type >= WM_T_82571) /* PCIe, 80003 and ICH/PCHs */ + evcnt_attach_dynamic(>sc_ev_iac, EVCNT_TYPE_MISC, + NULL, xname, "Interrupt Assertion"); if (sc->sc_type < WM_T_82575) { evcnt_attach_dynamic(>sc_ev_icrxptc, EVCNT_TYPE_MISC, NULL, xname, "Intr. Cause Rx Pkt Timer Expire"); @@ -3603,7 +3604,8 @@ wm_detach(device_t self, int flags __unu evcnt_detach(>sc_ev_ptc1522); evcnt_detach(>sc_ev_mptc); evcnt_detach(>sc_ev_bptc); - evcnt_detach(>sc_ev_iac); + if (sc->sc_type >= WM_T_82571) + evcnt_detach(>sc_ev_iac); if (sc->sc_type < WM_T_82575) { evcnt_detach(>sc_ev_icrxptc); evcnt_detach(>sc_ev_icrxatc); @@ -6706,7 +6708,8 @@ wm_update_stats(struct wm_softc *sc) WM_EVCNT_ADD(>sc_ev_ptc1522, CSR_READ(sc, WMREG_PTC1522)); WM_EVCNT_ADD(>sc_ev_mptc, CSR_READ(sc, WMREG_MPTC)); WM_EVCNT_ADD(>sc_ev_bptc, CSR_READ(sc, WMREG_BPTC)); - WM_EVCNT_ADD(>sc_ev_iac, CSR_READ(sc, WMREG_IAC)); + if (sc->sc_type >= WM_T_82571) + WM_EVCNT_ADD(>sc_ev_iac, CSR_READ(sc, WMREG_IAC)); if (sc->sc_type < WM_T_82575) { WM_EVCNT_ADD(>sc_ev_icrxptc, CSR_READ(sc, WMREG_ICRXPTC)); WM_EVCNT_ADD(>sc_ev_icrxatc, CSR_READ(sc, WMREG_ICRXATC)); @@ -6893,7 +6896,8 @@ wm_clear_evcnt(struct wm_softc *sc) WM_EVCNT_STORE(>sc_ev_ptc1522, 0); WM_EVCNT_STORE(>sc_ev_mptc, 0); WM_EVCNT_STORE(>sc_ev_bptc, 0); - WM_EVCNT_STORE(>sc_ev_iac, 0); + if (sc->sc_type >= WM_T_82571) + WM_EVCNT_STORE(>sc_ev_iac, 0); if (sc->sc_type < WM_T_82575) { WM_EVCNT_STORE(>sc_ev_icrxptc, 0); WM_EVCNT_STORE(>sc_ev_icrxatc, 0);
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Sep 25 07:11:08 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Add some info to some event counters. - The difference between the RUC(Rx Undersize) and RFC(Rx Fragment) is whether the CRC is valid or not. - The difference between the ROC(Rx Oversize) and RJC(Rx Jabber) is whether the CRC is valid or not. - LENERRS(Length Errors) is for the length/type field <= 1500. To generate a diff of this commit: cvs rdiff -u -r1.785 -r1.786 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.785 src/sys/dev/pci/if_wm.c:1.786 --- src/sys/dev/pci/if_wm.c:1.785 Mon Sep 25 06:18:09 2023 +++ src/sys/dev/pci/if_wm.c Mon Sep 25 07:11:08 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.785 2023/09/25 06:18:09 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.786 2023/09/25 07:11:08 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.785 2023/09/25 06:18:09 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.786 2023/09/25 07:11:08 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_if_wm.h" @@ -3361,13 +3361,13 @@ alloc_retry: evcnt_attach_dynamic(>sc_ev_rnbc, EVCNT_TYPE_MISC, NULL, xname, "Rx No Buffers"); evcnt_attach_dynamic(>sc_ev_ruc, EVCNT_TYPE_MISC, - NULL, xname, "Rx Undersize"); + NULL, xname, "Rx Undersize (valid CRC)"); evcnt_attach_dynamic(>sc_ev_rfc, EVCNT_TYPE_MISC, - NULL, xname, "Rx Fragment"); + NULL, xname, "Rx Fragment (bad CRC)"); evcnt_attach_dynamic(>sc_ev_roc, EVCNT_TYPE_MISC, - NULL, xname, "Rx Oversize"); + NULL, xname, "Rx Oversize (valid CRC)"); evcnt_attach_dynamic(>sc_ev_rjc, EVCNT_TYPE_MISC, - NULL, xname, "Rx Jabber"); + NULL, xname, "Rx Jabber (bad CRC)"); if (sc->sc_type >= WM_T_82540) { evcnt_attach_dynamic(>sc_ev_mgtprc, EVCNT_TYPE_MISC, NULL, xname, "Management Packets RX"); @@ -3460,7 +3460,7 @@ alloc_retry: evcnt_attach_dynamic(>sc_ev_hgotc, EVCNT_TYPE_MISC, NULL, xname, "Host Good Octets Tx"); evcnt_attach_dynamic(>sc_ev_lenerrs, EVCNT_TYPE_MISC, - NULL, xname, "Length Errors"); + NULL, xname, "Length Errors (length/type <= 1500)"); evcnt_attach_dynamic(>sc_ev_scvpc, EVCNT_TYPE_MISC, NULL, xname, "SerDes/SGMII Code Violation Packet"); evcnt_attach_dynamic(>sc_ev_hrmpc, EVCNT_TYPE_MISC,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Mon Sep 25 07:11:08 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Add some info to some event counters. - The difference between the RUC(Rx Undersize) and RFC(Rx Fragment) is whether the CRC is valid or not. - The difference between the ROC(Rx Oversize) and RJC(Rx Jabber) is whether the CRC is valid or not. - LENERRS(Length Errors) is for the length/type field <= 1500. To generate a diff of this commit: cvs rdiff -u -r1.785 -r1.786 src/sys/dev/pci/if_wm.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
Module Name:src Committed By: msaitoh Date: Mon Sep 25 06:18:09 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Use SCVPC and HRMPC for 82575 and newer. The SCVPC(SerDes/SGMII Code Violation Packet Count) register and the HRMPC (Header Redirection Missed Packet Count) register were added in if_wm.c rev. 1.776 but the location in the code were incorrect. Fix them. To generate a diff of this commit: cvs rdiff -u -r1.784 -r1.785 src/sys/dev/pci/if_wm.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
Module Name:src Committed By: msaitoh Date: Mon Sep 25 06:18:09 UTC 2023 Modified Files: src/sys/dev/pci: if_wm.c Log Message: wm(4): Use SCVPC and HRMPC for 82575 and newer. The SCVPC(SerDes/SGMII Code Violation Packet Count) register and the HRMPC (Header Redirection Missed Packet Count) register were added in if_wm.c rev. 1.776 but the location in the code were incorrect. Fix them. To generate a diff of this commit: cvs rdiff -u -r1.784 -r1.785 src/sys/dev/pci/if_wm.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/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.784 src/sys/dev/pci/if_wm.c:1.785 --- src/sys/dev/pci/if_wm.c:1.784 Fri Aug 25 09:38:50 2023 +++ src/sys/dev/pci/if_wm.c Mon Sep 25 06:18:09 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.784 2023/08/25 09:38:50 msaitoh Exp $ */ +/* $NetBSD: if_wm.c,v 1.785 2023/09/25 06:18:09 msaitoh Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -82,7 +82,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.784 2023/08/25 09:38:50 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.785 2023/09/25 06:18:09 msaitoh Exp $"); #ifdef _KERNEL_OPT #include "opt_if_wm.h" @@ -3461,6 +3461,10 @@ alloc_retry: NULL, xname, "Host Good Octets Tx"); evcnt_attach_dynamic(>sc_ev_lenerrs, EVCNT_TYPE_MISC, NULL, xname, "Length Errors"); + evcnt_attach_dynamic(>sc_ev_scvpc, EVCNT_TYPE_MISC, + NULL, xname, "SerDes/SGMII Code Violation Packet"); + evcnt_attach_dynamic(>sc_ev_hrmpc, EVCNT_TYPE_MISC, + NULL, xname, "Header Redirection Missed Packet"); } if ((sc->sc_type >= WM_T_I350) && !WM_IS_ICHPCH(sc)) { evcnt_attach_dynamic(>sc_ev_tlpic, EVCNT_TYPE_MISC, @@ -3475,10 +3479,6 @@ alloc_retry: NULL, xname, "BMC2OS Packets sent by BMC"); evcnt_attach_dynamic(>sc_ev_o2bgptc, EVCNT_TYPE_MISC, NULL, xname, "OS2BMC Packets received by BMC"); - evcnt_attach_dynamic(>sc_ev_scvpc, EVCNT_TYPE_MISC, - NULL, xname, "SerDes/SGMII Code Violation Packet"); - evcnt_attach_dynamic(>sc_ev_hrmpc, EVCNT_TYPE_MISC, - NULL, xname, "Header Redirection Missed Packet"); } #endif /* WM_EVENT_COUNTERS */ @@ -3626,6 +3626,8 @@ wm_detach(device_t self, int flags __unu evcnt_detach(>sc_ev_hgorc); evcnt_detach(>sc_ev_hgotc); evcnt_detach(>sc_ev_lenerrs); + evcnt_detach(>sc_ev_scvpc); + evcnt_detach(>sc_ev_hrmpc); } if ((sc->sc_type >= WM_T_I350) && !WM_IS_ICHPCH(sc)) { evcnt_detach(>sc_ev_tlpic); @@ -3634,8 +3636,6 @@ wm_detach(device_t self, int flags __unu evcnt_detach(>sc_ev_o2bspc); evcnt_detach(>sc_ev_b2ospc); evcnt_detach(>sc_ev_o2bgptc); - evcnt_detach(>sc_ev_scvpc); - evcnt_detach(>sc_ev_hrmpc); } #endif /* WM_EVENT_COUNTERS */ @@ -6735,6 +6735,8 @@ wm_update_stats(struct wm_softc *sc) CSR_READ(sc, WMREG_HGOTCL) + ((uint64_t)CSR_READ(sc, WMREG_HGOTCH) << 32)); WM_EVCNT_ADD(>sc_ev_lenerrs, CSR_READ(sc, WMREG_LENERRS)); + WM_EVCNT_ADD(>sc_ev_scvpc, CSR_READ(sc, WMREG_SCVPC)); + WM_EVCNT_ADD(>sc_ev_hrmpc, CSR_READ(sc, WMREG_HRMPC)); } if ((sc->sc_type >= WM_T_I350) && !WM_IS_ICHPCH(sc)) { WM_EVCNT_ADD(>sc_ev_tlpic, CSR_READ(sc, WMREG_TLPIC)); @@ -6749,8 +6751,6 @@ wm_update_stats(struct wm_softc *sc) WM_EVCNT_ADD(>sc_ev_o2bgptc, CSR_READ(sc, WMREG_O2BGPTC)); } - WM_EVCNT_ADD(>sc_ev_scvpc, CSR_READ(sc, WMREG_SCVPC)); - WM_EVCNT_ADD(>sc_ev_hrmpc, CSR_READ(sc, WMREG_HRMPC)); } net_stat_ref_t nsr = IF_STAT_GETREF(ifp); if_statadd_ref(nsr, if_collisions, colc); @@ -6916,6 +6916,8 @@ wm_clear_evcnt(struct wm_softc *sc) WM_EVCNT_STORE(>sc_ev_hgorc, 0); WM_EVCNT_STORE(>sc_ev_hgotc, 0); WM_EVCNT_STORE(>sc_ev_lenerrs, 0); + WM_EVCNT_STORE(>sc_ev_scvpc, 0); + WM_EVCNT_STORE(>sc_ev_hrmpc, 0); } if ((sc->sc_type >= WM_T_I350) && !WM_IS_ICHPCH(sc)) { WM_EVCNT_STORE(>sc_ev_tlpic, 0); @@ -6924,8 +6926,6 @@ wm_clear_evcnt(struct wm_softc *sc) WM_EVCNT_STORE(>sc_ev_o2bspc, 0); WM_EVCNT_STORE(>sc_ev_b2ospc, 0); WM_EVCNT_STORE(>sc_ev_o2bgptc, 0); - WM_EVCNT_STORE(>sc_ev_scvpc, 0); - WM_EVCNT_STORE(>sc_ev_hrmpc, 0); } #endif }