UNION PKT_INSTR_HDR(9)
π union pkt_instr_hdr(9) β Kernel API Manual π
okay so bestie, welcome to the union pkt_instr_hdr page β it lives in the kernel API manual and honestly it's giving "crypto packet header energy" and we're obsessed. it's a union. it's a header. it's a whole vibe. let's get into it β¨
πΈ NAME πΈ
union pkt_instr_hdr β Packet Instruction Header π
like, that's the whole name. short, sweet, iconic. periodt.
π SYNOPSIS π
here's the literal shape of it, no cap β copy it exactly, don't you dare retype it from memory:
union pkt_instr_hdr {
__be64 bev;
u64 value;
struct {
#if defined(__BIG_ENDIAN_BITFIELD);
u64 raz_48_63 : 16;
u64 g : 1;
u64 gsz : 7;
u64 ihi : 1;
u64 ssz : 7;
u64 raz_30_31 : 2;
u64 fsz : 6;
u64 raz_16_23 : 8;
u64 tlen : 16;
#else;
u64 tlen : 16;
u64 raz_16_23 : 8;
u64 fsz : 6;
u64 raz_30_31 : 2;
u64 ssz : 7;
u64 ihi : 1;
u64 gsz : 7;
u64 g : 1;
u64 raz_48_63 : 16;
#endif;
} s;
};
so you've got three ways to look at the same bits, and that's the entire point:
__be64 bev;β the big-endian view, 64 bits of "just trust me" π«Άu64 value;β the same thing as a plainu64, for when you wanna be normal about itstruct { ... } s;β the bitfield era π and yes, the field order literally flips depending on#if defined(__BIG_ENDIAN_BITFIELD)β the fields goraz_48_63,g,gsz,ihi,ssz,raz_30_31,fsz,raz_16_23,tlenon big-endian, and exactly reversed (tlen,raz_16_23,fsz,raz_30_31,ssz,ihi,gsz,g,raz_48_63) in the#elsebranch. read the#if/#elseblocks carefully babes, they're mirrored, not copy-pasted π
β οΈ don't reorder those bitfields by hand, fr fr. the __BIG_ENDIAN_BITFIELD branches are there to keep the layout consistent across endianness β copy the block as-is and let the preprocessor do its thing.
π¦ Members π¦
okay so the original page has a Members heading and then... nothing. it literally just puts the heading there and dips π so there's no extra member-by-member breakdown to relay β the field names you see inside the struct in the synopsis above (raz_48_63, g, gsz, ihi, ssz, raz_30_31, fsz, raz_16_23, tlen) are what you've got. it's giving minimalism, it's giving "read the code babe" π
β SEE ALSO β
go read these next, they're the friend group π«Ά
- Kernel file
./drivers/crypto/cavium/nitrox/nitrox_req.h struct gphdr(9)union se_req_ctrl(9)struct se_crypto_request(9)struct crypto_keys(9)struct auth_keys(9)struct flexi_crypto_context(9)struct nitrox_aead_rctx(9)struct nitrox_rfc4106_rctx(9)union pkt_hdr(9)union slc_store_info(9)struct nps_pkt_instr(9)struct aqmq_command_s(9)struct ctx_hdr(9)struct nitrox_softreq(9)create_single_sg(9)create_multi_sg(9)
like, that's a whole squad of crypto-related kernel structs and functions and honestly? ate π₯
aaaand that's the page bestie π this one comes to you from ./drivers/crypto/cavium/nitrox, dated October 2026, and it's filed under union pkt_instr_hdr(9). go forth and byte-swap responsibly, mwah πβ¨π
π¦ 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