i40e_remove_sd_bp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i40e_remove_sd_bp β€” bestie, we're un-backing a page

okay so this is a page from the Kernel API Manual (section 9, the driver-internals zone, iykyk), and honestly? It's a little cleanup queen. Her whole job is removing a backing page from a segment descriptor, and she does it with main character energy. Slay.


✨ NAME ✨

i40e_remove_sd_bp β€” remove a backing page from a segment descriptor πŸŽ€


🌸 SYNOPSIS 🌸

int i40e_remove_sd_bp (struct i40e_hw *hw , struct i40e_hmc_info
*hmc_info , u32 idx );

like, that's the whole vibe. three args, one int back at you. periodt.


πŸ¦‹ ARGUMENTS πŸ¦‹

  • hw β€” pointer to our HW structure πŸ’– literally the hardware bestie herself
  • hmc_info β€” pointer to the HMC configuration information structure ✨ all the config lore lives here
  • idx β€” the page index πŸ”₯ which page we're saying bye to

πŸ’… DESCRIPTION πŸ’…

okay so here's what this function actually does, step by step, no cap:

  1. Marks the entry in sd table (for direct address mode) invalid πŸ’€ yeah she just flags it as not-valid anymore
  2. write to register PMSDCMD, PMSDDATALOW(PMSDDATALOW.PMSDVALID set to 0) and PMSDDATAHIGH to invalidate the sd page ✨ register poking time, that's how the sd page gets told it's over
  3. Decrement the ref count for the sd_entry 🫢 gotta keep those counts honest

assumptions (the fine print, read it bestie):

  1. caller can deallocate the memory used by backing storage after this function returns πŸ‘‘ so like, once she's done, the memory's yours to free β€” she ain't touching it after
fr fr, that last one matters: don't go freeing anything before this returns, or it's giving undefined behaviour energy and nobody wants that 😭

🌈 SEE ALSO 🌈

Kernel file ./drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c β€” that's where the source lives, go look, it's iconic:

i40e_align_l2obj_base(9), i40e_calculate_l2fpm_size(9), i40e_init_lan_hmc(9), i40e_remove_pd_page(9), i40e_create_lan_hmc_object(9), i40e_configure_lan_hmc(9), i40e_delete_lan_hmc_object(9), i40e_shutdown_lan_hmc(9), i40e_write_byte(9), i40e_write_word(9), i40e_write_dword(9), i40e_write_qword(9), i40e_clear_hmc_context(9), i40e_set_hmc_context(9), i40e_hmc_get_object_va(9), i40e_clear_lan_tx_queue_context(9), i40e_set_lan_tx_queue_context(9), i40e_clear_lan_rx_queue_context(9), i40e_set_lan_rx_queue_context(9)

like, the whole friend group. go read all of them, obsessed πŸ’œ


πŸŽ€ kiss kiss, that's the page! brought to you by ./drivers/net/ethernet/intel/i40e, dated October 2026, and yes she's i40e_remove_sd_bp(9) β€” write it down bestie πŸ’–βœ¨

πŸ“¦ where this page comes from