DPDK patches and discussions
 help / color / mirror / Atom feed
From: <jerinj@marvell.com>
To: <dev@dpdk.org>, Olivier Matz <olivier.matz@6wind.com>
Cc: <thomas@monjalon.net>, <david.marchand@redhat.com>,
	Jerin Jacob <jerinj@marvell.com>
Subject: [dpdk-dev]  [PATCH 3/3] mbuf: use structure marker typedef in eal
Date: Sun, 8 Dec 2019 17:04:13 +0530	[thread overview]
Message-ID: <20191208113413.2179329-3-jerinj@marvell.com> (raw)
In-Reply-To: <20191208113413.2179329-1-jerinj@marvell.com>

From: Jerin Jacob <jerinj@marvell.com>

Use new marker typedef available in EAL and remove private marker
typedef.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
 lib/librte_mbuf/rte_mbuf_core.h | 21 ++++-----------------
 1 file changed, 4 insertions(+), 17 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_core.h b/lib/librte_mbuf/rte_mbuf_core.h
index 9a8557d1c..b9a59c879 100644
--- a/lib/librte_mbuf/rte_mbuf_core.h
+++ b/lib/librte_mbuf/rte_mbuf_core.h
@@ -406,19 +406,6 @@ extern "C" {
 #define	RTE_MBUF_DEFAULT_BUF_SIZE	\
 	(RTE_MBUF_DEFAULT_DATAROOM + RTE_PKTMBUF_HEADROOM)
 
-/*
- * define a set of marker types that can be used to refer to set points in the
- * mbuf.
- */
-__extension__
-typedef void    *MARKER[0];   /**< generic marker for a point in a structure */
-__extension__
-typedef uint8_t  MARKER8[0];  /**< generic marker with 1B alignment */
-
- /** marker that allows us to overwrite 8 bytes with a single assignment */
-__extension__
-typedef uint64_t MARKER64[0];
-
 struct rte_mbuf_sched {
 	uint32_t queue_id;   /**< Queue ID. */
 	uint8_t traffic_class;
@@ -478,7 +465,7 @@ enum {
  * The generic rte_mbuf, containing a packet mbuf.
  */
 struct rte_mbuf {
-	MARKER cacheline0;
+	RTE_MARKER cacheline0;
 
 	void *buf_addr;           /**< Virtual address of segment buffer. */
 	/**
@@ -494,7 +481,7 @@ struct rte_mbuf {
 	} __rte_aligned(sizeof(rte_iova_t));
 
 	/* next 8 bytes are initialised on RX descriptor rearm */
-	MARKER64 rearm_data;
+	RTE_MARKER64 rearm_data;
 	uint16_t data_off;
 
 	/**
@@ -522,7 +509,7 @@ struct rte_mbuf {
 	uint64_t ol_flags;        /**< Offload features. */
 
 	/* remaining bytes are set on RX when pulling packet from descriptor */
-	MARKER rx_descriptor_fields1;
+	RTE_MARKER rx_descriptor_fields1;
 
 	/*
 	 * The packet type, which is the combination of outer/inner L2, L3, L4
@@ -610,7 +597,7 @@ struct rte_mbuf {
 	uint64_t timestamp;
 
 	/* second cache line - fields only used in slow path or on TX */
-	MARKER cacheline1 __rte_cache_min_aligned;
+	RTE_MARKER cacheline1 __rte_cache_min_aligned;
 
 	RTE_STD_C11
 	union {
-- 
2.24.0


  parent reply	other threads:[~2019-12-08 11:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-08 11:34 [dpdk-dev] [PATCH 1/3] eal: introduce structure marker typedefs jerinj
2019-12-08 11:34 ` [dpdk-dev] [PATCH 2/3] drivers: use structure marker typedef in eal jerinj
2019-12-08 11:34 ` jerinj [this message]
2019-12-10 22:46 ` [dpdk-dev] [PATCH 1/3] eal: introduce structure marker typedefs Thomas Monjalon
2019-12-19 10:34   ` Jerin Jacob
2019-12-19 11:25 ` [dpdk-dev] [PATCH v2 " jerinj
2019-12-19 11:25   ` [dpdk-dev] [PATCH v2 2/3] drivers: use structure marker typedef in eal jerinj
2019-12-19 11:25   ` [dpdk-dev] [PATCH v2 3/3] mbuf: " jerinj
2019-12-26 16:24     ` Olivier Matz
2020-01-20 21:55       ` Thomas Monjalon
2019-12-20  4:21   ` [dpdk-dev] [PATCH v2 1/3] eal: introduce structure marker typedefs Gavin Hu
2019-12-26  8:15   ` Matan Azrad
2020-01-02  6:27     ` Jerin Jacob
2020-01-02  9:48       ` Matan Azrad
2020-01-16 13:09         ` Jerin Jacob
2020-01-20 20:11   ` Thomas Monjalon

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=20191208113413.2179329-3-jerinj@marvell.com \
    --to=jerinj@marvell.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=olivier.matz@6wind.com \
    --cc=thomas@monjalon.net \
    /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).