From patchwork Sun Aug 19 20:22:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Apfelbaum X-Patchwork-Id: 959676 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=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SYJcUSDF"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41vDH12DGlz9s8T for ; Mon, 20 Aug 2018 22:52:27 +1000 (AEST) Received: from localhost ([::1]:46913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frjfU-0005LP-Il for incoming@patchwork.ozlabs.org; Mon, 20 Aug 2018 08:52:24 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43945) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frjYj-00007n-9Z for qemu-devel@nongnu.org; Mon, 20 Aug 2018 08:45:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frjYe-0000fS-Ha for qemu-devel@nongnu.org; Mon, 20 Aug 2018 08:45:23 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:35584) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frjYe-0000f6-Be for qemu-devel@nongnu.org; Mon, 20 Aug 2018 08:45:20 -0400 Received: by mail-wr1-x442.google.com with SMTP id g1-v6so12896161wru.2 for ; Mon, 20 Aug 2018 05:45:20 -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; bh=Llcp7f9bGfnoG7LGvSpNjUmXvrJElWJhyQKvB/3Cb0c=; b=SYJcUSDF//VQSJL0hxR7mF3AoTxmTTwK/YY8NJwNZk8eG7b2NsYVk33dn4d/XuuGKG VJLw59eKm75ye5LFD/z+urOYkBRl/obh+FotifVQoR6ZQkiJaj3L/O8bij7b5ahDj5kS El2MSvpEdGJEaW0UW1Lk0QN0bYCCB8aNNES/GSbfnP1sxPMelg5JPFKhB0HQIfHwlCKB gybjH0r4qUBTypQtDY/PdJ8I3AMYzblKRunFsLS80PlPhT0Pptc+R5OzdxU6CQIGBL0L rACU0cqs60B38eexamQZN4QfX3sK84ZHWRkucislPijzQvqrIT3t7me4ZjaManA2HTOy Vgzg== 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; bh=Llcp7f9bGfnoG7LGvSpNjUmXvrJElWJhyQKvB/3Cb0c=; b=UmvOmQX1xxE+9mif0Vbu5OMyzu7SccTEuPjMSOc9LX1c21U/7QybG6GIxOXyLwki0Q j+avL5IKrSvMctg6DKn3Ja/CeaxFXj1ZctMEmYNsLLYV6pXYJnQm+i7Oc9crK3noOvtq DrVol0zWjZesyzQ0hufRSFWz6VFYqrwwjyzM8kUHF7k2UQ9faW0BUz/s3H3jS6FfTnxQ GVSngGwTbA/bUQX2AGoJbc6Tk3SI8tHXeE3YAbipoEX8Gb0ikZK8JJPJaReHQZ7JffEG j8lPygdmQ1XiKHKgM6ugogngmfjDIIXoRGwHeBguLKLg6NFnBK6eSCdIJjdhh9tKP+te 0qDw== X-Gm-Message-State: AOUpUlHM0aTORM8io614N+lnOSA0HETOcTo0a/Pq6fgdeKGLi3F8IZM3 FK10NN5WoKailaV5hSqliXJfkcV8 X-Google-Smtp-Source: AA+uWPwVCXpa2DcN6AWK4RrrW2aoxfhf+mC6nEuxd0ubiiPYhTw0WftiRAYNguFI1v7GaWblHy8BMA== X-Received: by 2002:adf:e287:: with SMTP id v7-v6mr17805824wri.139.1534769119070; Mon, 20 Aug 2018 05:45:19 -0700 (PDT) Received: from localhost.localdomain ([176.228.154.53]) by smtp.gmail.com with ESMTPSA id g2-v6sm26704613wrd.71.2018.08.20.05.45.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 20 Aug 2018 05:45:18 -0700 (PDT) From: Marcel Apfelbaum To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Sun, 19 Aug 2018 23:22:53 +0300 Message-Id: <20180819202300.10590-9-marcel.apfelbaum@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180819202300.10590-1-marcel.apfelbaum@gmail.com> References: <20180819202300.10590-1-marcel.apfelbaum@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 Subject: [Qemu-devel] [PATCH PULL 08/15] hw/rdma: Reorder resource cleanup 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: thuth@redhat.com, yuval.shaia@oracle.com Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Yuval Shaia To be consistence with allocation do the reverse order in deallocation Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum Message-Id: <20180805153518.2983-9-yuval.shaia@oracle.com> Signed-off-by: Marcel Apfelbaum --- hw/rdma/rdma_rm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index bf4a5c71b4..1f014b4ab2 100644 --- a/hw/rdma/rdma_rm.c +++ b/hw/rdma/rdma_rm.c @@ -543,8 +543,9 @@ void rdma_rm_fini(RdmaDeviceResources *dev_res) res_tbl_free(&dev_res->uc_tbl); res_tbl_free(&dev_res->cqe_ctx_tbl); res_tbl_free(&dev_res->qp_tbl); - res_tbl_free(&dev_res->cq_tbl); res_tbl_free(&dev_res->mr_tbl); + res_tbl_free(&dev_res->cq_tbl); res_tbl_free(&dev_res->pd_tbl); + g_hash_table_destroy(dev_res->qp_hash); }