-
Notifications
You must be signed in to change notification settings - Fork 96
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
Consider new interface names #1132
Comments
I hope at some point all, ethernet, wireless and usable devices which are embedded into the boeard, will be reported in board.json or in device tree, at that point we will not need anymore this filtering euristic, except maybe for pluggagle wifi or ethernet interfaces which usually doesn't have much complication like swconfig based switches (which we need to keep supporting as not all devices are DSA enabled) |
I propose we extract interface names from /etc/board.json. Every device that I encountered so far had their ethernet interfaces correctly listed in board.json. Here is a bash script that generates an approximate board.json for a given board_name using the openwrt/rootfs docker image: https://gist.github.com/pony1k/589cabfe3afa710adc8ec07d5ba2165a All devices @ilario listed seem to have correct board.json:
@G10h4ck , do you have an example of a device where board.json is incorrect for ethernet interfaces? |
As an example a device with an extra USB ethernet device plugged by the user. |
Amazing work @pony1k , thanks! |
@G10h4ck if the board.json solution is better than the current one and has no drawbacks (the USB sticks are not supported currently) I would support the board.json approach. The user experience when using a router with these interface names is terrible, see #1151. So I would say we should fix this before making the release. |
I'm only 99% sure, but I think the additional interfaces from USB dongles get names like eth0, eth1, etc. Those could be additionally collected to the ports found in board.json. Ideally, DSA conduit ports should be ignored. It would also be nice just in case to accept arbitrary names in port specific configurations, as long as they exist in /sys/class/net. So, if for whatever reason, there is a network interface called 'foo' that isn't listed in board.json, it would still be possible to configure it using |
- Scrape configurable network devices from /etc/board.json. - Avoid configuration on DSA conduit devices. - Allow device specific configuration for network devices with arbitrary names. - Remove 'nobridge' tag. - Add 'dsa' tag for DSA user ports. fixes libremesh#1132
In the swconfig era (OpenWrt 19.07 and previous), interfaces had usually a name like eth0.2.
With DSA, interfaces can have funny names like ethblue, game, lan1, ethernet1...
So we either find a general way to deal with arbitrary interface names, or we extract a list of the interface names from the targets we care about (for example, these: https://repo.libremesh.org/releases/2020.4-ow19/targets/).
The code that needs adaptation is the dev_parser in network.lua in lime-system:
lime-packages/packages/lime-system/files/usr/lib/lua/lime/network.lua
Lines 234 to 271 in d5befee
The text was updated successfully, but these errors were encountered: