From 00b7ca600c111f85b4c63ccbadfb1a7ca7042551 Mon Sep 17 00:00:00 2001 From: Harry van Haaren Date: Mon, 12 Oct 2015 17:45:32 +0100 Subject: [PATCH] ixgbevf: fix statistic wraparound Fix a misinterpretation of VF stats in ixgbe Signed-off-by: Harry van Haaren Acked-by: Roger Melton --- drivers/net/ixgbe/ixgbe_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index ec2918cd3d..74239a4bff 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -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; \ } -- 2.20.1