Module Name: src
Committed By: knakahara
Date: Wed Feb 17 08:15:43 UTC 2021
Modified Files:
src/share/man/man4: wm.4
src/sys/dev/pci: files.pci if_wm.c
Log Message:
In 64 bit architectures, WM_EVENT_COUNTER is enabled by default.
No objection from [email protected] and [email protected].
ok'ed by [email protected].
To generate a diff of this commit:
cvs rdiff -u -r1.41 -r1.42 src/share/man/man4/wm.4
cvs rdiff -u -r1.433 -r1.434 src/sys/dev/pci/files.pci
cvs rdiff -u -r1.698 -r1.699 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/share/man/man4/wm.4
diff -u src/share/man/man4/wm.4:1.41 src/share/man/man4/wm.4:1.42
--- src/share/man/man4/wm.4:1.41 Wed Apr 8 23:01:51 2020
+++ src/share/man/man4/wm.4 Wed Feb 17 08:15:43 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: wm.4,v 1.41 2020/04/08 23:01:51 jdolecek Exp $
+.\" $NetBSD: wm.4,v 1.42 2021/02/17 08:15:43 knakahara Exp $
.\"
.\" Copyright 2002, 2003 Wasabi Systems, Inc.
.\" All rights reserved.
@@ -33,7 +33,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd April 9, 2020
+.Dd February 17, 2021
.Dt WM 4
.Os
.Sh NAME
@@ -213,8 +213,11 @@ Transmit side of
.It Dv WM_EVENT_COUNTERS
Enable many event counters such as each Tx drop counter and Rx interrupt
counter.
+In 64 bit architectures, this is enabled by default.
Caution: If this flag is enabled, the number of evcnt entries increase
very much.
+.It Dv WM_DISABLE_EVENT_COUNTERS
+Disable event counters for 64 bit architectures.
.It Dv WM_DISABLE_MSI
If this option is set non-zero value, this driver does not use msi.
The default value is 0.
Index: src/sys/dev/pci/files.pci
diff -u src/sys/dev/pci/files.pci:1.433 src/sys/dev/pci/files.pci:1.434
--- src/sys/dev/pci/files.pci:1.433 Sat Jan 30 21:26:32 2021
+++ src/sys/dev/pci/files.pci Wed Feb 17 08:15:43 2021
@@ -1,4 +1,4 @@
-# $NetBSD: files.pci,v 1.433 2021/01/30 21:26:32 jmcneill Exp $
+# $NetBSD: files.pci,v 1.434 2021/02/17 08:15:43 knakahara Exp $
#
# Config file and device description for machine-independent PCI code.
# Included by ports that need it. Requires that the SCSI files be
@@ -674,7 +674,7 @@ file dev/pci/ixgbe/ixv.c ixv
device wm: ether, ifnet, arp, mii, mii_bitbang
attach wm at pci
file dev/pci/if_wm.c wm
-defflag opt_if_wm.h WM_EVENT_COUNTERS
+defflag opt_if_wm.h WM_EVENT_COUNTERS WM_DISABLE_EVENT_COUNTERS
defparam opt_if_wm.h WM_RX_PROCESS_LIMIT_DEFAULT
WM_RX_INTR_PROCESS_LIMIT_DEFAULT
WM_DISABLE_MSI
Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.698 src/sys/dev/pci/if_wm.c:1.699
--- src/sys/dev/pci/if_wm.c:1.698 Wed Feb 17 08:10:33 2021
+++ src/sys/dev/pci/if_wm.c Wed Feb 17 08:15:43 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: if_wm.c,v 1.698 2021/02/17 08:10:33 knakahara Exp $ */
+/* $NetBSD: if_wm.c,v 1.699 2021/02/17 08:15:43 knakahara Exp $ */
/*
* Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -82,7 +82,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.698 2021/02/17 08:10:33 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.699 2021/02/17 08:15:43 knakahara Exp $");
#ifdef _KERNEL_OPT
#include "opt_net_mpsafe.h"
@@ -313,6 +313,12 @@ static const uint32_t wm_82580_rxpbs_tab
struct wm_softc;
+#if defined(_LP64) && !defined(WM_DISABLE_EVENT_COUNTERS)
+#if !defined(WM_EVENT_COUNTERS)
+#define WM_EVENT_COUNTERS 1
+#endif
+#endif
+
#ifdef WM_EVENT_COUNTERS
#define WM_Q_EVCNT_DEFINE(qname, evname) \
char qname##_##evname##_evcnt_name[sizeof("qname##XX##evname")]; \