altq: Remove unused arguments from altq_attach()
Minor cleanup, no functional change. Reviewed by: donner@ Differential Revision: https://reviews.freebsd.org/D28304
This commit is contained in:
parent
16b3833344
commit
27b2aa4938
@ -216,7 +216,7 @@ cbq_pfattach(struct pf_altq *a)
|
||||
return (EINVAL);
|
||||
s = splnet();
|
||||
error = altq_attach(&ifp->if_snd, ALTQT_CBQ, a->altq_disc,
|
||||
cbq_enqueue, cbq_dequeue, cbq_request, NULL, NULL);
|
||||
cbq_enqueue, cbq_dequeue, cbq_request);
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ codel_pfattach(struct pf_altq *a)
|
||||
return (EINVAL);
|
||||
|
||||
return (altq_attach(&ifp->if_snd, ALTQT_CODEL, a->altq_disc,
|
||||
codel_enqueue, codel_dequeue, codel_request, NULL, NULL));
|
||||
codel_enqueue, codel_dequeue, codel_request));
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -142,7 +142,7 @@ fairq_pfattach(struct pf_altq *a)
|
||||
return (EINVAL);
|
||||
|
||||
error = altq_attach(&ifp->if_snd, ALTQT_FAIRQ, a->altq_disc,
|
||||
fairq_enqueue, fairq_dequeue, fairq_request, NULL, NULL);
|
||||
fairq_enqueue, fairq_dequeue, fairq_request);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ hfsc_pfattach(struct pf_altq *a)
|
||||
return (EINVAL);
|
||||
s = splnet();
|
||||
error = altq_attach(&ifp->if_snd, ALTQT_HFSC, a->altq_disc,
|
||||
hfsc_enqueue, hfsc_dequeue, hfsc_request, NULL, NULL);
|
||||
hfsc_enqueue, hfsc_dequeue, hfsc_request);
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -87,7 +87,7 @@ priq_pfattach(struct pf_altq *a)
|
||||
return (EINVAL);
|
||||
s = splnet();
|
||||
error = altq_attach(&ifp->if_snd, ALTQT_PRIQ, a->altq_disc,
|
||||
priq_enqueue, priq_dequeue, priq_request, NULL, NULL);
|
||||
priq_enqueue, priq_dequeue, priq_request);
|
||||
splx(s);
|
||||
return (error);
|
||||
}
|
||||
|
@ -168,15 +168,13 @@ altq_lookup(name, type)
|
||||
}
|
||||
|
||||
int
|
||||
altq_attach(ifq, type, discipline, enqueue, dequeue, request, clfier, classify)
|
||||
altq_attach(ifq, type, discipline, enqueue, dequeue, request)
|
||||
struct ifaltq *ifq;
|
||||
int type;
|
||||
void *discipline;
|
||||
int (*enqueue)(struct ifaltq *, struct mbuf *, struct altq_pktattr *);
|
||||
struct mbuf *(*dequeue)(struct ifaltq *, int);
|
||||
int (*request)(struct ifaltq *, int, void *);
|
||||
void *clfier;
|
||||
void *(*classify)(void *, struct mbuf *, int);
|
||||
{
|
||||
IFQ_LOCK(ifq);
|
||||
if (!ALTQ_IS_READY(ifq)) {
|
||||
@ -189,8 +187,6 @@ altq_attach(ifq, type, discipline, enqueue, dequeue, request, clfier, classify)
|
||||
ifq->altq_enqueue = enqueue;
|
||||
ifq->altq_dequeue = dequeue;
|
||||
ifq->altq_request = request;
|
||||
ifq->altq_clfier = clfier;
|
||||
ifq->altq_classify = classify;
|
||||
ifq->altq_flags &= (ALTQF_CANTCHANGE|ALTQF_ENABLED);
|
||||
IFQ_UNLOCK(ifq);
|
||||
return 0;
|
||||
@ -220,8 +216,6 @@ altq_detach(ifq)
|
||||
ifq->altq_enqueue = NULL;
|
||||
ifq->altq_dequeue = NULL;
|
||||
ifq->altq_request = NULL;
|
||||
ifq->altq_clfier = NULL;
|
||||
ifq->altq_classify = NULL;
|
||||
ifq->altq_flags &= ALTQF_CANTCHANGE;
|
||||
|
||||
IFQ_UNLOCK(ifq);
|
||||
@ -250,8 +244,6 @@ altq_enable(ifq)
|
||||
ASSERT(ifq->ifq_len == 0);
|
||||
ifq->ifq_drv_maxlen = 0; /* disable bulk dequeue */
|
||||
ifq->altq_flags |= ALTQF_ENABLED;
|
||||
if (ifq->altq_clfier != NULL)
|
||||
ifq->altq_flags |= ALTQF_CLASSIFY;
|
||||
splx(s);
|
||||
|
||||
IFQ_UNLOCK(ifq);
|
||||
@ -273,7 +265,7 @@ altq_disable(ifq)
|
||||
s = splnet();
|
||||
IFQ_PURGE_NOLOCK(ifq);
|
||||
ASSERT(ifq->ifq_len == 0);
|
||||
ifq->altq_flags &= ~(ALTQF_ENABLED|ALTQF_CLASSIFY);
|
||||
ifq->altq_flags &= ~(ALTQF_ENABLED);
|
||||
splx(s);
|
||||
|
||||
IFQ_UNLOCK(ifq);
|
||||
|
@ -63,10 +63,6 @@ struct ifaltq {
|
||||
struct mbuf *(*altq_dequeue)(struct ifaltq *, int);
|
||||
int (*altq_request)(struct ifaltq *, int, void *);
|
||||
|
||||
/* classifier fields */
|
||||
void *altq_clfier; /* classifier-specific use */
|
||||
void *(*altq_classify)(void *, struct mbuf *, int);
|
||||
|
||||
/* token bucket regulator */
|
||||
struct tb_regulator *altq_tbr;
|
||||
|
||||
@ -127,7 +123,7 @@ struct tb_regulator {
|
||||
/* if_altqflags */
|
||||
#define ALTQF_READY 0x01 /* driver supports alternate queueing */
|
||||
#define ALTQF_ENABLED 0x02 /* altq is in use */
|
||||
#define ALTQF_CLASSIFY 0x04 /* classify packets */
|
||||
/* ALTQF_CLASSIFY 0x04 obsolete classify packets */
|
||||
#define ALTQF_CNDTNING 0x08 /* altq traffic conditioning is enabled */
|
||||
#define ALTQF_DRIVER1 0x40 /* driver specific */
|
||||
|
||||
@ -147,7 +143,6 @@ struct tb_regulator {
|
||||
#else
|
||||
#define ALTQ_IS_ENABLED(ifq) 0
|
||||
#endif
|
||||
#define ALTQ_NEEDS_CLASSIFY(ifq) ((ifq)->altq_flags & ALTQF_CLASSIFY)
|
||||
#define ALTQ_IS_CNDTNING(ifq) ((ifq)->altq_flags & ALTQF_CNDTNING)
|
||||
|
||||
#define ALTQ_SET_CNDTNING(ifq) ((ifq)->altq_flags |= ALTQF_CNDTNING)
|
||||
@ -169,9 +164,7 @@ extern int altq_attach(struct ifaltq *, int, void *,
|
||||
int (*)(struct ifaltq *, struct mbuf *,
|
||||
struct altq_pktattr *),
|
||||
struct mbuf *(*)(struct ifaltq *, int),
|
||||
int (*)(struct ifaltq *, int, void *),
|
||||
void *,
|
||||
void *(*)(void *, struct mbuf *, int));
|
||||
int (*)(struct ifaltq *, int, void *));
|
||||
extern int altq_detach(struct ifaltq *);
|
||||
extern int altq_enable(struct ifaltq *);
|
||||
extern int altq_disable(struct ifaltq *);
|
||||
|
Loading…
x
Reference in New Issue
Block a user