As OVS does not know of the 25G speed, matching on a list of known speed for deducing full duplex capability is broken. Invert the test and assume full duplex is the default.
Suggested-by: Adrian Moreno <[email protected]> Signed-off-by: David Marchand <[email protected]> --- lib/netdev.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/netdev.c b/lib/netdev.c index f2d921ed63..bdacfe5c49 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -1285,14 +1285,14 @@ netdev_features_to_bps(enum netdev_features features, : default_bps); } -/* Returns true if any of the NETDEV_F_* bits that indicate a full-duplex link - * are set in 'features', otherwise false. */ +/* Returns true if any of the NETDEV_F_* bits that indicate a half-duplex link + * are unset in 'features', otherwise false. */ bool netdev_features_is_full_duplex(enum netdev_features features) { - return (features & (NETDEV_F_10MB_FD | NETDEV_F_100MB_FD | NETDEV_F_1GB_FD - | NETDEV_F_10GB_FD | NETDEV_F_40GB_FD - | NETDEV_F_100GB_FD | NETDEV_F_1TB_FD)) != 0; + + return (features & (NETDEV_F_10MB_HD | NETDEV_F_100MB_HD + | NETDEV_F_1GB_HD)) == 0; } /* Set the features advertised by 'netdev' to 'advertise'. Returns 0 if -- 2.45.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
