]> 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)
commit97d5336740c4844d695db3a87b04cef4fa380fa3
tree3b2fa40bc5029a871cc45ebaf97b772f08edb7b6
parent986889dda66427133e52da83ea5078d70b40fb02
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