From nobody Sat Apr 27 22:29:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=oracle.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528468970234477.6384630274903; Fri, 8 Jun 2018 07:42:50 -0700 (PDT) Received: from localhost ([::1]:36262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRIbJ-0008AY-Et for importer@patchew.org; Fri, 08 Jun 2018 10:42:49 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55191) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRIWs-0004ls-Ae for qemu-devel@nongnu.org; Fri, 08 Jun 2018 10:38:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRIWp-0001Lk-76 for qemu-devel@nongnu.org; Fri, 08 Jun 2018 10:38:14 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:45246) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRIWo-0001Kx-Tw for qemu-devel@nongnu.org; Fri, 08 Jun 2018 10:38:11 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w58Ea6sV163684; Fri, 8 Jun 2018 14:38:07 GMT Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp2120.oracle.com with ESMTP id 2jbvypwfq6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 08 Jun 2018 14:38:07 +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 w58Ec6Me009610 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 8 Jun 2018 14:38:06 GMT Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w58Ec6pI018771; Fri, 8 Jun 2018 14:38:06 GMT Received: from localhost.localdomain (/77.138.186.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 08 Jun 2018 07:38:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id; s=corp-2017-10-26; bh=QE1RSSfHU3T/QT873VvfQY11hrYXcvlDR3HZi4uHxmc=; b=MXqXMJFP7XtMhrbDh/ZGnuiSiZ3ZRaHt+Wt1aNLsY9RCz5l09xYT+OvGXu4ocuiVaPcl bf9Fg2zUjo2lDaYT8TeRz9XAIz8Q9sT6gax61JoLbI7Wg1hcCCjlqXapl1F38IePP4t5 QkmCH+8ssBYKThYXm+MbioAgVIVKXG3zLfWMjrVnVy9T/kaNhRuDhXaMIE5qMbR7e59h Gx1d7hC9Yny6A09GnHSErU7qUjysA2FCWrkV44HX6i6LG2t8SxIIX7cfDFE9DqJo7nDm VWtljf7PWf1BVJmTMydy6oPK8ZcYzmwemcQhfmYgs3SZXZi36F7rO+LGdtU2zVCgYslm fQ== From: Yuval Shaia To: yuval.shaia@oracle.com, marcel.apfelbaum@gmail.com, qemu-devel@nongnu.org Date: Fri, 8 Jun 2018 17:37:52 +0300 Message-Id: <20180608143752.22718-1-yuval.shaia@oracle.com> X-Mailer: git-send-email 2.17.1 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8917 signatures=668702 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-1805220000 definitions=main-1806080165 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 141.146.126.78 Subject: [Qemu-devel] [PATCH] hw/pvrdma: Bugfix - provide the correct attr_mask to query_qp 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Calling rdma_rm_query_qp with attr_mask equals to -1 leads to error where backend query_qp fails to retrieve the needed QP attributes. Fix it by providing the attr_mask we got from driver. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_cmd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 9d9dfc6b81..76df60a540 100644 --- a/hw/rdma/vmw/pvrdma_cmd.c +++ b/hw/rdma/vmw/pvrdma_cmd.c @@ -524,6 +524,7 @@ static int query_qp(PVRDMADev *dev, union pvrdma_cmd_re= q *req, struct ibv_qp_init_attr init_attr; =20 pr_dbg("qp_handle=3D%d\n", cmd->qp_handle); + pr_dbg("attr_mask=3D0x%x\n", cmd->attr_mask); =20 memset(rsp, 0, sizeof(*rsp)); rsp->hdr.response =3D cmd->hdr.response; @@ -531,8 +532,8 @@ static int query_qp(PVRDMADev *dev, union pvrdma_cmd_re= q *req, =20 rsp->hdr.err =3D rdma_rm_query_qp(&dev->rdma_dev_res, &dev->backend_de= v, cmd->qp_handle, - (struct ibv_qp_attr *)&resp->attrs, -1, - &init_attr); + (struct ibv_qp_attr *)&resp->attrs, + cmd->attr_mask, &init_attr); =20 pr_dbg("ret=3D%d\n", rsp->hdr.err); return rsp->hdr.err; --=20 2.17.0