Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sk-tcp: Improve TCP socket options handling #2380

Merged

Commits on May 19, 2024

  1. sk-tcp: Move TCP socket options from TcpStreamEntry to TcpOptsEntry

    Currently some of the TCP socket option information is stored in the
    TcpStreamEntry, but the information in the TcpStreamEntry is only
    restored after the TCP socket has established connection, which
    results in these TCP socket options not being restored for
    unconnected TCP sockets.
    
    In this commit move the TCP socket options from TcpStreamEntry to
    TcpOptsEntry and add dump_tcp_opts() and restore_tcp_opts() for TCP
    socket options dump and restore.
    
    Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
    juntongdeng committed May 19, 2024
    Configuration menu
    Copy the full SHA
    7e4feec View commit details
    Browse the repository at this point in the history
  2. sk-tcp: Move TCP socket options from SkOptsEntry to TcpOptsEntry

    Currently some TCP socket option information is stored in SkOptsEntry,
    which is a little confusing.
    
    SkOptsEntry should only contain socket options that are common to
    all sockets.
    
    In this commit move the TCP-specific socket options from SkOptsEntry
    to TcpOptsEntry.
    
    Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
    juntongdeng committed May 19, 2024
    Configuration menu
    Copy the full SHA
    59d4738 View commit details
    Browse the repository at this point in the history
  3. sk-tcp: Add test cases for TCP_CORK and TCP_NODELAY socket options

    Currently there are no socket option test cases for TCP_CORK and
    TCP_NODELAY, this commit adds related test cases.
    
    The socket option test cases for TCP_KEEPCNT, TCP_KEEPIDLE, and
    TCP_KEEPINTVL already exist in socket-tcp_keepalive.c, so they are
    not included in this test case.
    
    Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
    juntongdeng committed May 19, 2024
    Configuration menu
    Copy the full SHA
    7d06fb0 View commit details
    Browse the repository at this point in the history