diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2022-10-25 18:37:41 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-11-30 14:42:59 +0100 |
commit | b22c4d84038c3eceab9486984e601b2f979ebe6d (patch) | |
tree | 665c770bd038c5164a10af761cd8c3c092a3283a /vswitchd | |
parent | d240f72ad2adb9932b59b8e01f47a93f76c5c93c (diff) | |
download | openvswitch-b22c4d84038c3eceab9486984e601b2f979ebe6d.tar.gz |
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>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 4 | ||||
-rw-r--r-- | vswitchd/vswitch.xml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index d0667f229..bfb2adef1 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1678,7 +1678,7 @@ port_configure_stp(const struct ofproto *ofproto, struct port *port, unsigned int mbps; netdev_get_features(iface->netdev, ¤t, NULL, NULL, NULL); - mbps = netdev_features_to_bps(current, 100 * 1000 * 1000) / 1000000; + mbps = netdev_features_to_bps(current, NETDEV_DEFAULT_BPS) / 1000000; port_s->path_cost = stp_convert_speed_to_cost(mbps); } @@ -1761,7 +1761,7 @@ port_configure_rstp(const struct ofproto *ofproto, struct port *port, unsigned int mbps; netdev_get_features(iface->netdev, ¤t, NULL, NULL, NULL); - mbps = netdev_features_to_bps(current, 100 * 1000 * 1000) / 1000000; + mbps = netdev_features_to_bps(current, NETDEV_DEFAULT_BPS) / 1000000; port_s->path_cost = rstp_convert_speed_to_cost(mbps); } diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 928821a82..f9bdb2d92 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -4776,7 +4776,7 @@ ovs-vsctl add-port br0 p0 -- set Interface p0 type=patch options:peer=p1 \ Maximum rate shared by all queued traffic, in bit/s. Optional. If not specified, for physical interfaces, the default is the link rate. For other interfaces or if the link rate cannot be determined, the default - is currently 100 Mbps. + is currently 10 Gbps. </column> </group> |