[dpdk-dev] [PATCH 08/10] librte_mbuf: Add rte_pktmbuf_mtod_offset()

2015-06-19 Thread Olivier MATZ
On 04/29/2015 06:15 PM, Cyril Chemparathy wrote: > There are a number of instances in the code where rte_pktmbuf_mtod() is used > to get the mbuf data pointer, only to add an offset before casting the result > to some other header type. This patch adds a new rte_pktmbuf_mtod_offset() > macro to

[dpdk-dev] [PATCH 08/10] librte_mbuf: Add rte_pktmbuf_mtod_offset()

2015-06-19 Thread Cyril Chemparathy
On Fri, 19 Jun 2015 17:58:59 +0200 Olivier MATZ wrote: > Small comment here: m_headlen(m) should be replaced by "the length of > the first segment". Indeed, there is no m_headlen() function (I see > that it is coming from a copy/paste of the mtod() comment). Could you > also fix it by the way? W

[dpdk-dev] [PATCH 08/10] librte_mbuf: Add rte_pktmbuf_mtod_offset()

2015-04-29 Thread Cyril Chemparathy
There are a number of instances in the code where rte_pktmbuf_mtod() is used to get the mbuf data pointer, only to add an offset before casting the result to some other header type. This patch adds a new rte_pktmbuf_mtod_offset() macro to eliminate these awful double cast situations. Signed-off-b