1 // SPDX-License-Identifier: GPL-2.0 2 /* Copyright (c) 2021 Facebook */ 3 4 #include "bpf_tracing_net.h" 5 #include <bpf/bpf_helpers.h> 6 #include <bpf/bpf_tracing.h> 7 8 char _license[] SEC("license") = "GPL"; 9 const char cubic[] = "cubic"; 10 11 SEC("struct_ops") 12 void BPF_PROG(dctcp_nouse_release, struct sock *sk) 13 { 14 bpf_setsockopt(sk, SOL_TCP, TCP_CONGESTION, 15 (void *)cubic, sizeof(cubic)); 16 } 17 18 SEC(".struct_ops") 19 struct tcp_congestion_ops dctcp_rel = { 20 .release = (void *)dctcp_nouse_release, 21 .name = "bpf_dctcp_rel", 22 }; 23
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.