tcpdump mailing list archives

Re: Requesting DLT_* values for Ethernet switches proprietary tagging protocol


From: Guy Harris <gharris () sonic net>
Date: Thu, 17 Jan 2019 20:40:32 -0800

On Jan 17, 2019, at 8:22 PM, Florian Fainelli <f.fainelli () gmail com> wrote:

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.

OK - we'd need a detailed description of the tag formats for each DLT_ value we assign.

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:

        ...

+----------------------------------------------------------+
| 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]                                    |
+----------------------------------------------------------+

        ...

Ingress (management port to switch) format

        ...

+----------------------------------------------------------+
| OPcode[7:5] | Reserved[4:0]                              |
+----------------------------------------------------------+
| Classification ID [7:0]                                  |
+----------------------------------------------------------+
+----------------------------------------------------------+
| Reason code [7:0]                                        |
+----------------------------------------------------------+
+----------------------------------------------------------+
| Traffic class [7:5] | Source port number [4:0]           |
+----------------------------------------------------------+

So:

        How are ingress vs. egress packets distinguished?  By whether the machine doing the capturing received or sent 
the packet, by the OPcode value, or by some other mechanism?

        What are the OPcode values?

        What are the traffic class values?  Are they the same values in ingress and egress packets?

        What are the tag enforcement values?

        To what does the time stamp correspond?

        What are the destination map values?

        What are the classification ID values?

        What are the reason code values?

        Is the source port number a switch port number?  If so, how does that work for ports sent on the management 
port *to* the switch?

        

_______________________________________________
tcpdump-workers mailing list
tcpdump-workers () lists tcpdump org
https://lists.sandelman.ca/mailman/listinfo/tcpdump-workers

Current thread: