From patchwork Wed Mar 13 08:46:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10850819 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 56E251669 for ; Wed, 13 Mar 2019 09:03:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 43A6929AD4 for ; Wed, 13 Mar 2019 09:03:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 35D3429AD6; Wed, 13 Mar 2019 09:03:22 +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 D709429AD4 for ; Wed, 13 Mar 2019 09:03:21 +0000 (UTC) Received: from localhost ([127.0.0.1]:40746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3znE-0001DL-LS for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 Mar 2019 05:03:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46981) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zg5-0003Ij-7s for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:55:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3zY3-0005Sh-S7 for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:40 -0400 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]:38771) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3zY2-0005RQ-Ol for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:39 -0400 Received: by mail-wr1-x444.google.com with SMTP id g12so986690wrm.5 for ; Wed, 13 Mar 2019 01:47:38 -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=a488wIQNiTRFgFxu6M5wrImk569WnQNvbAVYXH7Wifo=; b=hwbktXQZcPyrr4Ty0JZQ87tyHkAftl5ZbRmGpyBCDoGzh5uEL1i2FJpSQnH/bajRlP J4PBn2jbdxIZksXIAtuI4Rvk303pmmhw+hgaHRriakx9ZcWRIv5CGUCeOTUa+pcFkOJ8 bKGOqhM6viQiImoXjjJXtDH1OWYwOTLSiAqQZk3zFc7BbucLqLZ++qEivG9GpUPxFG+S wHwWhvWCf+kda2UH9iAG0pcgkZd/+VlEToOijxXejL8cFB+jfzPRKkq61qlb11wZDWIW fvigLaY1Os2hpkt4SJ1lp+FYTG1Lke/cILVHvFhultlqzmMOe4vozlPzn8Hk7mxsrQVj NCzA== 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=a488wIQNiTRFgFxu6M5wrImk569WnQNvbAVYXH7Wifo=; b=OBqSZkIVFEAytB3iRrjUucBl6LRKfrTt4R93CGCdGE74/9tQBX0D2K9w6YdiLLi/hz w+tf9h8i1n4JPlIRUrUXOzYrgHGiPyHsA46iG6HuI/Dgy5jLJf54Q8pJ1vYAqURTvAJA 4cvzgfeYLWRvh2ySiNOMnNohIe2rjS4X1ac96LPpgx3lihy8Z0/1kSXbm1GGjP+tQKdV TqSCimEXORfxmFfKI/dp2Z8OspxuXiv41CqPqhIgQGEbSt0+APY6/yX/z+gFesCo62T0 BwlvyqESHjuKVQi98l30XXskIzUHYe6ir4dBXgySMpI1C/cwtZPmsBkzmTaZfIyS+ZuI 4AAQ== X-Gm-Message-State: APjAAAUrSB5SRuM66oMAtP9aDVzvlSnS6kiSKb3GSwJr+vt0cetOiq/Y EjEzyceycUzZvTxpEGMLHj8eyYFZ X-Google-Smtp-Source: APXvYqyzCitY7gI0K9Tdbx00hjWOARHcP9nQB14Ml20P9Sp6GAWeFQbv7xQyIVeA6M4vxel5BL1B3w== X-Received: by 2002:adf:f60d:: with SMTP id t13mr26489067wrp.225.1552466857107; Wed, 13 Mar 2019 01:47:37 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id o18sm37683587wrg.40.2019.03.13.01.47.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 01:47:36 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Wed, 13 Mar 2019 10:46:45 +0200 Message-Id: <20190313084648.9513-2-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190313084648.9513-1-kamalheib1@gmail.com> References: <20190313084648.9513-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::444 Subject: [Qemu-devel] [PATCH 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". 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 Wed Mar 13 08:46:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10850811 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 2938517DF for ; Wed, 13 Mar 2019 09:00:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 167D529A52 for ; Wed, 13 Mar 2019 09:00:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B03829AD4; Wed, 13 Mar 2019 09:00:43 +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 B4FFE29A52 for ; Wed, 13 Mar 2019 09:00:42 +0000 (UTC) Received: from localhost ([127.0.0.1]:40718 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zkg-0007Xz-10 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 Mar 2019 05:00:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47176) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zg5-0003Q2-42 for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:55:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3zY4-0005TN-Nd for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:42 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:33908) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3zY3-0005S9-UB for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:40 -0400 Received: by mail-wr1-x441.google.com with SMTP id k1so446992wre.1 for ; Wed, 13 Mar 2019 01:47:39 -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=lI0cjwNojiBWCutfji/T7H3ND9hiM1OI/u0zxYkh6Zg=; b=Siw2n4IOF0T12uy2xje7DoPP4mz40LXxPgMoj75P4zUau1BEGrvT07MyH9oBtK8eui JLulcBM06W6cqU3/VrMdBt+/ENprnssuFXjudBe54l2kOjUpB/Zv+RUKhbvgcPmgUdo+ OFxCG5kvmD8XBKkdZOuB1MkS635g/QDIXxHMdeye9D8i2HQG8DsRNwapJ/Yh/cyZkKBX 7bobstkkwh10XZWfFb8WoB/1TZraITtc8ZwyuuNQcvFl/xjXN98J+M/CBQs/IRvkwKdz QV0v2RLIFsGohMcc/Zg8X8AKW6aVHfU03hQQ5kbs4n6hGqHbLiqmWcoUd5n7G6zbqQXk 1OOw== 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=lI0cjwNojiBWCutfji/T7H3ND9hiM1OI/u0zxYkh6Zg=; b=C5heLe9mB/u7n22nO5ggWfBndD/wv3Og4iV3/hcARTAVcvKHFu9ZivgC84Y1X3RfsA wUuK717drpY2g1KShPFTMui7b4rU541X5uzWNyL5yIK2kHF2n0DDQheqWm2i9CoRPF1A 9XqmCLDL5DcjUojwe2xkaSwF3HGTylWIt+qyw1/TxR4IzVffqUMjs8J2bv0yAPVoKQEt TyzC0MNm5g2b4DEmcpIMqgTJXst1sXGEb/XXZVFBIanGb2yS1LSDgaqWRWR2BU+8KEDq gtOFYqd5BWAFNI9AJrRmh3QtPxYdZJntzTYK1aBs5wunZNZp4kEXhWvOARsmcSCn7BSd e7kg== X-Gm-Message-State: APjAAAXFSquJjXYycAr2EVjW9B1iGBdDJfXBhCQS3cLKuUZh/NO2n45R uDGbFyunI31Dl5uveYbcdKEfOZNs X-Google-Smtp-Source: APXvYqyoMHsheIp0P5uHm5ALtTOUKMi2xTqMHslhUsRveTReBZ2xB0PgD0xJXh+/heJCg+hZMYTkfA== X-Received: by 2002:adf:c704:: with SMTP id k4mr21362259wrg.142.1552466858461; Wed, 13 Mar 2019 01:47:38 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id o18sm37683587wrg.40.2019.03.13.01.47.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 01:47:38 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Wed, 13 Mar 2019 10:46:46 +0200 Message-Id: <20190313084648.9513-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190313084648.9513-1-kamalheib1@gmail.com> References: <20190313084648.9513-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 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. Signed-off-by: Kamal Heib Reviewed-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- 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 Wed Mar 13 08:46:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10850795 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 9B9811669 for ; Wed, 13 Mar 2019 09:00:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 832FB28C1D for ; Wed, 13 Mar 2019 09:00:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7056E299E1; Wed, 13 Mar 2019 09:00:12 +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 E0D7528C1D for ; Wed, 13 Mar 2019 09:00:11 +0000 (UTC) Received: from localhost ([127.0.0.1]:40703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zkB-00072u-6j for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 Mar 2019 05:00:11 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zg4-0003Kb-S5 for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:55:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3zY8-0005VY-G9 for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:45 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:52566) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3zY6-0005T9-HU for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:42 -0400 Received: by mail-wm1-x344.google.com with SMTP id f65so979085wma.2 for ; Wed, 13 Mar 2019 01:47:41 -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=Az/vZonZ5pN2ZVBStLxXLovnbZP/gBft2ZYLS9IkX9c=; b=blloXn1j41VkVhaS/NvflyVhfY2FNR2W9wCnkDz6ijcDjLC+i4FdC+u4Ou5pnCSW3B fhFHoXgyqiqUkLV4tCBckxg2cGnmc4k1ZAhdpVaLXg+13hYwX8p3CRJJwP1N/xtp2crR 3oqhAY5oekmRMETgfSKMc41vGUkSxReNTiP2QbHNMVjzm8IRJcxmqD3q56SdDxNWR4yc kKleKZmUZXYzQnWViNkumT8INbSSoF3uMUgkqbmlysf6M5aAuHSC41ViXDQzrV/nQVE4 V+ZcR8NY37FbD/l7tGiljBtY/ivg6ULsqThAzkXq4lU14qZjsKS0/VdD8/9q5N+iK1MJ SrxQ== 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=Az/vZonZ5pN2ZVBStLxXLovnbZP/gBft2ZYLS9IkX9c=; b=LcQ2JwgHhzG3vh835dmRs8uqtp1x7gMOi0RYtuE/FeLqchNYbTns06wZVqXNPXdJCT xXbBNmk0dmli2TQfPzvnVOcRsdFsbpLPoLKsfNTV3uxfoi+HZdus5E0315+QiZanF0fK m9tDgHQItYLkAC8ZrxrCEvDFxm/g/IDma5ktwb2vDNE0EftguZo0M7hFYXOMRBL00TZF HH7m1t13DbqZgUJUEW9hZ9uqh0Sh6NfykSebJGUm27Qic/kABg1DAFUCKMGMFIULVWtj Kp/vKaTZ1L8Q2cL2DTu4bwq131vl5nKwYoCaLwrYgjgZz4MyktBHI5U3Kshz0p1kQjY/ 5szg== X-Gm-Message-State: APjAAAXMWpDPIrfOBCVskWlqID6RwaRXepETwUhdmizZ2ruJ4JjvyOVS zTifwuZhD2sFibT2hLYmBZ19Gvri X-Google-Smtp-Source: APXvYqxtlISRf+zybZ5+VWq4R3wJsuuOYZo/WpzCDNmZM7FV946gx8oZ2r4us0Z4fBSpjOYU3m1QQw== X-Received: by 2002:a1c:eb17:: with SMTP id j23mr1326845wmh.86.1552466859800; Wed, 13 Mar 2019 01:47:39 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id o18sm37683587wrg.40.2019.03.13.01.47.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 01:47:39 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Wed, 13 Mar 2019 10:46:47 +0200 Message-Id: <20190313084648.9513-4-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190313084648.9513-1-kamalheib1@gmail.com> References: <20190313084648.9513-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::344 Subject: [Qemu-devel] [PATCH 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 Signed-off-by: Kamal Heib Reviewed-by: Marcel Apfelbaum --- 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 Wed Mar 13 08:46:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10850791 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 8D8CF1390 for ; Wed, 13 Mar 2019 08:57:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 778C929AD2 for ; Wed, 13 Mar 2019 08:57:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B46C29AD5; Wed, 13 Mar 2019 08:57: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 1D7B329AD2 for ; Wed, 13 Mar 2019 08:57:47 +0000 (UTC) Received: from localhost ([127.0.0.1]:40658 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zhq-00052R-Ct for patchwork-qemu-devel@patchwork.kernel.org; Wed, 13 Mar 2019 04:57:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3zg4-0003LJ-VH for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:55:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3zY8-0005Vn-L2 for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:45 -0400 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]:37233) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3zY8-0005U9-EH for qemu-devel@nongnu.org; Wed, 13 Mar 2019 04:47:44 -0400 Received: by mail-wr1-x443.google.com with SMTP id y15so990476wro.4 for ; Wed, 13 Mar 2019 01:47:42 -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=3xWbK+cf59pdg/jJAcewyR4c1JH0Cz+jH6tRL0PeMMQ=; b=hdLHCEAgbWZMnj6pA85h5G07HUWjQbmJLT7svslAchrQiussB0O5TzC+XZ0ihuTID3 uuFfG5vjYswIU88Yga8jNZ1OhtU1pKlE70yfQ+5/MxJRjjLXk6+cMEHYf+Uou2TtbRVD jHlWVjsIlWFXcT4qMAzG8hK2wFJuPgGM7D0/egkFYOr8XJ34nr1K7ztakecAbM6g5hIz 6+t9YUgESy69PyAns7JxuuJRgwYgHer3i6lLg53WCJ8habJWsKBg9dTEY/Y/Qmjr3nNR FfNBROTxXF6aQDtZOwe6+Ji1+2MbHDlGKiVmdKQhqFRdtYjL4MJZmXKJGW6OANhc07zU DAVw== 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=3xWbK+cf59pdg/jJAcewyR4c1JH0Cz+jH6tRL0PeMMQ=; b=eWIzjjRmL1d+qWN0yX+RdqgmbngRWRKQCz1fgQaYZSBRV5wPPnJvUjR2edkkV2lyP6 Q30DMXGgXvBuXjqKyhLoUWwfb5/moO9NcQXySHFRSxcYbeQ03Dj3G+CPjqSL6qSdAkiA 1TYEY0/uLv494hvfsjLCmYQNXiULct7B8txUSlyRakpNrhRww6wtqWibMUhSRZ2AzUUt f8LPxORqtOdVPCU4yyh673jxVUfcyKercy3AOsGCV22TlI/9DU8ndPfnB0988Cjr1Myu hakTFkkW0nTFxDn7F0knLpQTPb8KbhDLMdLugAjmZfp5qulVrfixFU+mPKuXbrInSC4m BjuA== X-Gm-Message-State: APjAAAWWdTOkptot6xWjLxttIH8o7u8TCrB60/N8Ce/PAfKZPJhmQskO FJS1KrHTNr9CSWeEid92xBTjdKaf X-Google-Smtp-Source: APXvYqw80SeqaSXodRPopqBjaFeh74ojHBQHALIubWHu4YIdclQNMVe2w3nqFHN233ikZhlYQJ5SNg== X-Received: by 2002:adf:f2c9:: with SMTP id d9mr12251430wrp.308.1552466861336; Wed, 13 Mar 2019 01:47:41 -0700 (PDT) Received: from kheib-workstation.redhat.com ([192.116.94.220]) by smtp.gmail.com with ESMTPSA id o18sm37683587wrg.40.2019.03.13.01.47.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 13 Mar 2019 01:47:40 -0700 (PDT) From: Kamal Heib To: qemu-devel@nongnu.org Date: Wed, 13 Mar 2019 10:46:48 +0200 Message-Id: <20190313084648.9513-5-kamalheib1@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190313084648.9513-1-kamalheib1@gmail.com> References: <20190313084648.9513-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 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. Signed-off-by: Kamal Heib Reviewed-by: Yuval Shaia Reviewed-by: Yuval Shaia --- 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,