Skip to contentSkip to conversation

net: tsn: add an netlink interface between kernel and application layer

PATCH In review PO LIU 3 participants 10 messages Dec 28, 2018 – Jan 4, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

PO LIU

author
#1 lore raw

PATCH 1/1 net: tsn: add an netlink interface between kernel and application layer

This patch provids netlink method to configure the TSN protocols hardwares. TSN guaranteed packet transport with bounded low latency, low packet delay variation, and low packet loss by hardware and software methods.

The three basic components of TSN are:

1. Time synchronization: This was implement by 8021AS which base on the IEEE1588 precision Time Protocol. This is configured by the other way in kernel.
8021AS not included in this patch.

2. Scheduling and traffic shaping and per-stream filter policing:
This patch support Qbv/Qci.

3. Selection of communication paths:
This patch not support the pure software only TSN protocols(like Qcc) but hardware related configuration.

TSN Protocols supports by this patch: Qbv/Qci/Qbu/Credit-base Shaper(Qav). This patch verified on NXP ls1028ardb board.

Will add more protocols in the future.

---
 MAINTAINERS              |    6 +
 include/net/tsn.h        |   76 ++
 include/uapi/linux/tsn.h |  958 +++++++++++++++++
 net/Kconfig              |    1 +
 net/Makefile             |    3 +
 net/tsn/Kconfig          |   15 +
 net/tsn/Makefile         |    1 +
 net/tsn/genl_tsn.c       | 2626 ++++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 3686 insertions(+)
 create mode 100644 include/net/tsn.h
 create mode 100644 include/uapi/linux/tsn.h
 create mode 100644 net/tsn/Kconfig
 create mode 100644 net/tsn/Makefile
 create mode 100644 net/tsn/genl_tsn.c
MAINTAINERS +6 -0
index 7a9804a..bc037e3 100644
@@ -15385,6 +15385,12 @@ F:	sound/soc/codecs/tscs*.c
 F:	sound/soc/codecs/tscs*.h
 F:	Documentation/devicetree/bindings/sound/tscs*.txt
 
+TSN NETLINK INTERFACE DRVIER
+M:	Po Liu <[email protected]>
+F:	net/tsn/genl_tsn.c
+F:	include/net/tsn.h
+F:	include/uapi/linux/tsn.h
+
 TTY LAYER
 M:	Greg Kroah-Hartman <[email protected]>
 M:	Jiri Slaby <[email protected]>
include/net/tsn.h new file +76 -0

76 lines not on this page · raw message

include/uapi/linux/tsn.h new file +958 -0

958 lines not on this page · raw message

net/Kconfig +1 -0
index 5cb9de1..d4ba7d6 100644
@@ -229,6 +229,7 @@ source "net/ieee802154/Kconfig"
 source "net/mac802154/Kconfig"
 source "net/sched/Kconfig"
 source "net/dcb/Kconfig"
+source "net/tsn/Kconfig"
 source "net/dns_resolver/Kconfig"
 source "net/batman-adv/Kconfig"
 source "net/openvswitch/Kconfig"
net/Makefile +3 -0
index bdaf539..d6804ba 100644
@@ -59,6 +59,9 @@ obj-$(CONFIG_CAIF)		+= caif/
 ifneq ($(CONFIG_DCB),)
 obj-y				+= dcb/
 endif
+ifneq ($(CONFIG_TSN),)
+obj-y 				+= tsn/
+endif
 obj-$(CONFIG_6LOWPAN)		+= 6lowpan/
 obj-$(CONFIG_IEEE802154)	+= ieee802154/
 obj-$(CONFIG_MAC802154)		+= mac802154/
net/tsn/Kconfig new file +15 -0
new file mode 100644
index 0000000..9f22807
@@ -0,0 +1,15 @@
+config TSN
+	bool "802.1 Time-Sensitive Networking support"
+	default n
+	depends on VLAN_8021Q && PTP_1588_CLOCK
+	help
+	  This enables support for TSN(time sensitive networking)
+	  TSN features include:
+		802.1Qav:
+		802.1Qbv:
+		802.1Qci:
+		802.1Qbu:
+		802.1AS:
+		802.1CB:
+
+	  If unsure, say N.
net/tsn/Makefile new file +1 -0
new file mode 100644
index 0000000..ed46381
@@ -0,0 +1 @@
+obj-$(CONFIG_TSN) += genl_tsn.o
net/tsn/genl_tsn.c new file +2626 -0

