From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 357DB4554D; Tue, 2 Jul 2024 16:46:45 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 590F640B9E; Tue, 2 Jul 2024 16:46:40 +0200 (CEST) Received: from smtp-fw-52003.amazon.com (smtp-fw-52003.amazon.com [52.119.213.152]) by mails.dpdk.org (Postfix) with ESMTP id A3248402AD for ; Tue, 2 Jul 2024 16:46:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1719931598; x=1751467598; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=h/4AfrN52IIHu066EMPyB3sGNyFYDgcUePgrT137c68=; b=BtRRl74ZBv/Epy8sPDkpi0OPuteEjQjTPODyVzoVMu65D0wZ4S1Xukcm Urex80SM9Fr3l1SIGNvns05xuH3W1i9YkBjzw6fkNgpEd5eAnuacC4obz b4Zn4+CSTRgaAzkeDcZG0KSFescExh4R7aqvnKOh8ihcapznczjgHHk4Z M=; X-IronPort-AV: E=Sophos;i="6.09,178,1716249600"; d="scan'208";a="8904848" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO smtpout.prod.us-west-2.prod.farcaster.email.amazon.dev) ([10.43.8.6]) by smtp-border-fw-52003.iad7.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Jul 2024 14:46:38 +0000 Received: from EX19MTAEUB001.ant.amazon.com [10.0.17.79:54268] by smtpin.naws.eu-west-1.prod.farcaster.email.amazon.dev [10.0.12.198:2525] with esmtp (Farcaster) id a68e4e32-2de0-4840-aa6e-fad4e5600b92; Tue, 2 Jul 2024 14:46:36 +0000 (UTC) X-Farcaster-Flow-ID: a68e4e32-2de0-4840-aa6e-fad4e5600b92 Received: from EX19D007EUA001.ant.amazon.com (10.252.50.133) by EX19MTAEUB001.ant.amazon.com (10.252.51.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Tue, 2 Jul 2024 14:46:36 +0000 Received: from EX19MTAUWB001.ant.amazon.com (10.250.64.248) by EX19D007EUA001.ant.amazon.com (10.252.50.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.1258.34; Tue, 2 Jul 2024 14:46:35 +0000 Received: from HFA15-CG15235BS.amazon.com (10.85.143.173) by mail-relay.amazon.com (10.250.64.254) with Microsoft SMTP Server id 15.2.1258.34 via Frontend Transport; Tue, 2 Jul 2024 14:46:34 +0000 From: To: CC: , Shai Brandes Subject: [PATCH 02/15] net/ena/base: remove unused param Date: Tue, 2 Jul 2024 17:46:13 +0300 Message-ID: <20240702144626.14545-3-shaibran@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240702144626.14545-1-shaibran@amazon.com> References: <20240702144626.14545-1-shaibran@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Shai Brandes Remove an unused dev_node parameter when allocating DMA memory. Signed-off-by: Shai Brandes --- drivers/net/ena/base/ena_com.c | 9 ++------- drivers/net/ena/base/ena_plat_dpdk.h | 11 +++++------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/net/ena/base/ena_com.c b/drivers/net/ena/base/ena_com.c index 24756e5e76..9e1fa40c0c 100644 --- a/drivers/net/ena/base/ena_com.c +++ b/drivers/net/ena/base/ena_com.c @@ -328,7 +328,6 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_dev, struct ena_com_io_sq *io_sq) { size_t size; - int dev_node = 0; memset(&io_sq->desc_addr, 0x0, sizeof(io_sq->desc_addr)); @@ -347,8 +346,7 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_dev, io_sq->desc_addr.virt_addr, io_sq->desc_addr.phys_addr, io_sq->desc_addr.mem_handle, - ctx->numa_node, - dev_node); + ctx->numa_node); if (!io_sq->desc_addr.virt_addr) { ENA_MEM_ALLOC_COHERENT(ena_dev->dmadev, size, @@ -377,8 +375,7 @@ static int ena_com_init_io_sq(struct ena_com_dev *ena_dev, ENA_MEM_ALLOC_NODE(ena_dev->dmadev, size, io_sq->bounce_buf_ctrl.base_buffer, - ctx->numa_node, - dev_node); + ctx->numa_node); if (!io_sq->bounce_buf_ctrl.base_buffer) io_sq->bounce_buf_ctrl.base_buffer = ENA_MEM_ALLOC(ena_dev->dmadev, size); @@ -417,7 +414,6 @@ static int ena_com_init_io_cq(struct ena_com_dev *ena_dev, struct ena_com_io_cq *io_cq) { size_t size; - int prev_node = 0; memset(&io_cq->cdesc_addr, 0x0, sizeof(io_cq->cdesc_addr)); @@ -436,7 +432,6 @@ static int ena_com_init_io_cq(struct ena_com_dev *ena_dev, io_cq->cdesc_addr.phys_addr, io_cq->cdesc_addr.mem_handle, ctx->numa_node, - prev_node, ENA_CDESC_RING_SIZE_ALIGNMENT); if (!io_cq->cdesc_addr.virt_addr) { ENA_MEM_ALLOC_COHERENT_ALIGNED(ena_dev->dmadev, diff --git a/drivers/net/ena/base/ena_plat_dpdk.h b/drivers/net/ena/base/ena_plat_dpdk.h index dffe60705d..eaa509bc2a 100644 --- a/drivers/net/ena/base/ena_plat_dpdk.h +++ b/drivers/net/ena/base/ena_plat_dpdk.h @@ -240,23 +240,22 @@ ena_mem_alloc_coherent(struct rte_eth_dev_data *data, size_t size, rte_memzone_free(mem_handle); }) #define ENA_MEM_ALLOC_COHERENT_NODE_ALIGNED( \ - dmadev, size, virt, phys, mem_handle, node, dev_node, alignment) \ + dmadev, size, virt, phys, mem_handle, node, alignment) \ do { \ void *virt_addr; \ dma_addr_t phys_addr; \ - ENA_TOUCH(dev_node); \ (mem_handle) = ena_mem_alloc_coherent((dmadev), (size), \ (node), (alignment), &virt_addr, &phys_addr); \ (virt) = virt_addr; \ (phys) = phys_addr; \ } while (0) #define ENA_MEM_ALLOC_COHERENT_NODE( \ - dmadev, size, virt, phys, mem_handle, node, dev_node) \ + dmadev, size, virt, phys, mem_handle, node) \ ENA_MEM_ALLOC_COHERENT_NODE_ALIGNED(dmadev, size, virt, phys, \ - mem_handle, node, dev_node, RTE_CACHE_LINE_SIZE) -#define ENA_MEM_ALLOC_NODE(dmadev, size, virt, node, dev_node) \ + mem_handle, node, RTE_CACHE_LINE_SIZE) +#define ENA_MEM_ALLOC_NODE(dmadev, size, virt, node) \ do { \ - ENA_TOUCH(dmadev); ENA_TOUCH(dev_node); \ + ENA_TOUCH(dmadev); \ virt = rte_zmalloc_socket(NULL, size, 0, node); \ } while (0) -- 2.17.1