]> git.baikalelectronics.ru Git - kernel.git/commit
ixgbe, xsk: Decorate IXGBE_XDP_REDIR with likely()
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 13 Apr 2022 15:30:05 +0000 (17:30 +0200)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 15 Apr 2022 19:10:32 +0000 (21:10 +0200)
commit572a1b63c83d166a8c442db3bad0c20ee52384f8
tree1eb73dcbf3b225dc2ea066e33191d1c52f76659c
parent343a9c02fcae17f615f8eb62a644900e7b758bf5
ixgbe, xsk: Decorate IXGBE_XDP_REDIR with likely()

ixgbe_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
ixgbe_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-5-maciej.fijalkowski@intel.com
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c