ice: allow empty Rx descriptors
authorMitch Williams <mitch.a.williams@intel.com>
Thu, 25 Jul 2019 08:55:34 +0000 (01:55 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 20 Aug 2019 21:30:37 +0000 (14:30 -0700)
commitac6f733a7bd5e23ce9d58ef995f51fbd1ad2fa97
treee1e1c76ab60d9dd98d8f4b1c75ade5646d1eb033
parent7829570e287d938fc49b8ae151d9af26436967a8
ice: allow empty Rx descriptors

In some circumstances, the hardware will hand us a receive descriptor
which has no data attached, but is otherwise valid. The receive code was
improperly ignoring these descriptors, which result in an infinite loop.

To fix this, change the receive code to process all descriptors,
regardless of the size of the associated data. Add checks to the
memory-handling functions to allow for zero size.

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/ice/ice_txrx.c