Skip to contentSkip to conversation

eal: Allow combining -m and --no-huge

PATCH Applied Simon Kagstrom 5 participants 7 messages May 27, 2015 – Jun 15, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 eal: Allow combining -m and --no-huge

Needed to run as non-root but with higher memory allocations, and removes a constraint on no-huge mode being limited to 64M. A usage example is if running with file input with the pcap PMD, which can be done as non-root after this patch via e.g.,

    ./test-dpdk --no-huge -m 1024 -l 0,1 -n3 --vdev 'eth_pcap0,rx_pcap=/tmp/eth-rx.pcap,tx_pcap=/tmp/eth-tx.pcap'

---
v2:
* Remove unneeded parentheses and merge lines

* Patch prefix now eal:

* Add example and more description (from David Marchand)

 lib/librte_eal/common/eal_common_options.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
lib/librte_eal/common/eal_common_options.c +2 -3
index 8fcb1ab..1f459ac 100644
@@ -850,9 +850,8 @@ eal_check_common_options(struct internal_config *internal_cfg)
 			"be specified at the same time\n");
 		return -1;
 	}
-	if (internal_cfg->no_hugetlbfs &&
-			(mem_parsed || internal_cfg->force_sockets == 1)) {
-		RTE_LOG(ERR, EAL, "Options -m or --"OPT_SOCKET_MEM" cannot "
+	if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) {
+		RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
 			"be specified together with --"OPT_NO_HUGE"\n");
 		return -1;
 	}
Signature · 1 line
1.9.1
#1 lore raw
Quoted 4 lines · Simon Kagstrom

Needed to run as non-root but with higher memory allocations, and removes a constraint on no-huge mode being limited to 64M. A usage example is if running with file input with the pcap PMD, which can be done as non-root after this patch via e.g.,

Simon,

I just tried applying v2 of the patch to master:
git apply ../patches/eal_common_options.patch
error: patch failed: lib/librte_eal/common/eal_common_options.c:850
error: lib/librte_eal/common/eal_common_options.c: patch does not apply

Quoted 33 lines
     ./test-dpdk --no-huge -m 1024 -l 0,1 -n3 --vdev 'eth_pcap0,rx_pcap=/tmp/eth-rx.pcap,tx_pcap=/tmp/eth-tx.pcap'

---
v2:
* Remove unneeded parentheses and merge lines

* Patch prefix now eal:

* Add example and more description (from David Marchand)

  lib/librte_eal/common/eal_common_options.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
lib/librte_eal/common/eal_common_options.c +2 -3
index 8fcb1ab..1f459ac 100644
@@ -850,9 +850,8 @@ eal_check_common_options(struct internal_config *internal_cfg)
  			"be specified at the same time\n");
  		return -1;
  	}
-	if (internal_cfg->no_hugetlbfs &&
-			(mem_parsed || internal_cfg->force_sockets == 1)) {
-		RTE_LOG(ERR, EAL, "Options -m or --"OPT_SOCKET_MEM" cannot "
+	if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets == 1) {
+		RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "
  			"be specified together with --"OPT_NO_HUGE"\n");
  		return -1;
  	}
#2 lore raw
Quoted 15 lines

-----Original Message-----
From: Thomas F Herbert [mailto:[email protected]]
Sent: Wednesday, May 27, 2015 2:07 PM
To: Simon Kagstrom; [email protected]; [email protected]; Mcnamara, John
Subject: Re: [dpdk-dev] [PATCH v2] eal: Allow combining -m and --no-huge

Quoted 4 lines · Simon Kagstrom

Needed to run as non-root but with higher memory allocations, and removes a constraint on no-huge mode being limited to 64M. A usage example is if running with file input with the pcap PMD, which can be done as non-root after this patch via e.g.,

Quoted 6 lines

Simon,

I just tried applying v2 of the patch to master:
git apply ../patches/eal_common_options.patch
error: patch failed: lib/librte_eal/common/eal_common_options.c:850
error: lib/librte_eal/common/eal_common_options.c: patch does not apply

Hi Thomas,

I just tried it with the HEAD via pwclient and it applies cleanly:

    $ git pull origin
    Already up-to-date.
    $ pwclient git-am 4915
    Applying patch #4915 using 'git am'
    Description: [dpdk-dev,v2] eal: Allow combining -m and --no-huge
    Applying: eal: Allow combining -m and --no-huge

John.

#3 lore raw
In reply to Thomas F Herbert
Quoted 4 lines · On Wed, 27 May 2015 09:06:46 -0400 Thomas F Herbert <[email protected]> wrote:

I just tried applying v2 of the patch to master:
git apply ../patches/eal_common_options.patch
error: patch failed: lib/librte_eal/common/eal_common_options.c:850
error: lib/librte_eal/common/eal_common_options.c: patch does not apply

Hmm... I tried it myself, but just saved the email and used

git am main.mbox

and that worked.

I´m using claws-mail as a mailer.

// Simon

#4 lore raw
Quoted 7 lines · Simon Kagstrom
Quoted 4 lines · On Wed, 27 May 2015 09:06:46 -0400 Thomas F Herbert <[email protected]> wrote:

I just tried applying v2 of the patch to master:
git apply ../patches/eal_common_options.patch
error: patch failed: lib/librte_eal/common/eal_common_options.c:850
error: lib/librte_eal/common/eal_common_options.c: patch does not apply

Quoted 5 lines

Hmm... I tried it myself, but just saved the email and used

git am main.mbox

and that worked.

Yes, the patch applies. Thanks!

Quoted 6 lines

I´m using claws-mail as a mailer.

// Simon

Acked-by on v2 1/1
#5 lore raw
In reply to Simon Kagstrom
Quoted 38 lines · Simon Kagstrom

Needed to run as non-root but with higher memory allocations, and removes a constraint on no-huge mode being limited to 64M. A usage example is if running with file input with the pcap PMD, which can be done as non-root after this patch via e.g.,

    ./test-dpdk --no-huge -m 1024 -l 0,1 -n3 --vdev

'eth_pcap0,rx_pcap=/tmp/eth-rx.pcap,tx_pcap=/tmp/eth-tx.pcap'

---
v2:
* Remove unneeded parentheses and merge lines

* Patch prefix now eal:

* Add example and more description (from David Marchand)

 lib/librte_eal/common/eal_common_options.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
lib/librte_eal/common/eal_common_options.c +0 -3
index 8fcb1ab..1f459ac 100644
@@ -850,9 +850,8 @@ eal_check_common_options(struct internal_config
 *internal_cfg)
                        "be specified at the same time\n");
                return -1;
        }
-       if (internal_cfg->no_hugetlbfs &&
-                       (mem_parsed || internal_cfg->force_sockets == 1)) {
-               RTE_LOG(ERR, EAL, "Options -m or --"OPT_SOCKET_MEM" cannot

"
+ if (internal_cfg->no_hugetlbfs && internal_cfg->force_sockets ==
1) {
+ RTE_LOG(ERR, EAL, "Option --"OPT_SOCKET_MEM" cannot "

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

--
1.9.1

Signature · 1 line
David Marchand
#6 lore raw
Quoted 5 lines
Quoted 5 lines

Needed to run as non-root but with higher memory allocations, and removes a constraint on no-huge mode being limited to 64M. A usage example is if running with file input with the pcap PMD, which can be done as non-root after this patch via e.g.,

Quoted 7 lines
Quoted 5 lines
    ./test-dpdk --no-huge -m 1024 -l 0,1 -n3 --vdev

'eth_pcap0,rx_pcap=/tmp/eth-rx.pcap,tx_pcap=/tmp/eth-tx.pcap'

Applied, thanks