]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
igb: Use length to determine if descriptor is done
authorAlexander Duyck <alexander.h.duyck@intel.com>
Tue, 7 Feb 2017 02:25:41 +0000 (18:25 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 17 Mar 2017 19:11:44 +0000 (12:11 -0700)
commit7ec0116c9131a8cd58dc456ae2bd5bc9976460d1
tree95779db3ed1419a7ab5caa68c4bff439dadf7226
parent7bd175928280c3e5d741cb9948cffaa61b7cc7c6
igb: Use length to determine if descriptor is done

This change makes it so that we use the length of the packet instead of the
DD status bit to determine if a new descriptor is ready to be processed.
The obvious advantage is that it cuts down on reads as we don't really even
need the DD bit if going from a 0 to a non-zero value on size is enough to
inform us that the packet has been completed.

In addition I have updated the code so that we only reset the Rx descriptor
length for descriptor zero when resetting a ring instead of having to do a
memset with 0 over the entire ring.  By doing this we can save some time on
initialization.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb_ethtool.c
drivers/net/ethernet/intel/igb/igb_main.c