summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorTushar Vyavahare <tushar.vyavahare@intel.com>2026-06-08 16:09:37 +0300
committerJakub Kicinski <kuba@kernel.org>2026-06-13 01:23:31 +0300
commit0fe61052acb09bab7ac2b39b2249d11d8b5dbdf7 (patch)
tree52b30df3157c503d12676561a7863846f974ec54 /tools/lib/python
parent1a24fe421739fc369fb15c515b9e114440df49df (diff)
downloadlinux-0fe61052acb09bab7ac2b39b2249d11d8b5dbdf7.tar.xz
selftests/xsk: Introduce mmap_size in umem struct
UMEM teardown currently recomputes the munmap() length from frame geometry, shared-UMEM adjustment, and hugepage rounding. This duplicates setup-time logic in cleanup and relies on re-deriving the mapping size instead of using the size originally established for the mapping. Store the final mapping length in xsk_umem_info as mmap_size when the UMEM mapping is created, and use that value during teardown. Also join the RX worker thread before cleanup in the single-thread path. This establishes synchronization before reading umem->mmap_size in teardown and avoids a potential visibility race. This removes duplicated size arithmetic in cleanup and makes munmap() use the canonical mapping size recorded at setup time. Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com> Signed-off-by: Tushar Vyavahare <tushar.vyavahare@intel.com> Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> Link: https://patch.msgid.link/20260608130938.958793-5-tushar.vyavahare@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions