mirror of
https://git.FreeBSD.org/src.git
synced 2024-11-25 07:49:18 +00:00
whitespace changes in preparation for future commits
This commit is contained in:
parent
a47ee22718
commit
38cc301f9f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213267
@ -166,6 +166,8 @@ dn_dequeue(struct dn_queue *q)
|
||||
if (m == NULL)
|
||||
return NULL;
|
||||
q->mq.head = m->m_nextpkt;
|
||||
|
||||
/* Update stats for the queue */
|
||||
q->ni.length--;
|
||||
q->ni.len_bytes -= m->m_pkthdr.len;
|
||||
if (q->_si) {
|
||||
|
@ -120,10 +120,6 @@ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, io_fast,
|
||||
CTLFLAG_RW, DC(io_fast), 0, "Enable fast dummynet io.");
|
||||
SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug,
|
||||
CTLFLAG_RW, DC(debug), 0, "Dummynet debug level");
|
||||
SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire,
|
||||
CTLFLAG_RW, DC(expire), 0, "Expire empty queues/pipes");
|
||||
SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle,
|
||||
CTLFLAG_RD, DC(expire_cycle), 0, "Expire cycle for queues/pipes");
|
||||
|
||||
/* RED parameters */
|
||||
SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_lookup_depth,
|
||||
@ -147,6 +143,12 @@ SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_lost,
|
||||
CTLFLAG_RD, &tick_lost, 0,
|
||||
"Number of ticks coalesced by dummynet taskqueue.");
|
||||
|
||||
/* Drain parameters */
|
||||
SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire,
|
||||
CTLFLAG_RW, DC(expire), 0, "Expire empty queues/pipes");
|
||||
SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle,
|
||||
CTLFLAG_RD, DC(expire_cycle), 0, "Expire cycle for queues/pipes");
|
||||
|
||||
/* statistics */
|
||||
SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, schk_count,
|
||||
CTLFLAG_RD, DC(schk_count), 0, "Number of schedulers");
|
||||
@ -463,6 +465,7 @@ serve_sched(struct mq *q, struct dn_sch_inst *si, uint64_t now)
|
||||
done = 0;
|
||||
while (si->credit >= 0 && (m = s->fp->dequeue(si)) != NULL) {
|
||||
uint64_t len_scaled;
|
||||
|
||||
done++;
|
||||
len_scaled = (bw == 0) ? 0 : hz *
|
||||
(m->m_pkthdr.len * 8 + extra_bits(m, s));
|
||||
@ -471,6 +474,7 @@ serve_sched(struct mq *q, struct dn_sch_inst *si, uint64_t now)
|
||||
dn_tag_get(m)->output_time += s->link.delay ;
|
||||
mq_append(&si->dline.mq, m);
|
||||
}
|
||||
|
||||
/*
|
||||
* If credit >= 0 the instance is idle, mark time.
|
||||
* Otherwise put back in the heap, and adjust the output
|
||||
|
@ -445,6 +445,7 @@ si_new(uintptr_t key, int flags, void *arg)
|
||||
si = malloc(l, M_DUMMYNET, M_NOWAIT | M_ZERO);
|
||||
if (si == NULL)
|
||||
goto error;
|
||||
|
||||
/* Set length only for the part passed up to userland. */
|
||||
set_oid(&si->ni.oid, DN_SCH_I, sizeof(struct dn_flow));
|
||||
set_oid(&(si->dline.oid), DN_DELAY_LINE,
|
||||
|
Loading…
Reference in New Issue
Block a user