* [dpdk-dev] rte_mbuf - contiguous ?
@ 2013-10-24 7:49 Jose Gavine Cueto
2013-10-24 8:03 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Jose Gavine Cueto @ 2013-10-24 7:49 UTC (permalink / raw)
To: dev
Hi,
Is the rte_mbuf/packet data always map to a contiguous area in memory, and
so if I can do a linear copy of it ?
Cheers,
pepe
--
To stop learning is like to stop loving.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] rte_mbuf - contiguous ?
2013-10-24 7:49 [dpdk-dev] rte_mbuf - contiguous ? Jose Gavine Cueto
@ 2013-10-24 8:03 ` Thomas Monjalon
2013-10-24 8:09 ` Jose Gavine Cueto
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2013-10-24 8:03 UTC (permalink / raw)
To: Jose Gavine Cueto; +Cc: dev
Hello,
24/10/2013 09:49, Jose Gavine Cueto :
> Is the rte_mbuf/packet data always map to a contiguous area in memory, and
> so if I can do a linear copy of it ?
No, in scatter/gather case, mbuf can be splitted in non contiguous areas.
--
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] rte_mbuf - contiguous ?
2013-10-24 8:03 ` Thomas Monjalon
@ 2013-10-24 8:09 ` Jose Gavine Cueto
2013-10-24 8:32 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Jose Gavine Cueto @ 2013-10-24 8:09 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
Thomas,
Thank you for the information. Because I would like to copy an rte_mbuf to
a memory mapped file for an application. Is there some dpdk API for this
copy operation (linear/nonlinear) or are these left with the application
developers ?
Thanks,
Pepe
On Thu, Oct 24, 2013 at 4:03 PM, Thomas Monjalon
<thomas.monjalon@6wind.com>wrote:
> Hello,
>
> 24/10/2013 09:49, Jose Gavine Cueto :
> > Is the rte_mbuf/packet data always map to a contiguous area in memory,
> and
> > so if I can do a linear copy of it ?
>
> No, in scatter/gather case, mbuf can be splitted in non contiguous areas.
>
> --
> Thomas
>
--
To stop learning is like to stop loving.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] rte_mbuf - contiguous ?
2013-10-24 8:09 ` Jose Gavine Cueto
@ 2013-10-24 8:32 ` Thomas Monjalon
2013-10-25 14:04 ` Jose Gavine Cueto
0 siblings, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2013-10-24 8:32 UTC (permalink / raw)
To: Jose Gavine Cueto; +Cc: dev
24/10/2013 10:09, Jose Gavine Cueto :
> Thank you for the information. Because I would like to copy an rte_mbuf to
> a memory mapped file for an application. Is there some dpdk API for this
> copy operation (linear/nonlinear) or are these left with the application
> developers ?
You can have some tips by looking at rte_pktmbuf_is_contiguous:
http://dpdk.org/doc/api/rte__mbuf_8h.html#a511a116ae4822037d4f1fb561aa4ffcf
and rte_pktmbuf_clone:
http://dpdk.org/doc/api/rte__mbuf_8h.html#a1d26cc982f6363cd7492dd70cc5c287c
--
Thomas
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] rte_mbuf - contiguous ?
2013-10-24 8:32 ` Thomas Monjalon
@ 2013-10-25 14:04 ` Jose Gavine Cueto
0 siblings, 0 replies; 5+ messages in thread
From: Jose Gavine Cueto @ 2013-10-25 14:04 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
Hi Thomas,
I've read both the rte_pktmbuf_is_contiguous and rte_pktmbuf_clone. I
think that I can get each mbuf segments and copy them to memory linearly.
Thanks for the tip.
On Thu, Oct 24, 2013 at 4:32 PM, Thomas Monjalon
<thomas.monjalon@6wind.com>wrote:
> 24/10/2013 10:09, Jose Gavine Cueto :
> > Thank you for the information. Because I would like to copy an rte_mbuf
> to
> > a memory mapped file for an application. Is there some dpdk API for this
> > copy operation (linear/nonlinear) or are these left with the application
> > developers ?
>
> You can have some tips by looking at rte_pktmbuf_is_contiguous:
> http://dpdk.org/doc/api/rte__mbuf_8h.html#a511a116ae4822037d4f1fb561aa4ffcf
> and rte_pktmbuf_clone:
> http://dpdk.org/doc/api/rte__mbuf_8h.html#a1d26cc982f6363cd7492dd70cc5c287c
>
> --
> Thomas
>
--
To stop learning is like to stop loving.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-10-25 14:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-24 7:49 [dpdk-dev] rte_mbuf - contiguous ? Jose Gavine Cueto
2013-10-24 8:03 ` Thomas Monjalon
2013-10-24 8:09 ` Jose Gavine Cueto
2013-10-24 8:32 ` Thomas Monjalon
2013-10-25 14:04 ` Jose Gavine Cueto
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).