]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r214844:
authoryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 13 Nov 2010 01:09:44 +0000 (01:09 +0000)
committeryongari <yongari@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sat, 13 Nov 2010 01:09:44 +0000 (01:09 +0000)
commitac79a515d287f43466b35eb641b2aecbe4dfc190
tree80cd5f31cb0b89aa6633a88b685113724f59def1
parentc9e0db0849b37bcc1bcd1066d70c8da32de9203b
MFC r214844:
  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

git-svn-id: svn://svn.freebsd.org/base/stable/8@215222 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/re/if_re.c
sys/pci/if_rlreg.h