altq: ansify
Sponsored by: Rubicon Communications, LLC ("Netgate")
This commit is contained in:
parent
aa0b46948e
commit
c492eb60b3
@ -575,8 +575,7 @@ priq_getq(struct priq_class *cl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct mbuf *
|
static struct mbuf *
|
||||||
priq_pollq(cl)
|
priq_pollq(struct priq_class *cl)
|
||||||
struct priq_class *cl;
|
|
||||||
{
|
{
|
||||||
return qhead(cl->cl_q);
|
return qhead(cl->cl_q);
|
||||||
}
|
}
|
||||||
|
@ -523,9 +523,7 @@ mark_ecn(struct mbuf *m, struct altq_pktattr *pktattr, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct mbuf *
|
struct mbuf *
|
||||||
red_getq(rp, q)
|
red_getq(red_t *rp, class_queue_t *q)
|
||||||
red_t *rp;
|
|
||||||
class_queue_t *q;
|
|
||||||
{
|
{
|
||||||
struct mbuf *m;
|
struct mbuf *m;
|
||||||
|
|
||||||
|
@ -148,9 +148,7 @@ ALTQ_FEATURE(fairq, "ALTQ Fair Queuing discipline");
|
|||||||
|
|
||||||
/* look up the queue state by the interface name and the queueing type. */
|
/* look up the queue state by the interface name and the queueing type. */
|
||||||
void *
|
void *
|
||||||
altq_lookup(name, type)
|
altq_lookup(char *name, int type)
|
||||||
char *name;
|
|
||||||
int type;
|
|
||||||
{
|
{
|
||||||
struct ifnet *ifp;
|
struct ifnet *ifp;
|
||||||
|
|
||||||
@ -164,13 +162,10 @@ altq_lookup(name, type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
altq_attach(ifq, type, discipline, enqueue, dequeue, request)
|
altq_attach(struct ifaltq *ifq, int type, void *discipline,
|
||||||
struct ifaltq *ifq;
|
int (*enqueue)(struct ifaltq *, struct mbuf *, struct altq_pktattr *),
|
||||||
int type;
|
struct mbuf *(*dequeue)(struct ifaltq *, int),
|
||||||
void *discipline;
|
int (*request)(struct ifaltq *, int, void *))
|
||||||
int (*enqueue)(struct ifaltq *, struct mbuf *, struct altq_pktattr *);
|
|
||||||
struct mbuf *(*dequeue)(struct ifaltq *, int);
|
|
||||||
int (*request)(struct ifaltq *, int, void *);
|
|
||||||
{
|
{
|
||||||
IFQ_LOCK(ifq);
|
IFQ_LOCK(ifq);
|
||||||
if (!ALTQ_IS_READY(ifq)) {
|
if (!ALTQ_IS_READY(ifq)) {
|
||||||
@ -189,8 +184,7 @@ altq_attach(ifq, type, discipline, enqueue, dequeue, request)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
altq_detach(ifq)
|
altq_detach(struct ifaltq *ifq)
|
||||||
struct ifaltq *ifq;
|
|
||||||
{
|
{
|
||||||
IFQ_LOCK(ifq);
|
IFQ_LOCK(ifq);
|
||||||
|
|
||||||
@ -219,8 +213,7 @@ altq_detach(ifq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
altq_enable(ifq)
|
altq_enable(struct ifaltq *ifq)
|
||||||
struct ifaltq *ifq;
|
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
@ -247,8 +240,7 @@ altq_enable(ifq)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
altq_disable(ifq)
|
altq_disable(struct ifaltq *ifq)
|
||||||
struct ifaltq *ifq;
|
|
||||||
{
|
{
|
||||||
int s;
|
int s;
|
||||||
|
|
||||||
@ -270,9 +262,7 @@ altq_disable(ifq)
|
|||||||
|
|
||||||
#ifdef ALTQ_DEBUG
|
#ifdef ALTQ_DEBUG
|
||||||
void
|
void
|
||||||
altq_assert(file, line, failedexpr)
|
altq_assert(const char *file, int line, const char *failedexpr)
|
||||||
const char *file, *failedexpr;
|
|
||||||
int line;
|
|
||||||
{
|
{
|
||||||
(void)printf("altq assertion \"%s\" failed: file \"%s\", line %d\n",
|
(void)printf("altq assertion \"%s\" failed: file \"%s\", line %d\n",
|
||||||
failedexpr, file, line);
|
failedexpr, file, line);
|
||||||
@ -293,9 +283,7 @@ altq_assert(file, line, failedexpr)
|
|||||||
#define TBR_UNSCALE(x) ((x) >> TBR_SHIFT)
|
#define TBR_UNSCALE(x) ((x) >> TBR_SHIFT)
|
||||||
|
|
||||||
static struct mbuf *
|
static struct mbuf *
|
||||||
tbr_dequeue(ifq, op)
|
tbr_dequeue(struct ifaltq *ifq, int op)
|
||||||
struct ifaltq *ifq;
|
|
||||||
int op;
|
|
||||||
{
|
{
|
||||||
struct tb_regulator *tbr;
|
struct tb_regulator *tbr;
|
||||||
struct mbuf *m;
|
struct mbuf *m;
|
||||||
@ -345,9 +333,7 @@ tbr_dequeue(ifq, op)
|
|||||||
* if the specified rate is zero, the token bucket regulator is deleted.
|
* if the specified rate is zero, the token bucket regulator is deleted.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
tbr_set(ifq, profile)
|
tbr_set(struct ifaltq *ifq, struct tb_profile *profile)
|
||||||
struct ifaltq *ifq;
|
|
||||||
struct tb_profile *profile;
|
|
||||||
{
|
{
|
||||||
struct tb_regulator *tbr, *otbr;
|
struct tb_regulator *tbr, *otbr;
|
||||||
|
|
||||||
@ -425,8 +411,7 @@ tbr_set(ifq, profile)
|
|||||||
* MPSAFE
|
* MPSAFE
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
tbr_timeout(arg)
|
tbr_timeout(void *arg)
|
||||||
void *arg;
|
|
||||||
{
|
{
|
||||||
VNET_ITERATOR_DECL(vnet_iter);
|
VNET_ITERATOR_DECL(vnet_iter);
|
||||||
struct ifnet *ifp;
|
struct ifnet *ifp;
|
||||||
@ -754,9 +739,7 @@ altq_getqstats(struct pf_altq *a, void *ubuf, int *nbytes, int version)
|
|||||||
* read and write diffserv field in IPv4 or IPv6 header
|
* read and write diffserv field in IPv4 or IPv6 header
|
||||||
*/
|
*/
|
||||||
u_int8_t
|
u_int8_t
|
||||||
read_dsfield(m, pktattr)
|
read_dsfield(struct mbuf *m, struct altq_pktattr *pktattr)
|
||||||
struct mbuf *m;
|
|
||||||
struct altq_pktattr *pktattr;
|
|
||||||
{
|
{
|
||||||
struct mbuf *m0;
|
struct mbuf *m0;
|
||||||
u_int8_t ds_field = 0;
|
u_int8_t ds_field = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user