mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
32 lines
792 B
C
32 lines
792 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
/* Copyright (c) 2022, SUSE. */
|
|
|
|
#include <linux/bpf.h>
|
|
#include "bpf_tcp_helpers.h"
|
|
|
|
char _license[] SEC("license") = "GPL";
|
|
|
|
SEC("struct_ops/mptcp_sched_first_init")
|
|
void BPF_PROG(mptcp_sched_first_init, struct mptcp_sock *msk)
|
|
{
|
|
}
|
|
|
|
SEC("struct_ops/mptcp_sched_first_release")
|
|
void BPF_PROG(mptcp_sched_first_release, struct mptcp_sock *msk)
|
|
{
|
|
}
|
|
|
|
int BPF_STRUCT_OPS(bpf_first_get_subflow, struct mptcp_sock *msk,
|
|
struct mptcp_sched_data *data)
|
|
{
|
|
mptcp_subflow_set_scheduled(bpf_mptcp_subflow_ctx_by_pos(data, 0), true);
|
|
return 0;
|
|
}
|
|
|
|
SEC(".struct_ops")
|
|
struct mptcp_sched_ops first = {
|
|
.init = (void *)mptcp_sched_first_init,
|
|
.release = (void *)mptcp_sched_first_release,
|
|
.get_subflow = (void *)bpf_first_get_subflow,
|
|
.name = "bpf_first",
|
|
};
|