Mesh routing protocol batman-adv (in particular the new BATMAN_V algorithm)
uses the link speed reported by get_link_ksettings to determine a path
metric for wired links. In the mesh framework Gluon [1], we layer VXLAN
and sometimes bridge interfaces on our Ethernet links.
These patches implement get_link_ksettings for these two interface types.
While this is obviously not accurate for bridges with multiple active
ports, it's much better than having no estimate at all (and in the
particular setup of Gluon, bridges with a single port aren't completely
uncommon).
[1] https://github.com/freifunk-gluon/gluon
Matthias Schiffer (2):
vxlan: implement get_link_ksettings ethtool method
bridge: implement get_link_ksettings ethtool method
drivers/net/vxlan.c | 24 ++++++++++++++++++++++--
net/bridge/br_device.c | 37 +++++++++++++++++++++++++++++++++++--
2 files changed, 57 insertions(+), 4 deletions(-)
--
2.24.0
We return the maximum speed of all active ports. This matches how the link
speed would give an upper limit for traffic to/from any single peer if the
bridge were replaced with a hardware switch.
Signed-off-by: Matthias Schiffer <redacted>
---
net/bridge/br_device.c | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
From: Nikolay Aleksandrov <hidden> Date: 2019-11-11 22:15:33
On 09/11/2019 19:54, Matthias Schiffer wrote:
quoted hunk
We return the maximum speed of all active ports. This matches how the link
speed would give an upper limit for traffic to/from any single peer if the
bridge were replaced with a hardware switch.
Signed-off-by: Matthias Schiffer <redacted>
---
net/bridge/br_device.c | 37 +++++++++++++++++++++++++++++++++++--
1 file changed, 35 insertions(+), 2 deletions(-)
Code-wise this is ok, but it could cause potential issues because devices will suddenly
have speed (without duplex), and macvlan/8021q are examples which use the lowerdev's
get_link_ksettings. I searched for potential problems with some user-space software
but couldn't find any, so I hope it will be fine. :)
Let's see where this goes.
Acked-by: Nikolay Aleksandrov <redacted>
Similar to VLAN and similar drivers, we can forward get_link_ksettings to
the lower dev if we have one to get meaningful speed/duplex data.
Signed-off-by: Matthias Schiffer <redacted>
---
drivers/net/vxlan.c | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)