From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f65.google.com (mail-lf0-f65.google.com [209.85.215.65]) by dpdk.org (Postfix) with ESMTP id 1DD277CB3 for ; Mon, 4 Jun 2018 14:10:20 +0200 (CEST) Received: by mail-lf0-f65.google.com with SMTP id t134-v6so24809683lff.6 for ; Mon, 04 Jun 2018 05:10:20 -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=GiA9ipF5FzID0V2xgIxFmDnVDJe+P1RxY5uzZv8TWZY0P6HH86DNvM3qf7u8MpM/eU 4SW9aATrUfbBAyNveKkqnHTaajb5UbaS+Q+UG7MFQFEbi48n1N8m4eb278wQvTcIBUXe XUm1BLAnugs3kHSlzr5JkQsurSeu0QsKWS5aPUJz6z5fFtLVYlUwT4Hv+v6lu8caTfKz vwZCyj7xf+MdiEptlvk7rz9DmtACe4V/kf7vAWSUyxXEafE3yLe/C56wuKPGmJHtMYnM b7JRmRgtLCTS4T8C6ZvlYrYqVSh4+GvbXV9eXwASsaLJ4Cqnmm9OdnKDc8Ft5UU9hQ6Z fxGw== 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=rD6tC2HraEihIZrnV2WOquhCkYAd3TKGVp1dXs+8xZZ4HRoOQPTc9Ns/CasJCvsqgT eBDv0noFwIkyOJisVLEQXppYfW9n31u1knyI4tGcobrVQLpvaLEddZpf6W+eWNR15GOI VF5CzmW8/BLd4fpqJcoQDcxNC9l9a8j61OTBDmv8r5Tk9OuoMYCjn5P5itYlA1JdbBLE tORwC2FMEZn2ZcSMxCuzJw3s4knzjY8JF80ijZVIlj5IazNhbBLE+/VxVcb5R1SaoIEg tLqtTLWWYzrnp27oQuTqP/Gcv9F9a8HiGy0pOchKeQdXbuoxWb67MoxBxYz+ar424Skv wTfQ== X-Gm-Message-State: APt69E3QoTEkjB1G70tBH8VDWgzQx7AVyaCLaaIPO1dTGMP3urgqBG6x U9+1XjxjiKWPua2A1OPiz0eqX01wb9w= X-Google-Smtp-Source: ADUXVKKtBsFqf0l5223/yQajktIjVWWmUQQH32iDTVdzYRn+pxHabulLsEwvxorgupm0iedXg5gVbw== X-Received: by 2002:a19:ee06:: with SMTP id g6-v6mr10319621lfb.77.1528114219783; Mon, 04 Jun 2018 05:10:19 -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 g23-v6sm3817415lfi.49.2018.06.04.05.10.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Jun 2018 05:10:19 -0700 (PDT) From: Michal Krawczyk To: Marcin Wojtas , Michal Krawczyk , Guy Tzalik , Evgeny Schemeilin Cc: dev@dpdk.org, matua@amazon.com Date: Mon, 4 Jun 2018 14:09:53 +0200 Message-Id: <20180604120955.17319-16-mk@semihalf.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180604120955.17319-1-mk@semihalf.com> References: <20180604120955.17319-1-mk@semihalf.com> Subject: [dpdk-dev] [PATCH v2 25/26] 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: Mon, 04 Jun 2018 12:10:20 -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