* [dpdk-users] Usage of "rte_pktmbuf_attach"
@ 2016-12-20 12:04 Nubin Stanley
0 siblings, 0 replies; only message in thread
From: Nubin Stanley @ 2016-12-20 12:04 UTC (permalink / raw)
To: users
Hi All
I have a doubt regarding the usage of :
static inline void rte_pktmbuf_attach(struct rte_mbuf **mi*, struct
rte_mbuf **m*)
Say "mi" is a newly allocated buffer. "m" is a multi-segment buffer (say
with 2 segments). Now, within the attach API, I see that "mi->nb_segs" is
always set to 1.
attach_frames(in_pkt) // in_pkt has 2 segments
{
pkt_1 = alloc(); // single segment
pkt_2 = alloc(); // single segment
rte_pktmbuf_attach(pkt_2, in_pkt);
<<Update pkt_2 fields so that only part of in_pkt is used>>
rte_pktmbuf_chain(pkt_1, pkt_2);
}
1) Will the attach ensure that whatever pkt_2 points to has the 2 segments
in in_pkt ? Or should I somehow loop and allocate new buffers and do
multiple attaches ?
2) Say, attach is properly done, the "chain" API should work as usual ?
Regards
Nubin Stanley
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-20 12:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-20 12:04 [dpdk-users] Usage of "rte_pktmbuf_attach" Nubin Stanley
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).