• Dmytro Shytyi's avatar
    selftests: mptcp: mptfo Initiator/Listener · ca7ae891
    Dmytro Shytyi authored
    This patch first adds TFO support in mptcp_connect.c.
    
    This can be enabled via a new option: -o MPTFO.
    
    Once enabled, the TCP_FASTOPEN socket option is enabled for the server
    side and a sendto() with MSG_FASTOPEN is used instead of a connect() for
    the client side.
    
    Note that the first SYN has a limit of bytes it can carry. In other
    words, it is allowed to send less data than the provided one. We then
    need to track more status info to properly allow the next sendmsg()
    starting from the next part of the data to send the rest.
    
    Also in TFO scenarios, we need to completely spool the partially xmitted
    buffer -- and account for that -- before starting sendfile/mmap xmit,
    otherwise the relevant tests will fail.
    Co-developed-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Signed-off-by: default avatarDmytro Shytyi <dmytro@shytyi.net>
    Signed-off-by: default avatarMatthieu Baerts <matthieu.baerts@tessares.net>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    ca7ae891
mptcp_connect.sh 22.6 KB