linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [very-RFC 0/8] TSN driver for the kernel
@ 2016-06-11 23:01 Henrik Austad
  2016-06-11 23:01 ` [very-RFC 1/8] TSN: add documentation Henrik Austad
                   ` (8 more replies)
  0 siblings, 9 replies; 54+ messages in thread
From: Henrik Austad @ 2016-06-11 23:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-media, alsa-devel, netdev, henrk, Henrik Austad

Hi all
(series based on v4.7-rc2, now with the correct netdev)

This is a *very* early RFC for a TSN-driver in the kernel. It has been
floating around in my repo for a while and I would appreciate some
feedback on the overall design to avoid doing some major blunders.

TSN: Time Sensitive Networking, formely known as AVB (Audio/Video
Bridging).

There are at least one AVB-driver (the AV-part of TSN) in the kernel
already, however this driver aims to solve a wider scope as TSN can do
much more than just audio. A very basic ALSA-driver is added to the end
that allows you to play music between 2 machines using aplay in one end
and arecord | aplay on the other (some fiddling required) We have plans
for doing the same for v4l2 eventually (but there are other fishes to
fry first). The same goes for a TSN_SOCK type approach as well.

TSN is all about providing infrastructure. Allthough there are a few
very interesting uses for TSN (reliable, deterministic network for audio
and video), once you have that reliable link, you can do a lot more.

Some notes on the design:

The driver is directed via ConfigFS as we need userspace to handle
stream-reservation (MSRP), discovery and enumeration (IEEE 1722.1) and
whatever other management is needed. Once we have all the required
attributes, we can create link using mkdir, and use write() to set the
attributes. Once ready, specify the 'shim' (basically a thin wrapper
between TSN and another subsystem) and we start pushing out frames.

The network part: it ties directly into the rx-handler for receive and
writes skb's using netdev_start_xmit(). This could probably be
improved. 2 new fields in netdev_ops have been introduced, and the Intel
igb-driver has been updated (as this is available as a PCI-e card). The
igb-driver works-ish


What remains
- tie to (g)PTP properly, currently using ktime_get() for presentation
  time
- get time from shim into TSN and vice versa
- let shim create/manage buffer

Henrik Austad (8):
  TSN: add documentation
  TSN: Add the standard formerly known as AVB to the kernel
  Adding TSN-driver to Intel I210 controller
  Add TSN header for the driver
  Add TSN machinery to drive the traffic from a shim over the network
  Add TSN event-tracing
  AVB ALSA - Add ALSA shim for TSN
  MAINTAINERS: add TSN/AVB-entries

 Documentation/TSN/tsn.txt                 | 147 +++++
 MAINTAINERS                               |  14 +
 drivers/media/Kconfig                     |  15 +
 drivers/media/Makefile                    |   3 +-
 drivers/media/avb/Makefile                |   5 +
 drivers/media/avb/avb_alsa.c              | 742 +++++++++++++++++++++++
 drivers/media/avb/tsn_iec61883.h          | 124 ++++
 drivers/net/ethernet/intel/Kconfig        |  18 +
 drivers/net/ethernet/intel/igb/Makefile   |   2 +-
 drivers/net/ethernet/intel/igb/igb.h      |  19 +
 drivers/net/ethernet/intel/igb/igb_main.c |  10 +-
 drivers/net/ethernet/intel/igb/igb_tsn.c  | 396 ++++++++++++
 include/linux/netdevice.h                 |  32 +
 include/linux/tsn.h                       | 806 ++++++++++++++++++++++++
 include/trace/events/tsn.h                | 349 +++++++++++
 net/Kconfig                               |   1 +
 net/Makefile                              |   1 +
 net/tsn/Kconfig                           |  32 +
 net/tsn/Makefile                          |   6 +
 net/tsn/tsn_configfs.c                    | 623 +++++++++++++++++++
 net/tsn/tsn_core.c                        | 975 ++++++++++++++++++++++++++++++
 net/tsn/tsn_header.c                      | 203 +++++++
 net/tsn/tsn_internal.h                    | 383 ++++++++++++
 net/tsn/tsn_net.c                         | 403 ++++++++++++
 24 files changed, 5306 insertions(+), 3 deletions(-)
 create mode 100644 Documentation/TSN/tsn.txt
 create mode 100644 drivers/media/avb/Makefile
 create mode 100644 drivers/media/avb/avb_alsa.c
 create mode 100644 drivers/media/avb/tsn_iec61883.h
 create mode 100644 drivers/net/ethernet/intel/igb/igb_tsn.c
 create mode 100644 include/linux/tsn.h
 create mode 100644 include/trace/events/tsn.h
 create mode 100644 net/tsn/Kconfig
 create mode 100644 net/tsn/Makefile
 create mode 100644 net/tsn/tsn_configfs.c
 create mode 100644 net/tsn/tsn_core.c
 create mode 100644 net/tsn/tsn_header.c
 create mode 100644 net/tsn/tsn_internal.h
 create mode 100644 net/tsn/tsn_net.c

--
2.7.4

^ permalink raw reply	[flat|nested] 54+ messages in thread

end of thread, other threads:[~2016-06-23 13:28 UTC | newest]

Thread overview: 54+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-11 23:01 [very-RFC 0/8] TSN driver for the kernel Henrik Austad
2016-06-11 23:01 ` [very-RFC 1/8] TSN: add documentation Henrik Austad
2016-06-11 23:01 ` [very-RFC 2/8] TSN: Add the standard formerly known as AVB to the kernel 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

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).