Bug 119205 - [dc] [patch] Collect various stats regarding dc(4) interrupts
Summary: [dc] [patch] Collect various stats regarding dc(4) interrupts
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.3-PRERELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-31 23:20 UTC by Peter Jeremy
Modified: 2019-01-22 19:57 UTC (History)
1 user (show)

See Also:


Attachments
dc.releng6.patch (3.71 KB, patch)
2007-12-31 23:20 UTC, Peter Jeremy
no flags Details | Diff
file.diff (3.88 KB, patch)
2007-12-31 23:20 UTC, Peter Jeremy
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Jeremy freebsd_committer 2007-12-31 23:20:01 UTC
	I wrote the attached patch some time ago to try and identify
	the breakdown of dc(4) interrupts as part of some investigations
	into the performance of a dc NIC that I was using.  It adds a new
	"hw.dc" sysctl tree and reports total interrupts, interrupt
	categories (abnormal, bus_err, normal, rx_nobuf, rx_ok,
	rx_watchdogtimeout, tx_idle, tx_nobuf, tx_ok, tx_underrun) and
	receiver resync events.  Note that this patch accumulates totals
	for all dc(4) devices, not per-device.

	The new sysctl nodes are:
hw.dc.abnormal	Abnormal interrupts
hw.dc.bus_err	"Bus error" interrupts
hw.dc.ints	Total interrupts
hw.dc.normal	"normal" interrupts
hw.dc.resync1	Resync needed following normal receive interrupt
hw.dc.resync2	Resync needed following watchdog timeout or no buffers
hw.dc.rx_nobuf	No receive buffers
hw.dc.rx_ok	Normal receive interrupt
hw.dc.rx_watdogtimeo  Watchdog timeout on receive
hw.dc.tx_idle	Transmitter idle
hw.dc.tx_nobuf	No transmit buffers
hw.dc.tx_ok	Normal transmit interrupt.
hw.dc.tx_underrun Transmit underrun

	It's possible they may be of use to someone else.

Fix: See attached patches for RELENG_6 and -current/RELENG_7.  Note that
	the latter patch compiles cleanly but has not been tested.
How-To-Repeat: 	code inspection
Comment 1 Edwin Groothuis freebsd_committer 2007-12-31 23:24:49 UTC
Responsible Changed
From-To: freebsd-bugs->edwin

I will handle it with submitter and mentor.
Comment 2 edwin 2008-01-15 07:28:16 UTC
Maybe it should be SYSCTL_ULONG instead of SYSCTL_INT.
Maybe hide it behind #ifdef DC_DEBUG or something.


-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/
Comment 3 Edwin Groothuis freebsd_committer 2008-02-14 10:34:20 UTC
Responsible Changed
From-To: edwin->freebsd-bugs


Give back into the pool until later.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2012-03-25 04:33:58 UTC
State Changed
From-To: open->feedback

is this still required and does the patch need to be updated? I don't 
have the hardware to test. 


Comment 5 Eitan Adler freebsd_committer freebsd_triage 2012-03-25 04:33:58 UTC
Responsible Changed
From-To: freebsd-bugs->eadler

is this still required and does the patch need to be updated? I don't 
have the hardware to test.
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2012-06-19 07:57:18 UTC
State Changed
From-To: feedback->closed

if this is still a problem please send me an email and I'll reopen
Comment 7 Eitan Adler freebsd_committer freebsd_triage 2012-06-23 22:15:14 UTC
State Changed
From-To: closed->open

per submitter request
Comment 8 Peter Jeremy freebsd_committer 2012-10-19 04:40:23 UTC
Responsible Changed
From-To: eadler->peterj

Take PR.
Comment 9 John Baldwin freebsd_committer freebsd_triage 2012-10-19 14:05:09 UTC
I would suggest making these per-device instead.  It should be fairly easy to 
put the counters in the softc and add these to the existing per-device sysctl 
tree from new-bus.

-- 
John Baldwin
Comment 10 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:56 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 11 Oleksandr Tymoshenko freebsd_committer freebsd_triage 2019-01-22 19:57:16 UTC
Peter, is this patch still relevant, are you going to implement John's suggestion of per-device stats sysctls?