<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/tools/testing/selftests/bpf/test_tcpbpf.h, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2020-12-04T01:23:24Z</updated>
<entry>
<title>selftests/bpf: Add Userspace tests for TCP_WINDOW_CLAMP</title>
<updated>2020-12-04T01:23:24Z</updated>
<author>
<name>Prankur gupta</name>
<email>prankgup@fb.com</email>
</author>
<published>2020-12-02T21:31:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55144f31f0d2fdd3e74ead67f1649bf577961eaa'/>
<id>urn:sha1:55144f31f0d2fdd3e74ead67f1649bf577961eaa</id>
<content type='text'>
Adding selftests for new added functionality to set TCP_WINDOW_CLAMP
from bpf setsockopt.

Signed-off-by: Prankur gupta &lt;prankgup@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20201202213152.435886-3-prankgup@fb.com
</content>
</entry>
<entry>
<title>selftest/bpf: Use global variables instead of maps for test_tcpbpf_kern</title>
<updated>2020-11-04T01:52:37Z</updated>
<author>
<name>Alexander Duyck</name>
<email>alexanderduyck@fb.com</email>
</author>
<published>2020-11-03T21:35:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=21b5177e997c98643eaabd4b917f2e287395af86'/>
<id>urn:sha1:21b5177e997c98643eaabd4b917f2e287395af86</id>
<content type='text'>
Use global variables instead of global_map and sockopt_results_map to track
test data. Doing this greatly simplifies the code as there is not need to
take the extra steps of updating the maps or looking up elements.

Signed-off-by: Alexander Duyck &lt;alexanderduyck@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Link: https://lore.kernel.org/bpf/160443931900.1086697.6588858453575682351.stgit@localhost.localdomain
</content>
</entry>
<entry>
<title>selftests/bpf: De-flake test_tcpbpf</title>
<updated>2019-12-05T02:01:05Z</updated>
<author>
<name>Stanislav Fomichev</name>
<email>sdf@google.com</email>
</author>
<published>2019-12-04T19:09:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ef8c84effce3c7a0b8196fcda8f430c815ab511c'/>
<id>urn:sha1:ef8c84effce3c7a0b8196fcda8f430c815ab511c</id>
<content type='text'>
It looks like BPF program that handles BPF_SOCK_OPS_STATE_CB state
can race with the bpf_map_lookup_elem("global_map"); I sometimes
see the failures in this test and re-running helps.

Since we know that we expect the callback to be called 3 times (one
time for listener socket, two times for both ends of the connection),
let's export this number and add simple retry logic around that.

Also, let's make EXPECT_EQ() not return on failure, but continue
evaluating all conditions; that should make potential debugging
easier.

With this fix in place I don't observe the flakiness anymore.

Signed-off-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Cc: Lawrence Brakmo &lt;brakmo@fb.com&gt;
Link: https://lore.kernel.org/bpf/20191204190955.170934-1-sdf@google.com
</content>
</entry>
<entry>
<title>selftests/bpf: Test case for BPF_SOCK_OPS_TCP_LISTEN_CB</title>
<updated>2018-07-14T22:08:41Z</updated>
<author>
<name>Andrey Ignatov</name>
<email>rdna@fb.com</email>
</author>
<published>2018-07-12T00:33:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=78d8e26d46bc2ed73ab6a0e369a342478fda4ce0'/>
<id>urn:sha1:78d8e26d46bc2ed73ab6a0e369a342478fda4ce0</id>
<content type='text'>
Cover new TCP-BPF callback in test_tcpbpf: when listen() is called on
socket, set BPF_SOCK_OPS_STATE_CB_FLAG so that BPF_SOCK_OPS_STATE_CB
callback can be called on future state transition, and when such a
transition happens (TCP_LISTEN -&gt; TCP_CLOSE), track it in the map and
verify it in user space later.

Signed-off-by: Andrey Ignatov &lt;rdna@fb.com&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
</content>
</entry>
<entry>
<title>bpf: add selftest for tcpbpf</title>
<updated>2018-01-26T00:41:15Z</updated>
<author>
<name>Lawrence Brakmo</name>
<email>brakmo@fb.com</email>
</author>
<published>2018-01-26T00:14:16Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d6d4f60c3a0933852dcc40a2142d93027ea1da76'/>
<id>urn:sha1:d6d4f60c3a0933852dcc40a2142d93027ea1da76</id>
<content type='text'>
Added a selftest for tcpbpf (sock_ops) that checks that the appropriate
callbacks occured and that it can access tcp_sock fields and that their
values are correct.

Run with command: ./test_tcpbpf_user
Adding the flag "-d" will show why it did not pass.

Signed-off-by: Lawrence Brakmo &lt;brakmo@fb.com&gt;
Acked-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
</feed>
