[dpdk-dev] [PATCH 1/4] librte_port: modify macros to access packet meta-data
roy.fan.zhang at intel.com
roy.fan.zhang at intel.com
Fri Sep 11 15:35:45 CEST 2015
From: Fan Zhang <roy.fan.zhang at intel.com>
This patch relates to ABI change proposed for librte_port. Macros to
access the packet meta-data stored within the packet buffer has been
adjusted to cover the packet mbuf structure.
Signed-off-by: Fan Zhang <roy.fan.zhang at intel.com>
---
lib/librte_port/rte_port.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_port/rte_port.h b/lib/librte_port/rte_port.h
index 396c7e9..00b97a9 100644
--- a/lib/librte_port/rte_port.h
+++ b/lib/librte_port/rte_port.h
@@ -55,7 +55,7 @@ extern "C" {
* just beyond the end of the mbuf data structure returned by a port
*/
#define RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset) \
- (&((uint8_t *) &(mbuf)[1])[offset])
+ (&((uint8_t *)(mbuf))[offset])
#define RTE_MBUF_METADATA_UINT16_PTR(mbuf, offset) \
((uint16_t *) RTE_MBUF_METADATA_UINT8_PTR(mbuf, offset))
#define RTE_MBUF_METADATA_UINT32_PTR(mbuf, offset) \
--
2.1.0
More information about the dev
mailing list