]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: Allow for -ENETDOWN in xdpsock
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>
Wed, 5 Feb 2020 04:58:34 +0000 (05:58 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Wed, 5 Feb 2020 21:06:09 +0000 (22:06 +0100)
commit4e700c242464077bd7ffb49244285d2c2084d3e3
treed664c62878db152984cb9317a94e5d858515542b
parent292c558c3718df15c3afb9822aaacf6673e3b059
samples: bpf: Allow for -ENETDOWN in xdpsock

ndo_xsk_wakeup() can return -ENETDOWN and there's no particular reason
to bail the whole application out on that case. Let's check in kick_tx()
whether errno was set to mentioned value and basically allow application
to further process frames.

Fixes: 4cb659ee6cb1 ("samples/bpf: convert xdpsock to use libbpf for AF_XDP access")
Reported-by: Cameron Elliott <cameron@cameronelliott.com>
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Björn Töpel <bjorn.topel@intel.com>
Link: https://lore.kernel.org/bpf/20200205045834.56795-4-maciej.fijalkowski@intel.com
samples/bpf/xdpsock_user.c