Thread (18 messages) flat view 18 messages, 4 authors, 2025-08-28

Re: [PATCH v3 bpf-next/net 5/5] selftest: bpf: Add test for SK_BPF_MEMCG_SOCK_ISOLATED.

From: Kuniyuki Iwashima <kuniyu@google.com>
Date: 2025-08-28 00:26:07
Also in: bpf

On Wed, Aug 27, 2025 at 5:14 PM Martin KaFai Lau [off-list ref] wrote:
On 8/26/25 11:38 AM, Kuniyuki Iwashima wrote:
quoted
The test does the following for IPv4/IPv6 x TCP/UDP sockets
with/without BPF prog.

   1. Create socket pairs
   2. Send a bunch of data that require more than 1000 pages
   3. Read memory_allocated from the 3rd column in /proc/net/protocols
   4. Check if unread data is charged to memory_allocated

If BPF prog is attached, memory_allocated should not be changed,
but we allow a small error (up to 10 pages) in case the test is ran
concurrently with other tests using TCP/UDP sockets.
hmm... there is a "./test_progs -j" that multiple tests can run in parallel.
Will it be reliable enough or it needs the "serial_" prefix in the test
function?
Didn't know the prefix, sounds useful :)

Beside, the test took ~20s in my qemu. Is it feasible to shorten the test?
Same on my qemu setup, and I think it's feasible with serial_.

Currently, the test consumes 2000> pages for each TCP/UDP
case, but this was just to make it more reliable on uncertain env.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help