From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 45E58A04F1; Sun, 8 Dec 2019 12:34:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2868B1B9B5; Sun, 8 Dec 2019 12:34:21 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 0A08D1BE80 for ; Sun, 8 Dec 2019 12:34:18 +0100 (CET) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id xB8BWmbO015155; Sun, 8 Dec 2019 03:34:18 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=pfpt0818; bh=ayvQ3wb9P3qweYE2uaD/rMvUQIdQc0i95i3k3AkWMns=; b=BH3xCW6tJ6LVhbW58ufRFDPhJee1rtyGYB0u1Iu5mG15w91sOJq4IzdBPDHMeKyEsRg5 bxJ2P5Jb6vP8nFM3dBpMA4I8HTDLUps2uCSj8oRqfHTHuLVsnETTq/qScHn1usMFDhXH NfQZLST/ywPmlMF0c6I9gh/vVGbOYJf5RPIfqhjH430ycAgmSJNR7mrf/A183ZiIXB4I 3HfJ8TlwojsLP68ga+pO+KetcfBuWRTgLdzJxXv5uicYSC9lQelej5a1iu09C+7QMsS7 NIVSZ0R/luqQX3mwqT+sweJX/adx2MYv319u2NDJ8loz+nxgdzJ0Y2OmWOGxgaWH8OpW tw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2wrcfptaux-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 08 Dec 2019 03:34:18 -0800 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Sun, 8 Dec 2019 03:34:06 -0800 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Sun, 8 Dec 2019 03:34:06 -0800 Received: from jerin-lab.marvell.com (jerin-lab.marvell.com [10.28.34.14]) by maili.marvell.com (Postfix) with ESMTP id 3A2BC3F703F; Sun, 8 Dec 2019 03:34:05 -0800 (PST) From: To: , Olivier Matz CC: , , Jerin Jacob Date: Sun, 8 Dec 2019 17:04:13 +0530 Message-ID: <20191208113413.2179329-3-jerinj@marvell.com> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191208113413.2179329-1-jerinj@marvell.com> References: <20191208113413.2179329-1-jerinj@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,18.0.572 definitions=2019-12-08_03:2019-12-05,2019-12-08 signatures=0 Subject: [dpdk-dev] [PATCH 3/3] mbuf: use structure marker typedef in eal X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" From: Jerin Jacob Use new marker typedef available in EAL and remove private marker typedef. Signed-off-by: Jerin Jacob --- 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