[dpdk-dev] Packet crafting....
bruce.richardson at intel.com
Fri Mar 14 12:49:16 CET 2014
> From: sabu kurian [mailto:sabu2kurian at gmail.com]
> Sent: Friday, March 14, 2014 11:38 AM
> To: Richardson, Bruce
> Cc: dev at dpdk.org
> Subject: Re: [dpdk-dev] Packet crafting....
> Thanks on the reply Richardson. You did mention something like "Don't forget that when you get the mbuf from
> rte_pktmbuf_alloc, you also need to set the length value to the appropriate size." .
> Like I'm allocating the mbuf using rte_mbuf . The rte_mempool_create has already set the maximum packet size
> for a mbuf and the number of mbuf's and all. So do I really need to use rte_pktmbuf_alloc ?
How are you getting an mbuf from the pool, if not using rte_pktmbuf_alloc?
When you have an mbuf, that buffer has a maximum size, generally around 2k. However, the packet inside that buffer is generally smaller than the overall buffer size and you must configure that size, otherwise the PMD, and therefore the NIC, has no idea how much data out of that 2k buffer needs to be transmitted.
More information about the dev