From patchwork Thu Nov 22 12:13:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuval Shaia X-Patchwork-Id: 1001751 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=oracle.com header.i=@oracle.com header.b="FA91n2Yl"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 430zYK5KBMz9s29 for ; Thu, 22 Nov 2018 23:40:05 +1100 (AEDT) Received: from localhost ([::1]:45839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPoH5-00066A-6a for incoming@patchwork.ozlabs.org; Thu, 22 Nov 2018 07:40:03 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gPnte-0000Nu-AG for qemu-devel@nongnu.org; Thu, 22 Nov 2018 07:16:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gPnsf-0000Iq-2u for qemu-devel@nongnu.org; Thu, 22 Nov 2018 07:14:53 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:52804) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gPnsd-0000GQ-5v for qemu-devel@nongnu.org; Thu, 22 Nov 2018 07:14:47 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wAMCE09g067787; Thu, 22 Nov 2018 12:14:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : in-reply-to : references; s=corp-2018-07-02; bh=9owyWV3jMNMWo89suS5VqAyGHjoEpFEkBLjHR84i4HM=; b=FA91n2YlfDZRWn67+HU/QVddHC1udAQYWajyGBpq8X7w+MEHvx5zXEjHkv/60swYpKQr t3jKXVtZNufzNkrDvrDtBfz7a535WQxVMLnwIrghnAYYxkC65KJGJWJrydS72WNlwNq7 xCfuLIGiq+pD7Xc4EFdllzUtVjo5BX/iV/tYPCQghgZV7Zf/Z7hPCT3rs0I/i4DdG+6J 4tt0L+6T8tSSO48uuuAwJj+RUFfROXCajvQk77Xmje4EsSkHbiQ43l7VjjKgN4NA/vL+ 0pjlTyrnUrlgETxr22C7XYmLrbrrTi5ELlm05+RuP2vFn6P8HnvnckzoqKN6T6cbMz9e fA== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2ntadu6nqw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Nov 2018 12:14:45 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wAMCEjDs028148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 Nov 2018 12:14:45 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id wAMCEi9b009516; Thu, 22 Nov 2018 12:14:45 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 22 Nov 2018 04:14:44 -0800 From: Yuval Shaia To: yuval.shaia@oracle.com, marcel.apfelbaum@gmail.com, dmitry.fleytman@gmail.com, jasowang@redhat.com, eblake@redhat.com, armbru@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, shamir.rabinovitch@oracle.com, cohuck@redhat.com Date: Thu, 22 Nov 2018 14:13:48 +0200 Message-Id: <20181122121402.13764-11-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181122121402.13764-1-yuval.shaia@oracle.com> References: <20181122121402.13764-1-yuval.shaia@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9084 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811220111 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.86 Subject: [Qemu-devel] [PATCH v5 10/24] qapi: Define new QMP message for pvrdma X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" pvrdma requires that the same GID attached to it will be attached to the backend device in the host. A new QMP messages is defined so pvrdma device can broadcast any change made to its GID table. This event is captured by libvirt which in turn will update the GID table in the backend device. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Acked-by: Markus Armbruster --- MAINTAINERS | 1 + Makefile.objs | 1 + qapi/qapi-schema.json | 1 + qapi/rdma.json | 38 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 41 insertions(+) create mode 100644 qapi/rdma.json diff --git a/MAINTAINERS b/MAINTAINERS index 7b68080094..525bcdcf41 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2335,6 +2335,7 @@ F: hw/rdma/* F: hw/rdma/vmw/* F: docs/pvrdma.txt F: contrib/rdmacm-mux/* +F: qapi/rdma.json Build and test automation ------------------------- diff --git a/Makefile.objs b/Makefile.objs index 319f14d937..fe3566b797 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -1,5 +1,6 @@ QAPI_MODULES = block-core block char common crypto introspect job migration QAPI_MODULES += misc net rocker run-state sockets tpm trace transaction ui +QAPI_MODULES += rdma ####################################################################### # Common libraries for tools and emulators diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json index 65b6dc2f6f..3bbdfcee84 100644 --- a/qapi/qapi-schema.json +++ b/qapi/qapi-schema.json @@ -86,6 +86,7 @@ { 'include': 'char.json' } { 'include': 'job.json' } { 'include': 'net.json' } +{ 'include': 'rdma.json' } { 'include': 'rocker.json' } { 'include': 'tpm.json' } { 'include': 'ui.json' } diff --git a/qapi/rdma.json b/qapi/rdma.json new file mode 100644 index 0000000000..804c68ab36 --- /dev/null +++ b/qapi/rdma.json @@ -0,0 +1,38 @@ +# -*- Mode: Python -*- +# + +## +# = RDMA device +## + +## +# @RDMA_GID_STATUS_CHANGED: +# +# Emitted when guest driver adds/deletes GID to/from device +# +# @netdev: RoCE Network Device name - char * +# +# @gid-status: Add or delete indication - bool +# +# @subnet-prefix: Subnet Prefix - uint64 +# +# @interface-id : Interface ID - uint64 +# +# Since: 3.2 +# +# Example: +# +# <- {"timestamp": {"seconds": 1541579657, "microseconds": 986760}, +# "event": "RDMA_GID_STATUS_CHANGED", +# "data": +# {"netdev": "bridge0", +# "interface-id": 15880512517475447892, +# "gid-status": true, +# "subnet-prefix": 33022}} +# +## +{ 'event': 'RDMA_GID_STATUS_CHANGED', + 'data': { 'netdev' : 'str', + 'gid-status' : 'bool', + 'subnet-prefix' : 'uint64', + 'interface-id' : 'uint64' } }