forked from Minki/linux
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>
This commit is contained in:
parent
d231776fda
commit
e98def1f71
@ -3618,6 +3618,8 @@ static int niu_rx_work(struct niu *np, struct rx_ring_info *rp, int budget)
|
|||||||
|
|
||||||
nw64(RX_DMA_CTL_STAT(rp->rx_channel), stat);
|
nw64(RX_DMA_CTL_STAT(rp->rx_channel), stat);
|
||||||
|
|
||||||
|
/* Only sync discards stats when qlen indicate potential for drops */
|
||||||
|
if (qlen > 10)
|
||||||
niu_sync_rx_discard_stats(np, rp, 0x7FFF);
|
niu_sync_rx_discard_stats(np, rp, 0x7FFF);
|
||||||
|
|
||||||
return work_done;
|
return work_done;
|
||||||
|
Loading…
Reference in New Issue
Block a user