summaryrefslogtreecommitdiff
path: root/rust/helpers/rcu.c
diff options
context:
space:
mode:
authorAmery Hung <ameryhung@gmail.com>2025-09-22 16:33:53 -0700
committerMartin KaFai Lau <martin.lau@kernel.org>2025-09-23 13:35:12 -0700
commit7eb83bff02ad5e82e8c456c58717ef181c220870 (patch)
treec9e8f2e6947557a8601b7f09bcd49a624d29b602 /rust/helpers/rcu.c
parent0e7a733ab3d7be8d745e8ee38d637ea7a9b24343 (diff)
bpf: Make variables in bpf_prog_test_run_xdp less confusing
Change the variable naming in bpf_prog_test_run_xdp() to make the overall logic less confusing. As different modes were added to the function over the time, some variables got overloaded, making it hard to understand and changing the code becomes error-prone. Replace "size" with "linear_sz" where it refers to the size of metadata and data. If "size" refers to input data size, use test.data_size_in directly. Replace "max_data_sz" with "max_linear_sz" to better reflect the fact that it is the maximum size of metadata and data (i.e., linear_sz). Also, xdp_rxq.frags_size is always PAGE_SIZE, so just set it directly instead of subtracting headroom and tailroom and adding them back. Signed-off-by: Amery Hung <ameryhung@gmail.com> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Link: https://patch.msgid.link/20250922233356.3356453-6-ameryhung@gmail.com
Diffstat (limited to 'rust/helpers/rcu.c')
0 files changed, 0 insertions, 0 deletions