]> git.ipfire.org Git - thirdparty/iproute2.git/commit
vdpa: Support reading device features
authorEli Cohen <elic@nvidia.com>
Sun, 13 Mar 2022 17:12:19 +0000 (19:12 +0200)
committerDavid Ahern <dsahern@kernel.org>
Mon, 14 Mar 2022 15:03:38 +0000 (09:03 -0600)
commit56eb8bf45aa3d509eb119201341d0323ea81ef84
tree7399732370e7195be8e1cfbc550708cc8c09db37
parent16482fd4df1132749575c49797c8d167c316d3f7
vdpa: Support reading device features

When showing the available management devices, check if
VDPA_ATTR_DEV_SUPPORTED_FEATURES feature is available and print the
supported features for a management device.

Examples:
$ vdpa mgmtdev show
auxiliary/mlx5_core.sf.1:
  supported_classes net
  max_supported_vqs 257
  dev_features CSUM GUEST_CSUM MTU HOST_TSO4 HOST_TSO6 STATUS CTRL_VQ MQ \
               CTRL_MAC_ADDR VERSION_1 ACCESS_PLATFORM

$ vdpa -jp mgmtdev show
{
    "mgmtdev": {
        "auxiliary/mlx5_core.sf.1": {
            "supported_classes": [ "net" ],
            "max_supported_vqs": 257,
            "dev_features": [
"CSUM","GUEST_CSUM","MTU","HOST_TSO4","HOST_TSO6","STATUS","CTRL_VQ","MQ",\
"CTRL_MAC_ADDR","VERSION_1","ACCESS_PLATFORM" ]
        }
    }
}

Reviewed-by: Si-Wei Liu <si-wei.liu@oracle.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
vdpa/vdpa.c