kunit_zalloc_skb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– kunit_zalloc_skb(9) πŸ’–

okay bestie, welcome to the Kernel API Manual page for kunit_zalloc_skb(9) β€” this is the one that hands you a resource-managed skb, and it's lowkey giving test-helper main character energy 🧚✨

🌸 NAME 🌸

kunit_zalloc_skb β€” Allocate and initialize a resource managed skb.

✨ SYNOPSIS ✨

struct sk_buff * kunit_zalloc_skb (struct kunit *test , int len , gfp_t
       gfp );

πŸŽ€ ARGUMENTS πŸŽ€

  • test β€” The test case to which the skb belongs
  • len β€” size to allocate
  • gfp β€” allocation flags

πŸ’… DESCRIPTION πŸ’…

Okay so boom: allocate a new struct sk_buff with gfp flags, zero fill the given length, and add it as a resource to the kunit test for automatic cleanup. That's the whole vibe, no cap 🫢

⭐ RETURN ⭐

newly allocated SKB, or NULL on error. So if you get NULL, that's the error case, bestie 😭

πŸ‘‘ SEE ALSO πŸ‘‘


made with πŸ’– from the ./include/kunit source/version corner, dated October 2026, and this was kunit_zalloc_skb(9) β€” periodt 🌈

πŸ“¦ where this page comes from