ice_copy_and_init_pkg(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– ice_copy_and_init_pkg(9) β€” Kernel API Manual πŸ’–

🌸 NAME 🌸

ice_copy_and_init_pkg β€” initialize/download a copy of the package β€” bestie, this is the copy-first-then-init glow-up πŸ’…βœ¨


✨ SYNOPSIS ✨

enum ice_ddp_state ice_copy_and_init_pkg (struct ice_hw *hw , const u8 *buf , u32 len );

πŸŽ€ ARGUMENTS πŸŽ€

  • hw β€” pointer to the hardware structure. the main-character struct πŸ’…
  • buf β€” pointer to the package buffer. the package source we're working with ✨
  • len β€” size of the package buffer. how many bytes we're dealing with πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

Okay so ice_copy_and_init_pkg does exactly what the name says: it copies the package buffer, and then calls ice_init_pkg to initialize the copied package contents. copy first, init second, slay πŸ’…

The copying is necessary if the package buffer supplied is constant, or if the memory may disappear shortly after calling this function. like, secure the data before it ghosts you 😭

If the package buffer resides in the data segment and can be modified, the caller is free to use ice_init_pkg instead of ice_copy_and_init_pkg. no copy needed, go straight to init, iykyk ✨

However, if the package buffer needs to be copied first, such as when being read from a file, the caller should use ice_copy_and_init_pkg. file-read situation says copy first, periodt πŸ“

This function will first copy the package buffer, before calling ice_init_pkg. The caller is free to immediately destroy the original package buffer, as the new copy will be managed by this function and related routines. so iconic β€” the new copy is handled for you, original can go off the grid 🫢


🌈 SEE ALSO 🌈

Kernel file: ./drivers/net/ethernet/intel/ice/ice_ddp.c go read the source, bestie πŸ“š

The whole friend group:


πŸ’– Kernel API Manual Β· October 2026 Β· source dir ./drivers/net/ethernet/intel/ice β€” bye bestie, go copy-then-init responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from