STRUCT PDS_LM_DIRTY_ENABLE_CMD(9)
π 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'sPDS_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_regionshas 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/pdsand 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
- 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