[dpdk-users] A question about rte_pktmbuf_init() and alike functions

Александр Самойлов cidjey1991 at mail.ru
Tue Nov 3 20:23:29 CET 2015


 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




More information about the users mailing list