ice: Fix the bytecount sent to netdev_tx_sent_queue
authorBrett Creeley <brett.creeley@intel.com>
Fri, 26 Oct 2018 17:40:59 +0000 (10:40 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 6 Nov 2018 20:46:47 +0000 (12:46 -0800)
commitd944b46992f8e99b6bdc721e44b02e5ca294fa2b
tree891167ff96bcf56c911bf802576de2d4c5df3301
parentc585ea42ec75e8d3afa278b7095d9f0dd6ee515b
ice: Fix the bytecount sent to netdev_tx_sent_queue

Currently if the driver does a TSO offload the bytecount sent to
netdev_tx_sent_queue will be incorrect. This is because in ice_tso we
overwrite the initial value that we set in ice_tx_map. This creates a
mismatch between the Tx and Tx clean flow. In the Tx clean flow we
calculate the bytecount (called total_bytes) as we clean the
descriptors so the value used in the Tx clean path is correct. Fix this
by using += in ice_tso instead of =. This fixes the mismatch in
bytecount mentioned above.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_txrx.c