brintos

brintos / linux-shallow public Read only

0
0
Text · 520 B · c91763f Raw
23 lines · c
1// SPDX-License-Identifier: GPL-2.02/* Copyright (c) 2021 Facebook */3 4#include "bpf_tracing_net.h"5#include <bpf/bpf_helpers.h>6#include <bpf/bpf_tracing.h>7 8char _license[] SEC("license") = "GPL";9const char cubic[] = "cubic";10 11SEC("struct_ops")12void BPF_PROG(dctcp_nouse_release, struct sock *sk)13{14	bpf_setsockopt(sk, SOL_TCP, TCP_CONGESTION,15		       (void *)cubic, sizeof(cubic));16}17 18SEC(".struct_ops")19struct tcp_congestion_ops dctcp_rel = {20	.release	= (void *)dctcp_nouse_release,21	.name		= "bpf_dctcp_rel",22};23