summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Richardson <bruce.richardson@intel.com>2015-07-09 14:22:39 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-07-16 16:47:52 +0200
commit29d607db3cb46dcb9a05f5326c19acb61951e5e3 (patch)
tree18d477c9f038e85270e2cfc3953e38a51756620b
parent53dbab96d5ecccd7662f4de3c17030ea3e11cda2 (diff)
downloaddpdk-29d607db3cb46dcb9a05f5326c19acb61951e5e3.zip
dpdk-29d607db3cb46dcb9a05f5326c19acb61951e5e3.tar.gz
dpdk-29d607db3cb46dcb9a05f5326c19acb61951e5e3.tar.xz
mbuf: clarify comment on adding Tx offload flags
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 <bruce.richardson@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
-rw-r--r--lib/librte_mbuf/rte_mbuf.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 115c560..917dd59 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().
@@ -201,6 +202,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 */