As the link speeds have evolved over the years, the list of supported
rates is obsolete in OVS.
Yet a catch all value (NETDEV_F_OTHER) is available, so use it.
Fixes: 6240c0b4c80e ("netdev: Add netdev_get_speed() to netdev API.")
Signed-off-by: David Marchand <[email protected]>
---
lib/netdev-bsd.c | 3 +++
lib/netdev-linux.c | 2 +-
tests/system-interface.at | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c
index 6e3091b939..c7cd59376a 100644
--- a/lib/netdev-bsd.c
+++ b/lib/netdev-bsd.c
@@ -1151,6 +1151,9 @@ netdev_bsd_get_features(const struct netdev *netdev,
/* Current settings. */
*current = netdev_bsd_parse_media(ifmr.ifm_active);
+ if (!*current) {
+ *current = NETDEV_F_OTHER;
+ }
/* Advertised features. */
*advertised = netdev_bsd_parse_media(ifmr.ifm_current);
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index a63d03d484..5dad2e7ed7 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -2680,7 +2680,7 @@ netdev_linux_read_features(struct netdev_linux *netdev)
} else if (netdev->current_speed == 1000000) {
netdev->current = NETDEV_F_1TB_FD;
} else {
- netdev->current = 0;
+ netdev->current = NETDEV_F_OTHER;
}
if (ecmd.port == PORT_TP) {
diff --git a/tests/system-interface.at b/tests/system-interface.at
index d4ee5c46ba..cb0835ad6b 100644
--- a/tests/system-interface.at
+++ b/tests/system-interface.at
@@ -199,7 +199,7 @@ OFPST_PORT_DESC reply (OF1.5):
1(tap0): addr:aa:55:aa:55:00:01
config: 0
state: LIVE
- current: COPPER
+ current: OTHER COPPER
speed: 50000 Mbps now, 0 Mbps max
])
--
2.50.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev