This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM335x ethtool dump vs ALE dump

Other Parts Discussed in Thread: AM3352

Hi

I am currently migrating my AM3352 custom board from Linux 3.2 to Linux 3.14.43 using ti-processor-sdk-linux-am335x-evm-01.00.00.03. I am now using ethtool to dump the ethernet infomation instead of CONFIG_SWITCH_DUMP through ioctl() as this is deprecated according to TI. The PHY is Marvell 88E3016 and the CPSW is configured as a switch. How do I interpret the dump from ethtool when I need to find the MAC address of a printer connected to port 2 of the switch ?

Thanks for your help.

  • Hi,

    Can you post the dump from ethtool?
  • Hi Biser

    thanks for your reply.

    Following is the first part of ethtool as the rest pretty much is ZERO's. I can see my MAC address from port1 as the printer attached has the MAC address 88:87:17:26:6F:58. This may be found several places in the dump e.g. around 0x00F0 and 0x0110
    My host MAC address is 84:eb:18:ce:fa:25 which I also can see starting from address 4.

    ethtool is version 4.6 and the dump was done with 'ethtool -d eth0'

    # ./ethtool -d eth0
    Offset Values
    ------ ------
    0x0000: 00 00 00 00 eb 84 00 10 25 fa ce 18 1c 00 00 00
    0x0010: ff ff 00 d0 ff ff ff ff 00 00 00 00 00 00 00 20
    0x0020: 07 06 07 07 1c 00 00 00 33 33 00 10 01 00 00 00
    0x0030: 1c 00 00 00 00 01 00 10 01 00 00 5e 1c 00 00 00
    0x0040: 33 33 00 10 25 fa ce ff 04 00 00 00 c3 10 00 f0
    0x0050: 68 8a a3 7b 04 00 00 00 11 00 00 40 0b cb 0a 32
    0x0060: 08 00 00 00 87 88 00 40 58 6f 26 17 08 00 00 00
    0x0070: 87 88 00 40 58 6f 26 17 04 00 00 00 69 c8 00 40
    0x0080: 9a a9 37 cd 08 00 00 00 87 88 00 40 58 6f 26 17
    0x0090: 04 00 00 00 a2 d8 00 40 5d 32 70 5e 04 00 00 00
    0x00a0: 11 00 00 f0 0b cb 0a 32 04 00 00 00 57 60 00 f0
    0x00b0: ca 05 76 18 04 00 00 00 e9 94 00 40 0b 13 dc 6a
    0x00c0: 04 00 00 00 67 50 00 f0 6f 7d 5e f0 04 00 00 00
    0x00d0: 57 60 00 40 ca 05 76 18 04 00 00 00 57 60 00 40
    0x00e0: ca 05 76 18 04 00 00 00 11 00 00 40 0b cb 0a 32
    0x00f0: 08 00 00 00 87 88 00 40 58 6f 26 17 04 00 00 00
    0x0100: 69 c8 00 40 9a a9 37 cd 08 00 00 00 87 88 00 40
    0x0110: 58 6f 26 17 04 00 00 00 71 38 00 40 08 a3 1e de
    0x0120: 08 00 00 00 87 88 00 40 58 6f 26 17 04 00 00 00
    0x0130: 0e 00 00 40 76 73 a1 58 04 00 00 00 50 00 00 40
    0x0140: 8e ec 7d b6 04 00 00 00 50 00 00 40 8e ec 7d b6
    0x0150: 08 00 00 00 87 88 00 40 58 6f 26 17 04 00 00 00
    0x0160: 57 60 00 40 ca 05 76 18 04 00 00 00 57 60 00 40
    0x0170: ca 05 76 18 04 00 00 00 03 d0 00 40 fb 13 1c 4b
    0x0180: 08 00 00 00 87 88 00 40 58 6f 26 17 04 00 00 00
    0x0190: 57 60 00 40 ca 05 76 18 04 00 00 00 57 60 00 40
    0x01a0: ca 05 76 18 04 00 00 00 57 60 00 40 ca 05 76 18
    0x01b0: 08 00 00 00 87 88 00 40 58 6f 26 17 04 00 00 00
    0x01c0: 69 c8 00 40 9a a9 37 cd 04 00 00 00 11 00 00 40
    0x01d0: 0b cb 0a 32 08 00 00 00 87 88 00 40 58 6f 26 17
    0x01e0: 04 00 00 00 50 00 00 40 8e ec 7d b6 04 00 00 00
    0x01f0: 11 00 00 40 0b cb 0a 32 04 00 00 00 0e 00 00 f0
    0x0200: 42 b9 75 58 04 00 00 00 57 60 00 40 ca 05 76 18
    0x0210: 04 00 00 00 69 c8 00 40 9a a9 37 cd 04 00 00 00
    0x0220: 0e 00 00 40 7a d1 c0 58 04 00 00 00 50 00 00 40
    0x0230: 8e ec 7d b6 04 00 00 00 0e 00 00 40 76 73 a1 58
    0x0240: 04 00 00 00 00 08 00 40 ff 95 55 27 04 00 00 00
    0x0250: 57 60 00 40 ca 05 76 18 08 00 00 00 87 88 00 40
    0x0260: 58 6f 26 17 04 00 00 00 57 60 00 40 ca 05 76 18
    0x0270: 04 00 00 00 11 00 00 40 0b cb 0a 32 04 00 00 00
    0x0280: 50 00 00 f0 8e ec 7d b6 08 00 00 00 87 88 00 40
    0x0290: 58 6f 26 17 08 00 00 00 87 88 00 40 58 6f 26 17
    0x02a0: 04 00 00 00 e9 b8 00 40 1e 96 53 37 08 00 00 00
    0x02b0: 87 88 00 40 58 6f 26 17 04 00 00 00 e9 b8 00 40
    0x02c0: 12 b4 b3 37 04 00 00 00 e9 94 00 40 0b 13 dc 6a
    0x02d0: 04 00 00 00 57 60 00 40 ca 05 76 18 08 00 00 00
    0x02e0: 87 88 00 40 58 6f 26 17 04 00 00 00 57 60 00 40
    0x02f0: ca 05 76 18 04 00 00 00 03 d0 00 40 fb 13 1c 4b
    0x0300: 04 00 00 00 69 c8 00 40 9a a9 37 cd 08 00 00 00
    0x0310: 87 88 00 40 58 6f 26 17 08 00 00 00 87 88 00 40
    0x0320: 58 6f 26 17 04 00 00 00 e9 b8 00 40 12 b4 b3 37
    0x0330: 04 00 00 00 71 38 00 40 08 a3 1e de 04 00 00 00
    0x0340: 57 60 00 40 ca 05 76 18 04 00 00 00 11 00 00 40
    0x0350: 0b cb 0a 32 00 00 00 00 00 00 00 00 00 00 00 00
    0x0360: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0370: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0380: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0390: 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00
    0x03a0: 69 c8 00 40 9a a9 37 cd 04 00 00 00 a2 d8 00 40
    0x03b0: 5d 32 70 5e 08 00 00 00 87 88 00 40 58 6f 26 17
    0x03c0: 04 00 00 00 50 00 00 40 8e ec 7d b6 04 00 00 00
    0x03d0: e9 b8 00 40 1e 96 53 37 08 00 00 00 87 88 00 40
    0x03e0: 58 6f 26 17 04 00 00 00 11 00 00 40 0b cb 0a 32
    0x03f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0410: 00 00 00 00 04 00 00 00 a0 24 00 40 db fb 41 74
    0x0420: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0430: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0440: 00 00 00 00 04 00 00 00 69 c8 00 40 9a a9 37 cd
    0x0450: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0460: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0470: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0480: 04 00 00 00 0e 00 00 40 76 73 a1 58 00 00 00 00
    0x0490: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x04a0: 00 00 00 00 04 00 00 00 03 d0 00 40 fb 13 1c 4b
    0x04b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x04c0: 00 00 00 00 00 00 00 00 04 00 00 00 57 60 00 40
    0x04d0: ca 05 76 18 00 00 00 00 00 00 00 00 00 00 00 00
    0x04e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x04f0: 00 00 00 00 00 00 00 00 04 00 00 00 11 00 00 40
    0x0500: 0b cb 0a 32 00 00 00 00 00 00 00 00 00 00 00 00
    0x0510: 04 00 00 00 50 00 00 40 8e ec 7d b6 00 00 00 00
    0x0520: 00 00 00 00 00 00 00 00 04 00 00 00 0e 00 00 40
    0x0530: 76 73 a1 58 00 00 00 00 00 00 00 00 00 00 00 00
    0x0540: 04 00 00 00 ad 6c 00 40 bc ce c8 f8 08 00 00 00
    0x0550: 87 88 00 40 58 6f 26 17 00 00 00 00 00 00 00 00
    0x0560: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0570: 04 00 00 00 bf 10 00 40 d7 bc ee 48 00 00 00 00
    0x0580: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0590: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x05a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x05b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x05c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x05d0: 00 00 00 00 00 00 00 00 00 00 00 00 04 00 00 00
    0x05e0: 0e 00 00 40 76 73 a1 58 00 00 00 00 00 00 00 00
    0x05f0: 00 00 00 00 08 00 00 00 87 88 00 40 58 6f 26 17
    0x0600: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0610: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0620: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0630: 00 00 00 00 00 00 00 00 00 00 00 00 08 00 00 00
    0x0640: 87 88 00 40 58 6f 26 17 00 00 00 00 00 00 00 00
    0x0650: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0660: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0670: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0680: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x0690: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x06a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x06b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    0x06c0: 04 00 00 00 11 00 00 40 0b cb 0a 32 00 00 00 00
  • Thanks. This has been forwarded to the Ethernet experts. They will respond directly here.
  • KEN said:
    How do I interpret the dump from ethtool when I need to find the MAC address of a printer connected to port 2 of the switch ?

    Hi Ken,


    "ethtool -d" is used to dump AM335x CPSW registers. I do not think you can find the MAC address of a printer connected to AM335x CPSW port 2 in the CPSW registers. Were you able to do this with the old v3.2 CONFIG_SWITCH_DUMP ioctl?

    You might try with the "arp -n" command.

    Regards,
    Pavel

  • Hi Pavel,

    thank you for your reply and sorry for not replying sooner. I have been out of office.

    First let me confirm that I was able to see the printers MAC address in Linux 3.2 using the CONFIG_SWITCH_DUMP ioctl.

    For Linux 3.14 (ie, the TI SDK 1.00.00.03) it is stated to use ethtool -d instead. And I am able to see the printers MAC adress using ethtool -d in Linux 3.14 however it seems that the MAC address occurs in several places (this is verified in the dump I have uploaded earlier).

    My box do not have a DHCP server - it is getting an DHCP adress from some arbitrary network. CPSW it then configured as a switch where port 1 is connected to this arbitrary network and port 2 is connected to a printer. My box will then get a DHCP address from the DHCP server and so will any printer connected to port 2. My challenge with arp -n is that I need to ensure that only CPSW port 2 is taken into account. Basically I need to investigate what is connected to port 2 and only port 2. without having to filter out everything else detected on the arbitrary network.

    Best regards

    KEN

  • Hi Pavel


    having gone through the source code I realised that the dump from 'ethtool -d' is directly the ALE addresses from the CPSW each occupying 12 bytes giving a total of 12288 bytes which is returned by ethtool -d. I am now able to pick out my information from the output of ethtool and thus also the MAC address of my attached printer.

    Best,

    KEN