Skip to content

Commit

Permalink
bnx2x: pfc statistics counts pfc events twice
Browse files Browse the repository at this point in the history
When pfc statistics were counted, the delta change from last count
was summed twice. This fixes the issue.

Signed-off-by: Yuval Mintz <[email protected]>
Signed-off-by: Eilon Greenstein <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Yuval Mintz authored and davem330 committed Mar 13, 2012
1 parent 930c514 commit db0ea84
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,23 +554,11 @@ static void bnx2x_bmac_stats_update(struct bnx2x *bp)
UPDATE_STAT64(tx_stat_gtufl, tx_stat_mac_ufl);

/* collect PFC stats */
DIFF_64(diff.hi, new->tx_stat_gtpp_hi,
pstats->pfc_frames_tx_hi,
diff.lo, new->tx_stat_gtpp_lo,
pstats->pfc_frames_tx_lo);
pstats->pfc_frames_tx_hi = new->tx_stat_gtpp_hi;
pstats->pfc_frames_tx_lo = new->tx_stat_gtpp_lo;
ADD_64(pstats->pfc_frames_tx_hi, diff.hi,
pstats->pfc_frames_tx_lo, diff.lo);

DIFF_64(diff.hi, new->rx_stat_grpp_hi,
pstats->pfc_frames_rx_hi,
diff.lo, new->rx_stat_grpp_lo,
pstats->pfc_frames_rx_lo);
pstats->pfc_frames_rx_hi = new->rx_stat_grpp_hi;
pstats->pfc_frames_rx_lo = new->rx_stat_grpp_lo;
ADD_64(pstats->pfc_frames_rx_hi, diff.hi,
pstats->pfc_frames_rx_lo, diff.lo);
}

estats->pause_frames_received_hi =
Expand Down

0 comments on commit db0ea84

Please sign in to comment.