reuseport_migrate_sock(9)
π NAME π
reuseport_migrate_sock β literally picks a socket out of an SO_REUSEPORT group, bestie. That's the whole vibe. π
β¨ SYNOPSIS β¨
struct sock * reuseport_migrate_sock (struct sock *sk , struct sock
*migrating_sk , struct sk_buff *skb );
okay so it's giving "three args, one socket pointer back" and honestly? iconic. π¦
π ARGUMENTS π
skβ acloseedorshutdownedsocket in the group. that's it, that's her job. she's done, she's clocked out, she's just here so the group knows what's up. πmigrating_skβ ngl this one has range β¨. it's either anESTABLISHED/SYN_RECVfull socket chillin' in the accept queue, or aNEW_SYN_RECVrequest socket mid-3WHS. two moods, one pointer. main character energy fr fr. π«Άskbβ the skb you run through the BPF filter. and here's the tea π: it returns a socket (withsk_refcnt +1, don't forget the refcount bestie, she's counting on you π) that should accept the child socket β orNULLon error. no cap, check for thatNULL. π
πΈ SEE ALSO πΈ
Kernel file ./net/core/sock_reuseport.c plus the girlies reuseport_add_sock(9) and reuseport_select_sock(9) β go read them, iykyk. πβ¨
lowkey reminder: sk_refcnt +1 means somebody has to drop that reference eventually. not me forgetting. not you either. π
and that's the whole page, babe π β brought to you by ./net/core, October 2026, and the manual page reuseport_migrate_sock(9). slay, go migrate some sockets responsibly πβ
π¦ 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