ice_devlink_nvm_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

So this is from the Kernel API Manual, bestie, and it's all about reading a chunk of the NVM flash contents. Let me break it down for you so you can slay your understanding of this function. 🫢


✨ NAME ✨

ice_devlink_nvm_read β€” read a portion of NVM flash contents πŸ’–


🌸 SYNOPSIS 🌸

int ice_devlink_nvm_read (struct devlink *devlink , const struct
       devlink_region_ops *ops , struct netlink_ext_ack *extack , u64 offset ,
       u32 size , u8 *data );

πŸŽ€ ARGUMENTS πŸŽ€

  • devlink β€” the devlink instance, like the main character of this whole operation πŸ‘‘
  • ops β€” the devlink region to snapshot, i.e., which region we're peeking into πŸ¦‹
  • extack β€” the extended ACK response structure, for when we need to send back some extra info πŸ“¨
  • offset β€” the offset to start at, like where in the flash we're dropping our anchor βš“
  • size β€” the amount to read, how many bytes we're grabbing 🧚
  • data β€” the data buffer to read into, the destination for all that sweet NVM goodness πŸ“

πŸ”₯ DESCRIPTION πŸ”₯

So basically, this function gets called in response to DEVLINK_CMD_REGION_READ, and its whole vibe is directly reading a section of the NVM contents. No middleman, just straight-up reading. πŸ’…

It reads from either the nvm-flash or shadow-ram region contents. Lowkey iconic how it handles both, ngl. 🌈

It returns zero on success and updates the data pointer, which is the happy path and we love that for us. Returns a non-zero error code on failure, which is the sad path but at least it's informative. 😭

This one's straightforward, bestieβ€”no hidden tricks, just a clean read or a clean error. Periodt. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./drivers/net/ethernet/intel/ice/devlink/devlink.c

And here's the whole squad of related functions, all in (9) because we're in the kernel manual, iykyk:

ice_devlink_info_get(9), ice_devlink_reload_empr_start(9), ice_devlink_reinit_down(9), ice_devlink_reload_down(9), ice_devlink_reload_empr_finish(9), ice_get_tx_topo_user_sel(9), ice_update_tx_topo_user_sel(9), ice_devlink_tx_sched_layers_get(9), ice_devlink_tx_sched_layers_set(9), ice_devlink_tx_sched_layers_validate(9), ice_tear_down_devlink_rate_tree(9), ice_enable_custom_tx(9), ice_traverse_tx_tree(9), ice_devlink_rate_init_tx_topology(9), ice_devlink_rate_clear_tx_topology(9), ice_set_object_tx_share(9), ice_set_object_tx_max(9), ice_set_object_tx_priority(9), ice_set_object_tx_weight(9), ice_get_pi_from_dev_rate(9), ice_devlink_reinit_up(9), ice_devlink_reload_up(9), ice_devlink_local_fwd_mode_to_str(9), ice_devlink_local_fwd_str_to_mode(9), ice_devlink_local_fwd_get(9), ice_devlink_local_fwd_set(9), ice_devlink_local_fwd_validate(9), ice_allocate_pf(9), ice_allocate_sf(9), ice_devlink_register(9), ice_devlink_unregister(9), ice_devlink_nvm_snapshot(9), ice_devlink_devcaps_snapshot(9), ice_devlink_init_regions(9), ice_devlink_destroy_regions(9)


That's the whole page, bestie. This is from ./drivers/net/ethernet/intel/i... and it's dated October 2026. Stay slay, and remember: reading NVM is a vibe. πŸ’œβœ¨πŸŽ€

πŸ“¦ where this page comes from