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) {
|
||||
|
@ -318,7 +318,7 @@ wf2qp_free_queue(struct dn_queue *q)
|
||||
{
|
||||
struct wf2qp_queue *alg_fq = (struct wf2qp_queue *)q;
|
||||
struct wf2qp_si *si = (struct wf2qp_si *)(q->_si + 1);
|
||||
|
||||
|
||||
if (alg_fq->S >= alg_fq->F + 1)
|
||||
return 0; /* nothing to do, not in any heap */
|
||||
si->wsum -= q->fs->fs.par[0];
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*-
|
||||
/*-
|
||||
* Copyright (c) 2010 Riccardo Panicucci, Universita` di Pisa
|
||||
* All rights reserved
|
||||
*
|
||||
|
@ -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,14 +465,16 @@ 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));
|
||||
(m->m_pkthdr.len * 8 + extra_bits(m, s));
|
||||
si->credit -= len_scaled;
|
||||
/* Move packet in the delay line */
|
||||
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,
|
||||
@ -1571,7 +1572,7 @@ config_profile(struct dn_profile *pf, struct dn_id *arg)
|
||||
*/
|
||||
if (s->profile == NULL)
|
||||
s->profile = malloc(pf->oid.len,
|
||||
M_DUMMYNET, M_NOWAIT | M_ZERO);
|
||||
M_DUMMYNET, M_NOWAIT | M_ZERO);
|
||||
if (s->profile == NULL) {
|
||||
D("no memory for profile %d", i);
|
||||
err = ENOMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user