bpf: sockmap, add tests for proto updates replace socket
authorJohn Fastabend <john.fastabend@gmail.com>
Thu, 21 Dec 2023 23:23:27 +0000 (15:23 -0800)
committerMartin KaFai Lau <martin.lau@kernel.org>
Thu, 4 Jan 2024 00:50:22 +0000 (16:50 -0800)
commitbdbca46d3f84a4455cd5c15a7483666218851549
treed8a0d5f195e29edc68c8095a224b082f57ef2dfc
parentf1300467dd9f67293a7aae86fd26471520fac36d
bpf: sockmap, add tests for proto updates replace socket

Add test that replaces the same socket with itself. This exercises a
corner case where old element and new element have the same posck.
Test protocols: TCP, UDP, stream af_unix and dgram af_unix.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Reviewed-by: Jakub Sitnicki <jakub@cloudflare.com>
Link: https://lore.kernel.org/r/20231221232327.43678-6-john.fastabend@gmail.com
tools/testing/selftests/bpf/prog_tests/sockmap_basic.c