Project

General

Profile

Actions

Bug #13475

open

TCP sends fragmented IP when LSO is enabled

Added by David Hanisch over 1 year ago. Updated 11 months ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
networking
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

Situation:
  • tcp connection was closed
  • there is more than one mss unsent
  • LSO is enabled

In tcp_send() the calculation of bytes to send is done under the assumption that LSO will be used. A value higher than mss is set for lso_usable. Later this 'if' is taken, because we are at the end of the data stream:

        if (tcp->tcp_valid_bits != 0 &&
            (tcp->tcp_valid_bits != TCP_FSS_VALID ||
            ((*snxt + len) == tcp->tcp_fss))) {

This causes data with len > mss being sent without LSO setup and due to this with IP fragmentation. Beside the general wish to avoid IP fragmentation this conflicted with IP filter: The additional fragments were dropped and retransmission occurred.

I can imagine two fixes:

  • the easy one: don't do LSO if any of the VALID bits is set
  • more complicated: with TCP_FSS_VALID don't send the complete unsent data with LSO but leave data <=mss for the next loop, which will then automaticaly be without LSO
Actions

Also available in: Atom PDF