Hi, On 01/04/2015 11:13 AM, Helmut Sim wrote: > In such case, a modified api should not require to set the ip_hdr > total_length field, which is 16 bits. > The HW will assign the correct packet length for each transmitted IP > packet which is l3_len+l4_len+mss (except of the last segment which may > be smaller than mss). > [...] > I went over the 82599 datasheet and as Olivier mentioned it is a > 18 bits field, hence allowing up to 256KB length. > > Olivier, although tcp window size field is 16 bits the > advertised window is typically higher than 64KB using the TCP > window scaling option (which is the common usage today). > > Hence I think that the API should allow at least up to 256KB > packet length, while finding a solution to make sure it also > support lower lengths for other NICs.
I don't think that the maximum TSO packet should be bigger than what we have. TSO does not exempt to implement a TCP stack, and it is not designed to send megabytes of data without the intervention of the TCP stack. The objective is to accelerate the segmentation of packets. Indeed, without TSO, the main costs are the segmentation itself (usually at ~1.5K) and the fact that each 1.5K packet go through the low layer code (driver). TSO solves these 2 problems even with a length limit at 64K: it would represent ~40 times less packets to segment and transmit to the driver, dividing the cost by the same amount. I think increasing the max length won't make any difference in terms of performance. Regards, Olivier