Skip to content

Commit

Permalink
eal/freebsd: ignore in-memory option
Browse files Browse the repository at this point in the history
[ upstream commit 0faa4cf ]

The in-memory option is not supported on FreeBSD so print a warning and
ignore the flag when it is specified for BSD apps. The lack of support
is due to the different way in which memory is managed on FreeBSD using
the contigmem driver rather than via a hugetlbfs filesystem.

Fixes: 14de873 ("eal: add --in-memory option")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
  • Loading branch information
bruce-richardson authored and cpaelzer committed Nov 30, 2021
1 parent 30edb6e commit 1f3a6bf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/librte_eal/freebsd/eal/eal.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,10 @@ rte_eal_init(int argc, char **argv)

/* FreeBSD always uses legacy memory model */
internal_config.legacy_mem = true;
if (internal_conf.in_memory) {
RTE_LOG(WARNING, EAL, "Warning: ignoring unsupported flag, '%s'\n", OPT_IN_MEMORY);
internal_conf.in_memory = false;
}

if (eal_plugins_init() < 0) {
rte_eal_init_alert("Cannot init plugins");
Expand Down

0 comments on commit 1f3a6bf

Please sign in to comment.