DEVLINK-RESOURCE(8)

okay bestie, welcome to devlink-resource โ€” the part of the devlink world that's all about device resource configuration. it's giving "let me peek at your resources and also maybe resize them" energy, and honestly? iconic. ๐ŸŽ€

this one lives in the Linux manual, section 8, and it's your go-to for showing and setting devlink device resources. no cap.


โœจ SYNOPSIS โœจ

devlink [ OPTIONS ] resource  { COMMAND | help }

OPTIONS := { -v[erbose] }

devlink resource show [ DEV[/PORT_INDEX] | scope { dev | port } ]

devlink resource help

devlink resource set DEV path RESOURCE_PATH size RESOURCE_SIZE

so like, you got a few moves here: show, help, and set. pick your fighter. ๐Ÿ’…


๐ŸŒธ DESCRIPTION ๐ŸŒธ

DEV โ€” tells it which devlink device to show. and if you justโ€ฆ don't say anything? it lists all the devices. main character behavior tbh.

format is:

BUS_NAME/BUS_ADDRESS

PORT_INDEX โ€” picks the port to show resources for. when you give it one, you only get the port-level resources for that port. no extras, no noise.

format is:

BUS_NAME/BUS_ADDRESS/PORT_INDEX

scope { dev | port }

filter your resources by scope, bestie:

  • dev shows only device-level resources.
  • port shows only port-level resources.
  • omit it and you get resources of both scopes. everything. the whole buffet. โœจ

DEV โ€” which devlink device you're messing with.

path RESOURCE_PATH

the resource's path. that's it, that's the vibe.

size RESOURCE_SIZE

the new resource's size. glow-up incoming. ๐Ÿ”ฅ


๐Ÿ“ EXAMPLES ๐Ÿ“

  • devlink resource show โ€” shows resources for all devlink devices.
  • devlink resource show pci/0000:01:00.0 โ€” shows the resources of the specified devlink device.
  • devlink resource show pci/0000:01:00.0/1 โ€” shows port-level resources for port 1 of the specified devlink device.
  • devlink resource set pci/0000:01:00.0 path /kvd/linear size 98304 โ€” sets the size of the specified resource for the specified devlink device.

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

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

go read those too, they're all in the friend group ๐Ÿซถ


๐ŸŽ€ AUTHOR ๐ŸŽ€

Arkadi Sharshevsky <arkadis@mellanox.com>


iproute2 ยท 11 Feb 2018 โ€” and that's the whole page bestie, ily, go resize some resources responsibly ๐Ÿ’–โœจ๐ŸŒธ

๐Ÿ“ฆ where this page comes from