On 3/2/23 5:21 PM, Kui-Feng Lee wrote:
diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index db8b4b488c31..981501871609 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -75,14 +75,8 @@ struct tcp_congestion_ops *tcp_ca_find_key(u32 key)
return NULL;
}
-/*
- * Attach new congestion control algorithm to the list
- * of available options.
- */
-int tcp_register_congestion_control(struct tcp_congestion_ops *ca)
+static int tcp_ca_validate(struct tcp_congestion_ops *ca)
It is useful to call tcp_ca_validate() before update_elem transiting a
struct_ops to BPF_STRUCT_OPS_STATE_READY. Otherwise, the user space will end up
having a struct_ops that can never be used to create a link.