From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com [209.85.212.174]) by dpdk.org (Postfix) with ESMTP id 9F2B858D4 for ; Thu, 3 Sep 2015 15:23:38 +0200 (CEST) Received: by wibz8 with SMTP id z8so98865111wib.1 for ; Thu, 03 Sep 2015 06:23:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=Jj52ATC0fM/6LzK7WUiReYxKA/PhnXo35V+1zJist9k=; b=a02xnhB5q92twdMLTWaXTElogTXKKYsJQVdk6nmZ7xs/QHbez/zPa3bRp5iEcUQb8+ CaT8zfW7c34wwr3zjwozkY4BcjhkrdZOIl4O7Kp3L9J8Yu5RLzQt7ER3oI/B+ePSShwP 5dgcL3jXQ5z/14/rRwNyAXnUEIR4PLmQHpsCOnyvbn5jHncdE6mxID4ZeMgYLFpiPl4Y E/sAWaWQZ6L8hWBEDkrVNiZuf2449lP9RmNn5CR3wSjGlPCeUlkjhmF6/6cn3XKFEj6I Rtn12qdTSS5EUmJ4dzED2pTTq3zbGbTtbXn2CX4PSMRmb0rrSXjO9XEm1IPMJ2hA8I7l qJCw== X-Gm-Message-State: ALoCoQnU3z6gIgkmEhhM4lMF5gKcOl4X53xHbpk5D4th53cYH+puDG5m/AOayF8T6KFpdAo/H2eB X-Received: by 10.180.81.70 with SMTP id y6mr13929341wix.36.1441286618450; Thu, 03 Sep 2015 06:23:38 -0700 (PDT) Received: from gloops.dev.6wind.com (89-158-215-180.rev.numericable.fr. [89.158.215.180]) by smtp.gmail.com with ESMTPSA id uc12sm9002673wib.13.2015.09.03.06.23.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Sep 2015 06:23:37 -0700 (PDT) From: David Marchand To: dev@dpdk.org Date: Thu, 3 Sep 2015 15:23:30 +0200 Message-Id: <1441286610-16935-1-git-send-email-david.marchand@6wind.com> X-Mailer: git-send-email 1.9.1 Subject: [dpdk-dev] [PATCH] i40e: fix base driver allocation when on numa != 0 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Sep 2015 13:23:38 -0000 Seen by code review. If dpdk is run with memory only available on socket 0, then i40e pmd refuses to initialize ports as this pmd requires some memory on socket 0. Fix this by setting socket to SOCKET_ID_ANY, so that allocations happen on the caller socket. Signed-off-by: David Marchand --- drivers/net/i40e/i40e_ethdev.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 40b0526..2dd9fdc 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2099,10 +2099,11 @@ i40e_allocate_dma_mem_d(__attribute__((unused)) struct i40e_hw *hw, id++; snprintf(z_name, sizeof(z_name), "i40e_dma_%"PRIu64, id); #ifdef RTE_LIBRTE_XEN_DOM0 - mz = rte_memzone_reserve_bounded(z_name, size, 0, 0, alignment, - RTE_PGSIZE_2M); + mz = rte_memzone_reserve_bounded(z_name, size, SOCKET_ID_ANY, 0, + alignment, RTE_PGSIZE_2M); #else - mz = rte_memzone_reserve_aligned(z_name, size, 0, 0, alignment); + mz = rte_memzone_reserve_aligned(z_name, size, SOCKET_ID_ANY, 0, + alignment); #endif if (!mz) return I40E_ERR_NO_MEMORY; -- 1.9.1