• [PATCH v3 18/19] net: Add support for networking over Thunderbolt cable

    From Mika Westerberg@21:1/5 to All on Mon Oct 2 12:40:02 2017
    From: Amir Levy <amir.jer.levy@intel.com>

    ThunderboltIP is a protocol created by Apple to tunnel IP/ethernet
    traffic over a Thunderbolt cable. The protocol consists of configuration
    phase where each side sends ThunderboltIP login packets (the protocol is determined by UUID in the XDomain packet header) over the configuration channel. Once both sides get positive acknowledgment to their login
    packet, they configure high-speed DMA path accordingly. This DMA path is
    then used to transmit and receive networking traffic.

    This patch creates a virtual ethernet interface the host software can
    use in the same way as any other networking interface. Once the
    interface is brought up successfully network packets get tunneled over
    the Thunderbolt cable to the remote host and back.

    The connection is terminated by sending a ThunderboltIP logout packet
    over the configuration channel. We do this when the network interface is brought down by user or the driver is unloaded.

    Signed-off-by: Amir Levy <amir.jer.levy@intel.com>
    Signed-off-by: Michael Jamet <michael.jamet@intel.com>
    Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
    Reviewed-by: Yehezkel Bernat <yehezkel.bernat@intel.com>
    Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    ---
    Documentation/admin-guide/thunderbolt.rst | 24 +
    drivers/net/Kconfig | 12 +
    drivers/net/Makefile | 3 +
    drivers/net/thunderbolt.c | 1362 +++++++++++++++++++++++++++++
    4 files changed, 1401 insertions(+)
    create mode 100644 drivers/net/thunderbolt.c

    diff --git a/Documentation/admin-guide/thunderbolt.rst b/Documentation/admin-guide/thunderbolt.rst
    index 6a4cd1f159ca..5c62d11d77e8 100644
    --- a/Documentation/admin-guide/thunderbolt.rst
    +++ b/Documentation/admin-guide/thunderbolt.rst
    @@ -197,3 +197,27 @@ information is missing.

    To recover from this mode, one needs to flash a valid NVM image to the
    host host controller in the same way it is done in the previous chapter.
    +
    +Networking over Thunderbolt cable
    +---------------------------------
    +Thunderbolt technology allows software communication across two hosts +connected by a Thunderbolt cable.
    +
    +It is possible to tunnel any kind of traffic over Thunderbolt link but