Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci make kernel config option WM_RX_PROCESS_LIMIT_DE...



details:   https://anonhg.NetBSD.org/src/rev/dd990e43aafb
branches:  trunk
changeset: 351885:dd990e43aafb
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Fri Mar 03 07:38:52 2017 +0000

description:
make kernel config option WM_RX_PROCESS_LIMIT_DEFAULT and WM_RX_INTR_PROCESS_LIMIT_DEFAULT

e.g. if
    - WM_RX_PROCESS_LIMIT_DEFAULT is set 0
    - WM_RX_INTR_PROCESS_LIMIT_DEFAULT is set -1 (means almost infinite)
that means wm(4) does not use polling mode.

diffstat:

 sys/dev/pci/files.pci |  4 +++-
 sys/dev/pci/if_wm.c   |  9 +++++++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r 768d3b880e99 -r dd990e43aafb sys/dev/pci/files.pci
--- a/sys/dev/pci/files.pci     Fri Mar 03 07:34:04 2017 +0000
+++ b/sys/dev/pci/files.pci     Fri Mar 03 07:38:52 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.pci,v 1.385 2016/12/02 10:48:11 msaitoh Exp $
+#      $NetBSD: files.pci,v 1.386 2017/03/03 07:38:52 knakahara Exp $
 #
 # Config file and device description for machine-independent PCI code.
 # Included by ports that need it.  Requires that the SCSI files be
@@ -690,6 +690,8 @@
 device wm: ether, ifnet, arp, mii, mii_bitbang
 attach wm at pci
 file   dev/pci/if_wm.c                 wm
+defparam opt_if_wm.h   WM_RX_PROCESS_LIMIT_DEFAULT
+                       WM_RX_INTR_PROCESS_LIMIT_DEFAULT
 
 # Broadcom 570x Gigabit Ethernet
 device bge: ether, ifnet, arp, mii, mii_bitbang
diff -r 768d3b880e99 -r dd990e43aafb sys/dev/pci/if_wm.c
--- a/sys/dev/pci/if_wm.c       Fri Mar 03 07:34:04 2017 +0000
+++ b/sys/dev/pci/if_wm.c       Fri Mar 03 07:38:52 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_wm.c,v 1.493 2017/03/03 07:32:36 knakahara Exp $    */
+/*     $NetBSD: if_wm.c,v 1.494 2017/03/03 07:38:52 knakahara Exp $    */
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -84,10 +84,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.493 2017/03/03 07:32:36 knakahara Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.494 2017/03/03 07:38:52 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
+#include "opt_if_wm.h"
 #endif
 
 #include <sys/param.h>
@@ -213,8 +214,12 @@
 #define        WM_NEXTRX(x)            (((x) + 1) & WM_NRXDESC_MASK)
 #define        WM_PREVRX(x)            (((x) - 1) & WM_NRXDESC_MASK)
 
+#ifndef WM_RX_PROCESS_LIMIT_DEFAULT
 #define        WM_RX_PROCESS_LIMIT_DEFAULT             100U
+#endif
+#ifndef WM_RX_INTR_PROCESS_LIMIT_DEFAULT
 #define        WM_RX_INTR_PROCESS_LIMIT_DEFAULT        0U
+#endif
 
 typedef union txdescs {
        wiseman_txdesc_t sctxu_txdescs[WM_NTXDESC_82544];



Home | Main Index | Thread Index | Old Index