From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f66.google.com (mail-lf0-f66.google.com [209.85.215.66]) by dpdk.org (Postfix) with ESMTP id 12EDD1B1F9 for ; Thu, 7 Jun 2018 11:44:27 +0200 (CEST) Received: by mail-lf0-f66.google.com with SMTP id o9-v6so13665830lfk.1 for ; Thu, 07 Jun 2018 02:44:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+AjmDI6aZ+QubT5ck1FpgVnjT3GHwZVKE5nMgqdKLD8=; b=ej3LFw1qaZ1RNHpoamJBn5BuKchgXtME0+J4HW47PDt/0XbE9S3I4hJvkDcC4yunNe TAkjJHhEdOCBdyIWEMYc7NDuxx+mZBTPK3mR2FbZVha8mczb+C3W5MJU8oR2fhAEurEY v8zXeKJCDdyuAeJZB//t2snv2kp6vedZ3daDtKQ7xNjxOAoSqUVUXVShTjzwUEsbtAex jvpKcG5GoD577uCfXG9g7TSuYBiL/CwhXyXsu80S+lG2bhAIXP+JTvCUEkHSMAEzq7q3 pMG3LQjbHiuRktfN9yFEvImncVRo1EoxcTtIswoyvwgVq1nQDiynsCzqh5Xe4yw15SmV q8oQ== 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=+AjmDI6aZ+QubT5ck1FpgVnjT3GHwZVKE5nMgqdKLD8=; b=JcvDZ5Zw6FASN+vit6pn6hOwYcblBLdaiN7LdzA1DghFJS6JV791zWk66ahVaUTnQu xDP7YNCBqpse0evFphTCbx1vd7MHJQcgEEkeOoZjmu5eJiv6b0Vvnc1PpdK14ufh3K/f HfIngZ7TIiBRm95Mc5X6hAB0ZzQNxpZEeLGkYTT4w9SUPYqxACKIW16OcPmFvS8pZepR QBIUoOr+0Fxfnm/qicKG+isG1x8EDSLmwx9jemQ8Ryi4r+dztPNg581gg1S8Gl6lzBW8 aeKmSJOaWEf226K9Ud0p7Io/wFtUHmUahihnv76L5jVIL6536YwGcthBXsPyOvPwQmI4 WaGA== X-Gm-Message-State: APt69E2WbBaY4myQ2zIwfiPys1QDcJk6nzuDHCOSoDmS++XTGarPhP/T YaaXgwx+bdgDG02B5VvKHIIZfw== X-Google-Smtp-Source: ADUXVKL9ce+wsaWHxlCkd0Na4113kt4u5bt9H60qGmyyyz+lj1odHSKEDrQEZLt9EYcmCrNJ1fAttQ== X-Received: by 2002:a19:9dca:: with SMTP id g193-v6mr865415lfe.65.1528364666738; Thu, 07 Jun 2018 02:44:26 -0700 (PDT) Received: from mkPC.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id p28-v6sm3612368lfh.24.2018.06.07.02.44.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Jun 2018 02:44:24 -0700 (PDT) From: Michal Krawczyk To: Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin Cc: dev@dpdk.org, matua@amazon.com Date: Thu, 7 Jun 2018 11:43:21 +0200 Message-Id: <20180607094322.14312-26-mk@semihalf.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180607094322.14312-1-mk@semihalf.com> References: <20180607094322.14312-1-mk@semihalf.com> Subject: [dpdk-dev] [PATCH v3 26/27] net/ena: store handle after memory allocation X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jun 2018 09:44:27 -0000 The pointer received from rte_memzone_reserve from macro ENA_MEM_ALLOC_COHERENT_NODE was not stored anywhere, and as a result memory allocated by this macro could not been released. Signed-off-by: Michal Krawczyk --- drivers/net/ena/base/ena_plat_dpdk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h index 8a04e84b9..900ba1a6b 100644 --- a/drivers/net/ena/base/ena_plat_dpdk.h +++ b/drivers/net/ena/base/ena_plat_dpdk.h @@ -237,6 +237,7 @@ extern uint32_t ena_alloc_cnt; "ena_alloc_%d", ena_alloc_cnt++); \ mz = rte_memzone_reserve(z_name, size, node, \ RTE_MEMZONE_IOVA_CONTIG); \ + mem_handle = mz; \ if (mz == NULL) { \ virt = NULL; \ phys = 0; \ @@ -245,7 +246,6 @@ extern uint32_t ena_alloc_cnt; virt = mz->addr; \ phys = mz->iova; \ } \ - (void)mem_handle; \ } while (0) #define ENA_MEM_ALLOC_NODE(dmadev, size, virt, node, dev_node) \ -- 2.14.1