From: "Wojciech Waśko" <wojciech@wasko.io>
To: dev@dpdk.org
Subject: [dpdk-dev] Decoupling rte_mbuf and the segment buffer.
Date: Mon, 24 Sep 2018 13:44:03 +0200 [thread overview]
Message-ID: <254a5b5ca351a3b7bb48979eb54b1237@wasko.io> (raw)
I've been wondering about the possibility to decouple the mbuf header
(and the private data) from the payload. If I'm reading the code
correctly, right now the payload is placed (together with the header and
the private data) in one memory object dequeued from the mempool.
I can use a specific mempool for pktbuf_pool by using
rte_pktmbuf_pool_create_by_ops(). However, there is no way to have the
header and buffer go to separate mempools, is that correct?
As I see that struct rte_mbuf contains a pointer to the segment buffer
(both VA and PA) and rte_pktmbuf_init() initializes those pointers. So
one could expect that the rest of DPDK would not depend on the fact that
the segment buffer is at some offset from the mbuf header, right?
I was also looking at the rte_pktmbuf_attach_extbuf() patches from
April. It seems that I could spin up my own (possibly non-RTE) memory
pool and then rte_mempool_obj_iter() the pktbuf_pool to attach external
buffers to all the mbufs in the original pool. The obvious downside here
would be that some memory would be wasted in the mbuf pool (because the
segment buffer would be allocated but unused) but in principle that
should also work, right? Can you think of any other obvious downsides to
that approach?
Regards,
Wojtek
reply other threads:[~2018-09-24 11:44 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=254a5b5ca351a3b7bb48979eb54b1237@wasko.io \
--to=wojciech@wasko.io \
--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).