From: Harry van Haaren Date: Mon, 12 Oct 2015 16:45:33 +0000 (+0100) Subject: igbvf: fix statistic wraparound X-Git-Tag: spdx-start~8313 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=795618c0aa534835e7cbbe7da80991eb624e5a84;p=dpdk.git igbvf: fix statistic wraparound Fix a misinterpreatation of VF statistic macro in e1000/igb. Signed-off-by: Harry van Haaren Acked-by: Roger Melton --- diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c index 422d718efb..3ab082e3ff 100644 --- a/drivers/net/e1000/igb_ethdev.c +++ b/drivers/net/e1000/igb_ethdev.c @@ -246,11 +246,10 @@ static void eth_igb_configure_msix_intr(struct rte_eth_dev *dev); #define UPDATE_VF_STAT(reg, last, cur) \ { \ u32 latest = E1000_READ_REG(hw, reg); \ - cur += latest - last; \ + cur += (latest - last) & UINT_MAX; \ last = latest; \ } - #define IGB_FC_PAUSE_TIME 0x0680 #define IGB_LINK_UPDATE_CHECK_TIMEOUT 90 /* 9s */ #define IGB_LINK_UPDATE_CHECK_INTERVAL 100 /* ms */