From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <miroslaw.walukiewicz@intel.com>
Received: from mga11.intel.com (mga11.intel.com [192.55.52.93])
 by dpdk.org (Postfix) with ESMTP id 3C6FB68B5
 for <dev@dpdk.org>; Mon, 13 Oct 2014 16:30:56 +0200 (CEST)
Received: from fmsmga003.fm.intel.com ([10.253.24.29])
 by fmsmga102.fm.intel.com with ESMTP; 13 Oct 2014 07:38:35 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="399444697"
Received: from gklab-18-011.igk.intel.com ([10.102.18.11])
 by FMSMGA003.fm.intel.com with ESMTP; 13 Oct 2014 07:31:28 -0700
From: miroslaw.walukiewicz@intel.com
To: dev@dpdk.org
Date: Mon, 13 Oct 2014 10:38:34 -0400
Message-ID: <20141013143834.19211.44077.stgit@gklab-18-011.igk.intel.com>
User-Agent: StGit/0.17-dirty
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Subject: [dpdk-dev] [PATCH 1/3] pmd: add new flag to indicate TX TSO
 operation on the packet
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <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: Mon, 13 Oct 2014 14:30:56 -0000

From: Miroslaw Walukiewicz <miroslaw.walukiewicz@intel.com>

Transmission of TCP packets could be accelerated by
HW Transmit Segmentation Offload. With TSO packets up to
64K could be transmismitted.

When this flag is set the PMD drived will enable TCP segmentation.

The new field tso_segsz is added to indicate how long is TCP TSO segment.

Signed-off-by: Mirek Walukiewicz <miroslaw.walukiewicz@intel.com>
---
 lib/librte_mbuf/rte_mbuf.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index ddadc21..63cbc36 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -117,6 +117,9 @@ extern "C" {
 /* Use final bit of flags to indicate a control mbuf */
 #define CTRL_MBUF_FLAG       (1ULL << 63) /**< Mbuf contains control data */
 
+/* Bit 50 - TSO (TCP Transmit Segmenation Offload) */
+#define PKT_TX_TCP_TSO       (1ULL << 50) /**< Mbuf needs TSO enabling */
+
 /**
  * Bit Mask to indicate what bits required for building TX context
  */
@@ -196,6 +199,8 @@ struct rte_mbuf {
 			uint16_t l2_len:7;      /**< L2 (MAC) Header Length. */
 		};
 	};
+	/* field to support TSO segment size */
+	uint32_t tso_segsz;
 } __rte_cache_aligned;
 
 /**