diff options
author | Vladimir Oltean <olteanv@gmail.com> | 2019-06-08 15:04:36 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-06-08 15:20:40 -0700 |
commit | d3f9b90bf19fad05889e4bead7dc1b336da56118 (patch) | |
tree | 9ad11a7f4750bda5a02b1332a825d07b716203cc /include/linux/dsa | |
parent | 47ed985e97f513b7746270e8c5d1f3a3f959b2da (diff) | |
download | linux-d3f9b90bf19fad05889e4bead7dc1b336da56118.tar.gz linux-d3f9b90bf19fad05889e4bead7dc1b336da56118.tar.bz2 linux-d3f9b90bf19fad05889e4bead7dc1b336da56118.zip |
net: dsa: sja1105: Build a minimal understanding of meta frames
Meta frames are sent on the CPU port by the switch if RX timestamping is
enabled. They contain a partial timestamp of the previous frame.
They are Ethernet frames with the Ethernet header constructed out of:
- SJA1105_META_DMAC
- SJA1105_META_SMAC
- ETH_P_SJA1105_META
The Ethernet payload will be decoded in a follow-up patch.
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/dsa')
-rw-r--r-- | include/linux/dsa/sja1105.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/dsa/sja1105.h b/include/linux/dsa/sja1105.h index 5a956f335022..cc4a909d1007 100644 --- a/include/linux/dsa/sja1105.h +++ b/include/linux/dsa/sja1105.h @@ -12,6 +12,7 @@ #include <net/dsa.h> #define ETH_P_SJA1105 ETH_P_DSA_8021Q +#define ETH_P_SJA1105_META 0x0008 /* IEEE 802.3 Annex 57A: Slow Protocols PDUs (01:80:C2:xx:xx:xx) */ #define SJA1105_LINKLOCAL_FILTER_A 0x0180C2000000ull @@ -20,6 +21,16 @@ #define SJA1105_LINKLOCAL_FILTER_B 0x011B19000000ull #define SJA1105_LINKLOCAL_FILTER_B_MASK 0xFFFFFF000000ull +/* Source and Destination MAC of follow-up meta frames. + * Whereas the choice of SMAC only affects the unique identification of the + * switch as sender of meta frames, the DMAC must be an address that is present + * in the DSA master port's multicast MAC filter. + * 01-80-C2-00-00-0E is a good choice for this, as all profiles of IEEE 1588 + * over L2 use this address for some purpose already. + */ +#define SJA1105_META_SMAC 0x222222222222ull +#define SJA1105_META_DMAC 0x0180C200000Eull + struct sja1105_port { struct dsa_port *dp; bool hwts_tx_en; |