From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH RFC 00/11] ixgbe/mbuf: add TSO support Date: Mon, 19 May 2014 14:47:06 +0200 Message-ID: <1546716.3aIeLKqHAb@xps13> References: <1399647038-15095-1-git-send-email-olivier.matz@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Olivier Matz Return-path: In-Reply-To: <1399647038-15095-1-git-send-email-olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 2014-05-09 16:50, Olivier Matz: > This series add TSO support in ixgbe DPDK driver. As discussed > previously on the list [1], one problem is that there is not enough room > in rte_mbuf today to store the required information to implement this > feature: > - a new ol_flag > - the MSS > - the L4 header len > > A solution would be to increase the size of the mbuf to 2 cache lines > but it could have a bad impact on performance. This series proposes some > rework to drastically reduce the size of the rte_mbuf structures before > implementing the TSO, avoiding to change the mbuf size to 128 bytes. > > After the rework of mbuf structures, the size of rte_mbuf structure is > reduced by 9 bytes. The implementation of TSO requires to double the > size of ol_flags (16 to 32 bits) and to double the size of offload > information in order to add the mss and the l4 header length (32 to 64 > bits). At the end of the whole series, sizeof(rte_mbuf) is still 64 > bytes and 4 bytes are available for future use. > > This rework causes a lot of modifications in the mbuf structure, > implying some changes in the applications that directly use the mbuf > structure fields instead of using the API functions (sometimes there is > no function). That's why this series is a RFC. In my opinion, it's the > proper moment for this evolution as the 1.7.0 window is open. > > About TSO, the new fields in mbuf try to be generic enough to apply to > other hardware in the future. To delegate the TCP segmentation to the > hardware, the user has to: > > - set the PKT_TX_TCP_SEG flag in mbuf->ol_flags (this flag implies > PKT_TX_IP_CKSUM and PKT_TX_TCP_CKSUM) > - fill the mbuf->hw_offload information: l2_len, l3_len, l4_len, mss > - calculate the pseudo header checksum and set it in the TCP header, > as required when doing hardware TCP checksum offload > - set the IP checksum to 0 This patchset triggers a lot of interesting discussions about mbuf API, TSO and performance impacts. It seems everybody agree that having TSO support is a nice improvement and there are some discussions on how it can be even better. I feel we need a v2 from Olivier in order to allow us sending improvements patches on top of it. Thanks everyone -- Thomas