ether: Add ETH_P_OPCUA macro
Subsystems (2)
PATCH 1/2 ether: Add ETH_P_OPCUA macro
This patch adds the ETH_P_OPCUA macro which defines the 'OPC UA over TSN' ethertype assigned to 0xB62C, according to:
http://standards-oui.ieee.org/ethertype/eth.txt
--- include/uapi/linux/if_ether.h | 1 + 1 file changed, 1 insertion(+)
include/uapi/linux/if_ether.h +1 -0
@@ -109,6 +109,7 @@#define ETH_P_QINQ1 0x9100/* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ #define ETH_P_QINQ2 0x9200/* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ #define ETH_P_QINQ3 0x9300/* deprecated QinQ VLAN [ NOT AN OFFICIALLY REGISTERED ID ] */ +#define ETH_P_OPCUA 0xB62C/* OPC UA over TSN */ #define ETH_P_EDSA 0xDADA/* Ethertype DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ #define ETH_P_DSA_8021Q 0xDADB/* Fake VLAN Header for DSA [ NOT AN OFFICIALLY REGISTERED ID ] */ #define ETH_P_IFE 0xED3E/* ForCES inter-FE LFB type */
Signature · 1 line
2.24.1
PATCH 2/2 ether: Add ETH_P_AVTP macro
This patch adds the ETH_P_AVTP macro which defines the Audio/Video Transport Protocol (AVTP) ethertype assigned to 0x22F0, according to:
http://standards-oui.ieee.org/ethertype/eth.txt
AVTP is the transport protocol utilized in Audio/Video Bridging (AVB), and it is defined by IEEE 1722 standard.
Note that we have ETH_P_TSN macro defined with the number assigned to AVTP. However, there is no "TSN" ethertype. TSN is not a protocol, but a set of features to deliver networking determinism, so ETH_P_TSN can be a bit misleading. For compatibility reasons we should keep it around. This patch re-defines it using the ETH_P_AVTP macro to make it explicit.
--- include/uapi/linux/if_ether.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
include/uapi/linux/if_ether.h +2 -1
@@ -47,7 +47,8 @@#define ETH_P_LOOP 0x0060/* Ethernet Loopback packet */ #define ETH_P_PUP 0x0200/* Xerox PUP packet */ #define ETH_P_PUPAT 0x0201/* Xerox PUP Addr Trans packet */ -#define ETH_P_TSN 0x22F0/* TSN (IEEE 1722) packet */ +#define ETH_P_AVTP 0x22F0/* AVTP (IEEE 1722) */ +#define ETH_P_TSN ETH_P_AVTP/* There is no TSN ethertype, we define it for compatibility reasons */ #define ETH_P_ERSPAN2 0x22EB/* ERSPAN version 2 (type III) */ #define ETH_P_IP 0x0800/* Internet Protocol packet */ #define ETH_P_X25 0x0805/* CCITT X.25 */
Signature · 1 line
2.24.1
David Miller
maintainerFrom: Andre Guedes <[email protected]>
Date: Wed, 18 Dec 2019 14:44:47 -0800
Quoted 6 lines
This patch adds the
ETH_P_OPCUAmacro which defines the 'OPC UA over TSN' ethertype assigned to0xB62C, according to:http://standards-oui.ieee.org/ethertype/eth.txt
Signed-off-by Andre Guedes <[email protected]>
Add then when there is also an in-kernel user as well.
David Miller
maintainerRe: [PATCH 2/2] ether: Add ETH_P_AVTP macro
In reply to Andre GuedesFrom: Andre Guedes <[email protected]>
Date: Wed, 18 Dec 2019 14:44:48 -0800
Quoted 8 lines
This patch adds the
ETH_P_AVTPmacro which defines the Audio/Video Transport Protocol (AVTP) ethertype assigned to0x22F0, according to:http://standards-oui.ieee.org/ethertype/eth.txt
AVTP is the transport protocol utilized in Audio/Video Bridging (AVB), and it is defined by IEEE 1722 standard.
Quoted 7 lines
Note that we have
ETH_P_TSNmacro defined with the number assigned to AVTP. However, there is no "TSN" ethertype. TSN is not a protocol, but a set of features to deliver networking determinism, soETH_P_TSNcan be a bit misleading. For compatibility reasons we should keep it around. This patch re-defines it using theETH_P_AVTPmacro to make it explicit.Signed-off-by Andre Guedes <[email protected]>
Likewise, let's see an in-kernel user first.
Re: [PATCH 2/2] ether: Add ETH_P_AVTP macro
Hi David,
Quoting David Miller (2019-12-18 15:12:21)
Quoted 17 lines
From: Andre Guedes <[email protected]>
Date: Wed, 18 Dec 2019 14:44:48 -0800Quoted 14 lines
This patch adds the
ETH_P_AVTPmacro which defines the Audio/Video Transport Protocol (AVTP) ethertype assigned to0x22F0, according to:http://standards-oui.ieee.org/ethertype/eth.txt
AVTP is the transport protocol utilized in Audio/Video Bridging (AVB), and it is defined by IEEE 1722 standard.
Note that we have
ETH_P_TSNmacro defined with the number assigned to AVTP. However, there is no "TSN" ethertype. TSN is not a protocol, but a set of features to deliver networking determinism, soETH_P_TSNcan be a bit misleading. For compatibility reasons we should keep it around. This patch re-defines it using theETH_P_AVTPmacro to make it explicit.
Quoted 3 lines
Quoted 1 line
Signed-off-by Andre Guedes <[email protected]>Likewise, let's see an in-kernel user first.
I don't think we are going to see an in-kernel user for these ethertypes since these protocols are implemented in user-space. For instance, we have AVTP plugins in upstream ALSA [1] and GStreamer [2] that implement AVB. The plugins are currently using ETH_P_TSN for convenience to send/receive AVTP packets.
Regards,
Andre
[1] https://github.com/alsa-project/alsa-plugins/blob/master/aaf/pcm_aaf.c#L283
[2] https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/blob/master/ext/avtp/gstavtpsink.c#L245