aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
diff options
context:
space:
mode:
authorKumar Kartikeya Dwivedi <[email protected]>2022-09-04 20:41:14 +0000
committerAlexei Starovoitov <[email protected]>2022-09-07 18:45:28 +0000
commit448325199f574d33824dbf9121efb03558412966 (patch)
tree370e555559cee9bf7aa0238aa0dfaf2545d3a3aa /tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
parentbpf: Fix resetting logic for unreferenced kptrs (diff)
downloadkernel-448325199f574d33824dbf9121efb03558412966.tar.gz
kernel-448325199f574d33824dbf9121efb03558412966.zip
bpf: Add copy_map_value_long to copy to remote percpu memory
bpf_long_memcpy is used while copying to remote percpu regions from BPF syscall and helpers, so that the copy is atomic at word size granularity. This might not be possible when you copy from map value hosting kptrs from or to percpu maps, as the alignment or size in disjoint regions may not be multiple of word size. Hence, to avoid complicating the copy loop, we only use bpf_long_memcpy when special fields are not present, otherwise use normal memcpy to copy the disjoint regions. Signed-off-by: Kumar Kartikeya Dwivedi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c')
0 files changed, 0 insertions, 0 deletions