UNION NPS_PKT_IN_DONE_CNTS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 union nps_pkt_in_done_cnts(9) 🌸

okay so this is a page from the Kernel API Manual β€” yes, the Kernel API Manual, we're in the big leagues bestie πŸ’… β€” and it's all about union nps_pkt_in_done_cnts, aka the Input instruction ring counts registers. (the heading already told you the name, so like… now you know, and knowing is half the battle ✨)


πŸ¦‹ NAME πŸ¦‹

union nps_pkt_in_done_cnts β€” Input instruction ring counts registers. that's it, that's the whole name section, she's brief and she's iconic πŸŽ€


✨ SYNOPSIS ✨

union nps_pkt_in_done_cnts {
    u64 value;
    struct {
  #if defined(__BIG_ENDIAN_BITFIELD);
      u64 slc_int : 1;
      u64 uns_int : 1;
      u64 in_int : 1;
      u64 mbox_int : 1;
      u64 resend : 1;
      u64 raz : 27;
      u64 cnt : 32;
  #else;
      u64 cnt : 32;
      u64 raz : 27;
      u64 resend : 1;
      u64 mbox_int : 1;
      u64 in_int : 1;
      u64 uns_int : 1;
      u64 slc_int : 1;
  #endif;
    } s;
 };

so real talk: you got u64 value; doing the whole-union thing, and then a struct s that's literally the same bits read two different ways depending on __BIG_ENDIAN_BITFIELD πŸ‘€ β€” big endian goes top-to-bottom, little endian (the #else; branch) flips the entire order, cnt first and slc_int last. it's giving mirrored queen energy πŸͺžπŸ’–


🌈 DESCRIPTION 🌈

okay so lowkey this page is a union in the C sense β€” one u64 named value, and a bitfield struct named s layered right on top of it, so you can grab the whole 64-bit word or poke at individual fields. and because bitfields are a whole thing, the layout depends on __BIG_ENDIAN_BITFIELD:

  • big endian branch (#if defined(__BIG_ENDIAN_BITFIELD);) β€” order is slc_int, uns_int, in_int, mbox_int, resend, raz, cnt
  • little endian branch (#else;) β€” order is cnt, raz, resend, mbox_int, in_int, uns_int, slc_int

either way the widths add up to a whole u64: five 1-bit flags, a 27-bit raz, and a 32-bit cnt β€” 1+1+1+1+1+27+32 = 64, the math ate and left no crumbs πŸ”₯

heads up bestie: you do not get to pick the layout, the preprocessor picks it for you based on __BIG_ENDIAN_BITFIELD. so like… know which one you're compiling for, mkay? πŸ’€

πŸŽ€ Members πŸŽ€

ngl the source page leaves this section literally empty β€” not a single line under it 😭 so I'm not gonna invent stuff that isn't there. the members are exactly what the synopsis bitfields say and nothing more:

  • value β€” u64, the whole thing in one go πŸ‘‘
  • s β€” the struct with the bitfields, laid out per __BIG_ENDIAN_BITFIELD
    • slc_int β€” : 1
    • uns_int β€” : 1
    • in_int β€” : 1
    • mbox_int β€” : 1
    • resend β€” : 1
    • raz β€” : 27
    • cnt β€” : 32

(and remember, in the #else; branch that list runs in reverse β€” cnt, raz, resend, mbox_int, in_int, uns_int, slc_int πŸ¦‹)


πŸ’œ SEE ALSO πŸ’œ

girl, the cross-reference list on this one is long, and we respect her for it. the kernel file lives at ./drivers/crypto/cavium/nitrox/nitrox_csr.h, and here's the entire friend group, no cap, all (9):

  • union ucd_core_eid_ucode_block_num(9)
  • union aqm_grp_execmsk_lo(9)
  • union aqm_grp_execmsk_hi(9)
  • union aqmq_drbl(9)
  • union aqmq_qsz(9)
  • union aqmq_cmp_thr(9)
  • union aqmq_cmp_cnt(9)
  • union aqmq_en(9)
  • union aqmq_activity_stat(9)
  • union emu_fuse_map(9)
  • union emu_se_enable(9)
  • union emu_ae_enable(9)
  • union emu_wd_int_ena_w1s(9)
  • union emu_ge_int_ena_w1s(9)
  • union nps_pkt_slc_ctl(9)
  • union nps_pkt_slc_cnts(9)
  • union nps_pkt_slc_int_levels(9)
  • union nps_pkt_in_instr_ctl(9)
  • union nps_pkt_in_instr_rsize(9)
  • union nps_pkt_in_instr_baoff_dbell(9)
  • union nps_core_int_ena_w1s(9)
  • union nps_core_gbl_vfcfg(9)
  • union nps_core_int_active(9)
  • union efl_core_int(9)
  • union efl_core_int_ena_w1s(9)
  • union efl_rnm_ctl_status(9)
  • union bmi_ctl(9)
  • union bmi_int_ena_w1s(9)
  • union bmo_ctl2(9)
  • union pom_int_ena_w1s(9)
  • union lbc_inval_ctl(9)
  • union lbc_int_ena_w1s(9)
  • union lbc_int(9)
  • union lbc_inval_status(9)
  • union rst_boot(9)
  • union fus_dat1(9)

like I said. long. but she ate πŸ’…


and that's the page!! mwah 🫢 ok bye, and remember the sign-off, because the original footer said this gem lives under ./drivers/crypto/cavium/nitrox, dated October 2026, on union nps_pkt_in_done_cnts(9) β€” periodt, no cap, go read your kernel headers bestie πŸ“βœ¨πŸ§š

πŸ“¦ where this page comes from