aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/niu.c
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <hawk@comx.dk>2008-12-18 22:51:56 -0500
committerDavid S. Miller <davem@davemloft.net>2008-12-19 01:27:41 -0500
commite98def1f71fa0a6a37e12a56eb52ce5ed9e2e800 (patch)
tree575063ef3b8ab38c762fcb86cce75ac0abc84c3f /drivers/net/niu.c
parentd231776fda4a1ed754298720c5fbc29eb34f130c (diff)
NIU: Implement discard counters, optimize
Optimize the lightly loaded case, by only synchronizing discards stats when qlen > 10 indicate potential for drops. Notice Robert Olsson might disagree with this patch. 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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 671721c8ca65..f219f16ec97a 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -3618,7 +3618,9 @@ static int niu_rx_work(struct niu *np, struct rx_ring_info *rp, int budget)
3618 3618
3619 nw64(RX_DMA_CTL_STAT(rp->rx_channel), stat); 3619 nw64(RX_DMA_CTL_STAT(rp->rx_channel), stat);
3620 3620
3621 niu_sync_rx_discard_stats(np, rp, 0x7FFF); 3621 /* Only sync discards stats when qlen indicate potential for drops */
3622 if (qlen > 10)
3623 niu_sync_rx_discard_stats(np, rp, 0x7FFF);
3622 3624
3623 return work_done; 3625 return work_done;
3624} 3626}