* [dpdk-dev] rte_malloc
@ 2016-05-09 17:32 Mahdi Moradmand Badie
2016-05-10 8:12 ` Sergio Gonzalez Monroy
0 siblings, 1 reply; 9+ messages in thread
From: Mahdi Moradmand Badie @ 2016-05-09 17:32 UTC (permalink / raw)
To: dev
Hello All,
I had a problem regarding use the rte_malloc.
I want to know if I want to use rte_malloc instead of malloc just mak
change like this
struct lcore_params *p = malloc
<http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>
(sizeof(*p)); ==>
struct lcore_params *p = rte_malloc
<http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>(NULL,
sizeof(*p), 0);
is enough ?
Because I have problem and Segmentation fault (core dumped) ??
Thanks in advance,
--
M@hdi Mor@dm@nd B@die
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] rte_malloc
2016-05-09 17:32 [dpdk-dev] rte_malloc Mahdi Moradmand Badie
@ 2016-05-10 8:12 ` Sergio Gonzalez Monroy
2016-05-10 15:15 ` Mahdi Moradmand Badie
2016-05-10 15:17 ` Mahdi Moradmand Badie
0 siblings, 2 replies; 9+ messages in thread
From: Sergio Gonzalez Monroy @ 2016-05-10 8:12 UTC (permalink / raw)
To: Mahdi Moradmand Badie; +Cc: dev
Hi,
On 09/05/2016 18:32, Mahdi Moradmand Badie wrote:
> Hello All,
>
> I had a problem regarding use the rte_malloc.
> I want to know if I want to use rte_malloc instead of malloc just mak
> change like this
> struct lcore_params *p = malloc
> <http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>
> (sizeof(*p)); ==>
> struct lcore_params *p = rte_malloc
> <http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>(NULL,
> sizeof(*p), 0);
> is enough ?
Yes, malloc(sizeof(*p)) has an equivalent behavior to rte_malloc(NULL,
sizeof(*p), 0)
in the context of a DPDK application.
> Because I have problem and Segmentation fault (core dumped) ??
Could you provide more details of how to reproduce or could you try to
reproduce your problem using a very simple example like
examples/helloworld ?
Sergio
> Thanks in advance,
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] rte_malloc
2016-05-10 8:12 ` Sergio Gonzalez Monroy
@ 2016-05-10 15:15 ` Mahdi Moradmand Badie
2016-05-10 15:17 ` Mahdi Moradmand Badie
1 sibling, 0 replies; 9+ messages in thread
From: Mahdi Moradmand Badie @ 2016-05-10 15:15 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
Thanks Sergio,
Yes sure,
I attached files, it seems so easy but doesn't work.
Thanks,
On 10 May 2016 at 04:12, Sergio Gonzalez Monroy <
sergio.gonzalez.monroy@intel.com> wrote:
> Hi,
>
> On 09/05/2016 18:32, Mahdi Moradmand Badie wrote:
>
>> Hello All,
>>
>> I had a problem regarding use the rte_malloc.
>> I want to know if I want to use rte_malloc instead of malloc just mak
>> change like this
>> struct lcore_params *p = malloc
>> <
>> http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b
>> >
>> (sizeof(*p)); ==>
>> struct lcore_params *p = rte_malloc
>> <
>> http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b
>> >(NULL,
>> sizeof(*p), 0);
>> is enough ?
>>
>
> Yes, malloc(sizeof(*p)) has an equivalent behavior to rte_malloc(NULL,
> sizeof(*p), 0)
> in the context of a DPDK application.
>
> Because I have problem and Segmentation fault (core dumped) ??
>>
>
> Could you provide more details of how to reproduce or could you try to
> reproduce your problem using a very simple example like
> examples/helloworld ?
>
> Sergio
>
> Thanks in advance,
>>
>>
>>
>
--
M@hdi Mor@dm@nd B@die
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] rte_malloc
2016-05-10 8:12 ` Sergio Gonzalez Monroy
2016-05-10 15:15 ` Mahdi Moradmand Badie
@ 2016-05-10 15:17 ` Mahdi Moradmand Badie
2016-05-10 15:31 ` Sergio Gonzalez Monroy
1 sibling, 1 reply; 9+ messages in thread
From: Mahdi Moradmand Badie @ 2016-05-10 15:17 UTC (permalink / raw)
To: Sergio Gonzalez Monroy, dev
Thanks Sergio,
Yes sure,
I attached files, it seems so easy but doesn't work.
Thanks,
On 10 May 2016 at 04:12, Sergio Gonzalez Monroy <
sergio.gonzalez.monroy@intel.com> wrote:
> Hi,
>
> On 09/05/2016 18:32, Mahdi Moradmand Badie wrote:
>
>> Hello All,
>>
>> I had a problem regarding use the rte_malloc.
>> I want to know if I want to use rte_malloc instead of malloc just mak
>> change like this
>> struct lcore_params *p = malloc
>> <
>> http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b
>> >
>> (sizeof(*p)); ==>
>> struct lcore_params *p = rte_malloc
>> <
>> http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b
>> >(NULL,
>> sizeof(*p), 0);
>> is enough ?
>>
>
> Yes, malloc(sizeof(*p)) has an equivalent behavior to rte_malloc(NULL,
> sizeof(*p), 0)
> in the context of a DPDK application.
>
> Because I have problem and Segmentation fault (core dumped) ??
>>
>
> Could you provide more details of how to reproduce or could you try to
> reproduce your problem using a very simple example like
> examples/helloworld ?
>
> Sergio
>
> Thanks in advance,
>>
>>
>>
>
--
M@hdi Mor@dm@nd B@die
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] rte_malloc
2016-05-10 15:17 ` Mahdi Moradmand Badie
@ 2016-05-10 15:31 ` Sergio Gonzalez Monroy
2016-05-10 15:55 ` Mahdi Moradmand Badie
0 siblings, 1 reply; 9+ messages in thread
From: Sergio Gonzalez Monroy @ 2016-05-10 15:31 UTC (permalink / raw)
To: Mahdi Moradmand Badie; +Cc: dev
Forgot to ask,
What's the command line you are using to run the app?
Sergio
On 10/05/2016 16:17, Mahdi Moradmand Badie wrote:
> Thanks Sergio,
> Yes sure,
> I attached files, it seems so easy but doesn't work.
> Thanks,
>
> On 10 May 2016 at 04:12, Sergio Gonzalez Monroy
> <sergio.gonzalez.monroy@intel.com
> <mailto:sergio.gonzalez.monroy@intel.com>> wrote:
>
> Hi,
>
> On 09/05/2016 18:32, Mahdi Moradmand Badie wrote:
>
> Hello All,
>
> I had a problem regarding use the rte_malloc.
> I want to know if I want to use rte_malloc instead of malloc
> just mak
> change like this
> struct lcore_params *p = malloc
> <http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>
> (sizeof(*p)); ==>
> struct lcore_params *p = rte_malloc
> <http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>(NULL,
> sizeof(*p), 0);
> is enough ?
>
>
> Yes, malloc(sizeof(*p)) has an equivalent behavior to
> rte_malloc(NULL, sizeof(*p), 0)
> in the context of a DPDK application.
>
> Because I have problem and Segmentation fault (core dumped) ??
>
>
> Could you provide more details of how to reproduce or could you try to
> reproduce your problem using a very simple example like
> examples/helloworld ?
>
> Sergio
>
> Thanks in advance,
>
>
>
>
>
>
> --
> M@hdi Mor@dm@nd B@die
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] rte_malloc
2016-05-10 15:31 ` Sergio Gonzalez Monroy
@ 2016-05-10 15:55 ` Mahdi Moradmand Badie
2016-05-10 16:12 ` Sergio Gonzalez Monroy
0 siblings, 1 reply; 9+ messages in thread
From: Mahdi Moradmand Badie @ 2016-05-10 15:55 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
#!/bin/sh
./build/app/Mahdi_test -c 0x55 --master-lcore 0
On 10 May 2016 at 11:31, Sergio Gonzalez Monroy <
sergio.gonzalez.monroy@intel.com> wrote:
> Forgot to ask,
>
> What's the command line you are using to run the app?
>
> Sergio
>
>
> On 10/05/2016 16:17, Mahdi Moradmand Badie wrote:
>
> Thanks Sergio,
> Yes sure,
> I attached files, it seems so easy but doesn't work.
> Thanks,
>
> On 10 May 2016 at 04:12, Sergio Gonzalez Monroy <
> sergio.gonzalez.monroy@intel.com> wrote:
>
>> Hi,
>>
>> On 09/05/2016 18:32, Mahdi Moradmand Badie wrote:
>>
>>> Hello All,
>>>
>>> I had a problem regarding use the rte_malloc.
>>> I want to know if I want to use rte_malloc instead of malloc just mak
>>> change like this
>>> struct lcore_params *p = malloc
>>> <
>>> http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b
>>> >
>>> (sizeof(*p)); ==>
>>> struct lcore_params *p = rte_malloc
>>> <
>>> http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b
>>> >(NULL,
>>> sizeof(*p), 0);
>>> is enough ?
>>>
>>
>> Yes, malloc(sizeof(*p)) has an equivalent behavior to rte_malloc(NULL,
>> sizeof(*p), 0)
>> in the context of a DPDK application.
>>
>> Because I have problem and Segmentation fault (core dumped) ??
>>>
>>
>> Could you provide more details of how to reproduce or could you try to
>> reproduce your problem using a very simple example like
>> examples/helloworld ?
>>
>> Sergio
>>
>> Thanks in advance,
>>>
>>>
>>>
>>
>
>
> --
> M@hdi Mor@dm@nd B@die
>
>
>
--
M@hdi Mor@dm@nd B@die
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] rte_malloc
2016-05-10 15:55 ` Mahdi Moradmand Badie
@ 2016-05-10 16:12 ` Sergio Gonzalez Monroy
2016-05-10 16:13 ` Mahdi Moradmand Badie
0 siblings, 1 reply; 9+ messages in thread
From: Sergio Gonzalez Monroy @ 2016-05-10 16:12 UTC (permalink / raw)
To: Mahdi Moradmand Badie; +Cc: dev
Have you tried to run the unit tests? (Run 'app/test' application, then
'malloc_autotest')
Sergio
On 10/05/2016 16:55, Mahdi Moradmand Badie wrote:
> #!/bin/sh
> ./build/app/Mahdi_test -c 0x55 --master-lcore 0
>
> On 10 May 2016 at 11:31, Sergio Gonzalez Monroy
> <sergio.gonzalez.monroy@intel.com
> <mailto:sergio.gonzalez.monroy@intel.com>> wrote:
>
> Forgot to ask,
>
> What's the command line you are using to run the app?
>
> Sergio
>
>
> On 10/05/2016 16:17, Mahdi Moradmand Badie wrote:
>> Thanks Sergio,
>> Yes sure,
>> I attached files, it seems so easy but doesn't work.
>> Thanks,
>>
>> On 10 May 2016 at 04:12, Sergio Gonzalez Monroy
>> <sergio.gonzalez.monroy@intel.com
>> <mailto:sergio.gonzalez.monroy@intel.com>> wrote:
>>
>> Hi,
>>
>> On 09/05/2016 18:32, Mahdi Moradmand Badie wrote:
>>
>> Hello All,
>>
>> I had a problem regarding use the rte_malloc.
>> I want to know if I want to use rte_malloc instead of
>> malloc just mak
>> change like this
>> struct lcore_params *p = malloc
>> <http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>
>> (sizeof(*p)); ==>
>> struct lcore_params *p = rte_malloc
>> <http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>(NULL,
>> sizeof(*p), 0);
>> is enough ?
>>
>>
>> Yes, malloc(sizeof(*p)) has an equivalent behavior to
>> rte_malloc(NULL, sizeof(*p), 0)
>> in the context of a DPDK application.
>>
>> Because I have problem and Segmentation fault (core
>> dumped) ??
>>
>>
>> Could you provide more details of how to reproduce or could
>> you try to
>> reproduce your problem using a very simple example like
>> examples/helloworld ?
>>
>> Sergio
>>
>> Thanks in advance,
>>
>>
>>
>>
>>
>>
>> --
>> M@hdi Mor@dm@nd B@die
>
>
>
>
> --
> M@hdi Mor@dm@nd B@die
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] rte_malloc
2016-05-10 16:12 ` Sergio Gonzalez Monroy
@ 2016-05-10 16:13 ` Mahdi Moradmand Badie
2016-05-11 10:29 ` Sergio Gonzalez Monroy
0 siblings, 1 reply; 9+ messages in thread
From: Mahdi Moradmand Badie @ 2016-05-10 16:13 UTC (permalink / raw)
To: Sergio Gonzalez Monroy; +Cc: dev
No, I don't have any idea? :)
On 10 May 2016 at 12:12, Sergio Gonzalez Monroy <
sergio.gonzalez.monroy@intel.com> wrote:
> Have you tried to run the unit tests? (Run 'app/test' application, then
> 'malloc_autotest')
>
> Sergio
>
>
> On 10/05/2016 16:55, Mahdi Moradmand Badie wrote:
>
> #!/bin/sh
> ./build/app/Mahdi_test -c 0x55 --master-lcore 0
>
> On 10 May 2016 at 11:31, Sergio Gonzalez Monroy <
> sergio.gonzalez.monroy@intel.com> wrote:
>
>> Forgot to ask,
>>
>> What's the command line you are using to run the app?
>>
>> Sergio
>>
>>
>> On 10/05/2016 16:17, Mahdi Moradmand Badie wrote:
>>
>> Thanks Sergio,
>> Yes sure,
>> I attached files, it seems so easy but doesn't work.
>> Thanks,
>>
>> On 10 May 2016 at 04:12, Sergio Gonzalez Monroy <
>> <sergio.gonzalez.monroy@intel.com>sergio.gonzalez.monroy@intel.com>
>> wrote:
>>
>>> Hi,
>>>
>>> On 09/05/2016 18:32, Mahdi Moradmand Badie wrote:
>>>
>>>> Hello All,
>>>>
>>>> I had a problem regarding use the rte_malloc.
>>>> I want to know if I want to use rte_malloc instead of malloc just mak
>>>> change like this
>>>> struct lcore_params *p = malloc
>>>> <
>>>> http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b
>>>> >
>>>> (sizeof(*p)); ==>
>>>> struct lcore_params *p = rte_malloc
>>>> <
>>>> http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b
>>>> >(NULL,
>>>> sizeof(*p), 0);
>>>> is enough ?
>>>>
>>>
>>> Yes, malloc(sizeof(*p)) has an equivalent behavior to rte_malloc(NULL,
>>> sizeof(*p), 0)
>>> in the context of a DPDK application.
>>>
>>> Because I have problem and Segmentation fault (core dumped) ??
>>>>
>>>
>>> Could you provide more details of how to reproduce or could you try to
>>> reproduce your problem using a very simple example like
>>> examples/helloworld ?
>>>
>>> Sergio
>>>
>>> Thanks in advance,
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> M@hdi Mor@dm@nd B@die
>>
>>
>>
>
>
> --
> M@hdi Mor@dm@nd B@die
>
>
>
--
M@hdi Mor@dm@nd B@die
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] rte_malloc
2016-05-10 16:13 ` Mahdi Moradmand Badie
@ 2016-05-11 10:29 ` Sergio Gonzalez Monroy
0 siblings, 0 replies; 9+ messages in thread
From: Sergio Gonzalez Monroy @ 2016-05-11 10:29 UTC (permalink / raw)
To: Mahdi Moradmand Badie; +Cc: dev
Ok.
So if you build DPDK from the sources, you would have an 'app' directory
in you build directory.
You can read the Getting Started Guide for more info:
http://dpdk.readthedocs.io/en/v16.04/linux_gsg/index.html
Once you ran the 'test' DPDK application (located inside the 'app'
directory) you would get a shell where you can run different kind of
autotests/tests. One of them is the 'malloc_autotest'.
Let me know the result of running that test.
Sergio
On 10/05/2016 17:13, Mahdi Moradmand Badie wrote:
> No, I don't have any idea? :)
>
> On 10 May 2016 at 12:12, Sergio Gonzalez Monroy
> <sergio.gonzalez.monroy@intel.com
> <mailto:sergio.gonzalez.monroy@intel.com>> wrote:
>
> Have you tried to run the unit tests? (Run 'app/test' application,
> then 'malloc_autotest')
>
> Sergio
>
>
> On 10/05/2016 16:55, Mahdi Moradmand Badie wrote:
>> #!/bin/sh
>> ./build/app/Mahdi_test -c 0x55 --master-lcore 0
>>
>> On 10 May 2016 at 11:31, Sergio Gonzalez Monroy
>> <sergio.gonzalez.monroy@intel.com
>> <mailto:sergio.gonzalez.monroy@intel.com>> wrote:
>>
>> Forgot to ask,
>>
>> What's the command line you are using to run the app?
>>
>> Sergio
>>
>>
>> On 10/05/2016 16:17, Mahdi Moradmand Badie wrote:
>>> Thanks Sergio,
>>> Yes sure,
>>> I attached files, it seems so easy but doesn't work.
>>> Thanks,
>>>
>>> On 10 May 2016 at 04:12, Sergio Gonzalez Monroy
>>> <sergio.gonzalez.monroy@intel.com
>>> <mailto:sergio.gonzalez.monroy@intel.com>> wrote:
>>>
>>> Hi,
>>>
>>> On 09/05/2016 18:32, Mahdi Moradmand Badie wrote:
>>>
>>> Hello All,
>>>
>>> I had a problem regarding use the rte_malloc.
>>> I want to know if I want to use rte_malloc instead
>>> of malloc just mak
>>> change like this
>>> struct lcore_params *p = malloc
>>> <http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>
>>> (sizeof(*p)); ==>
>>> struct lcore_params *p = rte_malloc
>>> <http://dpdk.org/doc/api/rte__malloc_8h.html#afb7316a4ec228ed9b8ffc1864b03d85b>(NULL,
>>> sizeof(*p), 0);
>>> is enough ?
>>>
>>>
>>> Yes, malloc(sizeof(*p)) has an equivalent behavior to
>>> rte_malloc(NULL, sizeof(*p), 0)
>>> in the context of a DPDK application.
>>>
>>> Because I have problem and Segmentation fault (core
>>> dumped) ??
>>>
>>>
>>> Could you provide more details of how to reproduce or
>>> could you try to
>>> reproduce your problem using a very simple example like
>>> examples/helloworld ?
>>>
>>> Sergio
>>>
>>> Thanks in advance,
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> M@hdi Mor@dm@nd B@die
>>
>>
>>
>>
>> --
>> M@hdi Mor@dm@nd B@die
>
>
>
>
> --
> M@hdi Mor@dm@nd B@die
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-05-11 10:29 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-09 17:32 [dpdk-dev] rte_malloc Mahdi Moradmand Badie
2016-05-10 8:12 ` Sergio Gonzalez Monroy
2016-05-10 15:15 ` Mahdi Moradmand Badie
2016-05-10 15:17 ` Mahdi Moradmand Badie
2016-05-10 15:31 ` Sergio Gonzalez Monroy
2016-05-10 15:55 ` Mahdi Moradmand Badie
2016-05-10 16:12 ` Sergio Gonzalez Monroy
2016-05-10 16:13 ` Mahdi Moradmand Badie
2016-05-11 10:29 ` Sergio Gonzalez Monroy
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).