]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe: Use ring values to test for Tx pending
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 22 Nov 2017 18:56:46 +0000 (10:56 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 9 Jan 2018 16:50:17 +0000 (08:50 -0800)
commit33a89cca43af9562d70e3f5830abe7fbb4aa6bcd
treeeebe64b4396204cf1b996e25ffb7848494491223
parentf80457b8889b4bb19d9fdbffea9d5ede5b3fa5b4
ixgbe: Use ring values to test for Tx pending

This patch simplifies the check for Tx pending traffic and makes it more
holistic as there being any difference between next_to_use and
next_to_clean is much more informative than if head and tail are equal, as
it is possible for us to either not update tail, or not be notified of
completed work in which case next_to_clean would not be equal to head.

In addition the simplification makes it so that we don't have to read
hardware which allows us to drop a number of variables that were previously
being used in the call.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c