summaryrefslogtreecommitdiff
path: root/include/uapi/linux/vdpa.h
diff options
context:
space:
mode:
authorParav Pandit <parav@nvidia.com>2021-10-26 20:55:13 +0300
committerMichael S. Tsirkin <mst@redhat.com>2021-11-01 12:26:49 +0300
commitad69dd0bf26b88ec6ab26f8bbe5cd74fbed7672a (patch)
treef375c7c9319917f9c300fc2a50589cea4107e14c /include/uapi/linux/vdpa.h
parent6dbb1f1687a2ccdfc5b84b0a35bbc6dfefc4de3b (diff)
downloadlinux-ad69dd0bf26b88ec6ab26f8bbe5cd74fbed7672a.tar.xz
vdpa: Introduce query of device config layout
Introduce a command to query a device config layout. An example query of network vdpa device: $ vdpa dev add name bar mgmtdev vdpasim_net $ vdpa dev config show bar: mac 00:35:09:19:48:05 link up link_announce false mtu 1500 $ vdpa dev config show -jp { "config": { "bar": { "mac": "00:35:09:19:48:05", "link ": "up", "link_announce ": false, "mtu": 1500, } } } Signed-off-by: Parav Pandit <parav@nvidia.com> Signed-off-by: Eli Cohen <elic@nvidia.com> Acked-by: Jason Wang <jasowang@redhat.com> Link: https://lore.kernel.org/r/20211026175519.87795-3-parav@nvidia.com Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/uapi/linux/vdpa.h')
-rw-r--r--include/uapi/linux/vdpa.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/uapi/linux/vdpa.h b/include/uapi/linux/vdpa.h
index e3b87879514c..a252f06f9dfd 100644
--- a/include/uapi/linux/vdpa.h
+++ b/include/uapi/linux/vdpa.h
@@ -17,6 +17,7 @@ enum vdpa_command {
VDPA_CMD_DEV_NEW,
VDPA_CMD_DEV_DEL,
VDPA_CMD_DEV_GET, /* can dump */
+ VDPA_CMD_DEV_CONFIG_GET, /* can dump */
};
enum vdpa_attr {
@@ -34,6 +35,11 @@ enum vdpa_attr {
VDPA_ATTR_DEV_MAX_VQ_SIZE, /* u16 */
VDPA_ATTR_DEV_MIN_VQ_SIZE, /* u16 */
+ VDPA_ATTR_DEV_NET_CFG_MACADDR, /* binary */
+ VDPA_ATTR_DEV_NET_STATUS, /* u8 */
+ VDPA_ATTR_DEV_NET_CFG_MAX_VQP, /* u16 */
+ VDPA_ATTR_DEV_NET_CFG_MTU, /* u16 */
+
/* new attributes must be added above here */
VDPA_ATTR_MAX,
};