linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Henrik Austad <henrik@austad.us>
To: linux-kernel@vger.kernel.org
Cc: linux-media@vger.kernel.org, alsa-devel@vger.kernel.org,
	netdev@vger.kernel.org, henrk@austad.us,
	Henrik Austad <haustad@cisco.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: [very-RFC 1/8] TSN: add documentation
Date: Sun, 12 Jun 2016 01:01:29 +0200	[thread overview]
Message-ID: <1465686096-22156-2-git-send-email-henrik@austad.us> (raw)
In-Reply-To: <1465686096-22156-1-git-send-email-henrik@austad.us>

From: Henrik Austad <haustad@cisco.com>

Describe the overall design behind the TSN standard, the TSN-driver,
requirements to userspace and new functionality introduced.

Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Henrik Austad <haustad@cisco.com>
---
 Documentation/TSN/tsn.txt | 147 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 147 insertions(+)
 create mode 100644 Documentation/TSN/tsn.txt

Index: linux/Documentation/TSN/tsn.txt
===================================================================
--- /dev/null
+++ linux/Documentation/TSN/tsn.txt
@@ -0,0 +1,188 @@
+		Time Sensitive Networking (TSN)
+		-------------------------------
+
+[work in progress]
+
+1. Motivation
+=============
+
+TSN is a set of open standards, formerly known as 'AVB' (Audio/Video
+Bridging). It was renamed to TSN to better reflect that it can do much
+more than just media transport.
+
+TSN is a way to create reliable streams across a network without loss of
+frames due to congestion in the network. By using gPTP (a specialized
+IEEE-1588v2 PTP profile), the time can be synchronized with sub-us
+granularity across all the connected devices in the AVB domain.
+
+2. Intro to AVB/TSN
+===================
+
+The original standards were written with Audio/Video in mind, so the
+initial standards refer to this as 'AVB'. In later standards, this has
+changed to TSN, and AVB now refers to a service you can add on top of
+TSN. Hopefully it will not be too confusing.
+
+In this document, we refer to the infrastructure part as TSN and AVB to
+the ALSA/V4L2 shim which can be added on top of TSN to provide a
+media-service.
+
+TSN operates with 'streams', and one stream can contain pretty much
+whatever you like. Currently, only media has been defined properly
+though, which is why you only have media-subtypes for the
+avtp_subtype-field.
+
+For a media-setup, one stream can contain multiple channels, all going
+to the same destination. A destination can be a single Listener
+(singlecast) or a group of Listeners (multicast).
+
+2.1 Endpoints
+
+A TSN 'endpoint' is where a stream either originates or ends -what
+others would call sources (Talkers) and sinks (Listeners). Looking back
+at pre-TSN when this was called AVB, these names make a bit more sense.
+
+Common for both types, they need to be PTPv2 capable, i.e. you need to
+timestamp gPTP frames upon ingress/egress to improve the accuracy of
+PTP.
+
+2.1.1 Talkers
+
+Hardware requirements:
+- Multiple Tx-queues
+- Credit based shaper on at least one of the queues for pacing the
+  frames onto the network
+- VLAN capable
+
+2.1.2 Listener
+
+A Listener does not have the same requirements as a Talker as it cannot
+control the pace of the incoming frames anyway. It is beneficial if the
+NIC understands VLANs and has a few Rx-queues so that you can steer all
+TSN-frames to a dedicated queue.
+
+2.2 Bridges
+
+What TSN calls switches that are TSN-capable. They must be able to
+prioritize TSN-streams, have the credit-based shaper available for that
+class, support SRP, support gPTP and so on.
+
+2.3 Relevant standards
+
+* IEEE 802.1BA-2011 Audio Video Bridging (AVB) Systems
+
+* IEEE 802.1Q-2011 sec 34 and 35
+
+  What is referred to as:
+  IEEE 802.1Qav (Forwarding and Queueing for Time-sensitive Streams)
+  IEEE 802.1Qat (Stream Registration protocol)
+
+* IEEE 802.1AS gPTP
+
+  A PTPv2 profile (from IEEE 1588) tailored for this domain. Notable
+  changes include the requirement that all nodes in the network must be
+  gPTP capable (i.e. no traversing non-PTP entities), and it allows
+  traffic over a wider range of medium that what "pure" PTPv2 allows.
+
+* IEEE 1722 AVTP Layer 2 Transport Protocol for Time-Sensitive
+  Applications in Bridged Local Area Networks
+
+* IEEE 1722.1 Device Discovery, Connection Management and Control for 1722
+
+  What allows AVB (TSN) devices to handle discovery, enumeration and
+  control, basically let you connect 2 devices from a 3rd
+
+  In this (in the scope of the Linux kernel TSN driver) must be done
+  purely from userspace as we do not want the kernel to suddenly attach
+  to a remote system without the user's knowledge. This is further
+  reflected in how the attributes for the link is managed via ConfigFS.
+
+
+3. Overview and/or design of the TSN-driver
+===========================================
+
+The driver handles the shifting of data for TSN-streams. Anything else
+is left for userspace to handle. This includes stream reservation (using
+some sort of MSRP client), negotiating multicast addresses, finding the
+value of the different attributes and connect application(s) to the
+exposed devices (currently we only have an ALSA-device).
+
+       	       /--------------------\
+       	       |                    |
+	       |  Media application |
+	       |       	       	    |
+	       \--------------------/
+		     | 	      |
+       	  +----------+	      +----+
+	  | 			   |
+	  | 			   |
+     +------------+		   |
+     |   ALSA  	  |		   |
+     +------------+		   |
+	  |			   |
+	  |			   |
+     +------------+          +--------------+
+     | 	avb_alsa  | 	     | tsn_configfs |
+     | (tsn-shim) |	     +--------------+
+     +------------+ 		   |
+       	  |  	    		   |
+	  |    	  		   |
+	  +------+     	  	   |
+	   	 |		   |
+       	       	 |		   |
+            +------------+	   |
+ 	    |  tsn_core  |<--------+
+            +------------+
+       	       	 |
+		 |
+            +------------+
+       	    |  tsn_net   |
+            +------------+
+		 |
+		 |
+	    +------------+
+	    |  network	 |
+       	    | subsystem  |
+	    +------------+
+	       	 |
+		 |
+		...
+
+
+3.1 Terms and concepts
+
+TSN uses the concept of streams and shims.
+
+- A shim is a thin wrapper that binds TSN to another subsystem (or
+  directly to userspace). avb_alsa is an example of such a shim.
+
+- A stream is the only data TSN cares about. What the data inside the
+  stream represents, is left for the associated shim to handle. TSN will
+  verify the headers up to the protocol specific header and then pass it
+  along to the shim.
+
+Note: currently, only the data-unit part is implemented, the control
+part, in which 1722.1 (discovery and enumeration) is part, is not
+handled.
+
+3.2 Userspace requirements
+
+(msrp-client, "tsnctl"-tool
+
+4. Creating a new link from userspace
+=====================================
+
+[coming]
+
+
+5. Creating a new shim
+======================
+
+shim_ops
+[coming]
+
+
+6. Other resources:
+===================
+
+https://en.wikipedia.org/wiki/Audio_Video_Bridging

  reply	other threads:[~2016-06-11 23:01 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-11 23:01 [very-RFC 0/8] TSN driver for the kernel Henrik Austad
2016-06-11 23:01 ` Henrik Austad [this message]
2016-06-11 23:01 ` [very-RFC 2/8] TSN: Add the standard formerly known as AVB to " Henrik Austad
2016-06-11 23:01 ` [very-RFC 3/8] Adding TSN-driver to Intel I210 controller Henrik Austad
2016-06-11 23:01 ` [very-RFC 4/8] Add TSN header for the driver Henrik Austad
2016-06-11 23:01 ` [very-RFC 5/8] Add TSN machinery to drive the traffic from a shim over the network Henrik Austad
2016-06-11 23:01 ` [very-RFC 6/8] Add TSN event-tracing Henrik Austad
2016-06-12 16:58   ` Steven Rostedt
2016-06-12 21:25     ` Henrik Austad
2016-06-13  2:22       ` Steven Rostedt
2016-06-13  7:20         ` Henrik Austad
2016-06-11 23:01 ` [very-RFC 7/8] AVB ALSA - Add ALSA shim for TSN Henrik Austad
2016-06-15 11:49   ` Richard Cochran
2016-06-15 12:13     ` Henrik Austad
2016-06-15 12:43       ` Richard Cochran
2016-06-11 23:01 ` [very-RFC 8/8] MAINTAINERS: add TSN/AVB-entries Henrik Austad
2016-06-13 11:47 ` [very-RFC 0/8] TSN driver for the kernel Richard Cochran
2016-06-13 13:00   ` Henrik Austad
2016-06-13 19:32     ` Richard Cochran
2016-06-14  9:30       ` Henrik Austad
2016-06-14 18:26         ` Richard Cochran
2016-06-14 20:38           ` Henrik Austad
2016-06-15  7:04             ` Richard Cochran
2016-06-15  7:50               ` Henrik Austad
2016-06-15 11:41               ` Richard Cochran
2016-06-15  7:11             ` Richard Cochran
2016-06-13 19:37     ` Richard Cochran
2016-06-13 13:12   ` Arnd Bergmann
2016-06-13 15:56   ` John Fastabend
2016-06-14  8:35     ` Henrik Austad
2016-06-13 19:51   ` Richard Cochran
2016-06-14 11:18     ` One Thousand Gnomes
2016-06-14 17:04       ` Richard Cochran
2016-06-15  3:15       ` Takashi Sakamoto
2016-06-15  8:06         ` Richard Cochran
2016-06-18  5:22           ` Takashi Sakamoto
2016-06-18 22:45             ` Henrik Austad
2016-06-19  9:46               ` Richard Cochran
2016-06-20  8:05                 ` Henrik Austad
2016-06-20 11:08               ` [alsa-devel] " Pierre-Louis Bossart
2016-06-20 11:49                 ` Henrik Austad
2016-06-20 12:18                 ` Richard Cochran
2016-06-20 12:31                   ` Richard Cochran
2016-06-20 15:21                     ` Richard Cochran
2016-06-21  5:54                       ` Takashi Iwai
2016-06-21  6:38                         ` Richard Cochran
2016-06-21  6:45                           ` Takashi Iwai
2016-06-21 17:18                     ` Pierre-Louis Bossart
2016-06-21 17:45                   ` Pierre-Louis Bossart
2016-06-21 19:40                     ` Richard Cochran
2016-06-22 12:36                       ` Pierre-Louis Bossart
2016-06-23 10:38                     ` Henrik Austad
2016-06-23 13:28                       ` Richard Cochran
2016-06-15  3:27       ` Takashi Sakamoto
  -- strict thread matches above, loose matches on Subject: below --
2016-06-11 22:22 Henrik Austad
2016-06-11 22:22 ` [very-RFC 1/8] TSN: add documentation Henrik Austad
2016-06-11 22:35   ` David Miller
2016-06-11 22:47     ` Henrik Austad
2016-06-11 22:49       ` David Miller
2016-06-11 22:51         ` Henrik Austad
2016-06-11 22:50   ` Henrik Austad

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1465686096-22156-2-git-send-email-henrik@austad.us \
    --to=henrik@austad.us \
    --cc=alsa-devel@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=haustad@cisco.com \
    --cc=henrk@austad.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).