From: Kumaraparameshwaran Rathnavel <krath@cloudsimple.com>
To: Take Ceara <dumitru.ceara@gmail.com>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] Freeing up Mbuf
Date: Sat, 24 Dec 2016 10:23:34 +0530 [thread overview]
Message-ID: <1E0F9EF4-CD19-4944-94B8-8CA273C77D83@cloudsimple.com> (raw)
In-Reply-To: <CAKKV4w8+KeJBT=mc51WqD0RpSppRHMdpPvZSwLJd5v5xPMNAbg@mail.gmail.com>
Hi Dumitru,
Thankyou for the response. The rte_pktmbuf_clone routine allocates a new mbuf right? I see that it allocated a newmbuf from the specified pool.
Thanking You,
Param.
> On 22-Dec-2016, at 10:30 PM, Take Ceara <dumitru.ceara@gmail.com> wrote:
>
> Hi Param,
>
> On Thu, Dec 22, 2016 at 5:47 PM, Kumaraparameshwaran Rathnavel
> <krath@cloudsimple.com> wrote:
>> Hi All,
>>
>> The mbuf implementation is similar to the Network Driver of the FreeBSD Network Driver. In DPDK userspace driver it is the responsibility of the rte_eth_dev implementation to free the memory buffer associated with a Queue when descriptors reach below a threshold. In FreeBSD the user can actually specify the free routine for the mbuf when the transmit routine is called. Is this implemented in DPDK. I basically will give the data buffer of the application layer that will be chained with the Transport Layer Headers and I do not want to free up the routines always. Is this possible?
>
> You can send a clone of the mbuf (see rte_pktmbuf_clone). Cloning the
> mbuf will increase the refcount of the direct mbuf (that stores the
> actual data). When the driver is done transmitting the clone it will
> decrement the refcount and only free the direct mbuf if the refcount
> is 0 (see rte_pktmbuf_free_seg and __rte_pktmbuf_prefree_seg).
>
> However, you need to be careful if you plan to change the data stored
> in the direct mbuf and make sure there are no more clones of the data
> pending transmission.
>
>>
>> Thanking You,
>> Param.
>
> Regards,
> Dumitru
next prev parent reply other threads:[~2016-12-24 4:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-22 16:47 Kumaraparameshwaran Rathnavel
2016-12-22 17:00 ` Take Ceara
2016-12-24 4:53 ` Kumaraparameshwaran Rathnavel [this message]
2016-12-23 3:54 ` Anupam Kapoor
2016-12-23 16:28 ` Wiles, Keith
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=1E0F9EF4-CD19-4944-94B8-8CA273C77D83@cloudsimple.com \
--to=krath@cloudsimple.com \
--cc=dumitru.ceara@gmail.com \
--cc=users@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).