From da3827b5518ed6cd2256ba87eddd1c40bbca75f0 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Fri, 8 Oct 2010 14:18:28 -0700 Subject: [PATCH] netdev: Enforce a floor "linux-htb" min-rate --- lib/netdev-linux.c | 4 ++-- vswitchd/vswitch.xml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index dfea605d8..06f739cdc 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -2415,13 +2415,13 @@ htb_parse_class_details__(struct netdev *netdev, const char *priority_s = shash_find_data(details, "priority"); int mtu; - /* min-rate */ + /* min-rate. Don't allow a min-rate below 1500 bytes/s. */ if (!min_rate_s) { /* min-rate is required. */ return EINVAL; } hc->min_rate = strtoull(min_rate_s, NULL, 10) / 8; - hc->min_rate = MAX(hc->min_rate, 0); + hc->min_rate = MAX(hc->min_rate, 1500); hc->min_rate = MIN(hc->min_rate, htb->max_rate); /* max-rate */ diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml index 8b2221b83..bbe4af151 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -1042,7 +1042,8 @@ column="type"/> of min-rate are:

min-rate
-
Minimum guaranteed bandwidth, in bit/s. Required.
+
Minimum guaranteed bandwidth, in bit/s. Required. The + floor value is 1500 bytes/s (12,000 bit/s).

The key-value pairs defined for of linux-htb are:

-- 2.43.0