__skb_queue_after(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… __skb_queue_after β€” Kernel API Manual ✨

okay bestie, welcome to the glow-up of __skb_queue_after(9), straight out of the Kernel API Manual. she's a tiny function with a big job and honestly she ate. let's get into it πŸŽ€


🌸 NAME 🌸

__skb_queue_after β€” queue a buffer at the list head

(and yes, we're clocking that the NAME line says list head while the description down below says the middle β€” the docs said what they said, we're not touching it, moving on πŸ’€)


⭐ SYNOPSIS ⭐

void __skb_queue_after (struct sk_buff_head *list , struct sk_buff *prev
, struct sk_buff *newsk );

three args, no return value, pure vibes. πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • list β€” the list you're working with, bestie. that's the one.
  • prev β€” the buffer you want your new one placed after. your reference point, your anchor, your main character's understudy.
  • newsk β€” the buffer getting queued. the one actually sliding into the lineup. ✨

πŸ’– DESCRIPTION πŸ’–

so what does she do? she queues a buffer int the middle of a list β€” and yes, "int" is literally how the manpage spells it, we're keeping it, it's iconic, no cap. 🫢 (think: "in the middle", but make it a typo that survived decades of git history.)

the big deal here, and listen closely because this is the part that matters: this function takes no locks. none. zero. she is lockless and she trusts you completely. so you must hold the required locks before you call her. not "should", not "probably" β€” must. if you don't, that's on you, not on her. 😭

🚨 also a hard rule: a buffer cannot be placed on two lists at the same time. pick a list. one list. that's her whole thing. πŸ’…

πŸ”₯ SEE ALSO πŸ”₯

so many siblings, bestie, she's got a whole family reunion down here. starting with the kernel file ./include/linux/skbuff.h, and then:

like I said. family reunion. πŸ’€πŸ«Ά


🧚 a lil sign-off 🧚

this glowing little page comes to you from the source tree at ./include/linux, dated October 2026, and it's the __skb_queue_after(9) page and no other. go forth, hold your locks, don't put one skb on two lists, and slay πŸ’œπŸŒˆβœ¨

πŸ“¦ where this page comes from