From: "Александр Самойлов" <cidjey1991@mail.ru>
To: users <users@dpdk.org>
Subject: [dpdk-users] A question about rte_pktmbuf_init() and alike functions
Date: Tue, 03 Nov 2015 22:23:29 +0300 [thread overview]
Message-ID: <1446578609.273825053@f418.i.mail.ru> (raw)
An update. I decided to try this:
m = rte_pktmbuf_alloc(mp);
if(unlikely(m == NULL))
{
RTE_LOG(INFO, USER1, "%s: Couldn't allocate pkt_mbuf\n", __func__);
return NULL;
}
rte_pktmbuf_init(mp, NULL, m, 0);
rte_mbuf_refcnt_set(m, 1);
Well, it worked out. My memory is not dirty anymore and TCP checksum is always OK. Thank you for the input.
But this raises another question: You said that rte_pktmbuf_alloc() implies resetting the buffer to a "sane state".
So why this reset doesn't make my new "m" buffer "sane enough" to keep a new frame while rte_pktmbuf_init does?
Alex Samoylov
next reply other threads:[~2015-11-03 19:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 19:23 Александр Самойлов [this message]
2015-11-03 19:27 ` Wiles, Keith
2015-11-03 19:44 ` Александр Самойлов
-- strict thread matches above, loose matches on Subject: below --
2015-11-03 17:49 Александр Самойлов
2015-11-03 18:52 ` Wiles, Keith
2015-11-03 18:53 ` Matt Laswell
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=1446578609.273825053@f418.i.mail.ru \
--to=cidjey1991@mail.ru \
--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).