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 5286345E33; Wed, 4 Dec 2024 22:50:30 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D902B402AF; Wed, 4 Dec 2024 22:50:29 +0100 (CET) Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mails.dpdk.org (Postfix) with ESMTP id 192714029B for ; Wed, 4 Dec 2024 22:50:29 +0100 (CET) Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-53dd57589c8so1512010e87.1 for ; Wed, 04 Dec 2024 13:50:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1733349028; x=1733953828; 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=wnDJ0F8/Xt6aZe5yOuvzhJV+KBRJG2ums1Ylv8r0wLw=; b=XXnu7mnOt0Hp9Ngvi78UU6r4nSiTsvt9W3pot59YlIm/dMoWqbyMN9MJjIFtEsBzeo tChMTJTdvAp+zRrVyXmRFQuGP1Z2qSJpzTNqoKEfuSEt/hQw1R079/OZEir39/qAXQJQ k4zb/LVTrihy7Mb5G1M6vvk9tRDPkqsDX0QslHZKSmQZaewEvbD0Q3lkYUk7DDPqfSId OrNqU7fYZ6oeCVgN7pAs+8DdP4wNkFQEtaTTtM6CwaoKZB33qfX55AdhWgLokEf0oE37 +Lkk6TwJ/4aNTJEO+xX09KO2WplGJTyhjImwaYExzY/xWwINIgTkvgGOx2Jif5eI051Y BRyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733349028; x=1733953828; 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=wnDJ0F8/Xt6aZe5yOuvzhJV+KBRJG2ums1Ylv8r0wLw=; b=LmCKrCi4vrvb5T6rLhxIBPgK4NDn6CWLV7uQt61vDszEogbQA/C67vSLGEiUWTRWwC Yniy5vl12F+bWCE+BMUD16jiOLf7TObct6hLzXcBe+iKDp3uryrhDMqp4r8wVjJh3XP2 UKiU2nP29blSMAY+XYD4yhk/sn7vFJA0J+czjX629zCQNI1C/sa6oK924EhWyXnFzLA7 7lg22sC8RlsOxzrkmOZds8RUuSjNjOvJaNB77i/G78W2gQi6ULaOWVLagnCh48iiNqoS GCusBocKh6Dhipo58NzVgimNI5QgPmQSqI/jHx5QnCPIn2+qN8sid2JMQnsEom95yxmE mlRQ== X-Gm-Message-State: AOJu0Yz+ZZJ18KnwtmwczG9bvW4UHFX1akNU5SVq+JazT46r0D5PrIUc wfNqefnhOJ80TdSouGm1GQk8qzAxpcoZBolAD1mC9l+PONyAjnnC X-Gm-Gg: ASbGnctxRBW67UrNF/YjILfnqaYH91LXweuBNkSaIbECsAkgrR+j7geGYWOteSSQOlo MOgAVXcogHraVXRwFFHFn54csSn8BTk6+mb9V6gfr9dv6Lfe/u/LHd4TN0JvWOhGZ4cTTUcwQtg X1KazRXmmr0AHPKIdRBw7+FA9nA1QaFol/4q4k/70Aq2/nN2P7pBtzP6vMpdpf9MW6ftgreEPqb 8gr+WgBnw3M8lRJjvLt/bSm0PL9zdNiRm5xfYzuVQge3OFD X-Google-Smtp-Source: AGHT+IFJ1zxM+Uru6MvU3S8V15Ia3DsOKeVwwom6f7SPI7D63Lm2e+e8QrFXhBNX1wUxgMv04B1Zdg== X-Received: by 2002:a05:6512:b9c:b0:53e:1349:ed77 with SMTP id 2adb3069b0e04-53e21700c6cmr262695e87.8.1733349028074; Wed, 04 Dec 2024 13:50:28 -0800 (PST) Received: from sovereign ([5.42.75.244]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53e229c2005sm9608e87.184.2024.12.04.13.50.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Dec 2024 13:50:26 -0800 (PST) Date: Thu, 5 Dec 2024 00:50:24 +0300 From: Dmitry Kozlyuk To: Igor Gutorov Cc: 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: <20241205005024.4ee732e6@sovereign> In-Reply-To: References: X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) 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 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: https://elixir.bootlin.com/dpdk/v24.11/source/lib/mempool/rte_mempool.c#L93 > > [1]: https://github.com/DPDK/dpdk/blob/3ee7a3e0e0e0f5a81a4b102a834697bc488fb32f/lib/eal/common/eal_common_options.c#L1815 > [2]: https://github.com/DPDK/dpdk/blob/3ee7a3e0e0e0f5a81a4b102a834697bc488fb32f/lib/eal/common/eal_common_memory.c#L1103