ice, xsk: Decorate ICE_XDP_REDIR with likely()
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 13 Apr 2022 15:30:04 +0000 (17:30 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 15 Apr 2022 19:10:25 +0000 (21:10 +0200)
commit0bd5ab511e30a8c462c377d0fdda3374fc6200a4
treeae1494d61b6bab91252b086bd13f54fb89e11860
parent2be4a677ccb2cae1f72a9467e922642655efc0be
ice, xsk: Decorate ICE_XDP_REDIR with likely()

ice_run_xdp_zc() suggests to compiler that XDP_REDIRECT is the most
probable action returned from BPF program that AF_XDP has in its
pipeline. Let's also bring this suggestion up to the callsite of
ice_run_xdp_zc() so that compiler will be able to generate more
optimized code which in turn will make branch predictor happy.

Suggested-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20220413153015.453864-4-maciej.fijalkowski@intel.com
drivers/net/ethernet/intel/ice/ice_xsk.c