Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src In 64 bit architectures, WM_EVENT_COUNTER is enabled by defa...



details:   https://anonhg.NetBSD.org/src/rev/b1dc94fc7cfe
branches:  trunk
changeset: 980758:b1dc94fc7cfe
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Wed Feb 17 08:15:43 2021 +0000

description:
In 64 bit architectures, WM_EVENT_COUNTER is enabled by default.

No objection from tech-kern@n.o and tech-net@n.o.

ok'ed by msaitoh@n.o.

diffstat:

 share/man/man4/wm.4   |   7 +++++--
 sys/dev/pci/files.pci |   4 ++--
 sys/dev/pci/if_wm.c   |  10 ++++++++--
 3 files changed, 15 insertions(+), 6 deletions(-)

diffs (79 lines):

diff -r a622bd409385 -r b1dc94fc7cfe share/man/man4/wm.4
--- a/share/man/man4/wm.4       Wed Feb 17 08:10:33 2021 +0000
+++ b/share/man/man4/wm.4       Wed Feb 17 08:15:43 2021 +0000
@@ -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 @@
 .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.
diff -r a622bd409385 -r b1dc94fc7cfe sys/dev/pci/files.pci
--- a/sys/dev/pci/files.pci     Wed Feb 17 08:10:33 2021 +0000
+++ b/sys/dev/pci/files.pci     Wed Feb 17 08:15:43 2021 +0000
@@ -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 @@
 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
diff -r a622bd409385 -r b1dc94fc7cfe sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Wed Feb 17 08:10:33 2021 +0000
+++ b/sys/dev/pci/if_wm.c       Wed Feb 17 08:15:43 2021 +0000
@@ -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 @@
 
 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")]; \



Home | Main Index | Thread Index | Old Index