From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 6BFA658EE for ; Wed, 3 Sep 2014 17:45:06 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 03 Sep 2014 08:49:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,458,1406617200"; d="scan'208";a="567777838" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 03 Sep 2014 08:49:40 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s83Fndd8025425; Wed, 3 Sep 2014 16:49:39 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s83FndY1010455; Wed, 3 Sep 2014 16:49:39 +0100 Received: (from bricha3@localhost) by sivswdev02.ir.intel.com with id s83FndSl010451; Wed, 3 Sep 2014 16:49:39 +0100 From: Bruce Richardson To: dev@dpdk.org Date: Wed, 3 Sep 2014 16:49:31 +0100 Message-Id: <1409759378-10113-7-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1409759378-10113-1-git-send-email-bruce.richardson@intel.com> References: <1409759378-10113-1-git-send-email-bruce.richardson@intel.com> Subject: [dpdk-dev] [PATCH 06/13] mbuf: minor changes for readability X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 15:45:06 -0000 * Ensure comments line up correctly * Simplify the #ifdefs around the refcnt fields to make them clearer Signed-off-by: Bruce Richardson --- lib/librte_mbuf/rte_mbuf.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 7b0b4f2..5260001 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -126,7 +126,6 @@ struct rte_mbuf { uint16_t buf_len; /**< Length of segment buffer. */ uint16_t data_off; -#ifdef RTE_MBUF_REFCNT /** * 16-bit Reference counter. * It should only be accessed using the following functions: @@ -136,12 +135,12 @@ struct rte_mbuf { * config option. */ union { - rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */ - uint16_t refcnt; /**< Non-atomically accessed refcnt */ - }; -#else - uint16_t refcnt_reserved; /**< Do not use this field */ +#ifdef RTE_MBUF_REFCNT + rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */ + uint16_t refcnt; /**< Non-atomically accessed refcnt */ #endif + uint16_t refcnt_reserved; /**< Do not use this field */ + }; uint8_t nb_segs; /**< Number of segments. */ uint8_t port; /**< Input port. */ @@ -155,12 +154,12 @@ struct rte_mbuf { uint16_t l2_len:7; /**< L2 (MAC) Header Length. */ uint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order). */ union { - uint32_t rss; /**< RSS hash result if RSS enabled */ + uint32_t rss; /**< RSS hash result if RSS enabled */ struct { uint16_t hash; uint16_t id; - } fdir; /**< Filter identifier if FDIR enabled */ - uint32_t sched; /**< Hierarchical scheduler */ + } fdir; /**< Filter identifier if FDIR enabled */ + uint32_t sched; /**< Hierarchical scheduler */ } hash; /**< hash information */ /* fields only used in slow path or on TX */ -- 1.9.3