reuseport_migrate_sock(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 β€” a closeed or shutdowned socket 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 an ESTABLISHED/SYN_RECV full socket chillin' in the accept queue, or a NEW_SYN_RECV request 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 (with sk_refcnt +1, don't forget the refcount bestie, she's counting on you 😭) that should accept the child socket β€” or NULL on error. no cap, check for that NULL. πŸ’€

🌸 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