dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pmd: Add generic support for TCP TSO (Transmit Segmentation Offload)
@ 2014-10-20  9:42 miroslaw.walukiewicz-ral2JQCrhuEAvxtiuMwx3w
       [not found] ` <20141020094252.14456.58891.stgit-tpi2AMbES9qir5R1eWH9hGt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: miroslaw.walukiewicz-ral2JQCrhuEAvxtiuMwx3w @ 2014-10-20  9:42 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Miroslaw Walukiewicz <miroslaw.walukiewicz-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

Add new  PKT_TX_TCP_SEG flag
Add new fields in the tx offload fields indicating MSS and L4 len

Signed-off-by: Mirek Walukiewicz <miroslaw.walukiewicz-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_mbuf/rte_mbuf.h |   23 ++++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index ddadc21..bcb09b9 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -114,6 +114,9 @@ extern "C" {
 /* Bit 51 - IEEE1588*/
 #define PKT_TX_IEEE1588_TMST (1ULL << 51) /**< TX IEEE1588 packet to timestamp. */
 
+/* Bit 49 - TCP transmit segmenation offload */
+#define PKT_TX_TCP_SEG (1ULL << 49) /**< TX TSO offload */
+ 
 /* Use final bit of flags to indicate a control mbuf */
 #define CTRL_MBUF_FLAG       (1ULL << 63) /**< Mbuf contains control data */
 
@@ -189,12 +192,22 @@ struct rte_mbuf {
 	struct rte_mbuf *next;    /**< Next segment of scattered packet. */
 
 	/* fields to support TX offloads */
-	union {
-		uint16_t l2_l3_len; /**< combined l2/l3 lengths as single var */
-		struct {
-			uint16_t l3_len:9;      /**< L3 (IP) Header Length. */
-			uint16_t l2_len:7;      /**< L2 (MAC) Header Length. */
+	/* two bytes - l2/l3 len for compatibility (endian issues)
+	 * two bytes - reseved for alignment
+	 * two bytes - l4 len (TCP/UDP) header len
+	 * two bytes - TCP tso segment size 
+ 	 */
+	struct {
+		union {
+			uint16_t l2_l3_len; /**< combined l2/l3 len */
+			struct {
+				uint16_t l3_len:9; /**< L3 (IP) Header */
+				uint16_t l2_len:7; /**< L2 (MAC) Header */
+			};
 		};
+		uint16_t reserved_tx_offload;
+		uint16_t l4_len;            /**< TCP/UDP header len */
+		uint16_t tso_segsz;         /**< TCP TSO segment size */
 	};
 } __rte_cache_aligned;
 

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-20 14:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-20  9:42 [PATCH] pmd: Add generic support for TCP TSO (Transmit Segmentation Offload) miroslaw.walukiewicz-ral2JQCrhuEAvxtiuMwx3w
     [not found] ` <20141020094252.14456.58891.stgit-tpi2AMbES9qir5R1eWH9hGt3HXsI98Cx0E9HWUfgJXw@public.gmane.org>
2014-10-20 11:30   ` Thomas Monjalon
2014-10-20 12:45     ` Walukiewicz, Miroslaw
     [not found]       ` <7C4248CAE043B144B1CD242D275626532FDE0709-kPTMFJFq+rGvNW/NfzhIbrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-10-20 13:51         ` Thomas Monjalon
2014-10-20 14:03           ` Walukiewicz, Miroslaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).