return EINVAL;
}
- /* 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 = min_rate_s ? strtoull(min_rate_s, NULL, 10) / 8 : 0;
hc->min_rate = MAX(hc->min_rate, 1500);
hc->min_rate = MIN(hc->min_rate, htb->max_rate);
min_rate_s = shash_find_data(details, "min-rate");
max_rate_s = shash_find_data(details, "max-rate");
- if (!min_rate_s) {
- return EINVAL;
- }
-
- min_rate = strtoull(min_rate_s, NULL, 10) / 8;
+ min_rate = min_rate_s ? strtoull(min_rate_s, NULL, 10) / 8 : 0;
min_rate = MAX(min_rate, 1500);
min_rate = MIN(min_rate, hfsc->max_rate);
column="type"/> of <code>linux-htb</code> are:</p>
<dl>
<dt><code>min-rate</code></dt>
- <dd>Minimum guaranteed bandwidth, in bit/s. Required.</dd>
+ <dd>Minimum guaranteed bandwidth, in bit/s.</dd>
<dt><code>max-rate</code></dt>
<dd>Maximum allowed bandwidth, in bit/s. Optional. If specified, the
queue's rate will not be allowed to exceed the specified value, even
column="type"/> of <code>linux-hfsc</code> are:</p>
<dl>
<dt><code>min-rate</code></dt>
- <dd>Minimum guaranteed bandwidth, in bit/s. Required.</dd>
+ <dd>Minimum guaranteed bandwidth, in bit/s.</dd>
<dt><code>max-rate</code></dt>
<dd>Maximum allowed bandwidth, in bit/s. Optional. If specified, the
queue's rate will not be allowed to exceed the specified value, even