From nobody Tue Nov 18 09:16:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1608772606; cv=none; d=zohomail.com; s=zohoarc; b=klP45Eru/3WMwpJ/HI6YJaqR99c9mtShXUo7Gqfynua+GPOCxhnPlbh4pmqqe2O8sze34o0NthwoVWIQWs0a/HTJhOi9XRXvQFhn7MnRNCwxpUgwqTR6390BzB4Bu6Wvwb101Uzi4WHzcUycWoI9eRE7waQFKorEaBmsFoIcTow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608772606; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=N+dFR9rE80jbPPLd4uAe3AJcKJzV9ClZs2N0JQ2mY9g=; b=W3Ki2yKctj5yZwkFDaLEFkwA+svA8J19q1tMF1lnsFvPkYh4/Rdi6FREwO+AZTJt1Y/cQLJXl9yWOOZXNBVRoW+sb1137OcoP8z5rV8Sx5tHjairV/JbwJ3rhpMBQH33mKbQOIpQT7cCDD6DwePMVPsUjb6eNuRmCbrmYi1T1F0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1608772606676597.5697280757154; Wed, 23 Dec 2020 17:16:46 -0800 (PST) Received: from localhost ([::1]:34358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksFFF-0002mn-Cw for importer@patchew.org; Wed, 23 Dec 2020 20:16:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksFCE-0001V6-Uk for qemu-devel@nongnu.org; Wed, 23 Dec 2020 20:13:39 -0500 Received: from mga06.intel.com ([134.134.136.31]:46595) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksFCD-0004bX-C8 for qemu-devel@nongnu.org; Wed, 23 Dec 2020 20:13:38 -0500 Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2020 17:13:18 -0800 Received: from unknown (HELO localhost.localdomain) ([10.239.13.19]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Dec 2020 17:13:16 -0800 IronPort-SDR: w56iw+EwSXsDCZCQAX6KJFzhcxV0JvYDdeliuw5B54cPx7HIUaRxOTfZ1XNBSImqNFmEkNI6aP PC0N8soDVdJw== X-IronPort-AV: E=McAfee;i="6000,8403,9844"; a="237652001" X-IronPort-AV: E=Sophos;i="5.78,443,1599548400"; d="scan'208";a="237652001" IronPort-SDR: fs3DsK8KtByJhO4tgB6lihn1b82LUlhHxBy7ufkd5rSKM2pEiGWrm0VSCKzf1JZXv61L3OCQn9 Zjx04dixQGwA== X-IronPort-AV: E=Sophos;i="5.78,443,1599548400"; d="scan'208";a="565580016" From: Zhang Chen To: Jason Wang , qemu-dev , Eric Blake , "Dr. David Alan Gilbert" , Markus Armbruster Subject: [PATCH 1/3] qapi/net: Add new QMP command for COLO passthrough Date: Thu, 24 Dec 2020 09:09:16 +0800 Message-Id: <20201224010918.19275-2-chen.zhang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201224010918.19275-1-chen.zhang@intel.com> References: <20201224010918.19275-1-chen.zhang@intel.com> Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=134.134.136.31; envelope-from=chen.zhang@intel.com; helo=mga06.intel.com X-Spam_score_int: 14 X-Spam_score: 1.4 X-Spam_bar: + X-Spam_report: (1.4 / 5.0 requ) BAYES_00=-1.9, FROM_ADDR_WS=2.999, FROM_WSP_TRAIL=2.3, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zhang Chen , Zhang Chen Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Zhang Chen 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 --- 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); } =20 +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'} } --=20 2.17.1