[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough
From: |
Zhang Chen |
Subject: |
[PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough |
Date: |
Thu, 24 Dec 2020 09:09:16 +0800 |
From: Zhang Chen <chen.zhang@intel.com>
Since the real user scenario does not need to monitor all traffic.
Add colo-passthrough-add and colo-passthrough-del to maintain
a COLO network passthrough list.
Signed-off-by: Zhang Chen <chen.zhang@intel.com>
---
net/net.c | 12 ++++++++++++
qapi/net.json | 46 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 58 insertions(+)
diff --git a/net/net.c b/net/net.c
index e1035f21d1..eac7a92618 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1151,6 +1151,18 @@ void qmp_netdev_del(const char *id, Error **errp)
qemu_del_net_client(nc);
}
+void qmp_colo_passthrough_add(const char *prot, const uint32_t port,
+ Error **errp)
+{
+ /* Setup passthrough connection */
+}
+
+void qmp_colo_passthrough_del(const char *prot, const uint32_t port,
+ Error **errp)
+{
+ /* Delete passthrough connection */
+}
+
static void netfilter_print_info(Monitor *mon, NetFilterState *nf)
{
char *str;
diff --git a/qapi/net.json b/qapi/net.json
index c31748c87f..466c29714e 100644
--- a/qapi/net.json
+++ b/qapi/net.json
@@ -714,3 +714,49 @@
##
{ 'event': 'FAILOVER_NEGOTIATED',
'data': {'device-id': 'str'} }
+
+##
+# @colo-passthrough-add:
+#
+# Add passthrough entry according to customer's needs in COLO-compare.
+#
+# @protocol: COLO passthrough just support TCP and UDP.
+#
+# @port: TCP or UDP port number.
+#
+# Returns: Nothing on success
+#
+# Since: 5.3
+#
+# Example:
+#
+# -> { "execute": "colo-passthrough-add",
+# "arguments": { "protocol": "tcp", "port": 3389 } }
+# <- { "return": {} }
+#
+##
+{ 'command': 'colo-passthrough-add',
+ 'data': {'protocol': 'str', 'port': 'uint32'} }
+
+##
+# @colo-passthrough-del:
+#
+# Delete passthrough entry according to customer's needs in COLO-compare.
+#
+# @protocol: COLO passthrough just support TCP and UDP.
+#
+# @port: TCP or UDP port number.
+#
+# Returns: Nothing on success
+#
+# Since: 5.3
+#
+# Example:
+#
+# -> { "execute": "colo-passthrough-del",
+# "arguments": { "protocol": "tcp", "port": 3389 } }
+# <- { "return": {} }
+#
+##
+{ 'command': 'colo-passthrough-del',
+ 'data': {'protocol': 'str', 'port': 'uint32'} }
--
2.17.1
- [PATCH 0/3] Bypass specific network traffic in COLO, Zhang Chen, 2020/12/23
- [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough,
Zhang Chen <=
- Re: [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough, Jason Wang, 2020/12/25
- RE: [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough, Zhang, Chen, 2020/12/27
- Re: [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough, Jason Wang, 2020/12/28
- RE: [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough, Zhang, Chen, 2020/12/28
- Re: [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough, Jason Wang, 2020/12/29
[PATCH 3/3] net/colo-compare: Add handler for passthrough connection, Zhang Chen, 2020/12/23
[PATCH 2/3] hmp-commands: Add new HMP command for COLO passthrough, Zhang Chen, 2020/12/23
Re: [PATCH 0/3] Bypass specific network traffic in COLO, Jason Wang, 2020/12/25