diff options
author | Jesper Dangaard Brouer <hawk@comx.dk> | 2008-12-19 06:51:26 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-12-19 09:27:40 +0300 |
commit | d231776fda4a1ed754298720c5fbc29eb34f130c (patch) | |
tree | c95fec7006a595f87d01cdf78a6820000731d3ec /drivers/net/niu.c | |
parent | b8a606b871d37e03b92be1bd3deedeee97ea4f13 (diff) | |
download | linux-d231776fda4a1ed754298720c5fbc29eb34f130c.tar.xz |
NIU: Implement discard counters, info/debug statements.
Discard packet counter debug statements that can be turned on
at runtime by users to assist debugging of the driver code.
Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/niu.c')
-rw-r--r-- | drivers/net/niu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 7b6cdd07c85f..671721c8ca65 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c @@ -3558,6 +3558,9 @@ static inline void niu_sync_rx_discard_stats(struct niu *np, if (unlikely(misc & RXMISC_OFLOW)) dev_err(np->device, "rx-%d: Counter overflow " "RXMISC discard\n", rx_channel); + + niudbg(RX_ERR, "%s-rx-%d: MISC drop=%u over=%u\n", + np->dev->name, rx_channel, misc, misc-limit); } /* WRED (Weighted Random Early Discard) by hardware */ @@ -3569,6 +3572,9 @@ static inline void niu_sync_rx_discard_stats(struct niu *np, if (unlikely(wred & RED_DIS_CNT_OFLOW)) dev_err(np->device, "rx-%d: Counter overflow " "WRED discard\n", rx_channel); + + niudbg(RX_ERR, "%s-rx-%d: WRED drop=%u over=%u\n", + np->dev->name, rx_channel, wred, wred-limit); } } |