From: Bruce Richardson <bruce.richardson@intel.com>
To: "Kavanagh, Mark B" <mark.b.kavanagh@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] mbuf: how to set data to NULL?
Date: Wed, 17 Dec 2014 16:49:35 +0000 [thread overview]
Message-ID: <20141217164934.GA6980@bricha3-MOBL3> (raw)
In-Reply-To: <DC5AD7FA266D86499789B1BCAEC715F846CCD9D9@IRSMSX105.ger.corp.intel.com>
On Wed, Dec 17, 2014 at 04:44:15PM +0000, Kavanagh, Mark B wrote:
> Hi,
>
> DPDK 1.8.0 removes the data pointer from the mbuf structure, such that the start of the data in the segment buffer must be calculated (i.e. buf_addr + data_off = 'data').
>
> Given this, what is the best approach to set the mbuf data to NULL (previously mbuf.data = NULL)?
>
> As I see it, given an initialized mbuf, such that buf_addr is non-null, and data_off =RTE_PKTMBUF_HEADROOM, is it fair to say that the best solution is to memset to 0 from location (buf_addr + data_off) for a length of (data_len - data_off)?
>
> Thanks in advance,
> Mark
Why not just set data_len = 0 to indicate an empty mbuf?
next prev parent reply other threads:[~2014-12-17 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 16:44 Kavanagh, Mark B
2014-12-17 16:49 ` Bruce Richardson [this message]
2015-02-09 10:51 ` Kavanagh, Mark B
2015-02-09 12:58 ` Bruce Richardson
2015-02-09 13:43 ` Kavanagh, Mark B
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=20141217164934.GA6980@bricha3-MOBL3 \
--to=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=mark.b.kavanagh@intel.com \
/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).