[{"id":1775742,"web_url":"http://patchwork.ozlabs.org/comment/1775742/","msgid":"<1506447434.16112.113.camel@linux.intel.com>","list_archive_url":null,"date":"2017-09-26T17:37:14","subject":"Re: [PATCH v2 00/16] Thunderbolt networking","submitter":{"id":8583,"url":"http://patchwork.ozlabs.org/api/people/8583/","name":"Andy Shevchenko","email":"andriy.shevchenko@linux.intel.com"},"content":"On Mon, 2017-09-25 at 14:07 +0300, Mika Westerberg wrote:\n> Hi all,\n> \n> In addition of tunneling PCIe, Display Port and USB traffic,\n> Thunderbolt\n> allows connecting two hosts (domains) over a Thunderbolt cable. It is\n> possible to tunnel arbitrary data packets over such connection using\n> high-speed DMA rings available in the Thunderbolt host controller.\n> \n> In order to discover Thunderbolt services the other host supports,\n> there is\n> a software protocol running on top of the automatically configured\n> control\n> channel (ring 0). This protocol is called XDomain discovery protocol\n> and it\n> uses XDomain properties to describe the host (domain) and the services\n> it\n> supports.\n> \n> Once both sides have agreed what services are supported they can\n> enable\n> high-speed DMA rings to transfer data over the cable.\n> \n> This series adds support for the XDomain protocol so that we expose\n> each\n> remote connection as Thunderbolt XDomain device and each service as\n> Thunderbolt service device. On top of that we create an API that\n> allows\n> writing drivers for these services and finally we provide an example\n> Thunderbolt service driver that creates virtual ethernet inferface\n> that\n> allows tunneling networking packets over Thunderbolt cable. The API\n> could\n> be used for creating other Thunderbolt services, such as tunneling\n> SCSI for\n> example.\n> \n> The XDomain protocol and networking support is also available in macOS\n> and\n> Windows so this makes it possible to connect Linux to macOS and\n> Windows as\n> well.\n> \n> The patches are based on previous Thunderbolt networking patch series\n> by\n> Amir Levy and Michael Jamet, that can be found here:\n> \n>   https://lwn.net/Articles/705998/\n> \n> The main difference to that patch series is that we have the XDomain\n> protocol running in the kernel now so there is no need for a separate\n> userspace daemon.\n> \n> Note this does not affect the existing functionality, so security\n> levels\n> and NVM firmware upgrade continue to work as before (with the small\n> exception that now sysfs also shows the XDomain connections and\n> services in\n> addition to normal Thunderbolt devices). It is also possible to\n> connect up\n> to 5 Thunderbolt devices and then another host, and the network driver\n> works exactly the same.\n> \n> This is second version of the patch series. The previous version (v1)\n> can\n> be found here:\n> \n>   https://lwn.net/Articles/734019/\n> \n> Changes from the v1:\n> \n>   * Add include/linux/thunderbolt.h to MAINTAINERS\n>   * Correct Linux version and date of new sysfs entries in\n>     Documentation/ABI/testing/sysfs-bus-thunderbolt\n>   * Move network driver from drivers/thunderbolt/net.c to\n>     drivers/net/thunderbolt.c and update it to follow coding style in\n>     drivers/net/*.\n>   * Add MAINTAINERS entry for the network driver\n>   * Minor cleanups\n> \n> In case someone wants to try this out, patch [16/16] adds\n> documentation how\n> the networking driver can be used. In short, if you connect Linux to a\n> macOS or Windows, everything is done automatically (as those systems\n> have\n> the networking service enabled by default). For Linux to Linux\n> connection\n> one host needs to load the networking driver first (so that the other\n> side\n> can locate the networking service and load the corresponding driver).\n\n\nLooks awesome!\n\nReviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>\n\n(I told privately to Mika about some minors and we agreed with him that\nthey will be considered only if there will be more comments on the\nseries)\n\n> \n> Amir Levy (1):\n>   net: Add support for networking over Thunderbolt cable\n> \n> Mika Westerberg (15):\n>   byteorder: Move {cpu_to_be32,be32_to_cpu}_array() from Thunderbolt\n> to core\n>   thunderbolt: Add support for XDomain properties\n>   thunderbolt: Move enum tb_cfg_pkg_type to thunderbolt.h\n>   thunderbolt: Move thunderbolt domain structure to thunderbolt.h\n>   thunderbolt: Move tb_switch_phy_port_from_link() to thunderbolt.h\n>   thunderbolt: Add support for XDomain discovery protocol\n>   thunderbolt: Configure interrupt throttling for all interrupts\n>   thunderbolt: Add support for frame mode\n>   thunderbolt: Export ring handling functions to modules\n>   thunderbolt: Move ring descriptor flags to thunderbolt.h\n>   thunderbolt: Use spinlock in ring serialization\n>   thunderbolt: Use spinlock in NHI serialization\n>   thunderbolt: Add polling mode for rings\n>   thunderbolt: Add function to retrieve DMA device for the ring\n>   thunderbolt: Allocate ring HopID automatically if requested\n> \n>  Documentation/ABI/testing/sysfs-bus-thunderbolt |   48 +\n>  Documentation/admin-guide/thunderbolt.rst       |   24 +\n>  MAINTAINERS                                     |    7 +\n>  drivers/net/Kconfig                             |   12 +\n>  drivers/net/Makefile                            |    3 +\n>  drivers/net/thunderbolt.c                       | 1379\n> ++++++++++++++++++++\n>  drivers/thunderbolt/Makefile                    |    2 +-\n>  drivers/thunderbolt/ctl.c                       |   46 +-\n>  drivers/thunderbolt/ctl.h                       |    3 +-\n>  drivers/thunderbolt/domain.c                    |  197 ++-\n>  drivers/thunderbolt/icm.c                       |  218 +++-\n>  drivers/thunderbolt/nhi.c                       |  409 ++++--\n>  drivers/thunderbolt/nhi.h                       |  141 +-\n>  drivers/thunderbolt/nhi_regs.h                  |   11 +-\n>  drivers/thunderbolt/property.c                  |  670 ++++++++++\n>  drivers/thunderbolt/switch.c                    |    7 +-\n>  drivers/thunderbolt/tb.h                        |   88 +-\n>  drivers/thunderbolt/tb_msgs.h                   |  140 +-\n>  drivers/thunderbolt/xdomain.c                   | 1576\n> +++++++++++++++++++++++\n>  include/linux/byteorder/generic.h               |   16 +\n>  include/linux/mod_devicetable.h                 |   26 +\n>  include/linux/thunderbolt.h                     |  598 +++++++++\n>  scripts/mod/devicetable-offsets.c               |    7 +\n>  scripts/mod/file2alias.c                        |   25 +\n>  24 files changed, 5304 insertions(+), 349 deletions(-)\n>  create mode 100644 drivers/net/thunderbolt.c\n>  create mode 100644 drivers/thunderbolt/property.c\n>  create mode 100644 drivers/thunderbolt/xdomain.c\n>  create mode 100644 include/linux/thunderbolt.h\n>","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3y1p7H3zMLz9t2Q\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 27 Sep 2017 03:37:31 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1031219AbdIZRhW (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tTue, 26 Sep 2017 13:37:22 -0400","from mga04.intel.com ([192.55.52.120]:55145 \"EHLO mga04.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S1753160AbdIZRhU (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tTue, 26 Sep 2017 13:37:20 -0400","from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t26 Sep 2017 10:37:17 -0700","from smile.fi.intel.com (HELO smile) ([10.237.72.86])\n\tby fmsmga004.fm.intel.com with ESMTP; 26 Sep 2017 10:37:14 -0700"],"X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos;i=\"5.42,441,1500966000\"; d=\"scan'208\";a=\"316451588\"","Message-ID":"<1506447434.16112.113.camel@linux.intel.com>","Subject":"Re: [PATCH v2 00/16] Thunderbolt networking","From":"Andy Shevchenko <andriy.shevchenko@linux.intel.com>","To":"Mika Westerberg <mika.westerberg@linux.intel.com>,\n\tGreg Kroah-Hartman <gregkh@linuxfoundation.org>,\n\t\"David S . Miller\" <davem@davemloft.net>","Cc":"Andreas Noever <andreas.noever@gmail.com>,\n\tMichael Jamet <michael.jamet@intel.com>,\n\tYehezkel Bernat <yehezkel.bernat@intel.com>,\n\tAmir Levy <amir.jer.levy@intel.com>,\n\tMario.Limonciello@dell.com, Lukas Wunner <lukas@wunner.de>,\n\tAndrew Lunn <andrew@lunn.ch>, linux-kernel@vger.kernel.org,\n\tnetdev@vger.kernel.org","Date":"Tue, 26 Sep 2017 20:37:14 +0300","In-Reply-To":"<20170925110738.68382-1-mika.westerberg@linux.intel.com>","References":"<20170925110738.68382-1-mika.westerberg@linux.intel.com>","Organization":"Intel Finland Oy","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.26.0-1 ","Mime-Version":"1.0","Content-Transfer-Encoding":"7bit","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"}}]