STRUCT BPF_KSOCK(9)
πΈ NAME πΈ
okay so this page is struct bpf_ksock(9) from the Kernel API Manual, and itβs literally a refcounted BPF kernel socket context π
β¨. thatβs the whole vibe bestie: a BPF kernel socket context that is refcounted. slay.
π¦ SYNOPSIS π¦
struct bpf_ksock {
struct socket *sock;
refcount_t usage;
struct rcu_work rwork;
};
π Members π
sockβ the underlying kernel socket. the main character socket, no cap π«Άusageβ reference counter. it keeps track of refs, periodt πrworkβ RCU work for deferred cleanup (sock_releasemay sleep). so yes, cleanup is deferred, andsock_releasemay sleep π΄
π SEE ALSO π
- Kernel file
./net/core/bpf_ksock.c bpf_ksock_create(9)bpf_ksock_connect(9)bpf_ksock_acquire(9)bpf_ksock_release(9)bpf_ksock_send(9)
xoxo from ./net/core β thatβs the source/version bestie β dated October 2026 ππ. bye bestie, go read those other pages! π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms