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 EA6685A88 for ; Thu, 9 Jul 2015 15:23:00 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 09 Jul 2015 06:22:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,440,1432623600"; d="scan'208";a="761250373" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 09 Jul 2015 06:22:40 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t69DMdhe008534; Thu, 9 Jul 2015 14:22:40 +0100 Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id t69DMd1O008430; Thu, 9 Jul 2015 14:22:39 +0100 Received: (from bricha3@localhost) by sivswdev01.ir.intel.com with id t69DMdbM008426; Thu, 9 Jul 2015 14:22:39 +0100 From: Bruce Richardson To: dev@dpdk.org Date: Thu, 9 Jul 2015 14:22:39 +0100 Message-Id: <1436448159-8394-1-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] mbuf: clarify comment on adding TX offload flags 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: Thu, 09 Jul 2015 13:23:01 -0000 The comment for TX offload flags stated that those flags started at bit 55 and then were added to the right of that, leaving 8 bits reserved for generic mbuf (i.e. non-offload) use. This comment may not have been clear as 5 of the 8 flags which were reserved have now been used for TX offloads. This patch: * updates the description so that it now reflects reality that only three flags are available for generic mbuf use * reserved the final generic flag so that it can't be taken over for TX offload in future * clarifies the comment for TX flags to indicate that they should be counting downwards not upwards. Signed-off-by: Bruce Richardson --- lib/librte_mbuf/rte_mbuf.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 80419df..0c0034b 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -75,9 +75,10 @@ extern "C" { * * - RX flags start at bit position zero, and get added to the left of previous * flags. - * - The most-significant 8 bits are reserved for generic mbuf flags - * - TX flags therefore start at bit position 55 (i.e. 63-8), and new flags get - * added to the right of the previously defined flags + * - The most-significant 3 bits are reserved for generic mbuf flags + * - TX flags therefore start at bit position 60 (i.e. 63-3), and new flags get + * added to the right of the previously defined flags i.e. they should count + * downwards, not upwards. * * Keep these flags synchronized with rte_get_rx_ol_flag_name() and * rte_get_tx_ol_flag_name(). @@ -197,6 +198,8 @@ extern "C" { */ #define PKT_TX_OUTER_IPV6 (1ULL << 60) +#define __RESERVED (1ULL << 61) /**< reserved for future mbuf use */ + #define IND_ATTACHED_MBUF (1ULL << 62) /**< Indirect attached mbuf */ /* Use final bit of flags to indicate a control mbuf */ -- 2.4.3