From patchwork Thu Mar 14 15:30:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10853107 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DFCDC1390 for ; Thu, 14 Mar 2019 15:36:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CA2F02A582 for ; Thu, 14 Mar 2019 15:36:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB0B22A587; Thu, 14 Mar 2019 15:36:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6FD8C2A582 for ; Thu, 14 Mar 2019 15:36:11 +0000 (UTC) Received: from localhost ([127.0.0.1]:39730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4SOw-0001fH-EV for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Mar 2019 11:36:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4SJn-00068F-Dh for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4SJl-0006RU-Pi for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:51 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:39830) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h4SJj-0006O2-KI for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:49 -0400 Received: by mail-wr1-x441.google.com with SMTP id p8so6341203wrq.6 for ; Thu, 14 Mar 2019 08:30:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P1WTb/s4mA3I/FT6DL2jgwlytSJNRM3fHhBu2Vhdn3s=; b=szcB5KcdxNipGG2ua2TMr8P6OgiNHfkx44C+qcealN5niVgMb2hTIQU+l3/0ZziJOV i4obbiIdzntIrzpToIA61pHTwHJ1/eCD0Rd7iJZiC/JQ0g/ACDYf9Immz3LuKeU+90FR DXC0ypxOmqII9JashvW++0cP0ioEOnMqaTT+/vwbRHcU+1TD9RAeVok67O6EBpyXEZ49 z7LJC8oMb7kBvneU5LQnr7c9f+xUmBUpu9ZfGhTKb8IT96W4BCXf0eDMX/ZMvBVooPTv LruoJ7jEIC+5dRCNWmYhGdH7e0bT2stL+xeH+3zrs6BjzA+XGhjBGMiUy9JJ+UY1zYLD FKzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P1WTb/s4mA3I/FT6DL2jgwlytSJNRM3fHhBu2Vhdn3s=; b=Yu51scNON6PZ1Mcyu6AqB8ADaGOpxd7tEq9BJK187s8OTJvAVU2bpfsiuPX8UrVNz3 Za8kIdvBQEHsfPKRWfGHEILbgWy61wKTFqaD2hRAGqEmEg8pamEGrmPsVuxNPZxjPO81 Xj2Xx+LGyMomMQS7yCcIgMtWh15gd9McB5/1hLn1DKEl75jUF27yAgZBJ3SHNxMUaMGW Hi9N1l/SiZsingKXOIo0mRSGyKrQGOJGqtXKCktzgQGt+kjtX79JUiTQAbq4iX/T6p4Y 3NGjOuMkxipfUgvD2KfEHb0Lb4d6krTbwZ1KsOz38u70ybDDS2SNVxzN+3WbKtIfkesM Gxbw== X-Gm-Message-State: APjAAAWCcm4lsxtmp+ojLE+c0FIdB+40t79Rcx1V3We1Mm8lf8F1VoSJ MYORATq/amC84sHYP/V4QfK9AKbG X-Google-Smtp-Source: APXvYqwUyv+baaMFT6aE9ecUyhm923zPZnRnc+LNMVdh6t3zq6OI1iMXnaudqB2T2nIMMUdUHG79UQ== X-Received: by 2002:a5d:5386:: with SMTP id d6mr30451258wrv.104.1552577443090; Thu, 14 Mar 2019 08:30:43 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id d9sm32070909wrn.72.2019.03.14.08.30.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 08:30:42 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Thu, 14 Mar 2019 17:30:28 +0200 Message-Id: <20190314153031.7197-2-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190314153031.7197-1-kamalheib1@gmail.com> References: <20190314153031.7197-1-kamalheib1@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v2 1/4] hw/rdma: Fix broken paths to docs/devel/tracing.txt 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: , Cc: Kamal Heib , Yuval Shaia Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The tracing.txt file is under "docs/devel" and not "docs". Reviewed-by: Yuval Shaia Signed-off-by: Kamal Heib --- hw/rdma/trace-events | 2 +- hw/rdma/vmw/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/rdma/trace-events b/hw/rdma/trace-events index 0fad56c88206..12868d8a8737 100644 --- a/hw/rdma/trace-events +++ b/hw/rdma/trace-events @@ -1,4 +1,4 @@ -# See docs/tracing.txt for syntax documentation. +# See docs/devel/tracing.txt for syntax documentation. # hw/rdma/rdma_backend.c rdma_check_dev_attr(const char *name, int max_bk, int max_fe) "%s: be=%d, fe=%d" diff --git a/hw/rdma/vmw/trace-events b/hw/rdma/vmw/trace-events index 0122266ad766..e846d54359a3 100644 --- a/hw/rdma/vmw/trace-events +++ b/hw/rdma/vmw/trace-events @@ -1,4 +1,4 @@ -# See docs/tracing.txt for syntax documentation. +# See docs/devel/tracing.txt for syntax documentation. # hw/rdma/vmw/pvrdma_main.c pvrdma_regs_read(uint64_t addr, uint64_t val) "pvrdma.regs[0x%"PRIx64"]=0x%"PRIx64 From patchwork Thu Mar 14 15:30:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10853111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B17FC1390 for ; Thu, 14 Mar 2019 15:39:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 990A52A55E for ; Thu, 14 Mar 2019 15:39:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88A7E2A589; Thu, 14 Mar 2019 15:39:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2B9D02A55E for ; Thu, 14 Mar 2019 15:39:44 +0000 (UTC) Received: from localhost ([127.0.0.1]:39767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4SSN-0004Ai-3L for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Mar 2019 11:39:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48055) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4SJp-0006AQ-WE for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4SJm-0006S3-Ct for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:53 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:34299) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h4SJl-0006ON-Tu for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:50 -0400 Received: by mail-wr1-x443.google.com with SMTP id k1so5831301wre.1 for ; Thu, 14 Mar 2019 08:30:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pL4effz0/7BO0Mc1hTMtpV+AJM5AAv08tyU+jbTe4mI=; b=rfXTv4RBAqptFaGrpgLvWGzEMBBDxTWC72y0Ik5A4RwrStqrT2zr9fUC8v5v7iL/Rh LQWY9xtkbaxLtZRNoq2rhjV93XdZ2IYRWyySmhJI9Q/W9XUb9efzIs5SR2fnXhZyFbpV O9gbiXeVAE3ghbFrFb8MEPvdnmHjwHdFl65hY6zRHfK6Oj6G5249fK3T0IEWkvl54B8z pJywSgYuhUjomyvPX9JxARlvGTOZOkuzFYizFh0sx5w7l+fzxvgUeZQzE9Mpl+hmZDc2 GncUovqAvEgY/i0Fq/KAKT7EiCJrC433MKnpCUbZoWyc5CGhyX7rsxmWNFkPymcYR3Be igog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pL4effz0/7BO0Mc1hTMtpV+AJM5AAv08tyU+jbTe4mI=; b=q1JQ3XcUOg18Spw0k2V4dgRotHxMM2m8M5JHjpewMvOfzh2kFXj3jT9E+EBTPwU5/u Pssko0PCGzngHtp0D4xoTVUzK8xF2xDZ5JAyh9IX0u1v4NjDQRA9JmHUX8CWOf0UT0Jd OwoBqUT1jYGNkqOI1Qdv05ew7LKTuI0+o94qvfpJ7fIAm6X93BA+KECL398sQxNUwhL+ DZQBz1yK8WiT0c9fEd2Qjjx+xZRyu85yHeo26J16fg2MTGaV/E4sx6qdu1tk4CTtk+77 JmiPLN6/b/2YF6zJG7ejSQ/764lz1ZYev70KY+FWpeEF80XQ7E8D9xCnLhM9d2pmhetc ny2Q== X-Gm-Message-State: APjAAAVoDQQtPy3l5h6SeEy56nPjFoeMX/KtS+nf2Xzbj/1WrMx3YiKU f6thSJG5hj0JcjGSe0+sJGF1UH11 X-Google-Smtp-Source: APXvYqw5hRwL1nnSjGH1JTRqwtRTGPRHZ/oQEfEPrbDVAckAJLkB2N+zIp8IOaGrjWkWvBnkeVDETg== X-Received: by 2002:a5d:654d:: with SMTP id z13mr30819351wrv.270.1552577444341; Thu, 14 Mar 2019 08:30:44 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id d9sm32070909wrn.72.2019.03.14.08.30.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 08:30:43 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Thu, 14 Mar 2019 17:30:29 +0200 Message-Id: <20190314153031.7197-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190314153031.7197-1-kamalheib1@gmail.com> References: <20190314153031.7197-1-kamalheib1@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::443 Subject: [Qemu-devel] [PATCH v2 2/4] hw/rdma: Remove unused parameter from rdma_poll_cq() 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: , Cc: Kamal Heib , Yuval Shaia Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The 'rdma_dev_res' parameter is not used in rdma_poll_cq(), so remove it. Reviewed-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Signed-off-by: Kamal Heib --- hw/rdma/rdma_backend.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index 66185bd487b6..78bafc13642a 100644 --- a/hw/rdma/rdma_backend.c +++ b/hw/rdma/rdma_backend.c @@ -94,8 +94,7 @@ static void clean_recv_mads(RdmaBackendDev *backend_dev) } while (cqe_ctx_id != -ENOENT); } -static int rdma_poll_cq(RdmaBackendDev *backend_dev, - RdmaDeviceResources *rdma_dev_res, struct ibv_cq *ibcq) +static int rdma_poll_cq(RdmaDeviceResources *rdma_dev_res, struct ibv_cq *ibcq) { int i, ne, total_ne = 0; BackendCtx *bctx; @@ -181,7 +180,7 @@ static void *comp_handler_thread(void *arg) } backend_dev->rdma_dev_res->stats.poll_cq_from_bk++; - rdma_poll_cq(backend_dev, backend_dev->rdma_dev_res, ev_cq); + rdma_poll_cq(backend_dev->rdma_dev_res, ev_cq); ibv_ack_cq_events(ev_cq, 1); } @@ -315,7 +314,7 @@ void rdma_backend_poll_cq(RdmaDeviceResources *rdma_dev_res, RdmaBackendCQ *cq) int polled; rdma_dev_res->stats.poll_cq_from_guest++; - polled = rdma_poll_cq(cq->backend_dev, rdma_dev_res, cq->ibcq); + polled = rdma_poll_cq(rdma_dev_res, cq->ibcq); if (!polled) { rdma_dev_res->stats.poll_cq_from_guest_empty++; } From patchwork Thu Mar 14 15:30:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10853115 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 809B9139A for ; Thu, 14 Mar 2019 15:40:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6B3722A583 for ; Thu, 14 Mar 2019 15:40:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E7662A58A; Thu, 14 Mar 2019 15:40:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D3E9D2A583 for ; Thu, 14 Mar 2019 15:40:46 +0000 (UTC) Received: from localhost ([127.0.0.1]:39801 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4STO-0005DH-6g for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Mar 2019 11:40:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4SJq-0006Au-Fa for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:31:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4SJm-0006Rl-2P for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:54 -0400 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]:55741) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h4SJl-0006PI-NX for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:49 -0400 Received: by mail-wm1-x342.google.com with SMTP id 4so3441059wmf.5 for ; Thu, 14 Mar 2019 08:30:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=D2aL715eOWt7FUxRDxeN32jprGibo/7klbnwp25m0g4=; b=a4+Ja/omQxkVBXaGnbe5XPzura4ub1vbClYj10g78eA5fsRIE1ic6Sp6HEfKz07eFl G4qZPTDgbzX3NnE5h8EyzG41ZVR00SW89cscMcEkny8JnHIdgCSB2pN9Rsw0+B6L5B2M 9fsUbdOx6pSc0dT9rAgaKNEAFyDhYSexRetp4AHNSG3TWT4YPD6UXRi5/FgDM/lIxJKM S3m1oa3dtStLmQrmyhMqpetkLrtHP39S/GnV9sgjV4ViRHvhCG88/2CLqdPvbMcdEyvL K/xuUL1FzgRlbK42dnBPJUBI3LHhztbvg6oImr5b3MYdqCvFh6x/N1YqELbsaPcM+EkH l2WA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=D2aL715eOWt7FUxRDxeN32jprGibo/7klbnwp25m0g4=; b=rtFSOTr/0GGmMbfteIEmHReCSFuGHPWQLgrGJIS/RwU2NJKE62hLcWne0SaFjUycgC fMUkc7Df68z9ku3qd/GZpstoLiB7tNW3KJaMpaOKSuH60GvpcQdp+FBF5RVq5SrVm7MR YQWfiye1Rqsits61jt/TeyEsniH6vQYLoOGxr7fA6QSuj8ucad2qI6gOvrK9L0Vtp01t AQsacJkuvsQkM/MoaJS1TTaIbmhMPn5VH+OPmxU+xr8NfrMhbeypf2no850R6hzTeAHN wfLeKNBAaMYvTxZCByUT/VBuEdufJTOuJ4QXWrGNNCDmIoN/2C+zLB5JrCxXvzcD8BQD zV+A== X-Gm-Message-State: APjAAAVa+K3UyQU8wsXcqeAHyJAJUHgllaDDhyqLk7vQbzXyIzSKPPLw JQJhnUrrRr3SdKKnOxPETBXwmfDB X-Google-Smtp-Source: APXvYqwcHG1Al+Fhi9AtD96iNMTY50XyAHa4d1dPQKjko5nN1MtRGgOYCf/a0gFGZ8b9cQnoGIiotw== X-Received: by 2002:a7b:ce83:: with SMTP id q3mr2959484wmj.108.1552577446049; Thu, 14 Mar 2019 08:30:46 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id d9sm32070909wrn.72.2019.03.14.08.30.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 08:30:45 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Thu, 14 Mar 2019 17:30:30 +0200 Message-Id: <20190314153031.7197-4-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190314153031.7197-1-kamalheib1@gmail.com> References: <20190314153031.7197-1-kamalheib1@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::342 Subject: [Qemu-devel] [PATCH v2 3/4] hw/rdma: Use {} instead of {0} 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: , Cc: Kamal Heib , Yuval Shaia Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Initialize structs with {} instead of {0} to make sure that all code is using the same convention. Reviewed-by: Marcel Apfelbaum Signed-off-by: Kamal Heib Reviewed-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 18 +++++++++--------- hw/rdma/vmw/pvrdma_cmd.c | 2 +- hw/rdma/vmw/pvrdma_qp_ops.c | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index 78bafc13642a..55b633e451c1 100644 --- a/hw/rdma/rdma_backend.c +++ b/hw/rdma/rdma_backend.c @@ -57,7 +57,7 @@ static void dummy_comp_handler(void *ctx, struct ibv_wc *wc) static inline void complete_work(enum ibv_wc_status status, uint32_t vendor_err, void *ctx) { - struct ibv_wc wc = {0}; + struct ibv_wc wc = {}; wc.status = status; wc.vendor_err = vendor_err; @@ -273,7 +273,7 @@ static void stop_backend_thread(RdmaBackendThread *thread) static void start_comp_thread(RdmaBackendDev *backend_dev) { - char thread_name[THR_NAME_LEN] = {0}; + char thread_name[THR_NAME_LEN] = {}; stop_backend_thread(&backend_dev->comp_thread); @@ -483,7 +483,7 @@ void rdma_backend_post_send(RdmaBackendDev *backend_dev, struct ibv_sge new_sge[MAX_SGE]; uint32_t bctx_id; int rc; - struct ibv_send_wr wr = {0}, *bad_wr; + struct ibv_send_wr wr = {}, *bad_wr; if (!qp->ibqp) { /* This field is not initialized for QP0 and QP1 */ if (qp_type == IBV_QPT_SMI) { @@ -600,7 +600,7 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev, struct ibv_sge new_sge[MAX_SGE]; uint32_t bctx_id; int rc; - struct ibv_recv_wr wr = {0}, *bad_wr; + struct ibv_recv_wr wr = {}, *bad_wr; if (!qp->ibqp) { /* This field does not get initialized for QP0 and QP1 */ if (qp_type == IBV_QPT_SMI) { @@ -737,7 +737,7 @@ int rdma_backend_create_qp(RdmaBackendQP *qp, uint8_t qp_type, uint32_t max_recv_wr, uint32_t max_send_sge, uint32_t max_recv_sge) { - struct ibv_qp_init_attr attr = {0}; + struct ibv_qp_init_attr attr = {}; qp->ibqp = 0; @@ -782,7 +782,7 @@ int rdma_backend_create_qp(RdmaBackendQP *qp, uint8_t qp_type, int rdma_backend_qp_state_init(RdmaBackendDev *backend_dev, RdmaBackendQP *qp, uint8_t qp_type, uint32_t qkey) { - struct ibv_qp_attr attr = {0}; + struct ibv_qp_attr attr = {}; int rc, attr_mask; attr_mask = IBV_QP_STATE | IBV_QP_PKEY_INDEX | IBV_QP_PORT; @@ -821,7 +821,7 @@ int rdma_backend_qp_state_rtr(RdmaBackendDev *backend_dev, RdmaBackendQP *qp, union ibv_gid *dgid, uint32_t dqpn, uint32_t rq_psn, uint32_t qkey, bool use_qkey) { - struct ibv_qp_attr attr = {0}; + struct ibv_qp_attr attr = {}; union ibv_gid ibv_gid = { .global.interface_id = dgid->global.interface_id, .global.subnet_prefix = dgid->global.subnet_prefix @@ -880,7 +880,7 @@ int rdma_backend_qp_state_rtr(RdmaBackendDev *backend_dev, RdmaBackendQP *qp, int rdma_backend_qp_state_rts(RdmaBackendQP *qp, uint8_t qp_type, uint32_t sq_psn, uint32_t qkey, bool use_qkey) { - struct ibv_qp_attr attr = {0}; + struct ibv_qp_attr attr = {}; int rc, attr_mask; attr.qp_state = IBV_QPS_RTS; @@ -1012,7 +1012,7 @@ static void process_incoming_mad_req(RdmaBackendDev *backend_dev, complete_work(IBV_WC_GENERAL_ERR, VENDOR_ERR_INV_MAD_BUFF, bctx->up_ctx); } else { - struct ibv_wc wc = {0}; + struct ibv_wc wc = {}; memset(mad, 0, bctx->sge.length); build_mad_hdr((struct ibv_grh *)mad, (union ibv_gid *)&msg->umad.hdr.addr.gid, &msg->hdr.sgid, diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 21a55e225a61..a0f2b13a2438 100644 --- a/hw/rdma/vmw/pvrdma_cmd.c +++ b/hw/rdma/vmw/pvrdma_cmd.c @@ -123,7 +123,7 @@ static int query_port(PVRDMADev *dev, union pvrdma_cmd_req *req, { struct pvrdma_cmd_query_port *cmd = &req->query_port; struct pvrdma_cmd_query_port_resp *resp = &rsp->query_port_resp; - struct pvrdma_port_attr attrs = {0}; + struct pvrdma_port_attr attrs = {}; if (cmd->port_num > MAX_PORTS) { return -EINVAL; diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 508d8fca3c9b..5b9786efbe4b 100644 --- a/hw/rdma/vmw/pvrdma_qp_ops.c +++ b/hw/rdma/vmw/pvrdma_qp_ops.c @@ -114,7 +114,7 @@ static void pvrdma_qp_ops_comp_handler(void *ctx, struct ibv_wc *wc) static void complete_with_error(uint32_t vendor_err, void *ctx) { - struct ibv_wc wc = {0}; + struct ibv_wc wc = {}; wc.status = IBV_WC_GENERAL_ERR; wc.vendor_err = vendor_err; From patchwork Thu Mar 14 15:30:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10853117 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8F487139A for ; Thu, 14 Mar 2019 15:42:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 789A82A5A2 for ; Thu, 14 Mar 2019 15:42:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76B8B2A5CB; Thu, 14 Mar 2019 15:42:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0D4102A5DB for ; Thu, 14 Mar 2019 15:42:45 +0000 (UTC) Received: from localhost ([127.0.0.1]:39828 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4SVJ-0006kU-72 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 14 Mar 2019 11:42:45 -0400 Received: from eggs.gnu.org ([209.51.188.92]:48064) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h4SJq-0006Ar-Er for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h4SJm-0006S9-EA for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:54 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:44721) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h4SJl-0006QC-VT for qemu-devel@nongnu.org; Thu, 14 Mar 2019 11:30:50 -0400 Received: by mail-wr1-x441.google.com with SMTP id w2so6310828wrt.11 for ; Thu, 14 Mar 2019 08:30:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZrIRSjceMaARp68/6KKBGCWqfHpjnd9tX6EHHrCOEns=; b=DvoXG6Kr7cwxcs049VLW2m3Z2W/x5yHyW1PjR3BXIGzQfX0FKogYE1iuyYBeP4Owgq +iTBjtoJZ+f7u03SlUBQ/d8O2dgZqot593drXttHhmOeBKp0mx2h/cZs1CT+OVN6F3DO NK7CylpryHvwBkkg5Kr0zj2/7eqiNebp7xfdOSBwnJRhGxSFyN1UvCkYkOrg04y0gsox Kmm+yuCR5sKNKt+jR1BfnGEixOLonxE3lcMDcCcg7L/40JrJCyOPfOonyvkgp/fWeqoT 59mgjOUm0lymqEMvQG5/oCRgbpUqPRHfot8A1IsFwK0k59v/wSFpzv1Ha+hlTWfqHZ9x E44g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZrIRSjceMaARp68/6KKBGCWqfHpjnd9tX6EHHrCOEns=; b=hiBbj79FsYiccP2i5+LiwrcF8b4g4Hu6f8hawwVbtP9WWC7HUWWRJDqtnAj/wOQQnO 2TvpInU7PflIUA23lLUEhPWu8hN92vvYmDsEukTkz2yfElWzgOYSTznu7lR1S4fwj/5w MZNcH8ggHHrWRirfTryXOSEBHN+lX9x3r96GIllgsdYc8x39vKmDGAqUF9l8LWfDJPlw 2DljCgxTrl3v9wqTspv3hzYn2rXJmQlRtR2BCWACQnNKhs4Cd39BedA37+VLzbz5chKN N7hORyTxH9+yjzowUfQaj2wSfu10eYKhqzl9JmloZukIA5wpCzxR70drLxTqpI98Z5/n rnyg== X-Gm-Message-State: APjAAAXyaN+ld878/Y5xoVlyXG4pI2a/lQA9ldiyxba96qSZuZNGdCAY 4nnefuKKgUFSiJbRdYhd1qx+/KOE X-Google-Smtp-Source: APXvYqyX5Kn+IfZjX5U8UBo7D/LIMBIYIAlSZO1V+W037Nkt4A8N0Oe6G50NajFnas6DXf5btl37xg== X-Received: by 2002:a5d:5482:: with SMTP id h2mr12872595wrv.203.1552577447425; Thu, 14 Mar 2019 08:30:47 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id d9sm32070909wrn.72.2019.03.14.08.30.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 Mar 2019 08:30:46 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Thu, 14 Mar 2019 17:30:31 +0200 Message-Id: <20190314153031.7197-5-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190314153031.7197-1-kamalheib1@gmail.com> References: <20190314153031.7197-1-kamalheib1@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH v2 4/4] hw/pvrdma: Fix zero-initialization of resp in {query/modify}_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: , Cc: Kamal Heib , Yuval Shaia Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Make sure to zero-initialize only the pvrdma_cmd_query_qp_resp and not the whole pvrdma_cmd_resp for query_qp, in modify_qp the resp isn't used so remove it. Reviewed-by: Yuval Shaia Signed-off-by: Kamal Heib --- hw/rdma/vmw/pvrdma_cmd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index a0f2b13a2438..d1ca20a3f90d 100644 --- a/hw/rdma/vmw/pvrdma_cmd.c +++ b/hw/rdma/vmw/pvrdma_cmd.c @@ -488,8 +488,6 @@ static int modify_qp(PVRDMADev *dev, union pvrdma_cmd_req *req, struct pvrdma_cmd_modify_qp *cmd = &req->modify_qp; int rc; - memset(rsp, 0, sizeof(*rsp)); - /* No need to verify sgid_index since it is u8 */ rc = rdma_rm_modify_qp(&dev->rdma_dev_res, &dev->backend_dev, @@ -512,7 +510,7 @@ static int query_qp(PVRDMADev *dev, union pvrdma_cmd_req *req, struct ibv_qp_init_attr init_attr; int rc; - memset(rsp, 0, sizeof(*rsp)); + memset(resp, 0, sizeof(*resp)); rc = rdma_rm_query_qp(&dev->rdma_dev_res, &dev->backend_dev, cmd->qp_handle, (struct ibv_qp_attr *)&resp->attrs, cmd->attr_mask,