From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id CEEA0A0613 for ; Tue, 30 Jul 2019 19:21:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7430E1BF14; Tue, 30 Jul 2019 19:21:59 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id CC31D1BF03 for ; Tue, 30 Jul 2019 19:21:58 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 7533321E95; Tue, 30 Jul 2019 13:21:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 30 Jul 2019 13:21:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=mesmtp; bh=lMrgljgkEz Z1UDAbDsLJWJ24lx4MjuIeERlg8d6bjBk=; b=Z2w7ghHQEM2Tdszj225K0302l1 LrTB7UyWip2lDYXUV//FaLttxtHE8nJnqR2J5/r8JGDUa1cuIBuVJBwjXcm7lhwd JYbnE5TvU0xBpNJQu8xeaK7/bQ2OCOcXIsPqeuCnefIIcy/TGlEsfDfzLn/514d8 gdBOPTItJ5hJjfCNg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=lMrgljgkEzZ1UDAbDsLJWJ24lx4MjuIeERlg8d6bjBk=; b=s+2mNqEN XXq1GiDnA61o95qkVSijSlhnm4ZwsJfyyLJKX/Lnk7C569vl3RjrRxiPEcMyj/4E q5wEXmkKMF+7Zw2EHYb1TVeL7/IpWjidKl0cXLckDwDBQ7RBaoM8zlXt2rDVIhUr mT36BLvKejDpr2Pqalk22HNi5ngNrp0OnxJ32C03LNy7Y3wcBcctzQ1AAnC+VQ/t 9Vtw1Dsow9dYOTGhEWtgCENVDtoefmuqiSFlOcYc8+6N3PJk6rx3Xdnc8AL/lUkb xw603GJJ8z7LXlEacJhzNGgI1GnNe56bn+0rv6zwdRgKhHEH8KheN6QLIo39uP4L zu0w/on+xh9Mqw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrleefgdduuddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepvfhhohhmrghsucfoohhnjhgrlhhonhcuoehthhhomhgrshes mhhonhhjrghlohhnrdhnvghtqeenucfkphepjeejrddufeegrddvtdefrddukeegnecurf grrhgrmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtnecu vehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from xps.monjalon.net (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 63E0A80063; Tue, 30 Jul 2019 13:21:57 -0400 (EDT) From: Thomas Monjalon To: anatoly.burakov@intel.com Cc: dev@dpdk.org Date: Tue, 30 Jul 2019 19:21:53 +0200 Message-Id: <20190730172153.29008-1-thomas@monjalon.net> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190718093432.14092-1-thomas@monjalon.net> References: <20190718093432.14092-1-thomas@monjalon.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3] eal: warn on legacy memory allocation requirement 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" When using --no-huge mode, dynamic allocation is not supported. Because of this limitation, the option --legacy-mem is implied and -m may be needed to specify the amount of memory to allocate. Otherwise the default amount MEMSIZE_IF_NO_HUGE_PAGE will be allocated. The option --socket-mem can also be used with --legacy-mem when hugepages are supported. Signed-off-by: Thomas Monjalon --- v3: - replace "allocation" with "amount of reserved memory" - add --socket-mem - more rewording v2: - user-oriented message - trigger warning on any legacy mem option --- lib/librte_eal/common/eal_common_options.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 512d5088e..ab0b6082b 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -1589,6 +1589,11 @@ eal_check_common_options(struct internal_config *internal_cfg) "with --"OPT_MATCH_ALLOCATIONS"\n"); return -1; } + if (internal_cfg->legacy_mem && internal_cfg->memory == 0) { + RTE_LOG(NOTICE, EAL, "Static memory layout is selected, " + "amount of reserved memory can be adjusted with " + "-m or --"OPT_SOCKET_MEM"\n"); + } return 0; } -- 2.21.0