21 Oct, 2020

3 commits

  • Like TCP, MPTCP cannot be compiled as a module. Obviously, MPTCP IPv6'
    support also depends on CONFIG_IPV6. But not all functions from IPv6
    code are exported.

    To simplify the code and reduce modifications outside MPTCP, it was
    decided from the beginning to support MPTCP with IPv6 only if
    CONFIG_IPV6 was built inlined. That's also why CONFIG_MPTCP_IPV6 was
    created. More modifications are needed to support CONFIG_IPV6=m.

    Even if it was not explicit, until recently, we were forcing CONFIG_IPV6
    to be built-in because we had "select IPV6" in Kconfig. Now that we have
    "depends on IPV6", we have to explicitly set "IPV6=y" to force
    CONFIG_IPV6 not to be built as a module.

    In other words, we can now only have CONFIG_MPTCP_IPV6=y if
    CONFIG_IPV6=y.

    Note that the new dependency might hide the fact IPv6 is not supported
    in MPTCP even if we have CONFIG_IPV6=m. But selecting IPV6 like we did
    before was forcing it to be built-in while it was maybe not what the
    user wants.

    Reported-by: Geert Uytterhoeven
    Fixes: 010b430d5df5 ("mptcp: MPTCP_IPV6 should depend on IPV6 instead of selecting it")
    Signed-off-by: Matthieu Baerts
    Link: https://lore.kernel.org/r/20201021105154.628257-1-matthieu.baerts@tessares.net
    Signed-off-by: Jakub Kicinski

    Matthieu Baerts
     
  • MPTCP_IPV6 selects IPV6, thus enabling an optional feature the user may
    not want to enable. Fix this by making MPTCP_IPV6 depend on IPV6, like
    is done for all other IPv6 features.

    Fixes: f870fa0b5768842c ("mptcp: Add MPTCP socket stubs")
    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Matthieu Baerts
    Link: https://lore.kernel.org/r/20201020073839.29226-1-geert@linux-m68k.org
    Signed-off-by: Jakub Kicinski

    Geert Uytterhoeven
     
  • MPTCP_KUNIT_TESTS selects MPTCP, thus enabling an optional feature the
    user may not want to enable. Fix this by making the test depend on
    MPTCP instead.

    Fixes: a00a582203dbc43e ("mptcp: move crypto test to KUNIT")
    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Matthieu Baerts
    Link: https://lore.kernel.org/r/20201019113240.11516-1-geert@linux-m68k.org
    Signed-off-by: Jakub Kicinski

    Geert Uytterhoeven
     

10 Jul, 2020

1 commit


27 Jun, 2020

2 commits

  • Unit tests for the internal MPTCP token APIs, using KUNIT

    v1 -> v2:
    - use the correct RCU annotation when initializing icsk ulp
    - fix a few checkpatch issues

    Signed-off-by: Paolo Abeni
    Reviewed-by: Mat Martineau
    Signed-off-by: David S. Miller

    Paolo Abeni
     
  • currently MPTCP uses a custom hook to executed unit tests at
    boot time. Let's use the KUNIT framework instead.
    Additionally move the relevant code to a separate file and
    export the function needed by the test when self-tests
    are build as a module.

    Co-developed-by: Matthieu Baerts
    Signed-off-by: Matthieu Baerts
    Signed-off-by: Paolo Abeni
    Reviewed-by: Mat Martineau
    Signed-off-by: David S. Miller

    Paolo Abeni
     

17 Feb, 2020

1 commit

  • Without this modification and if CRYPTO is not selected, we have this
    warning:

    WARNING: unmet direct dependencies detected for CRYPTO_LIB_SHA256
    Depends on [n]: CRYPTO [=n]
    Selected by [y]:
    - MPTCP [=y] && NET [=y] && INET [=y]

    MPTCP selects CRYPTO_LIB_SHA256 which seems to depend on CRYPTO. CRYPTO
    is now selected to avoid this issue.

    Even though the config system prints that warning, it looks like
    sha256.c is compiled and linked even without CONFIG_CRYPTO. Since MPTCP
    will end up needing CONFIG_CRYPTO anyway in future commits -- currently
    in preparation for net-next -- we propose to add it now to fix the
    warning.

    The dependency in the config system comes from the fact that
    CRYPTO_LIB_SHA256 is defined in "lib/crypto/Kconfig" which is sourced
    from "crypto/Kconfig" only if CRYPTO is selected.

    Fixes: 65492c5a6ab5 (mptcp: move from sha1 (v0) to sha256 (v1))
    Signed-off-by: Matthieu Baerts
    Signed-off-by: David S. Miller

    Matthieu Baerts
     

30 Jan, 2020

1 commit

  • As the MPTCP HMAC test is integrated into the MPTCP code, it can be
    built only when MPTCP is enabled. Hence when MPTCP is disabled, asking
    the user if the test code should be enabled is futile.

    Wrap the whole block of MPTCP-specific config options inside a check for
    MPTCP. While at it, drop the "default n" for MPTCP_HMAC_TEST, as that
    is the default anyway.

    Fixes: 65492c5a6ab5df50 ("mptcp: move from sha1 (v0) to sha256 (v1)")
    Signed-off-by: Geert Uytterhoeven
    Reviewed-by: Mat Martineau
    Signed-off-by: David S. Miller

    Geert Uytterhoeven
     

24 Jan, 2020

2 commits

  • For simplicity's sake use directly sha256 primitives (and pull them
    as a required build dep).
    Add optional, boot-time self-tests for the hmac function.

    Signed-off-by: Paolo Abeni
    Signed-off-by: Christoph Paasch
    Signed-off-by: David S. Miller

    Paolo Abeni
     
  • Implements the infrastructure for MPTCP sockets.

    MPTCP sockets open one in-kernel TCP socket per subflow. These subflow
    sockets are only managed by the MPTCP socket that owns them and are not
    visible from userspace. This commit allows a userspace program to open
    an MPTCP socket with:

    sock = socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP);

    The resulting socket is simply a wrapper around a single regular TCP
    socket, without any of the MPTCP protocol implemented over the wire.

    Co-developed-by: Florian Westphal
    Signed-off-by: Florian Westphal
    Co-developed-by: Peter Krystad
    Signed-off-by: Peter Krystad
    Co-developed-by: Matthieu Baerts
    Signed-off-by: Matthieu Baerts
    Co-developed-by: Paolo Abeni
    Signed-off-by: Paolo Abeni
    Signed-off-by: Mat Martineau
    Signed-off-by: Christoph Paasch
    Signed-off-by: David S. Miller

    Mat Martineau