From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <tiwei.bie@intel.com>
Received: from mga01.intel.com (mga01.intel.com [192.55.52.88])
 by dpdk.org (Postfix) with ESMTP id 22E2BF8AA
 for <dev@dpdk.org>; Wed,  4 Jan 2017 08:28:05 +0100 (CET)
Received: from orsmga004.jf.intel.com ([10.7.209.38])
 by fmsmga101.fm.intel.com with ESMTP; 03 Jan 2017 23:28:05 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.33,458,1477983600"; d="scan'208";a="45558594"
Received: from dpdk19.sh.intel.com ([10.239.129.113])
 by orsmga004.jf.intel.com with ESMTP; 03 Jan 2017 23:28:03 -0800
From: Tiwei Bie <tiwei.bie@intel.com>
To: dev@dpdk.org
Cc: adrien.mazarguil@6wind.com, wenzhuo.lu@intel.com, john.mcnamara@intel.com,
 olivier.matz@6wind.com, thomas.monjalon@6wind.com,
 konstantin.ananyev@intel.com, helin.zhang@intel.com, wei.dai@intel.com,
 xiao.w.wang@intel.com
Date: Wed,  4 Jan 2017 15:21:35 +0800
Message-Id: <1483514502-32841-2-git-send-email-tiwei.bie@intel.com>
X-Mailer: git-send-email 2.7.4
In-Reply-To: <1483514502-32841-1-git-send-email-tiwei.bie@intel.com>
References: <1482939691-34855-1-git-send-email-tiwei.bie@intel.com>
 <1483514502-32841-1-git-send-email-tiwei.bie@intel.com>
Subject: [dpdk-dev] [PATCH v5 1/8] mbuf: reserve a Tx offload flag for
	PMD-specific API
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 04 Jan 2017 07:28:06 -0000

Reserve a Tx offload flag in mbuf, that can be used by PMD to define
its own Tx offload flag when implementing the PMD-specific API.

Suggested-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 lib/librte_mbuf/rte_mbuf.c | 2 ++
 lib/librte_mbuf/rte_mbuf.h | 5 +++++
 2 files changed, 7 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c
index 63f43c8..15c4f68 100644
--- a/lib/librte_mbuf/rte_mbuf.c
+++ b/lib/librte_mbuf/rte_mbuf.c
@@ -404,6 +404,7 @@ const char *rte_get_tx_ol_flag_name(uint64_t mask)
 	case PKT_TX_TUNNEL_GRE: return "PKT_TX_TUNNEL_GRE";
 	case PKT_TX_TUNNEL_IPIP: return "PKT_TX_TUNNEL_IPIP";
 	case PKT_TX_TUNNEL_GENEVE: return "PKT_TX_TUNNEL_GENEVE";
+	case PKT_TX_RESERVED_0: return "PKT_TX_RESERVED_0";
 	default: return NULL;
 	}
 }
@@ -434,6 +435,7 @@ rte_get_tx_ol_flag_list(uint64_t mask, char *buf, size_t buflen)
 		  "PKT_TX_TUNNEL_NONE" },
 		{ PKT_TX_TUNNEL_GENEVE, PKT_TX_TUNNEL_MASK,
 		  "PKT_TX_TUNNEL_NONE" },
+		{ PKT_TX_RESERVED_0, PKT_TX_RESERVED_0, NULL },
 	};
 	const char *name;
 	unsigned int i;
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index ead7c6e..6168a6d 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -182,6 +182,11 @@ extern "C" {
 /* add new TX flags here */
 
 /**
+ * Reserved Tx offload flag for PMD-specific API.
+ */
+#define PKT_TX_RESERVED_0     (0x1ULL << 44)
+
+/**
  * Bits 45:48 used for the tunnel type.
  * When doing Tx offload like TSO or checksum, the HW needs to configure the
  * tunnel type into the HW descriptors.
-- 
2.7.4