Skip to content

Commit 8a6ed3c

Browse files
committed
Linux: Document a problem with the "mtk" DSA tag. [skip ci]
As per Vladimir Oltean comments in GH the-tcpdump-group#1451.
1 parent 976d885 commit 8a6ed3c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pcap-linux.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5561,6 +5561,14 @@ static struct dsa_proto {
55615561
* See
55625562
*
55635563
* https://elixir.bootlin.com/linux/v6.13.2/source/net/dsa/tag_mtk.c#L15
5564+
*
5565+
* Linux kernel implements this tag so that it does not indicate the frame
5566+
* encoding reliably. The matter is, some drivers use METADATA_HW_PORT_MUX,
5567+
* which (for the switch->CPU direction only, at the time of this writing)
5568+
* means that the frame does not have a DSA tag, the frame metadata is stored
5569+
* elsewhere and libpcap receives the frame only. Specifically, this is the
5570+
* case for drivers/net/ethernet/mediatek/mtk_eth_soc.c, but the tag visible
5571+
* in sysfs is still "mtk" even though the wire encoding is different.
55645572
*/
55655573
{ "mtk", DLT_DEBUG_ONLY },
55665574

0 commit comments

Comments
 (0)