Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#669 - CPE510: missing link details (via ethtool) #8000

Closed
openwrt-bot opened this issue Apr 1, 2017 · 3 comments
Closed

FS#669 - CPE510: missing link details (via ethtool) #8000

openwrt-bot opened this issue Apr 1, 2017 · 3 comments
Labels

Comments

@openwrt-bot
Copy link

sumpfralle:

I am using LEDE on a TP-Link CPE510 device.

The device contains one ethernet port (eth0) connected to two physical ports (eth0.1 and eth0.2).

I fail to retrieve ethernet status information (e.g. the currently negotiated link speed):

root@lede:/etc/opkg# ethtool eth0
Settings for eth0:
Cannot get device settings: No such device
Current message level: 0x000000ff (255)
drv probe link timer ifdown ifup rx_err tx_err
Link detected: yes

Thus it is not possible to detect the link speed. In my case this causes a problem with OLSRD2, since the negotiated link speed is required for the calculation of a proper routing metric.

Kernel initialization:

root@lede:/etc/opkg# dmesg |grep eth
[ 1.298265] eth0: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[ 3.319380] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 4.915811] eth0: link up (1000Mbps/Full duplex)
[ 4.920540] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 6.729961] eth0: link down
[ 15.741434] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 15.751276] IPv6: ADDRCONF(NETDEV_UP): eth0.1: link is not ready
[ 15.795536] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[ 17.335865] eth0: link up (1000Mbps/Full duplex)
[ 17.340597] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 17.388337] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.1: link becomes ready
[ 17.395183] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[ 51.404881] eth0: link down
[ 56.905812] eth0: link up (1000Mbps/Full duplex)

Driver information:

root@lede:/etc/opkg# ethtool -i eth0
driver: ag71xx
version: 0.5.35
firmware-version:
expansion-rom-version:
bus-info: ag71xx.1
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

Do you have any hints, how I can investigate, why the detailed interface information is missing?

@openwrt-bot
Copy link
Author

yousong:

I guess it's mainly because eth0 is actually only modelled as the "cpu port" of the builtin switch. The switch has multiple ports and each of them can have different negotiated link speed.

Link details can be fetched with swconfig utility

root@LEDE:~# swconfig swconfig list swconfig dev [port |vlan ] (help|set |get |load |show) root@LEDE:~# swconfig list Found: switch0 - eth0 root@LEDE:~# swconfig dev eth0 show Global attributes: enable_vlan: 1 Port 0: pvid: 1 link: port:0 link:up speed:1000baseT full-duplex txflow rxflow Port 1: pvid: 1 link: port:1 link:down Port 2: pvid: 1 link: port:2 link:down Port 3: pvid: 1 link: port:3 link:down Port 4: pvid: 1 link: port:4 link:down VLAN 1: vid: 1 ports: 0 1 2 3 4 root@LEDE:~# swconfig dev eth0 port 0 get link port:0 link:up speed:1000baseT full-duplex txflow rxflow root@LEDE:~# swconfig dev eth0 port 1 get link port:1 link:down root@LEDE:~#

@openwrt-bot
Copy link
Author

sumpfralle:

Thank you for your comment!

I guess it's mainly because eth0 is actually only modelled as the "cpu port" of the builtin switch.

Is this a problem which could be fixed in the board configuration (?) of this device?
Or is this just a fact, that should be handled by ethtool?

(I would be happy to work on fixing this - but I am far away from having a clue right now)

Thank you!

@openwrt-bot
Copy link
Author

ffainelli:

Regarding eth0 having only a few information, this ticket is relevant:

https://bugs.lede-project.org/index.php?do=details&task_id=559

The way swconfig currently works is that it does not expose individual switch port as normal network devices, unlike DSA. John has worked on the ar823x switch driver with the upstream kernel to be using DSA, so we can imagine fixing this in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant