From ff9a6b34ed9fa087df43ca6aabca5e3b3e532146 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 7668eff9f..c468a0358 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -2384,13 +2384,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 979fd5dfe..c1f2c9801 100644 --- a/vswitchd/vswitch.xml +++ b/vswitchd/vswitch.xml @@ -825,7 +825,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