summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorCindy Lu <lulu@redhat.com>2024-07-31 11:16:01 +0800
committerMichael S. Tsirkin <mst@redhat.com>2024-09-10 02:51:48 -0400
commit2f87e9cf0c9e21ab9be1fb2ba8520a1525359497 (patch)
tree6bc92828036e4d2eb76601fa74aa97ec9ae67028 /include/uapi
parenta8927f69e85ec3508085e1042ca8ffe1c1ededae (diff)
vdpa: support set mac address from vdpa tool
Add new UAPI to support the mac address from vdpa tool Function vdpa_nl_cmd_dev_attr_set_doit() will get the new MAC address from the vdpa tool and then set it to the device. The usage is: vdpa dev set name vdpa_name mac **:**:**:**:**:** Here is example: root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "82:4d:e9:5d:d7:e6", "link ": "up", "link_announce ": false, "mtu": 1500 } } } root@L1# vdpa dev set name vdpa0 mac 00:11:22:33:44:55 root@L1# vdpa -jp dev config show vdpa0 { "config": { "vdpa0": { "mac": "00:11:22:33:44:55", "link ": "up", "link_announce ": false, "mtu": 1500 } } } Signed-off-by: Cindy Lu <lulu@redhat.com> Message-Id: <20240731031653.1047692-2-lulu@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/vdpa.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/vdpa.h b/include/uapi/linux/vdpa.h
index 842bf1201ac4..71edf2c70cc3 100644
--- a/include/uapi/linux/vdpa.h
+++ b/include/uapi/linux/vdpa.h
@@ -19,6 +19,7 @@ enum vdpa_command {
VDPA_CMD_DEV_GET, /* can dump */
VDPA_CMD_DEV_CONFIG_GET, /* can dump */
VDPA_CMD_DEV_VSTATS_GET,
+ VDPA_CMD_DEV_ATTR_SET,
};
enum vdpa_attr {