From: Mahdi Dashtbozorgi <mdasht@gmail.com>
To: dev@dpdk.org
Subject: Re: [dpdk-dev] free a memzone
Date: Thu, 24 Jul 2014 09:49:52 +0430 [thread overview]
Message-ID: <CAB5=vGaWt3=-CnovCgmSCC9V5BpGmq0HqeOrW1fGQcmQK5CHnQ@mail.gmail.com> (raw)
In-Reply-To: <CAB5=vGY4t6nefbrJ7iaV7eNT1UdTkWOhdW4NUVdN+Dzcx__wTw@mail.gmail.com>
Hi Bruce,
Thank you for the response. That's a great Idea!
But I do not understand the last four parameters of this function. (vaddr,
paddr, pg_num, pg_shift)
I guess vaddr is the virtual address of the previously allocated mempool,
paddr is calculated using function call rte_mem_virt2phy(vaddr), am I
right? what about pg_num and pg_shift? how can I pass them correctly?
Best Regards,
Mahdi.
On Thu, Jul 24, 2014 at 9:48 AM, Mahdi Dashtbozorgi <mdasht@gmail.com>
wrote:
> Hi Bruce,
>
> Thank you for the response. That's a great Idea!
> But I do not understand the last four parameters of this function. (vaddr,
> paddr, pg_num, pg_shift)
> I guess vaddr is the virtual address of the previously allocated mempool,
> paddr is calculated using function call rte_mem_virt2phy(vaddr), am I
> right? what about pg_num and pg_shift? how can I pass them correctly?
>
> Best Regards,
> Mahdi.
>
>
> On Wed, Jul 23, 2014 at 11:09 PM, Richardson, Bruce <
> bruce.richardson@intel.com> wrote:
>
>> Rather than freeing the previously allocated memzone, could you not just
>> re-initialize the mempool using something like rte_mempool_xmem_create?
>>
>> > -----Original Message-----
>> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Mahdi Dashtbozorgi
>> > Sent: Wednesday, July 23, 2014 2:05 AM
>> > To: dev@dpdk.org
>> > Subject: Re: [dpdk-dev] free a memzone
>> >
>> > Hi guys,
>> >
>> > Is there any suggestion to free the previously allocated memzone?
>> > I really need help in this issue.
>> > Any help is appreciated.
>> >
>> > Best Regards,
>> > Mahdi.
>> >
>> >
>> >
>> > On Tue, Jul 22, 2014 at 4:03 PM, Mahdi Dashtbozorgi <mdasht@gmail.com>
>> > wrote:
>> >
>> > > Hi,
>> > >
>> > > I have two processes, which uses DPDK multi-process feature to
>> communicate.
>> > > Master process captures packets from NIC and put them to a ring
>> buffer,
>> > > which is shared between master and slave process.
>> > > The slave process looks up the shared ring buffer using
>> rte_ring_lookup
>> > > function and reads the packets.
>> > > The slave process needs a memory pool, too. Therefore, it creates a
>> > > mempool using rte_mempool_create. But If the slave process crashes
>> during
>> > > its processing and runs again, rte_mempool_create function fails and
>> tells
>> > > that there is a memory zone with that name.
>> > > If I use rte_mempool_lookup in this case, the memory pool is not a
>> clean
>> > > memory pool. Because the previous run of slave process did not
>> terminate
>> > > gracefully and did not return all the objects to the pool.
>> > > Is there any function to free an existing memory zone, which I call
>> before
>> > > rte_mempool_create to ensure that previous memory pool does not exists
>> > > anymore?
>> > >
>> > > Best Regards,
>> > > Mahdi.
>> > >
>>
>
>
next prev parent reply other threads:[~2014-07-24 5:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 11:33 Mahdi Dashtbozorgi
2014-07-23 9:04 ` Mahdi Dashtbozorgi
2014-07-23 18:39 ` Richardson, Bruce
[not found] ` <CAB5=vGY4t6nefbrJ7iaV7eNT1UdTkWOhdW4NUVdN+Dzcx__wTw@mail.gmail.com>
2014-07-24 5:19 ` Mahdi Dashtbozorgi [this message]
2014-07-28 11:57 ` Ananyev, Konstantin
2014-07-28 12:53 ` Mahdi Dashtbozorgi
2014-07-28 17:09 ` Ananyev, Konstantin
2014-07-31 14:57 ` Mahdi Dashtbozorgi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAB5=vGaWt3=-CnovCgmSCC9V5BpGmq0HqeOrW1fGQcmQK5CHnQ@mail.gmail.com' \
--to=mdasht@gmail.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).