STRUCT DIM_SAMPLE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct dim_sample(9) πŸ’–

okay bestie, welcome to the manual page for struct dim_sample β€” literally the structure for DIM sample data. it's the little messenger that carries info back and forth between DIM and its consumer, and honestly? it's giving middle-child energy but it's iconic. 🫢

this is from the Kernel API Manual, so yeah, we're in kernel land. no cap.


✨ SYNOPSIS ✨

struct dim_sample {
    ktime_t time;
    u32 pkt_ctr;
    u32 byte_ctr;
    u16 event_ctr;
    u32 comp_ctr;
 };

look at her. five fields, all business, zero fluff. πŸ’…


πŸŽ€ Members πŸŽ€

so here's the breakdown of every single member, and yes we're doing all of them:

  • time β€” the sample timestamp. when it happened, periodt.
  • pkt_ctr β€” the number of packets. counting them like a girlboss.
  • byte_ctr β€” the number of bytes. more bytes, more vibes.
  • event_ctr β€” the number of events. yes, we're tracking those too.
  • comp_ctr β€” the current completion counter. she's currently completing, your honor.

🌈 SEE ALSO 🌈

everything lives in the kernel file ./include/linux/dim.h, and the whole friend group is here β€” no one gets left out:

struct dim_cq_moder(9), struct dim_irq_moder(9), struct dim_stats(9), struct dim(9), enum dim_cq_period_mode(9), enum dim_state(9), enum dim_tune_state(9), enum dim_stats_state(9), enum dim_step_result(9), net_dim_init_irq_moder(9), net_dim_free_irq_moder(9), net_dim_setting(9), net_dim_work_cancel(9), net_dim_get_rx_irq_moder(9), net_dim_get_tx_irq_moder(9), net_dim_set_rx_mode(9), net_dim_set_tx_mode(9), dim_on_top(9), dim_turn(9), dim_park_on_top(9), dim_park_tired(9), dim_calc_stats(9), dim_update_sample(9), dim_update_sample_with_comps(9), net_dim_get_rx_moderation(9), net_dim_get_def_rx_moderation(9), net_dim_get_tx_moderation(9), net_dim_get_def_tx_moderation(9), net_dim(9), and rdma_dim(9).

like, the whole extended universe. go read them, iykyk πŸ’œ


and that's a wrap, bestie πŸ¦‹ this one came out of ./include/linux and it's dated October 2026 β€” so screenshot it, cite it, love it. mwah πŸ’–βœ¨

πŸ“¦ where this page comes from