// SPDX-License-Identifier: GPL-2.0 /* Copyright (c) 2021 Facebook */ #include #include #include #include #include #include #include #include "bpf_tcp_helpers.h" char _license[] SEC("license") = "GPL"; const char cubic[] = "cubic"; void BPF_STRUCT_OPS(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", };