Date: Fri, 5 Nov 2010 19:28:00 +0000 (UTC) From: Pyun YongHyeon <yongari@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/sys/dev/re if_re.c src/sys/pci if_rlreg.h Message-ID: <201011051928.oA5JSUqc098986@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
yongari 2010-11-05 19:28:00 UTC
FreeBSD src repository
Modified files:
sys/dev/re if_re.c
sys/pci if_rlreg.h
Log:
SVN rev 214844 on 2010-11-05 19:28:00Z by yongari
Add simple MAC statistics counter reading support. Unfortunately
useful counters like rl_missed_pkts is 16 bits quantity which is
too small to hold meaningful information happened in a second. This
means driver should frequently read these counters in order not to
lose accuracy and that approach is too inefficient in driver's
view. Moreover it seems there is no way to trigger an interrupt to
detect counter near-full or wraparound event as well as lacking
clearing the MAC counters. Another limitation of reading the
counters from RealTek controllers is lack of interrupt firing at
the end of DMA cycle of MAC counter read request such that driver
have to poll the end of the DMA which is a time consuming process
as well as inefficient. The more severe issue of the MAC counter
read request is it takes too long to complete the DMA. All these
limitation made maintaining MAC counters in driver impractical. For
now, just provide simple sysctl interface to trigger reading the
MAC counters. These counters could be used to track down driver
issues. Users can read MAC counters maintained in controller with
the following command.
#sysctl dev.re.0.stats=1
While I'm here add check for validity of dma map and allocated
memory before unloading/freeing them.
Tested by: rmacklem
Revision Changes Path
1.174 +139 -15 src/sys/dev/re/if_re.c
1.102 +7 -9 src/sys/pci/if_rlreg.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201011051928.oA5JSUqc098986>
