tcpdump mailing list archives
Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol
From: Florian Fainelli <f.fainelli () gmail com>
Date: Thu, 17 Jan 2019 20:22:21 -0800
On 1/17/2019 6:56 PM, Guy Harris wrote:
On Jan 17, 2019, at 2:39 PM, Florian Fainelli <f.fainelli () gmail com> wrote:DSA currently supports the following tagging protocols (details can be found under net/dsa/tag_*.c in Linux source for exactly length and offset within the Ethernet frame):Unfortunately, tag_brcm.c, for example, doesn't give *enough* details - it has a bunch of uncommented #defines (some of which suggest overlap between fields in the same byte of the tag) and some code that doesn't handle all the fields in both ingress and egress tags. Can you construct "ASCII-art" diagrams and explanatory text, of the sort seen in, for example: http://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL.html for the tags?
Most certainly, I can only answer for the Broadcom tags, since I am not very familiar with the other protocols, and I am hoping someone else could fill in for Intel/Qualcomm/Mediatek etc. We have two different formats, presented below. Let me know if you need more details on each field and I can expand. Egress (switch to management port) format: +----------------------------------------------------------+ | Ethernet Destination address (6 octets) | +----------------------------------------------------------+ +----------------------------------------------------------+ | Ethernet Source address (6 octets) | +----------------------------------------------------------+ +----------------------------------------------------------+ | OPcode[7:5] | Traffic class[4:2] | Tag enforcement [1:0] | +----------------------------------------------------------+ | Time stamp [7] | Unused | +----------------------------------------------------------+ +----------------------------------------------------------+ | Reserved [7:1] | Desination map[1]| +----------------------------------------------------------+ +----------------------------------------------------------+ | Destination map [7:0] | +----------------------------------------------------------+ +----------------------------------------------------------+ | Ethernet Type/Length (2 bytes) | +----------------------------------------------------------+ +----------------------------------------------------------+ | Ethernet payload | . . . . . . Ingress (management port to switch) format +----------------------------------------------------------+ | Ethernet Destination address (6 octets) | +----------------------------------------------------------+ +----------------------------------------------------------+ | Ethernet Source address (6 octets) | +----------------------------------------------------------+ +----------------------------------------------------------+ | OPcode[7:5] | Reserved[4:0] | +----------------------------------------------------------+ | Classification ID [7:0] | +----------------------------------------------------------+ +----------------------------------------------------------+ | Reason code [7:0] | +----------------------------------------------------------+ +----------------------------------------------------------+ | Traffic class [7:5] | Source port number [4:0] | +----------------------------------------------------------+ +----------------------------------------------------------+ | Ethernet Type/Length (2 bytes) | +----------------------------------------------------------+ +----------------------------------------------------------+ | Ethernet payload | . . . . . . -- Florian _______________________________________________ tcpdump-workers mailing list tcpdump-workers () lists tcpdump org https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers
Current thread:
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol, (continued)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Guy Harris (Jan 17)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Florian Fainelli (Jan 17)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Guy Harris (Jan 17)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Florian Fainelli (Jan 18)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Guy Harris (Jan 18)
- Message not available
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Florian Fainelli (Jan 18)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Andrew Lunn (Jan 20)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Florian Fainelli (Jan 20)
- Message not available
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Guy Harris (Jan 18)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Florian Fainelli (Jan 17)
- Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol Guy Harris (Jan 17)