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