mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
fix handling of initial credit for an idle pipe.
This fixes the bug where setting bw > 1 MTU/tick resulted in infinite bandwidth if io_fast=1 PR: 147245 148429 Obtained from: Riccardo Panicucci MFC after: 3 days
This commit is contained in:
parent
063045a555
commit
a47ee22718
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213265
@ -752,8 +752,11 @@ dummynet_io(struct mbuf **m0, int dir, struct ip_fw_args *fwa)
|
||||
}
|
||||
|
||||
/* compute the initial allowance */
|
||||
{
|
||||
if (si->idle_time < dn_cfg.curr_time) {
|
||||
/* Do this only on the first packet on an idle pipe */
|
||||
struct dn_link *p = &fs->sched->link;
|
||||
|
||||
si->sched_time = dn_cfg.curr_time;
|
||||
si->credit = dn_cfg.io_fast ? p->bandwidth : 0;
|
||||
if (p->burst) {
|
||||
uint64_t burst = (dn_cfg.curr_time - si->idle_time) * p->bandwidth;
|
||||
|
Loading…
Reference in New Issue
Block a user