1,922 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.8.3.1

Part of the diff is not shown here. View the raw message.

#2 lore raw

Hi,

Quoted 3 lines · PO LIU

This patch provids netlink method to configure the TSN protocols hardwares. TSN guaranteed packet transport with bounded low latency, low packet delay variation, and low packet loss by hardware and software methods.

I don't think having another way to configure TSN features is a good idea. We already have the CBS/ETF/taprio family of qdiscs, that provide (or will in the near future, more on this later) a way to configure the hardware.

A little background on the choice of qdiscs as an interface (and why we came to believe they are a good abstraction), they already provide a way to map packets into traffic classes (it isn't clear in our proposal how you do that, but I think you are using something like mqprio), they provide a neat way to "compose" (by installing one under another), they already have a user facing API with various counters, and very importantly for TSN they have mecanisms to offload some of their work to the hardware.

I suggest is for you to take a look at how CBS offloading was implemented for the Intel i210:

https://patchwork.ozlabs.org/cover/824626/

Patches 4 and 5 should be the interesting ones. I think you can use them as inspiration for enabling CBS offload in your driver.

If you did take a look at those patches (and the current work that has been upstreamed), my question then becomes, what are the reasons that it might not work for your use cases?

Quoted 10 lines

The three basic components of TSN are:

1. Time synchronization: This was implement by 8021AS which base on the IEEE1588 precision Time Protocol. This is configured by the other way in kernel.
8021AS not included in this patch.

2. Scheduling and traffic shaping and per-stream filter policing:
This patch support Qbv/Qci.

I am working on a proposal for the API for Qbv (and Qbu) offloading using taprio. I should send it soon-ish. Your feedback would be very welcome.

Also, how to expose in the qdiscs the per-stream filtering and policing parts (Qci) is something that I don't know how to do right now, any suggestions would be nice.

In short, take a look at what's there and see what's missing for the stuff that you care about, then we can work on that.

Quoted 11 lines

3. Selection of communication paths:
This patch not support the pure software only TSN protocols(like Qcc) but hardware related configuration.

TSN Protocols supports by this patch: Qbv/Qci/Qbu/Credit-base Shaper(Qav). This patch verified on NXP ls1028ardb board.

Will add more protocols in the future.

Cheers,
--
Vinicius

author
#3 lore raw

Hi Vinicius,

Thank you very much for your feedback.

I know the CBS is used to be most important part of AVB. And qdiscs is good tool to configure qos.

But as you know, the TSN family is a cluster of protocols and much extending the AVB. The protocols have different functionalities and they may have more than hundred parameters. For example NXP ls1028a support Qbv/Qci/Qbu/Qav and also the 8021CB (not included in this patch yet).

Some protocols target to configure the traffic class(like Qav CBS). Some to config the port(like Qbv). But some for the whole ethernet controller(like Qci, the control entries for the whole controller, which input ports and which output ports).

So I do think all the TSN configuration should not mix in the ethernet driver itself. I mean the driver should separate a xxx_tsn.c(for I210, may igb_tsn.c) to maintain the tsn operations.

As far as using qdiscs or the interface of generic netlink. I think both could configuring the TSN protocols interface layer. Just what I provided the patch net/tsn/genl_tsn.c. But I do believe it is better using a standalone TSN middle layer to maintain the TSN capability ports. Because the TSN ports include not only the end station and also the switch. LS1028 is such a kind of device.

And your advises are precious for us. Let's make out an easy and flexible interface for TSN.

Br,
Po Liu

Quoted 84 lines

-----Original Message-----
From: Vinicius Costa Gomes [mailto:[email protected]]
Sent: 2018年12月29日 3:30
To: PO LIU <[email protected]>; [email protected]; linux- [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Mingkai Hu <[email protected]>; Roy Zang <[email protected]>; PO LIU <[email protected]>; PO LIU <[email protected]>
Subject: Re: [PATCH] net: tsn: add an netlink interface between kernel and application layer

Hi,

Quoted 3 lines · PO LIU

This patch provids netlink method to configure the TSN protocols hardwares. TSN guaranteed packet transport with bounded low latency, low packet delay variation, and low packet loss by hardware and software methods.

I don't think having another way to configure TSN features is a good idea. We already have the CBS/ETF/taprio family of qdiscs, that provide (or will in the near future, more on this later) a way to configure the hardware.

A little background on the choice of qdiscs as an interface (and why we came to believe they are a good abstraction), they already provide a way to map packets into traffic classes (it isn't clear in our proposal how you do that, but I think you are using something like mqprio), they provide a neat way to "compose" (by installing one under another), they already have a user facing API with various counters, and very importantly for TSN they have mecanisms to offload some of their work to the hardware.

I suggest is for you to take a look at how CBS offloading was implemented for the Intel i210:

https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch
work.ozlabs.org%2Fcover%2F824626%2F&amp;data=02%7C01%7Cpo.liu%40n xp.com%7C107e693326214900cf0708d66cfadace%7C686ea1d3bc2b4c6fa92c d99c5c301635%7C0%7C0%7C636816222009310445&amp;sdata=6O1s%2Bd% 2BbNek1Ko7a5ev0txiw8S6TiVeUrUWZlOXDnAw%3D&amp;reserved=0

Patches 4 and 5 should be the interesting ones. I think you can use them as inspiration for enabling CBS offload in your driver.

If you did take a look at those patches (and the current work that has been upstreamed), my question then becomes, what are the reasons that it might not work for your use cases?

Quoted 10 lines

The three basic components of TSN are:

1. Time synchronization: This was implement by 8021AS which base on the IEEE1588 precision Time Protocol. This is configured by the other way in kernel.
8021AS not included in this patch.

2. Scheduling and traffic shaping and per-stream filter policing:
This patch support Qbv/Qci.

I am working on a proposal for the API for Qbv (and Qbu) offloading using taprio. I should send it soon-ish. Your feedback would be very welcome.

Also, how to expose in the qdiscs the per-stream filtering and policing parts (Qci) is something that I don't know how to do right now, any suggestions would be nice.

In short, take a look at what's there and see what's missing for the stuff that you care about, then we can work on that.

Quoted 11 lines

3. Selection of communication paths:
This patch not support the pure software only TSN protocols(like Qcc) but hardware related configuration.

TSN Protocols supports by this patch: Qbv/Qci/Qbu/Credit-base Shaper(Qav). This patch verified on NXP ls1028ardb board.

Will add more protocols in the future.

Cheers,
--
Vinicius

#4 lore raw

Hi Po Liu,

Quoted 4 lines · PO LIU

Hi Vinicius,

Thank you very much for your feedback.

Quoted 8 lines

I know the CBS is used to be most important part of AVB. And qdiscs is good tool to configure qos.

But as you know, the TSN family is a cluster of protocols and much extending the AVB. The protocols have different functionalities and they may have more than hundred parameters. For example NXP ls1028a support Qbv/Qci/Qbu/Qav and also the 8021CB (not included in this patch yet).

Some protocols target to configure the traffic class(like Qav CBS). Some to config the port(like Qbv). But some for the whole ethernet controller(like Qci, the control entries for the whole controller, which input ports and which output ports).

Reading your email, now I understand your point a little better. You are interested in multi-port devices. I admit that I am not too familiar with how multi-port devices are exposed in Linux, I was only focused on the end-station use cases, until now.

Quoted 11 lines

So I do think all the TSN configuration should not mix in the ethernet driver itself. I mean the driver should separate a xxx_tsn.c(for I210, may igb_tsn.c) to maintain the tsn operations.

As far as using qdiscs or the interface of generic netlink. I think both could configuring the TSN protocols interface layer. Just what I provided the patch net/tsn/genl_tsn.c. But I do believe it is better using a standalone TSN middle layer to maintain the TSN capability ports. Because the TSN ports include not only the end station and also the switch. LS1028 is such a kind of device.

I think this is the "interesting" part of the discussion. From my point of view the question now is:

"We already have an acceptable way to expoose TSN features for end stations. What can we do for multi-port devices?"

What are the options here? From a quick look, it seems that extending switchdev is a possible solution. What else?

Thinking a little more, if all the ports have netdevices associated with them, then it could be that exposing those features via qdiscs could be considered still. Perhaps taking a look at how tc-flower offloading is done can give some ideas.

And about the process, usually when a new interface is proposed, the patches are directed to net-next and have the RFC tag, so the readers (and their tools) know what to expect.

Quoted 7 lines

And your advises are precious for us. Let's make out an easy and flexible interface for TSN.

Br,
Po Liu

Cheers,
--
Vinicius

author
#5 lore raw

Hi Vinicius,

Thanks!
As comments below.

Br,
Po Liu

Quoted 49 lines

-----Original Message-----
From: Vinicius Costa Gomes [mailto:[email protected]]
Sent: 2019年1月3日 3:02
To: Po Liu <[email protected]>; [email protected]; linux- [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; Mingkai Hu <[email protected]>; Roy Zang <[email protected]>
Subject: RE: [PATCH] net: tsn: add an netlink interface between kernel and application layer

Hi Po Liu,

Quoted 5 lines · PO LIU

Hi Vinicius,

Thank you very much for your feedback.

I know the CBS is used to be most important part of AVB. And qdiscs is good

tool to configure qos.

Quoted 2 lines

But as you know, the TSN family is a cluster of protocols and much extending

the AVB. The protocols have different functionalities and they may have more than hundred parameters. For example NXP ls1028a support Qbv/Qci/Qbu/Qav and also the 8021CB (not included in this patch yet).

Quoted 5 lines

Some protocols target to configure the traffic class(like Qav CBS). Some to config the port(like Qbv). But some for the whole ethernet controller(like Qci, the control entries for the whole controller, which input ports and which output ports).

Reading your email, now I understand your point a little better. You are interested in multi-port devices. I admit that I am not too familiar with how multi-port devices are exposed in Linux, I was only focused on the end-station use cases, until now.

Quoted 11 lines

So I do think all the TSN configuration should not mix in the ethernet driver itself. I mean the driver should separate a xxx_tsn.c(for I210, may igb_tsn.c) to maintain the tsn operations.

As far as using qdiscs or the interface of generic netlink. I think both could configuring the TSN protocols interface layer. Just what I provided the patch net/tsn/genl_tsn.c. But I do believe it is better using a standalone TSN middle layer to maintain the TSN capability ports. Because the TSN ports include not only the end station and also the switch. LS1028 is such a kind of device.

Quoted 5 lines

I think this is the "interesting" part of the discussion. From my point of view the question now is:

"We already have an acceptable way to expoose TSN features for end stations. What can we do for multi-port devices?"

[Po Liu] correct, that is what we expect to do. There could be with more than one ethernet controllers(or switch) with TSN capability. Ether pci plug in, or SOC chips. This patch try to manage all.

Quoted 3 lines

What are the options here? From a quick look, it seems that extending switchdev is a possible solution. What else?

[Po Liu] that's it. Could extend it.

Quoted 4 lines

Thinking a little more, if all the ports have netdevices associated with them, then it could be that exposing those features via qdiscs could be considered still. Perhaps taking a look at how tc-flower offloading is done can give some ideas.

[Po Liu] I did using the tc-flower at application layer to filter the frames to different queue. I avoid to using the qos but only using the multiq to make all traffic classes to be exposed to user space. I am trying to understand what your patch working on the qdisc and how it help for TSN.

Quoted 4 lines

And about the process, usually when a new interface is proposed, the patches are directed to net-next and have the RFC tag, so the readers (and their tools) know what to expect.

[Po Liu] thanks for the mention, I would update.

Quoted 12 lines
Quoted 8 lines

And your advises are precious for us. Let's make out an easy and flexible interface for TSN.

Br,
Po Liu

Cheers,
--
Vinicius

#6 lore raw
In reply to Vinicius Costa Gomes

Hi Po,

Quoted 13 lines
Quoted 4 lines

Hi Vinicius,

Thank you very much for your feedback.

Quoted 8 lines

I know the CBS is used to be most important part of AVB. And qdiscs is good tool to configure qos.

But as you know, the TSN family is a cluster of protocols and much extending the AVB. The protocols have different functionalities and they may have more than hundred parameters. For example NXP ls1028a support Qbv/Qci/Qbu/Qav and also the 8021CB (not included in this patch yet).

Some protocols target to configure the traffic class(like Qav CBS). Some to config the port(like Qbv). But some for the whole ethernet controller(like Qci, the control entries for the whole controller, which input ports and which output ports).

Quoted 4 lines

Reading your email, now I understand your point a little better. You are interested in multi-port devices. I admit that I am not too familiar with how multi-port devices are exposed in Linux, I was only focused on the end-station use cases, until now.

Have you considered a switchdev-based driver for multi-port devices? What you ask of TSN configuration is currently doable with switch switchdev for VLANs and other similar networking functionality.

Instead of rewriting this from scratch, we not extend the currect TC and switchdev functionality for that ?

Regards
/Ilias

author
#7 lore raw

Hi Ilias,

Br,
Po Liu

Quoted 30 lines

-----Original Message-----
From: Ilias Apalodimas [mailto:[email protected]]
Sent: 2019年1月3日 17:16
To: Vinicius Costa Gomes <[email protected]>
Cc: Po Liu <[email protected]>; [email protected]; linux- [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Mingkai Hu <[email protected]>; Roy Zang <[email protected]>
Subject: Re: [PATCH] net: tsn: add an netlink interface between kernel and application layer

Hi Po,

Quoted 5 lines
Quoted 5 lines

Hi Vinicius,

Thank you very much for your feedback.

I know the CBS is used to be most important part of AVB. And qdiscs is good

tool to configure qos.

Quoted 2 lines
Quoted 2 lines

But as you know, the TSN family is a cluster of protocols and much

extending the AVB. The protocols have different functionalities and they may have more than hundred parameters. For example NXP ls1028a support Qbv/Qci/Qbu/Qav and also the 8021CB (not included in this patch yet).

Quoted 6 lines
Quoted 5 lines

Some protocols target to configure the traffic class(like Qav CBS). Some to config the port(like Qbv). But some for the whole ethernet controller(like Qci, the control entries for the whole controller, which input ports and which output ports).

Quoted 6 lines
Quoted 4 lines

Reading your email, now I understand your point a little better. You are interested in multi-port devices. I admit that I am not too familiar with how multi-port devices are exposed in Linux, I was only focused on the end-station use cases, until now.

Have you considered a switchdev-based driver for multi-port devices?

[Po] Yes, the patch is including the switchdev-based driver. In fact, we have driver examples for ls1028 which include end-station IP and switch ports IP, with this interface driver, it is working. But we need to add base ethernet driver of ENETC(end station) and FELIX(switch) upstream first, then add the TSN driver upstream.

Quoted 2 lines

What you ask of TSN configuration is currently doable with switch switchdev for VLANs and other similar networking functionality.

[Po] I think the VLAN configure is not conflict with the TSN. TSN is extending the 8021Q. TSN configure the setting of filter frame or scheduling between TC. But maybe need to consider as whole as you said.

Quoted 3 lines

Instead of rewriting this from scratch, we not extend the currect TC and switchdev functionality for that ?

[Po] Ya, there are operations of switchdev. You may think that to add the TSN configurations ops into switchdev operations. But we need to consider the end-station devices and switch all in the devices or in the TSN domain. The TSN domain is the devices include TSN capabilities ports, for up layer, we need to provide a formal interface. So tsn configure can be standalone. In this patch, we treat two kinds of ports when registering the ports, end-station or switch. This may treat them in some minor differences in TSN spec and drivers.

Quoted 4 lines

Regards
/Ilias

#8 lore raw

Hi Po,

Quoted 10 lines
Quoted 10 lines
Quoted 9 lines
Quoted 4 lines

Some protocols target to configure the traffic class(like Qav CBS). Some to config the port(like Qbv). But some for the whole ethernet controller(like Qci, the control entries for the whole controller, which input ports and which output ports).

Reading your email, now I understand your point a little better. You are interested in multi-port devices. I admit that I am not too familiar with how multi-port devices are exposed in Linux, I was only focused on the end-station use cases, until now.

Quoted 6 lines
Quoted 1 line

Have you considered a switchdev-based driver for multi-port devices?

[Po] Yes, the patch is including the switchdev-based driver. In fact, we have driver examples for ls1028 which include end-station IP and switch ports IP, with this interface driver, it is working. But we need to add base ethernet driver of ENETC(end station) and FELIX(switch) upstream first, then add the TSN driver upstream.

Quoted 2 lines

What you ask of TSN configuration is currently doable with switch switchdev for VLANs and other similar networking functionality.

[Po] I think the VLAN configure is not conflict with the TSN. TSN is extending the 8021Q. TSN configure the setting of filter frame or scheduling between TC. But maybe need to consider as whole as you said.

VLAN was an example of devices already performing complex configuration using switchdev and configurating 'switch' ports and 'cpu' port(s) individually. It wasn't related to TSN or its 802.1Qbv importance in any way.

Quoted 7 lines
Quoted 3 lines

Instead of rewriting this from scratch, we not extend the currect TC and switchdev functionality for that ?

[Po] Ya, there are operations of switchdev. You may think that to add the TSN configurations ops into switchdev operations. But we need to consider the end-station devices and switch all in the devices or in the TSN domain. The TSN domain is the devices include TSN capabilities ports, for up layer, we need to provide a formal interface. So tsn configure can be standalone. In this patch, we treat two kinds of ports when registering the ports, end-station or switch. This may treat them in some minor differences in TSN spec and drivers.

Why are switches different than end-stations configuration wise?
I understand that you may need to support different TSN IEEE standards per device, but adding support for different capabilities shouldn't affect a 'common' configuration path.
That's the actual advantage of switchdev based drivers. switches and end stations will have a very similar way of confiration via iproute2/bridge/tc utils. Am i missing something?

/Ilias

author
#9 lore raw

Hi Ilias,

Quoted 49 lines

-----Original Message-----
From: Ilias Apalodimas [mailto:[email protected]]
Sent: 2019年1月3日 19:39
To: Po Liu <[email protected]>
Cc: Vinicius Costa Gomes <[email protected]>; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Mingkai Hu <[email protected]>; Roy Zang <[email protected]>
Subject: Re: [PATCH] net: tsn: add an netlink interface between kernel and application layer

Hi Po,

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 4 lines

Some protocols target to configure the traffic class(like Qav CBS). Some to config the port(like Qbv). But some for the whole ethernet controller(like Qci, the control entries for the whole controller, which input ports and which output ports).

Quoted 7 lines
Quoted 6 lines
Quoted 4 lines

Reading your email, now I understand your point a little better. You are interested in multi-port devices. I admit that I am not too familiar with how multi-port devices are exposed in Linux, I was only focused on the end-station use cases, until now.

Have you considered a switchdev-based driver for multi-port devices?

[Po] Yes, the patch is including the switchdev-based driver. In fact, we have

driver examples for ls1028 which include end-station IP and switch ports IP, with this interface driver, it is working. But we need to add base ethernet driver of ENETC(end station) and FELIX(switch) upstream first, then add the TSN driver upstream.

Quoted 4 lines
Quoted 3 lines

What you ask of TSN configuration is currently doable with switch switchdev for VLANs and other similar networking functionality.

[Po] I think the VLAN configure is not conflict with the TSN. TSN is extending

the 8021Q. TSN configure the setting of filter frame or scheduling between TC. But maybe need to consider as whole as you said.

VLAN was an example of devices already performing complex configuration using switchdev and configurating 'switch' ports and 'cpu' port(s) individually. It wasn't related to TSN or its 802.1Qbv importance in any way.

Quoted 5 lines
Quoted 3 lines

Instead of rewriting this from scratch, we not extend the currect TC and switchdev functionality for that ?

[Po] Ya, there are operations of switchdev. You may think that to add the TSN

configurations ops into switchdev operations. But we need to consider the end- station devices and switch all in the devices or in the TSN domain. The TSN domain is the devices include TSN capabilities ports, for up layer, we need to provide a formal interface. So tsn configure can be standalone.

Quoted 6 lines
Quoted 1 line

In this patch, we treat two kinds of ports when registering the ports, end-

station or switch. This may treat them in some minor differences in TSN spec and drivers.

Quoted 1 line

Why are switches different than end-stations configuration wise?

Minor differences but still have mentioned in spec.

Quoted 7 lines

I understand that you may need to support different TSN IEEE standards per device, but adding support for different capabilities shouldn't affect a 'common' configuration path.
That's the actual advantage of switchdev based drivers. switches and end stations will have a very similar way of confiration via iproute2/bridge/tc utils. Am i missing something?

I guess I start to getting your advise. Do you mean to add operations in struct switchdev_ops ? Is it proper include end station? I used to add structure tsn_ops in net_device. But I think there are some information and status of devices maintain in the kernel from drivers. So I create structure tsn_port standalone. Yes, iproute2/bridge/tc is one choice for user space. I would think of the possible. But the too many parameters are still the problem. For example to create Qbv gate list.

Quoted 1 line

/Ilias

#10 lore raw

Hi Po,

Quoted 22 lines
Quoted 6 lines
Quoted 2 lines

[Po] Ya, there are operations of switchdev. You may think that to add the TSN

configurations ops into switchdev operations. But we need to consider the end- station devices and switch all in the devices or in the TSN domain. The TSN domain is the devices include TSN capabilities ports, for up layer, we need to provide a formal interface. So tsn configure can be standalone.

Quoted 6 lines
Quoted 1 line

In this patch, we treat two kinds of ports when registering the ports, end-

station or switch. This may treat them in some minor differences in TSN spec and drivers.

Quoted 1 line

Why are switches different than end-stations configuration wise?

Minor differences but still have mentioned in spec.

Quoted 7 lines

I understand that you may need to support different TSN IEEE standards per device, but adding support for different capabilities shouldn't affect a 'common' configuration path.
That's the actual advantage of switchdev based drivers. switches and end stations will have a very similar way of confiration via iproute2/bridge/tc utils. Am i missing something?

Quoted 2 lines

I guess I start to getting your advise. Do you mean to add operations in struct switchdev_ops ? Is it proper include end station? I used to add structure tsn_ops in net_device. But I think there are some information and status of devices maintain in the kernel from drivers. So I create structure tsn_port standalone. Yes, iproute2/bridge/tc is one choice for user space. I would think of the possible. But the too many parameters are still the problem. For example to create Qbv gate list.

Well iproute2 is already used to configure an 802.1Qbv software scheduler which is already merged into net-next [1].

The netdevice operations already have a callback to configure hardware schedulers used for CBS currently [2]. We should be able to configure the hardware (at least the basics) for 802.1Qbv, using those callbacks.

Try to include switchdev maintainers in the next RFC and have a discussion on what's the best approach to move forward on that and how to add missing features.

I am not really sure i have all the bits and pieces correctly, but i did make a presentation a few months ago on this [3].

Since switchdev is creating 1 ethernet interface per switch port and provides you with a way of configuring the switch 'cpu' port individually we should be able to fit everything in there by extending the current API's (but i might be missing something).

[1] Look into net/sched/sch_taprio.c for the software scheduler.
[2] .ndo_setup_tc() is the ndo callback. Look for TC_SETUP_QDISC_CBS and you'll get the idea. I know intel i210 and TI's cpsw driver are using it.
[3] https://connect.linaro.org/resources/yvr18/sessions/yvr18-212/

/Ilias