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 1386745E33; Wed, 4 Dec 2024 23:15:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C3BD402AF; Wed, 4 Dec 2024 23:15:06 +0100 (CET) Received: from mail-pg1-f181.google.com (mail-pg1-f181.google.com [209.85.215.181]) by mails.dpdk.org (Postfix) with ESMTP id 81BA64029B for ; Wed, 4 Dec 2024 23:15:05 +0100 (CET) Received: by mail-pg1-f181.google.com with SMTP id 41be03b00d2f7-7fc22a88bcbso227055a12.2 for ; Wed, 04 Dec 2024 14:15:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1733350504; x=1733955304; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=e3N+/kNheG6N1bEcGaZgZnaVRCWJLaBXhmU0ZTOd3dM=; b=mJnKZ+eaVHCHCWtIMh8XwIgGqrs/E1kWnOXhagS/6DJw4A7JK+Q1MT/khP0q74Q544 42aBbtm5hwBU65t60SXIpcVXAPqRqqiuI0PdioX813iN6Cchl3O36QZhsaUPWLNh3GAd YVvyGpawoG7EMdDz1T7O0xzrNpswLvXD/4ZZ+N/M8GzkKdyaygPMYYqe+0K9WU9Q8aVc btvTG1nKUY94UFfNHlsjnnO6WDTyKVa8JpPHtr3BiT4YgyXCo2ukkIoCweNhVQPw9O9Z 9PNJCRMV1GkcyTTgy/dunKMwyXSO4lQ8JBl5r/YifXjBCY273Iq7bmYqgxBRAZqrVFXn Ly9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733350504; x=1733955304; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=e3N+/kNheG6N1bEcGaZgZnaVRCWJLaBXhmU0ZTOd3dM=; b=u+XHWsNkILsUm2HQ0+o0o1K/ckkNHEbmMMeCegaXpTDPYm5siVMFnTFDNn7RJBqYTS FhY13Fgb4Ikgnujvf3dYZEj84WysD5+Znm9mlLCQMcUElEYBjTHaOFU8lKB8NNGPvtHd JpFR83Dbngeme4ObuTzxYia67uazzM6C7pFoTBr/YzGyBTneRBUJyBAdqyDztbiszAuA X7EWinTEffnruy31XfGqK9U7QbBfii4SeltwSmEfK+dS1QlWvNR+RSFVshcWsASkscN6 mjc2MrBYpyJPQBC4ZHvjiaZ0tgUN29RqOAKGK0Iz4PAF1FLxB7ldIRHCglP4snXWbulJ C4hQ== X-Forwarded-Encrypted: i=1; AJvYcCUm6yGw4UIyaUQDCdltQi5muaUn4+cDVGB1w0oQMqtkrJgNCGEjHC9M3vwTTLpIpMGVnws=@dpdk.org X-Gm-Message-State: AOJu0YyzCnrjyyReFYFYAcPzIblUFkw77R936TdbGrG8HRLNfIDnLqjZ Dho67rfNKflKNO28x8I92UYikTMTjjX78tyjfsK405yut5trk1/2A96zBQjPnOU= X-Gm-Gg: ASbGncujElGTosPXwefcC9CAPjS3kk6Ik4Hk8v2XsBb7qA+ko/kXFXBljLF+ddOKWsV LeatcCMn+wz7/wa9ulzeTHJlnj8uVoNyIse/zakdHvc2Xqt9fAj42goc/7sdYo9uB/l51iIbnXo dTvLyk39eQ2N7GnH60JYT57AlsMlQosCbj2bFRhZ1o737ob5cu+p0+sQisC2pHhPOKgOp6vvFZj wL1WOJb4yYmpOEgAa41raU6urqmDd/QLAxRZuChq8euv0gJlxQqEHASXFOyZ5dRT2l6FOXApiAJ OYAG/HSDXCZ4rLpN41bFP76Beq4= X-Google-Smtp-Source: AGHT+IEh8o8YFmLZv1t2Q+if1zDMBfTqh1I1AAJpMUqoOGrIMlxklLsUrj7TKq8vyFfKXU7zvfUzAg== X-Received: by 2002:a05:6a20:a104:b0:1e0:ddf6:56ae with SMTP id adf61e73a8af0-1e1653a6520mr12768920637.7.1733350504478; Wed, 04 Dec 2024 14:15:04 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7fd157d87d2sm20893a12.70.2024.12.04.14.15.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 14:15:04 -0800 (PST) Date: Wed, 4 Dec 2024 14:15:02 -0800 From: Stephen Hemminger To: Dmitry Kozlyuk Cc: Igor Gutorov , dev@dpdk.org, roretzla@linux.microsoft.com, Anatoly Burakov Subject: Re: eal: -n or -r options are ignored when --in-memory is used Message-ID: <20241204141502.441fdb45@hermes.local> In-Reply-To: <20241205005024.4ee732e6@sovereign> References: <20241205005024.4ee732e6@sovereign> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Thu, 5 Dec 2024 00:50:24 +0300 Dmitry Kozlyuk wrote: > Hi Igor, > > 2024-10-23 02:25 (UTC+0300), Igor Gutorov: > > I've noticed an issue of `rte_memory_get_nchannel()` or > > `rte_memory_get_nrank()` always returning zero regardless of the -n or > > -r options set. > > > > I think this is due to `--in-memory` forcing `conf->no_shconf = 1` > > [1], which leads to `rte_eal_memdevice_init()` never being executed > > [2]. > > > > I do not fully understand the context of the code, but I can submit a > > patch that simply removes the `internal_conf->no_shconf == 0` check in > > `rte_eal_memory_init()` and so always calls > > `rte_eal_memdevice_init()`. Would that be ok or is there a better way? > > Alternatively, does `(internal_conf->no_shconf == 0 || > > internal_conf->in_memory == 1) && ...` make sense here? > > Well spotted! Yes, the check seems unneeded. > > > And one more thing, the 9.1.4 section of the getting started guide > > states that the number of memory ranks is auto-detected by default, > > but I can't find any code that performs the auto-detection - am I > > missing something, or is the documentation wrong here? > > The doc is clearly wrong. > Git says this piece originates from TestPMD documentation, > so maybe "auto-detected" refers to some defaults for mempools: Doc should be reworded to some thing like "if not defined, reasonable default values are used instead". It is difficult to do auto-detection of memory layout optimum spread. The Linux kernel provides no visible API for finding out; and the only way I know is digging into DMI data (see dmidecode). But DMI data is only readable as root, can be wrong, and doesn't really match in a cloud environment.