The BPF core now allows the registration of read-only ops tables, make use of it. Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx> --- net/ipv4/bpf_tcp_ca.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net/ipv4/bpf_tcp_ca.c b/net/ipv4/bpf_tcp_ca.c index ce5012f6821d543541b13275aff87bef0abf4677..9b95dcacf3467de69e366e9196c36c4c92f78d75 100644 --- a/net/ipv4/bpf_tcp_ca.c +++ b/net/ipv4/bpf_tcp_ca.c @@ -11,7 +11,7 @@ #include <net/tcp.h> #include <net/bpf_sk_storage.h> -static struct bpf_struct_ops bpf_tcp_congestion_ops; +static const struct bpf_struct_ops bpf_tcp_congestion_ops; static const struct btf_type *tcp_sock_type; static u32 tcp_sock_id, sock_id; @@ -307,7 +307,7 @@ static void __bpf_tcp_ca_release(struct sock *sk) { } -static struct tcp_congestion_ops __bpf_ops_tcp_congestion_ops = { +static const struct tcp_congestion_ops __bpf_ops_tcp_congestion_ops = { .ssthresh = bpf_tcp_ca_ssthresh, .cong_avoid = bpf_tcp_ca_cong_avoid, .set_state = bpf_tcp_ca_set_state, @@ -323,7 +323,7 @@ static struct tcp_congestion_ops __bpf_ops_tcp_congestion_ops = { .release = __bpf_tcp_ca_release, }; -static struct bpf_struct_ops bpf_tcp_congestion_ops = { +static const struct bpf_struct_ops bpf_tcp_congestion_ops = { .verifier_ops = &bpf_tcp_ca_verifier_ops, .reg = bpf_tcp_ca_reg, .unreg = bpf_tcp_ca_unreg, -- 2.47.1