From patchwork Thu Jul 18 09:34:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 56709 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A11C21DBE; Thu, 18 Jul 2019 11:34:54 +0200 (CEST) Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) by dpdk.org (Postfix) with ESMTP id 44867137C for ; Thu, 18 Jul 2019 11:34:53 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 552F841A; Thu, 18 Jul 2019 05:34:52 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 18 Jul 2019 05:34:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=mesmtp; bh=ns5+cu+fBpESBbEf/gl2+Ji oU3NSovGGsIsopKOl1Ok=; b=D0ntda4ocVEWCk9Ji18g6Ms7/Uj+gE+ltBmBjOh NzPRbm7oCxgzLOAwKIDK7PvE/NZFerXau5PCDcsrz7VOGqAbFwAhv2TohvAWybje LfJbKjEPNHoegHckCifqQY82YzRXy1SNYmUv+JJ98xQ6kMNy0QAOyOvj8ZnkfAgw Cs+M= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=ns5+cu+fBpESBbEf/ gl2+JioU3NSovGGsIsopKOl1Ok=; b=PZaG1D+gEdIwJZxGUeL6lZi9zemXwPRM2 wRsmq1xx/IVnztaompbQM6/Iom3K6CcRIA0cl/E/NQgoQl+yTcHHXsjcQQPF6Glo bHa9LauhC+2K7FJ6EZKlnIQjTlgk4lxzK1n738ZnLCzIL4bTDKk6gZ4XR2asN1HE DK6L3jqy/JqdrWb6MUeZbdlCLAm7yGXNLDMLDJs+SJgS4ya96wZsVTc7Jhdjuccw OBr8ltImucWwNN8zLcQRQh2jY2tOkkCESy7pMfU7ayWwL5TdDCoCsa8QA5nlpLX7 bEPF8w/kWTK50HS8bc4E6kCfcxo9//n7M/hKXQsu1ibK8X93wkn+A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduvddrieehgddukecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkffoggfgsedtkeertdertd dtnecuhfhrohhmpefvhhhomhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhn jhgrlhhonhdrnhgvtheqnecukfhppeejjedrudefgedrvddtfedrudekgeenucfrrghrrg hmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvthenucevlhhu shhtvghrufhiiigvpedt 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 07F1C380076; Thu, 18 Jul 2019 05:34:50 -0400 (EDT) From: Thomas Monjalon To: anatoly.burakov@intel.com Cc: dev@dpdk.org Date: Thu, 18 Jul 2019 11:34:32 +0200 Message-Id: <20190718093432.14092-1-thomas@monjalon.net> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH] eal: warn on --no-huge 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. Signed-off-by: Thomas Monjalon --- lib/librte_eal/common/eal_common_options.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index 512d5088e..4a76929ea 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -1551,6 +1551,10 @@ eal_check_common_options(struct internal_config *internal_cfg) "be specified at the same time\n"); return -1; } + if (internal_cfg->no_hugetlbfs && internal_cfg->memory == 0) { + RTE_LOG(NOTICE, EAL, "Option --"OPT_NO_HUGE" uses legacy mode, " + "option -m would override default memory allocation\n"); + } if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) { RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot " "be specified together with --"OPT_NO_HUGE"\n");