mbuf: add macro for offset arithmetic
authorCyril Chemparathy <cchemparathy@ezchip.com>
Mon, 22 Jun 2015 18:34:21 +0000 (11:34 -0700)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 24 Jun 2015 10:00:42 +0000 (12:00 +0200)
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-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>

No differences found