1
0
Fork 0
linux/tools/testing/selftests/bpf/progs/bpf_dctcp_release.c
Daniel Baumann 79d69e5050
Adding upstream version 6.12.33.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-22 12:14:28 +02:00

22 lines
520 B
C

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2021 Facebook */
#include "bpf_tracing_net.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
char _license[] SEC("license") = "GPL";
const char cubic[] = "cubic";
SEC("struct_ops")
void BPF_PROG(dctcp_nouse_release, struct sock *sk)
{
bpf_setsockopt(sk, SOL_TCP, TCP_CONGESTION,
(void *)cubic, sizeof(cubic));
}
SEC(".struct_ops")
struct tcp_congestion_ops dctcp_rel = {
.release = (void *)dctcp_nouse_release,
.name = "bpf_dctcp_rel",
};