[dpdk-dev] [PATCH 1/2] ixgbe: fix VF statistic wraparound handling macro
Roger B. Melton
rmelton at cisco.com
Tue Oct 13 21:43:54 CEST 2015
ack
On 10/12/15 12:45 PM, Harry van Haaren wrote:
> Fix a misinterpretation of VF stats in ixgbe
>
> Signed-off-by: Harry van Haaren <harry.van.haaren at intel.com>
> ---
> 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 ec2918c..86dcd87 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; \
> }
>
--
____________________________________________________________________
|Roger B. Melton | | Cisco Systems |
|CPP Software :|: :|: 7100 Kit Creek Rd |
|+1.919.476.2332 phone :|||: :|||: RTP, NC 27709-4987 |
|+1.919.392.1094 fax .:|||||||:..:|||||||:. rmelton at cisco.com |
| |
| This email may contain confidential and privileged material for the|
| sole use of the intended recipient. Any review, use, distribution |
| or disclosure by others is strictly prohibited. If you are not the |
| intended recipient (or authorized to receive for the recipient), |
| please contact the sender by reply email and delete all copies of |
| this message. |
| |
| For corporate legal information go to: |
| http://www.cisco.com/web/about/doing_business/legal/cri/index.html |
|__________________________ http://www.cisco.com ____________________|
More information about the dev
mailing list