]> git.ipfire.org Git - thirdparty/iproute2.git/commit
vdpa: Add vdpa tool
authorParav Pandit <parav@nvidia.com>
Wed, 10 Feb 2021 18:34:45 +0000 (20:34 +0200)
committerDavid Ahern <dsahern@kernel.org>
Thu, 11 Feb 2021 16:09:15 +0000 (09:09 -0700)
commitc2ecc82b9d4cd3b71fa992afee05ac938eb1b66a
treef8061c4c55104f9f943eac92e31091c73f8de30c
parent6c769949827584984e5b76402d70be84b25706a9
vdpa: Add vdpa tool

vdpa tool is created to create, delete and query vdpa devices.
examples:
Show vdpa management device that supports creating, deleting vdpa devices.

$ vdpa mgmtdev show
vdpasim:
  supported_classes net

$ vdpa mgmtdev show -jp
{
    "show": {
        "vdpasim": {
            "supported_classes": [ "net" ]
        }
    }
}

Create a vdpa device of type networking named as "foo2" from
the management device vdpasim_net:

$ vdpa dev add mgmtdev vdpasim_net name foo2

Show the newly created vdpa device by its name:
$ vdpa dev show foo2
foo2: type network mgmtdev vdpasim_net vendor_id 0 max_vqs 2 max_vq_size 256

$ vdpa dev show foo2 -jp
{
    "dev": {
        "foo2": {
            "type": "network",
            "mgmtdev": "vdpasim_net",
            "vendor_id": 0,
            "max_vqs": 2,
            "max_vq_size": 256
        }
    }
}

Delete the vdpa device after its use:
$ vdpa dev del foo2

Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
Makefile
man/man8/vdpa-dev.8 [new file with mode: 0644]
man/man8/vdpa-mgmtdev.8 [new file with mode: 0644]
man/man8/vdpa.8 [new file with mode: 0644]
vdpa/Makefile [new file with mode: 0644]
vdpa/vdpa.c [new file with mode: 0644]