Skip to contentSkip to conversation

librte_eal: Allow combining --no-huge with -m XXX

PATCH In review Simon Kagstrom 2 participants 2 messages Mar 23, 2015 – Mar 27, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 librte_eal: Allow combining --no-huge with -m XXX

Useful to run applications in usermode via a test driver.

---
Not sure if there are other implications of this, so please check!

 lib/librte_eal/common/eal_common_options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eal/common/eal_common_options.c +1 -1
index 4319549..af865f5 100644
@@ -850,7 +850,7 @@ eal_check_common_options(struct internal_config *internal_cfg)
 		return -1;
 	}
 	if (internal_cfg->no_hugetlbfs &&
-			(mem_parsed || internal_cfg->force_sockets == 1)) {
+			(internal_cfg->force_sockets == 1)) {
 		RTE_LOG(ERR, EAL, "Options -m or --"OPT_SOCKET_MEM" cannot "
 			"be specified together with --"OPT_NO_HUGE"\n");
 		return -1;
Signature · 1 line
1.9.1
#1 lore raw

Hello Simon,

Quoted 2 lines · Simon Kagstrom

Useful to run applications in usermode via a test driver.

I would add that this commit removes a constraint on no-huge mode being limited to 64M.

Quoted 4 lines

---
Not sure if there are other implications of this, so please check!

Looked around, I can find no issue with this change.

Quoted 17 lines
 lib/librte_eal/common/eal_common_options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/librte_eal/common/eal_common_options.c +1 -1
index 4319549..af865f5 100644
@@ -850,7 +850,7 @@ eal_check_common_options(struct internal_config
 *internal_cfg)
                return -1;
        }
        if (internal_cfg->no_hugetlbfs &&
-                       (mem_parsed || internal_cfg->force_sockets == 1)) {
+                       (internal_cfg->force_sockets == 1)) {
                RTE_LOG(ERR, EAL, "Options -m or --"OPT_SOCKET_MEM" cannot

"

Quoted 3 lines
                        "be specified together with --"OPT_NO_HUGE"\n");
                return -1;

We still can't use --socket-mem in no-huge mode since we can't pin memory to socket at the moment, so the test on force_sockets can remain.

However, you missed reference to -m in the log message. Can you remove it ?

In which situation did you encounter this limitation and how did you test this change ?
This should go in the commit log.

Thanks.

Signature · 1 line
David Marchand