From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 4EE9FA05D3 for ; Tue, 23 Apr 2019 18:54:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C931A1B4E3; Tue, 23 Apr 2019 18:53:56 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id A548E1B0FC for ; Tue, 23 Apr 2019 18:53:48 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id 9so7771988pfj.13 for ; Tue, 23 Apr 2019 09:53:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e2OAOyI51TjoT/4QB1GtTC1iGYMT4d/z1QSisRfvmcw=; b=Kd6cabj142ar0x+I/SgKoJtqcjHKYLkF/X7ka0tgb62IAZSQRidrgaTVwMqJZ3C6gA BlP3R1Aw7CO3FszRliJUfOh07xJ6b5KrXx0VbzSGjDmU7q04387THK7QYlfdFPCX7ub8 OonMZpALlppl7fSXjI/MntIA2YrFYHm1H53YUd4o9/uDKERZgPqn9g5Bsuf9leEQdoyZ L9C7ZnSgx/6ntUSnSwlMx+UMUVqE8NXukyneBQwUgQBBZZxlxbUklTIj8Y3ii5mgqs2d YD7/1aVJPXAbeaiJcs5YkDHGhkB6G7hpN1eh76O0qBs04l8snmbutUir63bTvfbgZjQQ /+5A== 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=e2OAOyI51TjoT/4QB1GtTC1iGYMT4d/z1QSisRfvmcw=; b=qLRycfGY8zNWBC4hHMiMLKvbs/cyxy1XToZ4BXty6UL0YgG4p2w4epW8xT4/vm9uUd /Yx+p7h99lB4hzNjuO3iJhdTdlO3NkHXlu3SnfneE69bMx8WDZCeCAOUJ1gg9TCNOA7P vnfq5lYH6fjniYElyBVu4NnUN9RVInlx4yg9l6hao5xpkdUj94s6EXXiAQ15tj4Y6Dph wDTMdm4QsHCR2nHpp4jMxrOqbuI8yuaUkGdIJSZ7g5DGNO9YlQrfZxF9PWG1qdMIu1DJ n3xfCasFB5gpLa/qqbik8gbuQ7y1waIjMDuq/B8xtYZBn70X4LCjmrYmimIOlk2XT5oy eLJw== X-Gm-Message-State: APjAAAUgNx25CMurs0GuwI6Qv0pXjxM60omANZMA2WknvWR0/LyKrI2h ho0aLEsHTNcYAoB9kXp0/ldjgcmtyWQ= X-Google-Smtp-Source: APXvYqyrBtenf8wbps/1u13Oi3PLebBn2e2wWvoKENArhzdFXarHCXyz7Oc4eDAQ1WMTgqdziI3Avg== X-Received: by 2002:a62:4351:: with SMTP id q78mr27334923pfa.86.1556038427902; Tue, 23 Apr 2019 09:53:47 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 71sm47194750pfs.36.2019.04.23.09.53.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Apr 2019 09:53:46 -0700 (PDT) From: Stephen Hemminger To: bruce.richardson@intel.com Cc: dev@dpdk.org, Stephen Hemminger Date: Tue, 23 Apr 2019 09:53:34 -0700 Message-Id: <20190423165335.4025-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423165335.4025-1-stephen@networkplumber.org> References: <20190423164812.3427-1-stephen@networkplumber.org> <20190423165335.4025-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2 3/4] net/ring: use rte_calloc_socket 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190423165334.CFEtBconnGK9myfo4X84rauj4Gxlka0aUBYCEK4sFU4@z> Use rte_calloc_socket instead of computing size. Signed-off-by: Stephen Hemminger --- drivers/net/ring/rte_eth_ring.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index 2e4ca3b16a1c..0355f2b7c4d8 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -270,15 +270,15 @@ do_eth_dev_ring_create(const char *name, PMD_LOG(INFO, "Creating rings-backed ethdev on numa socket %u", numa_node); - rx_queues_local = rte_zmalloc_socket(name, - sizeof(void *) * nb_rx_queues, 0, numa_node); + rx_queues_local = rte_calloc_socket(name, nb_rx_queues, + sizeof(void *), 0, numa_node); if (rx_queues_local == NULL) { rte_errno = ENOMEM; goto error; } - tx_queues_local = rte_zmalloc_socket(name, - sizeof(void *) * nb_tx_queues, 0, numa_node); + tx_queues_local = rte_calloc_socket(name, nb_tx_queues, + sizeof(void *), 0, numa_node); if (tx_queues_local == NULL) { rte_errno = ENOMEM; goto error; -- 2.20.1