All of lore.kernel.org
 help / color / mirror / Atom feed
* bpf: tcp_cubic/bbr/dctcp: congestion control not registered when BTF kfunc registration fails
@ 2026-12-04  6:36 Fred Li
  0 siblings, 0 replies; only message in thread
From: Fred Li @ 2026-12-04  6:36 UTC (permalink / raw)
  To: netdev, bpf
  Cc: Fred Li, Eric Dumazet, Jakub Kicinski, Martin KaFai Lau,
	Alexei Starovoitov, Daniel Borkmann

On a 6.6 kernel (x86_64), the built-in CUBIC, BBR and DCTCP congestion
control algorithms are silently not registered when
register_btf_kfunc_id_set() fails, leaving only reno available, even with
CONFIG_TCP_CONG_CUBIC=y and CONFIG_DEFAULT_TCP_CONG="cubic".

The registration path in cubictcp_register() is:


ret = register_btf_kfunc_id_set(BPF_PROG_TYPE_STRUCT_OPS,
				&tcp_cubic_kfunc_set);
if (ret < 0)
	return ret;
return tcp_register_congestion_control(&cubictcp);

In practice, the failure was register_btf_kfunc_id_set() returning
-EINVAL because the static __bpf_kfunc functions were missing from the
vmlinux BTF generated by pahole v1.17.

Before b202d8442222 ("bpf: Remove check_kfunc_call callback and old kfunc
BTF ID API", v5.17), the congestion control was registered first and the
kfunc set afterwards; that commit reversed the order and made a kfunc
registration failure fatal to the congestion control registration.

Should register_btf_kfunc_id_set() failure really be fatal here? 
Would it make sense to just warn and continue, so the congestion
control still registers? Any guidance would be appreciated.

Fred Li

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-04  6:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-04  6:36 bpf: tcp_cubic/bbr/dctcp: congestion control not registered when BTF kfunc registration fails Fred Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.