DEVLINK-REGION(8)

๐Ÿ“ฆ
version 7.3.0 ยท 2 versions
  • 7.3.0 ยท alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 5.15.0 ยท ubuntu jammy
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

โœจ NAME โœจ

okay bestie, this is devlink-region ๐Ÿฆ‹, the devlink address region access tool. it lets you poke at device address regions, snapshot them, and read or dump the data ๐Ÿ”ฅ

๐ŸŽ€ SYNOPSIS ๐ŸŽ€

devlink [ OPTIONS ] region  { COMMAND | help }

OPTIONS := { -V[ersion] | -n[no-nice-names] }

devlink region show [ DEV/REGION ]

devlink region new DEV/REGION [ snapshot SNAPSHOT_ID ]

devlink region del DEV/REGION snapshot SNAPSHOT_ID

devlink region dump DEV/REGION snapshot SNAPSHOT_ID

devlink region read DEV/REGION [ snapshot SNAPSHOT_ID ] address ADDRESS
        length LENGTH

devlink region help

๐ŸŒธ DESCRIPTION ๐ŸŒธ

the whole vibe here is that each subcommand does its own thing, so let's go one by one ๐Ÿ’…

this one is giving list everything. it shows all the supported address regions, their names, snapshots, and sizes โœจ

  • DEV/REGION โ€” tells devlink which device and address region you want to look at ๐Ÿงš

this one makes a snapshot of an address region, identified by its name and snapshot ID ๐Ÿ“ธ

  • DEV/REGION โ€” the device and address region you want to snapshot ๐ŸŒˆ
  • snapshot SNAPSHOT_ID โ€” totally optional! if you pass an ID, that's the one that gets assigned. if you don't, devlink picks a unique ID for you ๐Ÿซถ

bye bye snapshot ๐Ÿ‘‹ this deletes a snapshot, picked out by address region name and snapshot ID ๐Ÿ’€

  • DEV/REGION โ€” the device and address region you're deleting the snapshot from ๐Ÿ™ˆ
  • snapshot SNAPSHOT_ID โ€” the snapshot ID you want gone ๐Ÿ”ฅ

main character moment: this dumps all the available data from a region, or from a snapshot of a region ๐Ÿ‘‘

  • DEV/REGION โ€” the device and address region you're dumping from ๐ŸŒธ
  • snapshot SNAPSHOT_ID โ€” the snapshot ID of the region you want to dump ๐Ÿ’–

this one reads from a specific address in a region, for a given length. very precise, very iconic โœจ

  • DEV/REGION โ€” the device and address region you're reading from ๐Ÿฆ‹
  • snapshot SNAPSHOT_ID โ€” the snapshot ID of the region you want to read ๐ŸŽ€
  • address ADDRESS โ€” the address you want to start reading from ๐Ÿซถ
  • length LENGTH โ€” how much data you want to read ๐Ÿ’…

โญ OPTIONS โญ

  • -V[ersion] โ€” shows the version of the tool ๐ŸŽ€
  • -n[no-nice-names] โ€” turns off the pretty names ๐Ÿ™ˆ

๐ŸŒŸ EXAMPLES ๐ŸŒŸ

okay so here's how it looks in action, no cap ๐Ÿ’…

devlink region show

list the available address regions and snapshots ๐Ÿฆ‹

devlink region new pci/0000:00:05.0/cr-space

make a brand new snapshot of the cr-space address region on device pci/0000:00:05.0 ๐Ÿ“ธ

devlink region del pci/0000:00:05.0/cr-space snapshot 1

delete snapshot ID 1 from the cr-space address region on device pci/0000:00:05.0 ๐Ÿ‘‹

devlink region dump pci/0000:00:05.0/cr-space snapshot 1

dump the snapshot with ID 1 that was taken from the cr-space address region ๐Ÿงš

devlink region read pci/0000:00:05.0/cr-space snapshot 1 address 0x10
length 16

read from address 0x10, grabbing 16 bytes from snapshot ID 1 taken from the cr-space address region ๐Ÿ’–

๐Ÿซถ SEE ALSO ๐Ÿซถ

you'll want to check these out too, bestie ๐ŸŒˆ

devlink(8), devlink-dev(8), devlink-port(8), devlink-monitor(8),

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

written by Alex Vesker <valex@mellanox.com> ๐Ÿ’œ


bestie, that's the whole page! ๐ŸŽ€ this came from iproute2, dated 10 Jan 2018, and it's still giving ๐Ÿ’…โœจ

๐Ÿ“ฆ where this page comes from