]> git.baikalelectronics.ru Git - kernel.git/commit
ice: xsk: Eliminate unnecessary loop iteration
authorMagnus Karlsson <magnus.karlsson@intel.com>
Mon, 28 Mar 2022 14:21:21 +0000 (16:21 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 29 Mar 2022 02:56:28 +0000 (19:56 -0700)
commite935d13fdb714ff4d08e03e00a45315193096310
tree4d9bcf39ab12323e8037f671cf28bcd849c50466
parent67c5dcc5c6e031482de79c68a97736cad886407e
ice: xsk: Eliminate unnecessary loop iteration

The NIC Tx ring completion routine cleans entries from the ring in
batches. However, it processes one more batch than it is supposed
to. Note that this does not matter from a functionality point of view
since it will not find a set DD bit for the next batch and just exit
the loop. But from a performance perspective, it is faster to
terminate the loop before and not issue an expensive read over PCIe to
get the DD bit.

Fixes: 58e53db8b70b ("ice: xsk: Improve AF_XDP ZC Tx and use batching API")
Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20220328142123.170157-3-maciej.fijalkowski@intel.com
drivers/net/ethernet/intel/ice/ice_xsk.c