DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix parsing zero socket memory and limits
       [not found] <CGME20190122162720eucas1p1a9b93996c3a9384ba141313d3de9e37a@eucas1p1.samsung.com>
@ 2019-01-22 16:27 ` Ilya Maximets
  2019-01-23 10:15   ` Burakov, Anatoly
  0 siblings, 1 reply; 4+ messages in thread
From: Ilya Maximets @ 2019-01-22 16:27 UTC (permalink / raw)
  To: dev, Anatoly Burakov; +Cc: Thomas Monjalon, Ilya Maximets, stable

Modern memory mode allowes to not reserve any memory by the
'--socket-mem' option. i.e. it could be possible to specify
zero preallocated memory like '--socket-mem 0'.
Also, it should be possible to configure unlimited memory
allocations by '--socket-limit 0'.

Both cases are impossible now and blocks starting the DPDK
application:

    ./dpdk-app --socket-limit 0 <...>
    EAL: invalid parameters for --socket-limit
    EAL: Invalid 'command line' arguments.
    Unable to initialize DPDK: Invalid argument

Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode")
Cc: stable@dpdk.org

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/librte_eal/linuxapp/eal/eal.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c
index a386829f3..13f401684 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -582,10 +582,6 @@ eal_parse_socket_arg(char *strval, volatile uint64_t *socket_arg)
 		socket_arg[i] = val;
 	}
 
-	/* check if we have a positive amount of total memory */
-	if (total_mem == 0)
-		return -1;
-
 	return 0;
 }
 
-- 
2.17.1

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] eal: fix parsing zero socket memory and limits
  2019-01-22 16:27 ` [dpdk-dev] [PATCH] eal: fix parsing zero socket memory and limits Ilya Maximets
@ 2019-01-23 10:15   ` Burakov, Anatoly
  2019-01-23 22:03     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Burakov, Anatoly @ 2019-01-23 10:15 UTC (permalink / raw)
  To: Ilya Maximets, dev; +Cc: Thomas Monjalon, stable

On 22-Jan-19 4:27 PM, Ilya Maximets wrote:
> Modern memory mode allowes to not reserve any memory by the
> '--socket-mem' option. i.e. it could be possible to specify
> zero preallocated memory like '--socket-mem 0'.
> Also, it should be possible to configure unlimited memory
> allocations by '--socket-limit 0'.
> 
> Both cases are impossible now and blocks starting the DPDK
> application:
> 
>      ./dpdk-app --socket-limit 0 <...>
>      EAL: invalid parameters for --socket-limit
>      EAL: Invalid 'command line' arguments.
>      Unable to initialize DPDK: Invalid argument
> 
> Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---

That's kind of an odd parameter to pass, as it is assumed that if you 
don't need any limitations or preallocated memory, you don't specify 
these flags in the first place, but OK :)

Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

-- 
Thanks,
Anatoly

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] eal: fix parsing zero socket memory and limits
  2019-01-23 10:15   ` Burakov, Anatoly
@ 2019-01-23 22:03     ` Thomas Monjalon
  2019-01-24  1:12       ` Wiles, Keith
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2019-01-23 22:03 UTC (permalink / raw)
  To: Ilya Maximets; +Cc: stable, Burakov, Anatoly, dev

23/01/2019 11:15, Burakov, Anatoly:
> On 22-Jan-19 4:27 PM, Ilya Maximets wrote:
> > Modern memory mode allowes to not reserve any memory by the
> > '--socket-mem' option. i.e. it could be possible to specify
> > zero preallocated memory like '--socket-mem 0'.
> > Also, it should be possible to configure unlimited memory
> > allocations by '--socket-limit 0'.
> > 
> > Both cases are impossible now and blocks starting the DPDK
> > application:
> > 
> >      ./dpdk-app --socket-limit 0 <...>
> >      EAL: invalid parameters for --socket-limit
> >      EAL: Invalid 'command line' arguments.
> >      Unable to initialize DPDK: Invalid argument
> > 
> > Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> > ---
> 
> That's kind of an odd parameter to pass, as it is assumed that if you 
> don't need any limitations or preallocated memory, you don't specify 
> these flags in the first place, but OK :)
> 
> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] eal: fix parsing zero socket memory and limits
  2019-01-23 22:03     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
@ 2019-01-24  1:12       ` Wiles, Keith
  0 siblings, 0 replies; 4+ messages in thread
From: Wiles, Keith @ 2019-01-24  1:12 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Ilya Maximets, stable, Burakov, Anatoly, dev



> On Jan 23, 2019, at 5:03 PM, Thomas Monjalon <thomas@monjalon.net> wrote:
> 
> 23/01/2019 11:15, Burakov, Anatoly:
>> On 22-Jan-19 4:27 PM, Ilya Maximets wrote:
>>> Modern memory mode allowes to not reserve any memory by the
>>> '--socket-mem' option. i.e. it could be possible to specify
>>> zero preallocated memory like '--socket-mem 0'.
>>> Also, it should be possible to configure unlimited memory
>>> allocations by '--socket-limit 0'.
>>> 
>>> Both cases are impossible now and blocks starting the DPDK
>>> application:
>>> 
>>>     ./dpdk-app --socket-limit 0 <...>
>>>     EAL: invalid parameters for --socket-limit
>>>     EAL: Invalid 'command line' arguments.
>>>     Unable to initialize DPDK: Invalid argument
>>> 
>>> Fixes: 6b42f75632f0 ("eal: enable non-legacy memory mode")
>>> Cc: stable@dpdk.org
>>> 
>>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>>> ---
>> 
>> That's kind of an odd parameter to pass, as it is assumed that if you 
>> don't need any limitations or preallocated memory, you don't specify 
>> these flags in the first place, but OK :)

I personally would have liked a comment replacing the three lines stating that total_mem of zero is fine as it only seems reasonable to document the reason total_mem can be zero.
>> 
>> Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
> 
> Applied, thanks

Regards,
Keith

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-24  1:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20190122162720eucas1p1a9b93996c3a9384ba141313d3de9e37a@eucas1p1.samsung.com>
2019-01-22 16:27 ` [dpdk-dev] [PATCH] eal: fix parsing zero socket memory and limits Ilya Maximets
2019-01-23 10:15   ` Burakov, Anatoly
2019-01-23 22:03     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2019-01-24  1:12       ` Wiles, Keith

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).