UNION NPS_PKT_IN_DONE_CNTS(9)
πΈ 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 isslc_int,uns_int,in_int,mbox_int,resend,raz,cnt - little endian branch (
#else;) β order iscnt,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β thestructwith the bitfields, laid out per__BIG_ENDIAN_BITFIELDslc_intβ: 1uns_intβ: 1in_intβ: 1mbox_intβ: 1resendβ: 1razβ: 27cntβ: 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
- 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