naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone
Blob Blame History Raw
From 548e39858ecf9291494555466e6e931935b4a0ee Mon Sep 17 00:00:00 2001
Message-Id: <548e39858ecf9291494555466e6e931935b4a0ee.1643220552.git.aclaudi@redhat.com>
In-Reply-To: <b30268eda844bdebbb8e5e4f5735e3b1bb666368.1643220552.git.aclaudi@redhat.com>
References: <b30268eda844bdebbb8e5e4f5735e3b1bb666368.1643220552.git.aclaudi@redhat.com>
From: Andrea Claudi <aclaudi@redhat.com>
Date: Wed, 26 Jan 2022 10:37:45 +0100
Subject: [PATCH] vdpa: align uapi headers

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2036880
Upstream Status: iproute2.git commit fa58de9b0c73

commit 34672eae6ec8e885f76ae30af10f849720012dd6
Author: Stephen Hemminger <stephen@networkplumber.org>
Date:   Thu Nov 18 09:56:57 2021 -0800

    vdpa: align uapi headers

    Update vdpa headers based on 5.16.0-rc1 and remove redundant
    copy.

    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 include/uapi/linux/vdpa.h            | 40 ----------------------------
 vdpa/include/uapi/linux/vdpa.h       |  7 +++++
 vdpa/include/uapi/linux/virtio_ids.h | 26 ++++++++++++++++++
 3 files changed, 33 insertions(+), 40 deletions(-)
 delete mode 100644 include/uapi/linux/vdpa.h

diff --git a/include/uapi/linux/vdpa.h b/include/uapi/linux/vdpa.h
deleted file mode 100644
index 37ae26b6..00000000
--- a/include/uapi/linux/vdpa.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
-/*
- * vdpa device management interface
- * Copyright (c) 2020 Mellanox Technologies Ltd. All rights reserved.
- */
-
-#ifndef _LINUX_VDPA_H_
-#define _LINUX_VDPA_H_
-
-#define VDPA_GENL_NAME "vdpa"
-#define VDPA_GENL_VERSION 0x1
-
-enum vdpa_command {
-	VDPA_CMD_UNSPEC,
-	VDPA_CMD_MGMTDEV_NEW,
-	VDPA_CMD_MGMTDEV_GET,		/* can dump */
-	VDPA_CMD_DEV_NEW,
-	VDPA_CMD_DEV_DEL,
-	VDPA_CMD_DEV_GET,		/* can dump */
-};
-
-enum vdpa_attr {
-	VDPA_ATTR_UNSPEC,
-
-	/* bus name (optional) + dev name together make the parent device handle */
-	VDPA_ATTR_MGMTDEV_BUS_NAME,		/* string */
-	VDPA_ATTR_MGMTDEV_DEV_NAME,		/* string */
-	VDPA_ATTR_MGMTDEV_SUPPORTED_CLASSES,	/* u64 */
-
-	VDPA_ATTR_DEV_NAME,			/* string */
-	VDPA_ATTR_DEV_ID,			/* u32 */
-	VDPA_ATTR_DEV_VENDOR_ID,		/* u32 */
-	VDPA_ATTR_DEV_MAX_VQS,			/* u32 */
-	VDPA_ATTR_DEV_MAX_VQ_SIZE,		/* u16 */
-
-	/* new attributes must be added above here */
-	VDPA_ATTR_MAX,
-};
-
-#endif
diff --git a/vdpa/include/uapi/linux/vdpa.h b/vdpa/include/uapi/linux/vdpa.h
index 37ae26b6..b7eab069 100644
--- a/vdpa/include/uapi/linux/vdpa.h
+++ b/vdpa/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 {
@@ -32,6 +33,12 @@ enum vdpa_attr {
 	VDPA_ATTR_DEV_VENDOR_ID,		/* u32 */
 	VDPA_ATTR_DEV_MAX_VQS,			/* u32 */
 	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,
diff --git a/vdpa/include/uapi/linux/virtio_ids.h b/vdpa/include/uapi/linux/virtio_ids.h
index bc1c0621..80d76b75 100644
--- a/vdpa/include/uapi/linux/virtio_ids.h
+++ b/vdpa/include/uapi/linux/virtio_ids.h
@@ -51,8 +51,34 @@
 #define VIRTIO_ID_PSTORE		22 /* virtio pstore device */
 #define VIRTIO_ID_IOMMU			23 /* virtio IOMMU */
 #define VIRTIO_ID_MEM			24 /* virtio mem */
+#define VIRTIO_ID_SOUND			25 /* virtio sound */
 #define VIRTIO_ID_FS			26 /* virtio filesystem */
 #define VIRTIO_ID_PMEM			27 /* virtio pmem */
+#define VIRTIO_ID_RPMB			28 /* virtio rpmb */
 #define VIRTIO_ID_MAC80211_HWSIM	29 /* virtio mac80211-hwsim */
+#define VIRTIO_ID_VIDEO_ENCODER		30 /* virtio video encoder */
+#define VIRTIO_ID_VIDEO_DECODER		31 /* virtio video decoder */
+#define VIRTIO_ID_SCMI			32 /* virtio SCMI */
+#define VIRTIO_ID_NITRO_SEC_MOD		33 /* virtio nitro secure module*/
+#define VIRTIO_ID_I2C_ADAPTER		34 /* virtio i2c adapter */
+#define VIRTIO_ID_WATCHDOG		35 /* virtio watchdog */
+#define VIRTIO_ID_CAN			36 /* virtio can */
+#define VIRTIO_ID_DMABUF		37 /* virtio dmabuf */
+#define VIRTIO_ID_PARAM_SERV		38 /* virtio parameter server */
+#define VIRTIO_ID_AUDIO_POLICY		39 /* virtio audio policy */
+#define VIRTIO_ID_BT			40 /* virtio bluetooth */
+#define VIRTIO_ID_GPIO			41 /* virtio gpio */
+
+/*
+ * Virtio Transitional IDs
+ */
+
+#define VIRTIO_TRANS_ID_NET		1000 /* transitional virtio net */
+#define VIRTIO_TRANS_ID_BLOCK		1001 /* transitional virtio block */
+#define VIRTIO_TRANS_ID_BALLOON		1002 /* transitional virtio balloon */
+#define VIRTIO_TRANS_ID_CONSOLE		1003 /* transitional virtio console */
+#define VIRTIO_TRANS_ID_SCSI		1004 /* transitional virtio SCSI */
+#define VIRTIO_TRANS_ID_RNG		1005 /* transitional virtio rng */
+#define VIRTIO_TRANS_ID_9P		1009 /* transitional virtio 9p console */
 
 #endif /* _LINUX_VIRTIO_IDS_H */
-- 
2.34.1