[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1229608578.16904.28.camel@localhost.localdomain>
Date: Thu, 18 Dec 2008 14:56:18 +0100
From: Jesper Dangaard Brouer <hawk@...x.dk>
To: "David S. Miller" <davem@...emloft.net>
Cc: Robert Olsson <Robert.Olsson@...a.slu.se>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>, hawk@...x.dk
Subject: [PATCH 2/3] NIU: Implement discard counters, info/debug statements.
Discard packet counter debug statements that can be turned on
runtime, by users to assist debugging of the driver code.
Signed-off-by: Jesper Dangaard Brouer <hawk@...x.dk>
---
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 1bd7018..9f6a98f 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -3560,6 +3560,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 */
@@ -3571,6 +3574,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);
}
}
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists