qeth_add_hw_header(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– qeth_add_hw_header(9) πŸ’–

okay so this one lives in the Kernel API Manual and it's literally the function that gives your skb a little HW header glow-up ✨ stick around, bestie, it's short but it ate.


🌸 NAME 🌸

qeth_add_hw_header β€” add a HW header to an skb. that's it, that's the whole vibe πŸ’…


✨ SYNOPSIS ✨

int qeth_add_hw_header (struct qeth_qdio_out_q *queue , struct sk_buff
*skb , struct qeth_hdr **hdr , unsigned int hdr_len , unsigned int
proto_len , unsigned int *elements );

πŸŽ€ ARGUMENTS πŸŽ€

  • queue β€” the TX queue that the skb is gonna be placed on. like, which line is it queuing in 🫢
  • skb β€” the skb that the HW header should be added to. this is the main character fr.
  • hdr β€” a double pointer to a qeth_hdr. and listen: when it returns with >= 0, it contains a valid pointer to a qeth_hdr. so on the way out it's actually pointing at something real πŸ‘‘
  • hdr_len β€” length of the HW header. just the header, no extras.
  • proto_len β€” length of protocol headers that need to be in the same page as the HW header. they gotta be page-mates, no cap 🧚
  • elements β€” returns the required number of buffer elements for this skb. it's an out-param, so it's giving information on the way out energy πŸ’«

πŸ’œ DESCRIPTION πŸ’œ

Returns the pushed length. that's the happy path, slay πŸ’…

But if the header can't be pushed on (eg. because it would cross a page boundary β€” rude of it honestly), then it is allocated from the cache instead and 0 is returned. not a fail, just a different route, iykyk.

The number of needed buffer elements is returned in elements.

And an error to create the hdr is indicated by returning with < 0. so if you see a negative number, that's your ✨ signal ✨ that the header did not happen.

real talk: >= 0 means hdr has a valid pointer, < 0 means error. don't mix those up, bestie 😭

πŸ¦‹ SEE ALSO πŸ¦‹

Kernel file ./drivers/s390/net/qeth_core_main.c πŸ’– and also these iconic functions:


that's the whole page, babe πŸŽ€ this one came from ./drivers/s390/net, dated October 2026, and it's filed under qeth_add_hw_header(9) in the Kernel API Manual β€” go read the source, it's giving main character energy 🌈⭐

πŸ“¦ where this page comes from