DPDK usage discussions
 help / color / mirror / Atom feed
From: Take Ceara <dumitru.ceara@gmail.com>
To: Kumaraparameshwaran Rathnavel <krath@cloudsimple.com>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] Freeing up Mbuf
Date: Thu, 22 Dec 2016 18:00:39 +0100	[thread overview]
Message-ID: <CAKKV4w8+KeJBT=mc51WqD0RpSppRHMdpPvZSwLJd5v5xPMNAbg@mail.gmail.com> (raw)
In-Reply-To: <35D0462D-761F-4C7A-A0F4-FD72EBDFA8EB@cloudsimple.com>

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

  reply	other threads:[~2016-12-22 17:01 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 [this message]
2016-12-24  4:53   ` Kumaraparameshwaran Rathnavel
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='CAKKV4w8+KeJBT=mc51WqD0RpSppRHMdpPvZSwLJd5v5xPMNAbg@mail.gmail.com' \
    --to=dumitru.ceara@gmail.com \
    --cc=krath@cloudsimple.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).