Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Jan 2021 19:59:03 GMT
From:      Kristof Provost <kp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 27b2aa49385d - main - altq: Remove unused arguments from altq_attach()
Message-ID:  <202101251959.10PJx39s006038@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=27b2aa49385dc39959f772b76abec1601d4b9ab2

commit 27b2aa49385dc39959f772b76abec1601d4b9ab2
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2021-01-23 09:37:13 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2021-01-25 18:58:22 +0000

    altq: Remove unused arguments from altq_attach()
    
    Minor cleanup, no functional change.
    
    Reviewed by:            donner@
    Differential Revision:  https://reviews.freebsd.org/D28304
---
 sys/net/altq/altq_cbq.c   |  2 +-
 sys/net/altq/altq_codel.c |  2 +-
 sys/net/altq/altq_fairq.c |  2 +-
 sys/net/altq/altq_hfsc.c  |  2 +-
 sys/net/altq/altq_priq.c  |  2 +-
 sys/net/altq/altq_subr.c  | 12 ++----------
 sys/net/altq/if_altq.h    | 11 ++---------
 7 files changed, 9 insertions(+), 24 deletions(-)

diff --git a/sys/net/altq/altq_cbq.c b/sys/net/altq/altq_cbq.c
index 6c6557725354..0e267fcb49e2 100644
--- a/sys/net/altq/altq_cbq.c
+++ b/sys/net/altq/altq_cbq.c
@@ -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);
 }
diff --git a/sys/net/altq/altq_codel.c b/sys/net/altq/altq_codel.c
index cca75a70b4c6..b9950ed94d2b 100644
--- a/sys/net/altq/altq_codel.c
+++ b/sys/net/altq/altq_codel.c
@@ -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
diff --git a/sys/net/altq/altq_fairq.c b/sys/net/altq/altq_fairq.c
index a8f96daeed36..b4eeb1ddf9b4 100644
--- a/sys/net/altq/altq_fairq.c
+++ b/sys/net/altq/altq_fairq.c
@@ -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);
 }
diff --git a/sys/net/altq/altq_hfsc.c b/sys/net/altq/altq_hfsc.c
index 2dbf571cdbb9..c3e84b345509 100644
--- a/sys/net/altq/altq_hfsc.c
+++ b/sys/net/altq/altq_hfsc.c
@@ -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);
 }
diff --git a/sys/net/altq/altq_priq.c b/sys/net/altq/altq_priq.c
index e0c3e0f6ee80..f0627e2611a7 100644
--- a/sys/net/altq/altq_priq.c
+++ b/sys/net/altq/altq_priq.c
@@ -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);
 }
diff --git a/sys/net/altq/altq_subr.c b/sys/net/altq/altq_subr.c
index b35637820a47..dff589607ac8 100644
--- a/sys/net/altq/altq_subr.c
+++ b/sys/net/altq/altq_subr.c
@@ -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);
diff --git a/sys/net/altq/if_altq.h b/sys/net/altq/if_altq.h
index 8d0463e09b3e..e0237ce77fda 100644
--- a/sys/net/altq/if_altq.h
+++ b/sys/net/altq/if_altq.h
@@ -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 *);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101251959.10PJx39s006038>