]> git.baikalelectronics.ru Git - kernel.git/commit
iavf: allow null RX descriptors
authorMitch Williams <mitch.a.williams@intel.com>
Tue, 14 May 2019 17:37:09 +0000 (10:37 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 17 Jun 2019 22:39:26 +0000 (15:39 -0700)
commitcff135bd1f7187de0e4ba8614b4f9e97d86f3abe
tree3b2fa40bc5029a871cc45ebaf97b772f08edb7b6
parent4c1527e6c21fcf0c4b977478710d10f896bf5f6e
iavf: allow null RX descriptors

In some circumstances, the hardware can hand us a null receive
descriptor, with no data attached but otherwise valid. Unfortunately,
the driver was ill-equipped to handle such an event, and would stop
processing packets at that point.

To fix this, use the Descriptor Done bit instead of the size to
determine whether or not a descriptor is ready to be processed. Add some
checks to allow for unused buffers.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/iavf/iavf_txrx.c