DPDK patches and discussions
 help / color / mirror / Atom feed
From: roy.fan.zhang@intel.com
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/4] librte_port: modify macros to access packet meta-data
Date: Fri, 11 Sep 2015 14:35:45 +0100	[thread overview]
Message-ID: <1441978548-3582-2-git-send-email-roy.fan.zhang@intel.com> (raw)
In-Reply-To: <1441978548-3582-1-git-send-email-roy.fan.zhang@intel.com>

From: Fan Zhang <roy.fan.zhang@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@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

  reply	other threads:[~2015-09-11 13:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 13:35 [dpdk-dev] [PATCH 0/4]librte_port: " roy.fan.zhang
2015-09-11 13:35 ` roy.fan.zhang [this message]
2015-09-11 13:35 ` [dpdk-dev] [PATCH 2/4] app/test: modify table and pipeline test roy.fan.zhang
2015-09-11 13:35 ` [dpdk-dev] [PATCH 3/4] app/test_pipeline: modify " roy.fan.zhang
2015-09-11 13:35 ` [dpdk-dev] [PATCH 4/4] librte_port: modify release notes and deprecation notice roy.fan.zhang
2015-10-19 14:21   ` Thomas Monjalon
2015-09-11 13:40 ` [dpdk-dev] [PATCH 0/4]librte_port: modify macros to access packet meta-data Dumitrescu, Cristian
2015-10-19 15:02   ` Thomas Monjalon
     [not found] ` <6444334.trQLVujQca@xps13>
2015-10-20 14:56   ` Dumitrescu, Cristian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441978548-3582-2-git-send-email-roy.fan.zhang@intel.com \
    --to=roy.fan.zhang@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).