]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2019 07:12:37 +0000 (09:12 +0200)
commit2a51e334a0ade539e5b0fcfdbd8b43acb9c7547d
tree20e6571e9d6a9b0aa9456c57adb7c69507768f8a
parent46ffa1554f00314a0e502eb081c212f02d6e26be
iavf: allow null RX descriptors

[ Upstream commit efa14c3985828da3163f5372137cb64d992b0f79 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/iavf/iavf_txrx.c