__devlink_s...id_increment(9)
π
__devlink_snapshot_id_increment β like, the whole vibe
okay so bestie, welcome to the Kernel API Manual β¨ this one's from the ./net/devlink corner of the kernel and she's a lil helper function with main character energy π
β¨ NAME β¨
__devlink_snapshot_id_increment β increments the number of snapshots that are using a given id π
yes literally that's it, that's the whole job, and she does it flawlessly π
πΈ SYNOPSIS πΈ
int __devlink_snapshot_id_increment (struct devlink *devlink , u32 id );
π¦ ARGUMENTS π¦
devlinkβ the devlink instance π«Ά (you know, the one doing the snapshotting)idβ the snapshot id π
π DESCRIPTION π
okay so here's the tea β β this function keeps track of when a new snapshot starts using an id. The way it works is honestly iconic: it loads the count for the given id out of the snapshot xarray, increments it, and stores it right back. Load β bump β store. periodt πβ¨
It gets called when a new snapshot is created with the given id. So every time somebody rolls up with that id, the count goes up by one π₯
β οΈ bestie listen to me β theidmust have been previously allocated bydevlink_region_snapshot_id_get. No cap. Don't be out here passing random ids, that's not the vibe π
It returns 0 on success, or an error on failure. Simple as that, slay π
π SEE ALSO π
Kernel file ./net/devlink/region.c β go read the source, it's giving transparency β¨
__devlink_snapshot_id_decrement(9)__devlink_snapshot_id_insert(9)__devlink_region_snapshot_id_get(9)__devlink_region_snapshot_create(9)devl_region_create(9)devlink_region_create(9)devlink_port_region_create(9)devl_region_destroy(9)devlink_region_destroy(9)devlink_region_snapshot_id_get(9)devlink_region_snapshot_id_put(9)devlink_region_snapshot_create(9)
and that's the page, bestie π«Ά straight from ./net/devlink, dated October 2026, living in the Kernel API Manual β go forth and increment responsibly π§π π
π¦ 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