On 24-Oct-19 7:56 PM, David Marchand wrote:
On Thu, Oct 24, 2019 at 5:18 PM Anatoly Burakov
<anatoly.bura...@intel.com> wrote:
According to our docs, only Linuxapp supports base-virtaddr option.
That is, strictly speaking, not true because most of the things
that are attempting to respect base-virtaddr are in common files,
so FreeBSD already *mostly* supports this option in practice.
This commit fixes the remaining bits to explicitly support
base-virtaddr option, and moves the arg parsing from EAL to common
options parsing code. Documentation is also updated to reflect
that all platforms now support base-virtaddr.
Signed-off-by: Anatoly Burakov <anatoly.bura...@intel.com>
Reviewed-by: David Marchand <david.march...@redhat.com>
---
Notes:
v2:
- Harmonize FreeBSD reattach implementation with Linux
doc/guides/linux_gsg/eal_args.include.rst | 6 +++
doc/guides/linux_gsg/linux_eal_parameters.rst | 6 ---
doc/guides/rel_notes/release_19_11.rst | 5 +++
lib/librte_eal/common/eal_common_options.c | 38 ++++++++++++++++++
I was about to apply it, and I realised that the usage() in Linux
still references the --base-virtaddr option but it was not moved to
the common code.
What do you think of this hunk?
diff --git a/lib/librte_eal/common/eal_common_options.c
b/lib/librte_eal/common/eal_common_options.c
index 1cdbd35..020f36e 100644
--- a/lib/librte_eal/common/eal_common_options.c
+++ b/lib/librte_eal/common/eal_common_options.c
@@ -1692,6 +1692,7 @@ static int xdigit2val(unsigned char c)
" --"OPT_NO_PCI" Disable PCI\n"
" --"OPT_NO_HPET" Disable HPET\n"
" --"OPT_NO_SHCONF" No shared config (mmap'd files)\n"
+ " --"OPT_BASE_VIRTADDR" Base virtual address\n"
"\n", RTE_MAX_LCORE);
rte_option_usage();
}
diff --git a/lib/librte_eal/linux/eal/eal.c b/lib/librte_eal/linux/eal/eal.c
index ef5dafa..c0aac21 100644
--- a/lib/librte_eal/linux/eal/eal.c
+++ b/lib/librte_eal/linux/eal/eal.c
@@ -539,7 +539,6 @@ enum rte_proc_type_t
" --"OPT_SOCKET_LIMIT" Limit memory allocation on
sockets (comma separated values)\n"
" --"OPT_HUGE_DIR" Directory where hugetlbfs
is mounted\n"
" --"OPT_FILE_PREFIX" Prefix for hugepage filenames\n"
- " --"OPT_BASE_VIRTADDR" Base virtual address\n"
" --"OPT_CREATE_UIO_DEV" Create /dev/uioX (usually
done by hotplug)\n"
" --"OPT_VFIO_INTR" Interrupt mode for VFIO
(legacy|msi|msix)\n"
" --"OPT_LEGACY_MEM" Legacy memory mode (no
dynamic allocation, contiguous segments)\n"
Should be OK, i think. The whitespace seems to be slightly off, but
otherwise, looks good.
--
Thanks,
Anatoly