]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
idpf: improve when to set RE bit logic
authorJoshua Hay <joshua.a.hay@intel.com>
Mon, 15 Dec 2025 21:42:43 +0000 (13:42 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Jan 2026 09:15:03 +0000 (10:15 +0100)
commit2d799d58d4021aab26a8355ca42f724abd8a9bfd
treedb11fc73b36fe01e8964e7fb2afe61a9b5e91655
parente8f9e3ec17a2425f4c0bf1ca6cae84835aca2d30
idpf: improve when to set RE bit logic

[ Upstream commit f2d18e16479cac7a708d77cbfb4220a9114a71fc ]

Track the gap between next_to_use and the last RE index. Set RE again
if the gap is large enough to ensure RE bit is set frequently. This is
critical before removing the stashing mechanisms because the
opportunistic descriptor ring cleaning from the out-of-order completions
will go away. Previously the descriptors would be "cleaned" by both the
descriptor (RE) completion and the out-of-order completions. Without the
latter, we must ensure the RE bit is set more frequently. Otherwise,
it's theoretically possible for the descriptor ring next_to_clean to
never advance.  The previous implementation was dependent on the start
of a packet falling on a 64th index in the descriptor ring, which is not
guaranteed with large packets.

Signed-off-by: Luigi Rizzo <lrizzo@google.com>
Signed-off-by: Brian Vazquez <brianvv@google.com>
Signed-off-by: Joshua Hay <joshua.a.hay@intel.com>
Reviewed-by: Madhu Chittim <madhu.chittim@intel.com>
Tested-by: Samuel Salin <Samuel.salin@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/idpf/idpf_txrx.c
drivers/net/ethernet/intel/idpf/idpf_txrx.h