]> Git Repo - linux.git/commitdiff
mptcp: add TCP_FASTOPEN sock option
authorDmytro Shytyi <[email protected]>
Fri, 25 Nov 2022 22:29:52 +0000 (23:29 +0100)
committerJakub Kicinski <[email protected]>
Wed, 30 Nov 2022 04:24:25 +0000 (20:24 -0800)
The TCP_FASTOPEN socket option is one way for the application to tell
the kernel TFO support has to be enabled for the listener socket.

The only thing to do here with MPTCP is to relay the request to the
first subflow like it is already done for the other TCP_FASTOPEN* socket
options.

Acked-by: Paolo Abeni <[email protected]>
Signed-off-by: Dmytro Shytyi <[email protected]>
Signed-off-by: Matthieu Baerts <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
net/mptcp/sockopt.c

index f62f6483ef77565a5b071f53b1d554aff86eb853..c1bca711c35cfdb4ccc419da8c1cbce8b5d6ff30 100644 (file)
@@ -559,6 +559,7 @@ static bool mptcp_supported_sockopt(int level, int optname)
                case TCP_NOTSENT_LOWAT:
                case TCP_TX_DELAY:
                case TCP_INQ:
+               case TCP_FASTOPEN:
                case TCP_FASTOPEN_CONNECT:
                case TCP_FASTOPEN_NO_COOKIE:
                        return true;
@@ -569,7 +570,7 @@ static bool mptcp_supported_sockopt(int level, int optname)
                /* TCP_REPAIR, TCP_REPAIR_QUEUE, TCP_QUEUE_SEQ, TCP_REPAIR_OPTIONS,
                 * TCP_REPAIR_WINDOW are not supported, better avoid this mess
                 */
-               /* TCP_FASTOPEN_KEY, TCP_FASTOPEN are not supported because
+               /* TCP_FASTOPEN_KEY is not supported because
                 * fastopen for the listener side is currently unsupported
                 */
        }
@@ -801,6 +802,7 @@ static int mptcp_setsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
                /* See tcp.c: TCP_DEFER_ACCEPT does not fail */
                mptcp_setsockopt_first_sf_only(msk, SOL_TCP, optname, optval, optlen);
                return 0;
+       case TCP_FASTOPEN:
        case TCP_FASTOPEN_CONNECT:
        case TCP_FASTOPEN_NO_COOKIE:
                return mptcp_setsockopt_first_sf_only(msk, SOL_TCP, optname,
@@ -1166,6 +1168,7 @@ static int mptcp_getsockopt_sol_tcp(struct mptcp_sock *msk, int optname,
        case TCP_INFO:
        case TCP_CC_INFO:
        case TCP_DEFER_ACCEPT:
+       case TCP_FASTOPEN:
        case TCP_FASTOPEN_CONNECT:
        case TCP_FASTOPEN_NO_COOKIE:
                return mptcp_getsockopt_first_sf_only(msk, SOL_TCP, optname,
This page took 0.047155 seconds and 4 git commands to generate.