datapath: Fix double counting of packet stats for Linux devices.
authorJesse Gross <jesse@nicira.com>
Wed, 5 Jan 2011 15:25:41 +0000 (07:25 -0800)
committerJesse Gross <jesse@nicira.com>
Wed, 5 Jan 2011 22:17:09 +0000 (14:17 -0800)
commit0971d127d038e0279b3b9cb2f6ccd060ddaee9e5
tree43026b7b47e7eed0aeb68b2ad633371f66622e87
parent46c6a11da0409a4f52fd6ea5f72154c73af0ba47
datapath: Fix double counting of packet stats for Linux devices.

The kernel augments stats for Linux devices that only provide 32-bit stats
with its own internal 64-bit counters.  When doing this it takes the error
stats from the device but uses the packet and byte values from its local
counters.  However, we were also taking the packet and byte counts from
the device, leading to double counting.

Problem introduced by commit ec61a01cd8ed73b13ffe042ddff4baf41f6b63e7
'datapath: Use "struct rtnl_link_stats64" instead of "struct odp_vport_stats".'.

Bug #4327

Reported-by: Krishna Miriyala <krishna@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/vport.c