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

ofproto: Report 0 Mbps when speed not available instead of 100 Mbps.

When a link is down, or when a link has no speed because it is not a
physical interface, Open vSwitch previously reported that its rate is 100
Mbps as a default.  This is counterintuitive, however, so this commit
changes Open vSwitch behavior to report 0 Mbps when a link is down or its
speed is otherwise unavailable.

Bug #13388.
Reported-by: Hiroshi Tanaka <htanaka@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Ben Pfaff
2012-11-03 18:00:39 -07:00
parent 8087f5ff82
commit d02a5f8ea4
9 changed files with 28 additions and 32 deletions

View File

@@ -2668,7 +2668,7 @@ htb_parse_qdisc_details__(struct netdev *netdev,
enum netdev_features current;
netdev_get_features(netdev, &current, NULL, NULL, NULL);
hc->max_rate = netdev_features_to_bps(current) / 8;
hc->max_rate = netdev_features_to_bps(current, 100 * 1000 * 1000) / 8;
}
hc->min_rate = hc->max_rate;
hc->burst = 0;
@@ -3147,7 +3147,7 @@ hfsc_parse_qdisc_details__(struct netdev *netdev, const struct smap *details,
enum netdev_features current;
netdev_get_features(netdev, &current, NULL, NULL, NULL);
max_rate = netdev_features_to_bps(current) / 8;
max_rate = netdev_features_to_bps(current, 100 * 1000 * 1000) / 8;
}
class->min_rate = max_rate;