STRUCT PDS_LM_DIRTY_ENABLE_CMD(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct pds_lm_dirty_enable_cmd β€” DIRTY_ENABLE command πŸ’…

okay bestie, so this is a page from the Kernel API Manual, section 9 β€” yes, the big-girl kernel API section, we love her πŸ’–. Buckle up, because this struct is the little packet that tells a device "hey, start tracking dirty stuff for me" ✨.


🌸 NAME 🌸

struct pds_lm_dirty_enable_cmd β€” the DIRTY_ENABLE command, periodt πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

Like, here's the whole vibe of her, laid out:

struct pds_lm_dirty_enable_cmd {
    u8 opcode;
    u8 rsvd;
    __le16 vf_id;
    u8 bmp_type;
    u8 num_regions;
    u8 rsvd2[2];
    __le64 regions_dma;
 };

she's small, she's tidy, she has two whole padding fields and honestly? iconic 🫢


πŸ¦‹ Members πŸ¦‹

okay so let's meet the cast, one field at a time πŸ‘‘

  • opcode β€” the opcode, and it's PDS_LM_CMD_DIRTY_ENABLE (that's her whole personality fr).
  • rsvd β€” word boundary padding. she's just here to keep the alignment cute, no thoughts head empty πŸ’€.
  • vf_id β€” the VF id. which VF are we talking about? this one, bestie.
  • bmp_type β€” the type of dirty bitmap representation. like, what flavour of bitmap are we doing 🌈.
  • num_regions β€” number of entries in the region info buffer. count 'em.
  • rsvd2 β€” more word boundary padding (u8 rsvd2[2], two whole bytes of nothing, we stan a consistent aesthetic ✨).
  • regions_dma β€” the DMA address of the region info buffer. that's where the actual region tea lives β˜•.

πŸ’œ Description πŸ’œ

so here's the rules, and you gotta follow them, no cap:

  • num_regions has to be nonzero, and it has to be less than or equal to the maximum number of regions the device supports. zero regions is giving nothing, and too many regions is giving chaos 😭.
  • the memory regions should not overlap. like, stay in your lane, regions 🚧.

The information should be initialized by the driver. Then β€” plot twist β€” the device may modify the information on successful completion, for example by size-aligning the number of pages in a region πŸ‘€.

And here's the part you gotta internalize: the modified number of pages will be greater than or equal to the page count you gave in the enable command, and it'll be aligned at least as coarsely as the given value. Example time, because examples ate and left no crumbs πŸ“: the count might get aligned to a multiple of 64, but if the value is already a multiple of 128 or higher, it will not change. slay, no unnecessary touching πŸ™ˆ.

⚠️ so if the driver needs its own minimum alignment on the number of pages, the driver should account for that already in the region info of this command. do not show up expecting the device to fix it for you, bestie. the device is not your therapist πŸ’€.

Also, this command uses struct pds_lm_dirty_status_comp for its completion. that's her other half πŸ’ž.


⭐ SEE ALSO ⭐

go read these too, iykwup (iykyk but with more pages) πŸ“š β€” first up, the kernel file ./include/linux/pds/pds_adminq.h, and then this whole friend group:

struct pds_core_notifyq_event(9), struct pds_core_link_change_event(9), struct pds_core_reset_event(9), struct pds_core_client_event(9), struct pds_core_notifyq_cmd(9), struct pds_core_client_reg_cmd(9), struct pds_core_client_reg_comp(9), struct pds_core_client_unreg_cmd(9), struct pds_core_client_request_cmd(9), enum pds_core_logical_qtype(9), union pds_core_lif_config(9), struct pds_core_lif_status(9), struct pds_core_lif_info(9), struct pds_core_lif_identity(9), struct pds_core_lif_identify_cmd(9), struct pds_core_lif_identify_comp(9), struct pds_core_lif_init_cmd(9), struct pds_core_lif_init_comp(9), struct pds_core_lif_reset_cmd(9), enum pds_core_lif_attr(9), struct pds_core_lif_setattr_cmd(9), struct pds_core_lif_setattr_comp(9), struct pds_core_lif_getattr_cmd(9), struct pds_core_lif_getattr_comp(9), struct pds_core_q_identity(9), struct pds_core_q_identify_cmd(9), struct pds_core_q_identify_comp(9), struct pds_core_q_init_cmd(9), struct pds_core_q_init_comp(9), struct pds_vdpa_cmd(9), struct pds_vdpa_init_cmd(9), struct pds_vdpa_ident(9), struct pds_vdpa_ident_cmd(9), struct pds_vdpa_status_cmd(9), enum pds_vdpa_attr(9), struct pds_vdpa_setattr_cmd(9), struct pds_vdpa_vq_init_cmd(9), struct pds_vdpa_vq_init_comp(9), struct pds_vdpa_vq_reset_cmd(9), struct pds_vdpa_vq_reset_comp(9), struct pds_vdpa_set_features_cmd(9), struct pds_lm_cmd(9), struct pds_lm_state_size_cmd(9), struct pds_lm_state_size_comp(9), struct pds_lm_suspend_cmd(9), struct pds_lm_suspend_status_cmd(9), struct pds_lm_resume_cmd(9), struct pds_lm_sg_elem(9), struct pds_lm_save_cmd(9), struct pds_lm_restore_cmd(9), union pds_lm_dev_state(9), struct pds_lm_dirty_region_info(9), struct pds_lm_dirty_status_cmd(9), enum pds_lm_dirty_bmp_type(9), struct pds_lm_dirty_status_comp(9), struct pds_lm_dirty_disable_cmd(9), struct pds_lm_dirty_seq_ack_cmd(9), struct pds_lm_host_vf_status_cmd(9), struct pds_fwctl_cmd(9), struct pds_fwctl_comp(9), struct pds_fwctl_ident_cmd(9), struct pds_fwctl_ident(9), struct pds_fwctl_query_cmd(9), struct pds_fwctl_query_comp(9), struct pds_fwctl_query_data_endpoint(9), struct pds_fwctl_query_data_operation(9), struct pds_fwctl_query_data(9), struct pds_fwctl_rpc_cmd(9), struct pds_sg_elem(9), struct pds_fwctl_rpc_comp(9)

that's the whole group chat, bestie. read the room 🧚


πŸ’– cute little sign-off: this page lives at ./include/linux/pds and it was stamped October 2026 β€” and the page title header situation? struct pds_l...y_enable_cmd(9), because even manpage headers get truncated and honestly same πŸ’…βœ¨
πŸ“¦ where this page comes from