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 2A43C45BA1; Wed, 23 Oct 2024 01:25:52 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ED58740299; Wed, 23 Oct 2024 01:25:51 +0200 (CEST) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) by mails.dpdk.org (Postfix) with ESMTP id 6D51340151 for ; Wed, 23 Oct 2024 01:25:50 +0200 (CEST) Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-7b1434b00a2so490527485a.0 for ; Tue, 22 Oct 2024 16:25:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729639549; x=1730244349; darn=dpdk.org; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=OnS7AiYUayL9kw7WWhu9Kigz1fB8tHlzbNiCh840D18=; b=iSd5RuFVXfpE2t3S7z6VQyDXD05yg8u2yNLWPZhNd2WtSLkKQ3GP1RFuM2AkGMqD10 tp8kepAn/CUlpdjCqUPxqXYB0H+uXtDcTM/lHd2cvabwJ8iaT8YEcqnoYHJXEqDSEGi7 ZOjEBuqT+zicNTyOoFhMQQKkV2B1srY0WQekrw69hOEqzuOjU4pQ5sahXG85n/Zzswy6 AE7P8KsVwD8zIdG7g0mzdphM1a1UL4pTK+S26AIe4tPsjn/FfiBTDaRcqyZw5vkxC6AE Aj2IjTvqOrhpFqN/cN+Ga4sZrbQRxgX5DTJFm2zLUnvUkPvO20y2M6Nts5WvQmwjossS k76w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729639549; x=1730244349; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=OnS7AiYUayL9kw7WWhu9Kigz1fB8tHlzbNiCh840D18=; b=O8kCVcj5FW+p+xfyyjRTh5+sh9f7pvSjSmAcVoMUQLihkEpWnnUdp6olCv/ovIS+v9 Zl0j1Nb4HkWkVfYRscGTI3LUD09eXfEe4tv49ZrTYVfdeCs4utBR3Yg/dcAzLFQXv87U W0MeKcXaW2LXy6Xqeqg9falUCoNgcXiZG/50PZaRI6W2+oT6NPmY9CRWWIKjYTkee1nD vclMoao9lES428OAymk9A90QtZsfEscWvLU5dZOLuqoUuP/E5ELeKLFRFeGKB/TfqyQZ D4GcPqE/Xn3u316SEi/FAyn0OEyuO97pxTiz3VdBmTMc3OkMP2eliFkMdqR0VZchcBPr LBPw== X-Gm-Message-State: AOJu0Yz7gTci62UXIe5s0zMnrf5Q5vGYU2/gFWSsWyRJUvMbfhUj5880 8GFCE6Tz6P6YDqq4Bp6bUR+VrFiMDtnqoR35LMC9idQzXOCvAZ78k52md1lJdY5lF04955jTkF8 8eLPZtVZXXo1xFIFPBZJyUpv7wOCewZPa X-Google-Smtp-Source: AGHT+IF3yIBKfdDw2IyXfegF24sYWkhnp7rx2pkNgiVvHJS5BeGLDGS165mIk1PAO1emTAO2cFqmM+cG5lcHvHl+tMQ= X-Received: by 2002:a05:6214:588b:b0:6ce:3372:2fb3 with SMTP id 6a1803df08f44-6ce3425853cmr13476996d6.26.1729639549522; Tue, 22 Oct 2024 16:25:49 -0700 (PDT) MIME-Version: 1.0 From: Igor Gutorov Date: Wed, 23 Oct 2024 02:25:13 +0300 Message-ID: Subject: eal: -n or -r options are ignored when --in-memory is used To: dev@dpdk.org Cc: roretzla@linux.microsoft.com Content-Type: text/plain; charset="UTF-8" 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, 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? 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? [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