2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

netdev: Assume default link speed to be 10 Gbps instead of 100 Mbps.

100 Mbps was a fair assumption 13 years ago.  Modern days 10 Gbps seems
like a good value in case no information is available otherwise.

The change mainly affects QoS which is currently limited to 100 Mbps if
the user didn't specify 'max-rate' and the card doesn't report the
speed or OVS doesn't have a predefined enumeration for the speed
reported by the NIC.

Calculation of the path cost for STP/RSTP is also affected if OVS is
unable to determine the link speed.

Lower link speed adapters are typically good at reporting their speed,
so chances for overshoot should be low.  But newer high-speed adapters,
for which there is no speed enumeration or if there are some other
issues, will not suffer that much.

Acked-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Ilya Maximets
2022-10-25 18:37:41 +02:00
parent d240f72ad2
commit b22c4d8403
10 changed files with 27 additions and 18 deletions

View File

@@ -4710,7 +4710,7 @@ htb_parse_qdisc_details__(struct netdev *netdev_,
netdev_linux_read_features(netdev);
current = !netdev->get_features_error ? netdev->current : 0;
hc->max_rate = netdev_features_to_bps(current, 100 * 1000 * 1000) / 8;
hc->max_rate = netdev_features_to_bps(current, NETDEV_DEFAULT_BPS) / 8;
}
hc->min_rate = hc->max_rate;
hc->burst = 0;
@@ -5182,7 +5182,7 @@ hfsc_parse_qdisc_details__(struct netdev *netdev_, const struct smap *details,
netdev_linux_read_features(netdev);
current = !netdev->get_features_error ? netdev->current : 0;
max_rate = netdev_features_to_bps(current, 100 * 1000 * 1000) / 8;
max_rate = netdev_features_to_bps(current, NETDEV_DEFAULT_BPS) / 8;
}
class->min_rate = max_rate;