{"id":818198,"url":"http://patchwork.ozlabs.org/api/covers/818198/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/cover/20170925110738.68382-1-mika.westerberg@linux.intel.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170925110738.68382-1-mika.westerberg@linux.intel.com>","list_archive_url":null,"date":"2017-09-25T11:07:22","name":"[v2,00/16] Thunderbolt networking","submitter":{"id":14534,"url":"http://patchwork.ozlabs.org/api/people/14534/?format=json","name":"Mika Westerberg","email":"mika.westerberg@linux.intel.com"},"mbox":"http://patchwork.ozlabs.org/project/netdev/cover/20170925110738.68382-1-mika.westerberg@linux.intel.com/mbox/","series":[{"id":4937,"url":"http://patchwork.ozlabs.org/api/series/4937/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=4937","date":"2017-09-25T11:07:27","name":"Thunderbolt networking","version":2,"mbox":"http://patchwork.ozlabs.org/series/4937/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/818198/comments/","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 3y11dv54PRz9sPk\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 25 Sep 2017 21:12:51 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S935115AbdIYLMj (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 25 Sep 2017 07:12:39 -0400","from mga11.intel.com ([192.55.52.93]:38289 \"EHLO mga11.intel.com\"\n\trhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP\n\tid S933062AbdIYLHn (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tMon, 25 Sep 2017 07:07:43 -0400","from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t25 Sep 2017 04:07:42 -0700","from black.fi.intel.com ([10.237.72.28])\n\tby fmsmga004.fm.intel.com with ESMTP; 25 Sep 2017 04:07:39 -0700","by black.fi.intel.com (Postfix, from userid 1001)\n\tid 508CD133; Mon, 25 Sep 2017 14:07:38 +0300 (EEST)"],"X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos;i=\"5.42,435,1500966000\"; d=\"scan'208\";a=\"315842238\"","From":"Mika Westerberg <mika.westerberg@linux.intel.com>","To":"Greg 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\tAndy Shevchenko <andriy.shevchenko@linux.intel.com>,\n\tAndrew Lunn <andrew@lunn.ch>,\n\tMika Westerberg <mika.westerberg@linux.intel.com>,\n\tlinux-kernel@vger.kernel.org, netdev@vger.kernel.org","Subject":"[PATCH v2 00/16] Thunderbolt networking","Date":"Mon, 25 Sep 2017 14:07:22 +0300","Message-Id":"<20170925110738.68382-1-mika.westerberg@linux.intel.com>","X-Mailer":"git-send-email 2.14.1","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"Hi all,\n\nIn addition of tunneling PCIe, Display Port and USB traffic, Thunderbolt\nallows connecting two hosts (domains) over a Thunderbolt cable. It is\npossible to tunnel arbitrary data packets over such connection using\nhigh-speed DMA rings available in the Thunderbolt host controller.\n\nIn order to discover Thunderbolt services the other host supports, there is\na software protocol running on top of the automatically configured control\nchannel (ring 0). This protocol is called XDomain discovery protocol and it\nuses XDomain properties to describe the host (domain) and the services it\nsupports.\n\nOnce both sides have agreed what services are supported they can enable\nhigh-speed DMA rings to transfer data over the cable.\n\nThis series adds support for the XDomain protocol so that we expose each\nremote connection as Thunderbolt XDomain device and each service as\nThunderbolt service device. On top of that we create an API that allows\nwriting drivers for these services and finally we provide an example\nThunderbolt service driver that creates virtual ethernet inferface that\nallows tunneling networking packets over Thunderbolt cable. The API could\nbe used for creating other Thunderbolt services, such as tunneling SCSI for\nexample.\n\nThe XDomain protocol and networking support is also available in macOS and\nWindows so this makes it possible to connect Linux to macOS and Windows as\nwell.\n\nThe patches are based on previous Thunderbolt networking patch series by\nAmir Levy and Michael Jamet, that can be found here:\n\n  https://lwn.net/Articles/705998/\n\nThe main difference to that patch series is that we have the XDomain\nprotocol running in the kernel now so there is no need for a separate\nuserspace daemon.\n\nNote this does not affect the existing functionality, so security levels\nand NVM firmware upgrade continue to work as before (with the small\nexception that now sysfs also shows the XDomain connections and services in\naddition to normal Thunderbolt devices). It is also possible to connect up\nto 5 Thunderbolt devices and then another host, and the network driver\nworks exactly the same.\n\nThis is second version of the patch series. The previous version (v1) can\nbe found here:\n\n  https://lwn.net/Articles/734019/\n\nChanges 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\nIn case someone wants to try this out, patch [16/16] adds documentation how\nthe networking driver can be used. In short, if you connect Linux to a\nmacOS or Windows, everything is done automatically (as those systems have\nthe networking service enabled by default). For Linux to Linux connection\none host needs to load the networking driver first (so that the other side\ncan locate the networking service and load the corresponding driver).\n\nAmir Levy (1):\n  net: Add support for networking over Thunderbolt cable\n\nMika Westerberg (15):\n  byteorder: Move {cpu_to_be32,be32_to_cpu}_array() from Thunderbolt 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 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 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"}