From: Igor Gutorov <igootorov@gmail.com>
To: dev@dpdk.org
Cc: roretzla@linux.microsoft.com
Subject: eal: -n or -r options are ignored when --in-memory is used
Date: Wed, 23 Oct 2024 02:25:13 +0300 [thread overview]
Message-ID: <CAL7bPf0QsOA5pj7cokK2mgFcmyn0gRPMCgMYG6C=37f7McqR8w@mail.gmail.com> (raw)
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
reply other threads:[~2024-10-22 23:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAL7bPf0QsOA5pj7cokK2mgFcmyn0gRPMCgMYG6C=37f7McqR8w@mail.gmail.com' \
--to=igootorov@gmail.com \
--cc=dev@dpdk.org \
--cc=roretzla@linux.microsoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).