aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
diff options
context:
space:
mode:
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>2024-09-04 18:28:08 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2024-09-05 15:56:49 +0200
commit6b083650a37318112fb60c65fbb6070584f53d93 (patch)
tree554c2f777963910ab84bdb900ff0c291280e17bf /tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h
parent5d1622831064abf2633a1bc9a6446e83a669f58d (diff)
xsk: Bump xsk_queue::queue_empty_descs in xp_can_alloc()
We have STAT_FILL_EMPTY test case in xskxceiver that tries to process traffic with fill queue being empty which currently fails for zero copy ice driver after it started to use xsk_buff_can_alloc() API. That is because xsk_queue::queue_empty_descs is currently only increased from alloc APIs and right now if driver sees that xsk_buff_pool will be unable to provide the requested count of buffers, it bails out early, skipping calls to xsk_buff_alloc{_batch}(). Mentioned statistic should be handled in xsk_buff_can_alloc() from the very beginning, so let's add this logic now. Do it by open coding xskq_cons_has_entries() and bumping queue_empty_descs in the middle when fill queue currently has no entries. Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Magnus Karlsson <magnus.karlsson@intel.com> Link: https://lore.kernel.org/bpf/20240904162808.249160-1-maciej.fijalkowski@intel.com
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_testmod/bpf_testmod-events.h')
0 files changed, 0 insertions, 0 deletions