From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id C99832BF5 for ; Wed, 5 Apr 2017 17:03:16 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP; 05 Apr 2017 08:03:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,279,1486454400"; d="scan'208";a="244611930" Received: from sivswdev02.ir.intel.com ([10.237.217.46]) by fmsmga004.fm.intel.com with ESMTP; 05 Apr 2017 08:03:14 -0700 From: Ferruh Yigit To: Bruce Richardson Cc: Thomas Monjalon , dev@dpdk.org, Ferruh Yigit Date: Wed, 5 Apr 2017 16:03:12 +0100 Message-Id: <20170405150312.20960-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.8.4 Subject: [dpdk-dev] [PATCH] ring: fix build with icc 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: , X-List-Received-Date: Wed, 05 Apr 2017 15:03:17 -0000 build error: In file included from .../lib/librte_ring/rte_ring.c(90): .../lib/librte_ring/rte_ring.h(162): error #1366: a reduction in alignment without the "packed" attribute is ignored } __rte_cache_aligned; ^ Alignment attribute moved to first element of the struct Fixes: a6619414e0a9 ("ring: make struct and macros type agnostic") Signed-off-by: Ferruh Yigit --- lib/librte_ring/rte_ring.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h index 6642e18..28b7b2a 100644 --- a/lib/librte_ring/rte_ring.h +++ b/lib/librte_ring/rte_ring.h @@ -147,7 +147,7 @@ struct rte_ring { * compatibility requirements, it could be changed to RTE_RING_NAMESIZE * next time the ABI changes */ - char name[RTE_MEMZONE_NAMESIZE]; /**< Name of the ring. */ + char name[RTE_MEMZONE_NAMESIZE] __rte_cache_aligned; /**< Name of the ring. */ int flags; /**< Flags supplied at creation. */ const struct rte_memzone *memzone; /**< Memzone, if any, containing the rte_ring */ @@ -159,7 +159,7 @@ struct rte_ring { /** Ring consumer status. */ struct rte_ring_headtail cons __rte_aligned(CONS_ALIGN); -} __rte_cache_aligned; +}; #define RING_F_SP_ENQ 0x0001 /**< The default enqueue is "single-producer". */ #define RING_F_SC_DEQ 0x0002 /**< The default dequeue is "single-consumer". */ -- 2.9.3