ice_devlink_nvm_read(9)
π ice_devlink_nvm_read(9) π
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
- 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