ixgbevf: fix statistic wraparound

Fix a misinterpretation of VF stats in ixgbe

Signed-off-by: Harry van Haaren <harry.van.haaren@intel.com>
Acked-by: Roger Melton <rmelton@cisco.com>
This commit is contained in:
Harry van Haaren 2015-10-12 17:45:32 +01:00 committed by Thomas Monjalon
parent 795618c0aa
commit 00b7ca600c

View File

@ -329,10 +329,10 @@ static int ixgbe_timesync_read_tx_timestamp(struct rte_eth_dev *dev,
/*
* Define VF Stats MACRO for Non "cleared on read" register
*/
#define UPDATE_VF_STAT(reg, last, cur) \
#define UPDATE_VF_STAT(reg, last, cur) \
{ \
uint32_t latest = IXGBE_READ_REG(hw, reg); \
cur += latest - last; \
cur += (latest - last) & UINT_MAX; \
last = latest; \
}