Module Name: src Committed By: knakahara Date: Fri Mar 3 07:38:53 UTC 2017
Modified Files: src/sys/dev/pci: files.pci if_wm.c Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.385 -r1.386 src/sys/dev/pci/files.pci cvs rdiff -u -r1.493 -r1.494 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/files.pci diff -u src/sys/dev/pci/files.pci:1.385 src/sys/dev/pci/files.pci:1.386 --- src/sys/dev/pci/files.pci:1.385 Fri Dec 2 10:48:11 2016 +++ src/sys/dev/pci/files.pci Fri Mar 3 07:38:52 2017 @@ -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 @@ 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 +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 Index: src/sys/dev/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.493 src/sys/dev/pci/if_wm.c:1.494 --- src/sys/dev/pci/if_wm.c:1.493 Fri Mar 3 07:32:36 2017 +++ src/sys/dev/pci/if_wm.c Fri Mar 3 07:38:52 2017 @@ -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 @@ int wm_debug = WM_DEBUG_TX | WM_DEBUG_RX #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];