Björn Töpel 8d14768a79 ice, xsk: clear the status bits for the next_to_use descriptor
On the Rx side, the next_to_use index points to the next item in the
HW ring to be refilled/allocated, and next_to_clean points to the next
item to potentially be processed.

When the HW Rx ring is fully refilled, i.e. no packets has been
processed, the next_to_use will be next_to_clean - 1. When the ring is
fully processed next_to_clean will be equal to next_to_use. The latter
case is where a bug is triggered.

If the next_to_use bits are not cleared, and the "fully processed"
state is entered, a stale descriptor can be processed.

The skb-path correctly clear the status bit for the next_to_use
descriptor, but the AF_XDP zero-copy path did not do that.

This change adds the status bits clearing of the next_to_use
descriptor.

Fixes: 2d4238f55697 ("ice: Add support for AF_XDP")
Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-12-16 10:51:07 -08:00
..
2020-05-22 22:02:34 -07:00
2020-05-22 22:02:34 -07:00
2020-07-29 08:38:54 -07:00
2020-07-29 08:38:54 -07:00
2020-05-27 17:03:40 -07:00
2019-11-08 12:02:14 -08:00
2020-07-29 08:38:54 -07:00
2020-08-01 08:44:04 -07:00
2020-05-22 21:44:48 -07:00
2020-10-09 13:14:19 -07:00
2020-05-21 22:10:04 -07:00
2020-05-21 22:10:04 -07:00
2020-08-01 08:44:04 -07:00
2020-08-01 08:44:04 -07:00
2020-12-09 08:11:55 -08:00
2020-08-01 08:44:04 -07:00
2020-10-09 13:14:19 -07:00
2020-12-09 08:11:54 -08:00