Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/ipfw/dn_sched.h
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | #endif | ||||
/* Update stats for the queue */ | /* Update stats for the queue */ | ||||
q->ni.length--; | q->ni.length--; | ||||
q->ni.len_bytes -= m->m_pkthdr.len; | q->ni.len_bytes -= m->m_pkthdr.len; | ||||
if (q->_si) { | if (q->_si) { | ||||
q->_si->ni.length--; | q->_si->ni.length--; | ||||
q->_si->ni.len_bytes -= m->m_pkthdr.len; | q->_si->ni.len_bytes -= m->m_pkthdr.len; | ||||
} | } | ||||
if (q->ni.length == 0) /* queue is now idle */ | if (q->ni.length == 0) /* queue is now idle */ | ||||
q->q_time = dn_cfg.curr_time; | q->q_time = V_dn_cfg.curr_time; | ||||
return m; | return m; | ||||
} | } | ||||
int dn_sched_modevent(module_t mod, int cmd, void *arg); | int dn_sched_modevent(module_t mod, int cmd, void *arg); | ||||
#define DECLARE_DNSCHED_MODULE(name, dnsched) \ | #define DECLARE_DNSCHED_MODULE(name, dnsched) \ | ||||
static moduledata_t name##_mod = { \ | static moduledata_t name##_mod = { \ | ||||
#name, dn_sched_modevent, dnsched \ | #name, dn_sched_modevent, dnsched \ | ||||
}; \ | }; \ | ||||
DECLARE_MODULE(name, name##_mod, \ | DECLARE_MODULE(name, name##_mod, \ | ||||
SI_SUB_PROTO_FIREWALL, SI_ORDER_ANY); \ | SI_SUB_PROTO_FIREWALL, SI_ORDER_ANY); \ | ||||
MODULE_DEPEND(name, dummynet, 3, 3, 3) | MODULE_DEPEND(name, dummynet, 3, 3, 3) | ||||
#endif /* _DN_SCHED_H */ | #endif /* _DN_SCHED_H */ |