sk_for_each_...y_offset_rcu(9)
β¨ sk_for_each_...y_offset_rcu(9) β¨
okay bestie, welcome to the Kernel API Manual π this one's a lil macro from the networking/socket corner of the kernel and honestly it's giving "niche but essential" energy. buckle up π
πΈ NAME πΈ
sk_for_each_entry_offset_rcu β iterate over a list at a given struct offset π¦
like, you're walking a list, but the list node lives at some offset inside your struct. lowkey iconic.
β SYNOPSIS β
sk_for_each_entry_offset_rcu (tpos , pos , head , offset );
that's the whole vibe, no cap. four args, in that exact order π
π§ ARGUMENTS π§
tposβ the type * to use as a loop cursor. this is your main character pointer, the one you actually look at in the loop body πposβ thestruct hlist_nodeto use as a loop cursor. your humble little list-walker, doing the actual traversing πheadβ the head for your list. the starting point, the origin story, theheadof the whole situation πoffsetβ offset ofhlist_nodewithin the struct. this is the secret sauce fr fr β it tells the macro where inside your struct the node be hiding π₯
π¦ SEE ALSO π¦
so many friends in the Kernel file ./include/net/sock.h β go say hi to all of them, they're literally all linked here π
struct sock_common(9)struct sock(9)sk_user_data_is_nocopy(9)__locked_read_sk_user_data_with_flags(9)__rcu_dereference_sk_user_data_with_flags(9)SOCK_CONNECT_BIND(9)lock_sock_fast(9)unlock_sock_fast(9)sk_wmem_alloc_get(9)sk_rmem_alloc_get(9)sk_has_allocations(9)skwq_has_sleeper(9)sock_poll_wait(9)sk_page_frag(9)_sock_tx_timestamp(9)sk_eat_skb(9)
π«Ά that's the whole page bestie β no hidden options, no environment variables, no exit statuses to worry about. it's just a macro, its args, and its extended friend group.
sign-off time β¨π this lil beauty lives over in ./include/net, and the manual page itself is dated October 2026 β so yeah, it's from the future, we stay ahead of the curve π
mwah, go iterate something gorgeous π
π¦ 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