summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMaciej Fijalkowski <maciej.fijalkowski@intel.com>2026-06-29 21:12:21 +0200
committerJakub Kicinski <kuba@kernel.org>2026-06-30 16:57:00 -0700
commit333289d1690d6089a656edb46c7cde68afe77223 (patch)
treec5960084356959ffe142bf4c6efc6d9358b77860 /include
parenta53d1872f2be6574460bf3980777d3f26cf3f107 (diff)
downloadlinux-333289d1690d6089a656edb46c7cde68afe77223.tar.gz
linux-333289d1690d6089a656edb46c7cde68afe77223.zip
selftests/xsk: Preserve UMEM view in BIDIRECTIONAL test
The UMEM state refactor made __send_pkts() use xsk->umem for Tx address generation. At the same time, the shared-UMEM Tx setup copies the Rx UMEM state into a Tx-local state object and resets base_addr and next_buffer before configuring the Tx socket. Passing that Tx-local object to xsk_configure() makes xsk->umem point to the zero-based Tx allocator state. This breaks the BIDIRECTIONAL test once the roles are switched: the same socket is then used for Rx validation, but received descriptors from the other logical UMEM half are checked against base_addr == 0. With the new UMEM bounds check, a valid address such as base_addr + XDP_PACKET_HEADROOM is rejected as being outside the UMEM window. Keep xsk->umem as the shared/Rx UMEM view used for socket configuration and Rx validation. Use the ifobject-local UMEM copy only for Tx descriptor address generation, preserving the BIDIRECTIONAL test's intent of using the proper logical UMEM half after the direction switch. Reviewed-by: Jason Xing <kerneljasonxing@gmail.com> Reviewed-by: Tushar Vyavahare <tushar.vyavahare@intel.com> Tested-by: Tushar Vyavahare <tushar.vyavahare@intel.com> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://patch.msgid.link/20260629191221.2700-1-maciej.fijalkowski@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions