From mboxrd@z Thu Jan 1 00:00:00 1970 From: roy.fan.zhang@intel.com Subject: [PATCH 1/4] librte_port: modify macros to access packet meta-data Date: Fri, 11 Sep 2015 14:35:45 +0100 Message-ID: <1441978548-3582-2-git-send-email-roy.fan.zhang@intel.com> References: <1441978548-3582-1-git-send-email-roy.fan.zhang@intel.com> To: dev@dpdk.org Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8EF1B8DED for ; Fri, 11 Sep 2015 15:36:21 +0200 (CEST) In-Reply-To: <1441978548-3582-1-git-send-email-roy.fan.zhang@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Fan Zhang 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 --- 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