<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/tools/testing/selftests/bpf/progs/bpf_dctcp.c, branch master</title>
<subtitle>Linux kernel source tree.</subtitle>
<id>https://git.ilvokhin.com/linux.git/atom/tools/testing/selftests/bpf/progs/bpf_dctcp.c?h=master</id>
<link rel='self' href='https://git.ilvokhin.com/linux.git/atom/tools/testing/selftests/bpf/progs/bpf_dctcp.c?h=master'/>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/'/>
<updated>2025-11-18T22:57:45Z</updated>
<entry>
<title>selftests/bpf: Move common TCP helpers into bpf_tracing_net.h</title>
<updated>2025-11-18T22:57:45Z</updated>
<author>
<name>Hoyeon Lee</name>
<email>hoyeon.lee@suse.com</email>
</author>
<published>2025-11-15T22:55:38Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=f700b37314d9b96dce66e31d2da865b201fa6b38'/>
<id>urn:sha1:f700b37314d9b96dce66e31d2da865b201fa6b38</id>
<content type='text'>
Some BPF selftests contain identical copies of the min(), max(),
before(), and after() helpers. These repeated snippets are the same
across the tests and do not need to be defined separately.

Move these helpers into bpf_tracing_net.h so they can be shared by
TCP related BPF programs. This removes repeated code and keeps the
helpers in a single place.

Reviewed-by: Amery Hung &lt;ameryhung@gmail.com&gt;
Signed-off-by: Hoyeon Lee &lt;hoyeon.lee@suse.com&gt;
Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://patch.msgid.link/20251115225550.1086693-4-hoyeon.lee@suse.com
</content>
</entry>
<entry>
<title>selftests/bpf: Fix typos and grammar in test sources</title>
<updated>2025-08-27T22:13:08Z</updated>
<author>
<name>Shubham Sharma</name>
<email>slopixelz@gmail.com</email>
</author>
<published>2025-08-26T12:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=d3abefe897408718799ae3bd06295b89b870a38e'/>
<id>urn:sha1:d3abefe897408718799ae3bd06295b89b870a38e</id>
<content type='text'>
Fix spelling typos and grammar errors in BPF selftests source code.

Signed-off-by: Shubham Sharma &lt;slopixelz@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20250826125746.17983-1-slopixelz@gmail.com
</content>
</entry>
<entry>
<title>selftests/bpf: Rename fallback in bpf_dctcp to avoid naming conflict</title>
<updated>2024-09-05T20:13:39Z</updated>
<author>
<name>Pu Lehui</name>
<email>pulehui@huawei.com</email>
</author>
<published>2024-09-05T08:13:53Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=a48a43884cdd46dba8cc4a15160c116ffd965800'/>
<id>urn:sha1:a48a43884cdd46dba8cc4a15160c116ffd965800</id>
<content type='text'>
Recently, when compiling bpf selftests on RV64, the following
compilation failure occurred:

progs/bpf_dctcp.c:29:21: error: redefinition of 'fallback' as different kind of symbol
   29 | volatile const char fallback[TCP_CA_NAME_MAX];
      |                     ^
/workspace/tools/testing/selftests/bpf/tools/include/vmlinux.h:86812:15: note: previous definition is here
 86812 | typedef u32 (*fallback)(u32, const unsigned char *, size_t);

The reason is that the `fallback` symbol has been defined in
arch/riscv/lib/crc32.c, which will cause symbol conflicts when vmlinux.h
is included in bpf_dctcp. Let we rename `fallback` string to
`fallback_cc` in bpf_dctcp to fix this compilation failure.

Signed-off-by: Pu Lehui &lt;pulehui@huawei.com&gt;
Link: https://lore.kernel.org/r/20240905081401.1894789-3-pulehui@huaweicloud.com
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: selftests: Namespace struct_opt callbacks in bpf_dctcp</title>
<updated>2024-06-12T18:01:31Z</updated>
<author>
<name>Daniel Xu</name>
<email>dxu@dxuuu.xyz</email>
</author>
<published>2024-06-12T15:58:31Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=0ce089cbdc6a393bf9ad04964427852800503a58'/>
<id>urn:sha1:0ce089cbdc6a393bf9ad04964427852800503a58</id>
<content type='text'>
With generated kfunc prototypes, the existing callback names will
conflict. Fix by namespacing with a bpf_ prefix.

Signed-off-by: Daniel Xu &lt;dxu@dxuuu.xyz&gt;
Link: https://lore.kernel.org/r/efe7aadad8a054e5aeeba94b1d2e4502eee09d7a.1718207789.git.dxu@dxuuu.xyz
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Use bpf_tracing_net.h in bpf_dctcp</title>
<updated>2024-05-09T18:13:12Z</updated>
<author>
<name>Martin KaFai Lau</name>
<email>martin.lau@kernel.org</email>
</author>
<published>2024-05-09T17:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=6ad4e6e94697e960630594907666bc09e78a3b8a'/>
<id>urn:sha1:6ad4e6e94697e960630594907666bc09e78a3b8a</id>
<content type='text'>
This patch uses bpf_tracing_net.h (i.e. vmlinux.h) in bpf_dctcp.
This will allow to retire the bpf_tcp_helpers.h and consolidate
tcp-cc tests to vmlinux.h.

