[dpdk-users] Usage of "rte_pktmbuf_attach"
nubinstanley at gmail.com
Tue Dec 20 13:04:13 CET 2016
I have a doubt regarding the usage of :
static inline void rte_pktmbuf_attach(struct rte_mbuf **mi*, struct
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
<<Update pkt_2 fields so that only part of in_pkt is used>>
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 ?
More information about the users