UNION PKT_INSTR_HDR(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 plain u64, for when you wanna be normal about it
  • struct { ... } s; β€” the bitfield era 😭 and yes, the field order literally flips depending on #if defined(__BIG_ENDIAN_BITFIELD) β€” the fields go raz_48_63, g, gsz, ihi, ssz, raz_30_31, fsz, raz_16_23, tlen on big-endian, and exactly reversed (tlen, raz_16_23, fsz, raz_30_31, ssz, ihi, gsz, g, raz_48_63) in the #else branch. read the #if/#else blocks 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