Message ID | 20191218224448.8066-2-andre.guedes@intel.com |
---|---|
State | Rejected |
Delegated to: | David Miller |
Headers | show |
Series | [1/2] ether: Add ETH_P_OPCUA macro | expand |
From: Andre Guedes <andre.guedes@intel.com> Date: Wed, 18 Dec 2019 14:44:48 -0800 > 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. > > Signed-off-by: Andre Guedes <andre.guedes@intel.com> Likewise, let's see an in-kernel user first.
Hi David, Quoting David Miller (2019-12-18 15:12:21) > From: Andre Guedes <andre.guedes@intel.com> > Date: Wed, 18 Dec 2019 14:44:48 -0800 > > > 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. > > > > Signed-off-by: Andre Guedes <andre.guedes@intel.com> > > 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
diff --git a/include/uapi/linux/if_ether.h b/include/uapi/linux/if_ether.h index 0752281ee05a..c75cb646ba08 100644 --- a/include/uapi/linux/if_ether.h +++ b/include/uapi/linux/if_ether.h @@ -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 */
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. Signed-off-by: Andre Guedes <andre.guedes@intel.com> --- include/uapi/linux/if_ether.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)