It will have a dup on min/max macros with the bpf_cubic. It could
be further refactored in the future.

Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://lore.kernel.org/r/20240509175026.3423614-8-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Rename tcp-cc private struct in bpf_cubic and bpf_dctcp</title>
<updated>2024-05-09T18:13:12Z</updated>
<author>
<name>Martin KaFai Lau</name>
<email>martin.lau@kernel.org</email>
</author>
<published>2024-05-09T17:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=b1d87ae9b0d3d91767d85183e40c96f4229a6c21'/>
<id>urn:sha1:b1d87ae9b0d3d91767d85183e40c96f4229a6c21</id>
<content type='text'>
The "struct bictcp" and "struct dctcp" are private to the bpf prog
and they are stored in the private buffer in inet_csk(sk)-&gt;icsk_ca_priv.
Hence, there is no bpf CO-RE required.

The same struct name exists in the vmlinux.h. To reuse vmlinux.h,
they need to be renamed such that the bpf prog logic will be
immuned from the kernel tcp-cc changes.

This patch adds a "bpf_" prefix to them.

Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://lore.kernel.org/r/20240509175026.3423614-6-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Sanitize the SEC and inline usages in the bpf-tcp-cc tests</title>
<updated>2024-05-09T18:13:11Z</updated>
<author>
<name>Martin KaFai Lau</name>
<email>martin.lau@kernel.org</email>
</author>
<published>2024-05-09T17:50:20Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=7d3851a31832bf8dc776a78494b788518734ad0f'/>
<id>urn:sha1:7d3851a31832bf8dc776a78494b788518734ad0f</id>
<content type='text'>
It is needed to remove the BPF_STRUCT_OPS usages from the tcp-cc tests
because it is defined in bpf_tcp_helpers.h which is going to be retired.
While at it, this patch consolidates all tcp-cc struct_ops programs to
use the SEC("struct_ops") + BPF_PROG().

It also removes the unnecessary __always_inline usages from the
tcp-cc tests.

Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://lore.kernel.org/r/20240509175026.3423614-5-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/bpf: Check -EBUSY for the recurred bpf_setsockopt(TCP_CONGESTION)</title>
<updated>2022-09-29T16:25:47Z</updated>
<author>
<name>Martin KaFai Lau</name>
<email>martin.lau@kernel.org</email>
</author>
<published>2022-09-29T07:04:07Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=3411c5b6f8d6e08d98e606dcf74fc42e2f9d731f'/>
<id>urn:sha1:3411c5b6f8d6e08d98e606dcf74fc42e2f9d731f</id>
<content type='text'>
This patch changes the bpf_dctcp test to ensure the recurred
bpf_setsockopt(TCP_CONGESTION) returns -EBUSY.

Signed-off-by: Martin KaFai Lau &lt;martin.lau@kernel.org&gt;
Link: https://lore.kernel.org/r/20220929070407.965581-6-martin.lau@linux.dev
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>bpf: selftests: Add dctcp fallback test</title>
<updated>2021-08-26T00:40:35Z</updated>
<author>
<name>Martin KaFai Lau</name>
<email>kafai@fb.com</email>
</author>
<published>2021-08-24T17:30:26Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=574ee209286755ae57449196bfa11a90d2d724e5'/>
<id>urn:sha1:574ee209286755ae57449196bfa11a90d2d724e5</id>
<content type='text'>
This patch makes the bpf_dctcp test to fallback to cubic by
using setsockopt(TCP_CONGESTION) when the tcp flow is not
ecn ready.

It also checks setsockopt() is not available to release().

The settimeo() from the network_helpers.h is used, so the local
one is removed.

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210824173026.3979130-1-kafai@fb.com
</content>
</entry>
<entry>
<title>bpf: selftests: Bpf_cubic and bpf_dctcp calling kernel functions</title>
<updated>2021-03-27T03:41:52Z</updated>
<author>
<name>Martin KaFai Lau</name>
<email>kafai@fb.com</email>
</author>
<published>2021-03-25T01:52:46Z</published>
<link rel='alternate' type='text/html' href='https://git.ilvokhin.com/linux.git/commit/?id=78e60bbbe8e8f614b6a453d8a780d9e6f77749a8'/>
<id>urn:sha1:78e60bbbe8e8f614b6a453d8a780d9e6f77749a8</id>
<content type='text'>
This patch removes the bpf implementation of tcp_slow_start()
and tcp_cong_avoid_ai().  Instead, it directly uses the kernel
implementation.

It also replaces the bpf_cubic_undo_cwnd implementation by directly
calling tcp_reno_undo_cwnd().  bpf_dctcp also directly calls
tcp_reno_cong_avoid() instead.

Signed-off-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210325015246.1551062-1-kafai@fb.com
</content>
</entry>
</feed>
