netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@oss.sgi.com, hadi@cyberus.ca
Subject: [PATCH 2/16] PKT_SCHED: Max TLV types cleanup
Date: Thu, 21 Oct 2004 14:34:52 +0200	[thread overview]
Message-ID: <20041021123452.GG21977@postel.suug.ch> (raw)
In-Reply-To: <20041021123209.GE21977@postel.suug.ch>

Cleans up maximum TLV type of existing definitions and adds
missing definitions for TBF, RED, GRED, and HTB.

Signed-off-by: Thomas Graf <tgraf@suug.ch>


--- linux-2.6.9-rc5.orig/include/linux/pkt_sched.h	2004-10-21 10:44:39.000000000 +0200
+++ linux-2.6.9-rc5/include/linux/pkt_sched.h	2004-10-21 11:09:53.000000000 +0200
@@ -117,8 +117,11 @@
 	TCA_TBF_PARMS,
 	TCA_TBF_RTAB,
 	TCA_TBF_PTAB,
+	__TCA_TBF_MAX,
 };
 
+#define TCA_TBF_MAX (__TCA_TBF_MAX - 1)
+
 
 /* TEQL section */
 
@@ -151,8 +154,11 @@
 	TCA_RED_UNSPEC,
 	TCA_RED_PARMS,
 	TCA_RED_STAB,
+	__TCA_RED_MAX,
 };
 
+#define TCA_RED_MAX (__TCA_RED_MAX - 1)
+
 struct tc_red_qopt
 {
 	__u32		limit;		/* HARD maximal queue length (bytes)	*/
@@ -183,8 +189,11 @@
        TCA_GRED_PARMS,
        TCA_GRED_STAB,
        TCA_GRED_DPS,
+	   __TCA_GRED_MAX,
 };
 
+#define TCA_GRED_MAX (__TCA_GRED_MAX - 1)
+
 #define TCA_SET_OFF TCA_GRED_PARMS
 struct tc_gred_qopt
 {
@@ -249,7 +258,11 @@
 	TCA_HTB_INIT,
 	TCA_HTB_CTAB,
 	TCA_HTB_RTAB,
+	__TCA_HTB_MAX,
 };
+
+#define TCA_HTB_MAX (__TCA_HTB_MAX - 1)
+
 struct tc_htb_xstats
 {
 	__u32 lends;
@@ -287,9 +300,12 @@
 	TCA_HFSC_RSC,
 	TCA_HFSC_FSC,
 	TCA_HFSC_USC,
-	TCA_HFSC_MAX = TCA_HFSC_USC
+	__TCA_HFSC_MAX,
 };
 
+#define TCA_HFSC_MAX (__TCA_HFSC_MAX - 1)
+
+
 /* CBQ section */
 
 #define TC_CBQ_MAXPRIO		8
@@ -370,9 +386,10 @@
 	TCA_CBQ_RATE,
 	TCA_CBQ_RTAB,
 	TCA_CBQ_POLICE,
+	__TCA_CBQ_MAX,
 };
 
-#define TCA_CBQ_MAX	TCA_CBQ_POLICE
+#define TCA_CBQ_MAX	(__TCA_CBQ_MAX - 1)
 
 /* dsmark section */
 
@@ -382,10 +399,11 @@
 	TCA_DSMARK_DEFAULT_INDEX,
 	TCA_DSMARK_SET_TC_INDEX,
 	TCA_DSMARK_MASK,
-	TCA_DSMARK_VALUE
+	TCA_DSMARK_VALUE,
+	__TCA_DSMARK_MAX,
 };
 
-#define TCA_DSMARK_MAX TCA_DSMARK_VALUE
+#define TCA_DSMARK_MAX (__TCA_DSMARK_MAX - 1)
 
 /* ATM  section */
 
@@ -396,10 +414,11 @@
 	TCA_ATM_HDR,		/* LL header */
 	TCA_ATM_EXCESS,		/* excess traffic class (0 for CLP)  */
 	TCA_ATM_ADDR,		/* PVC address (for output only) */
-	TCA_ATM_STATE		/* VC state (ATM_VS_*; for output only) */
+	TCA_ATM_STATE,		/* VC state (ATM_VS_*; for output only) */
+	__TCA_ATM_MAX,
 };
 
-#define TCA_ATM_MAX	TCA_ATM_STATE
+#define TCA_ATM_MAX	(__TCA_ATM_MAX - 1)
 
 /* Network emulator */
 
@@ -408,9 +427,10 @@
 	TCA_NETEM_UNSPEC,
 	TCA_NETEM_CORR,
 	TCA_NETEM_DELAY_DIST,
+	__TCA_NETEM_MAX,
 };
 
-#define TCA_NETEM_MAX	TCA_NETEM_DELAY_DIST
+#define TCA_NETEM_MAX (__TCA_NETEM_MAX - 1)
 
 struct tc_netem_qopt
 {

  parent reply	other threads:[~2004-10-21 12:34 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21 12:32 [PATCHSET 0/16] More gnet_stats conversions Thomas Graf
2004-10-21 12:33 ` [PATCH 1/16] PKT_SCHED: Requeues statistics Thomas Graf
2004-10-21 12:34 ` Thomas Graf [this message]
2004-10-21 12:36 ` [PATCH 3/16] PKT_SCHED: Add dump_stats qdisc op Thomas Graf
2004-10-21 12:37 ` [PATCH 4/16] CBQ: use dump_stats Thomas Graf
2004-10-21 12:38 ` [PATCH 5/16] RED: " Thomas Graf
2004-10-21 12:39 ` [PATCH 6/16] PKT_SCHED: Add dump_stats class op Thomas Graf
2004-10-21 12:40 ` [PATCH 7/16] CBQ: Use gnet_stats for class statistics Thomas Graf
2004-10-21 12:43 ` [PATCH 8/16] CBQ: Use dump_stats for class statistics dumping Thomas Graf
2004-10-21 12:44 ` [PATCH 9/16] CBQ: Use generic rate estimator Thomas Graf
2004-10-21 12:45 ` [PATCH 10/16] HTB: Use gnet_stats for class statistics Thomas Graf
2004-10-21 12:46 ` [PATCH 11/16] HTB: Use dump_stats for class statistics dumping Thomas Graf
2004-10-21 12:47 ` [PATCH 12/16] HTB: Remove unneeded rate estimator bits Thomas Graf
2004-10-21 12:48 ` [PATCH 13/16] HFSC: Use gnet_stats for class statistics Thomas Graf
2004-10-21 12:49 ` [PATCH 14/16] HFSC: Use generic rate estimator Thomas Graf
2004-10-21 12:51 ` [PATCH 15/16] HFSC: Use dump_stats for class statistics dumping Thomas Graf
2004-10-21 12:52 ` [PATCH 16/16] ATM: Use gnet_stats for class statistics and dump them Thomas Graf
2004-10-21 15:42   ` [RESEND " Thomas Graf
2004-10-21 19:42 ` [PATCH] iproute2: support generic statistics and add requeues statistics Thomas Graf
2004-10-22  5:48 ` [PATCHSET 0/16] More gnet_stats conversions David S. Miller
2004-10-22 11:08   ` jamal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041021123452.GG21977@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=hadi@cyberus.ca \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).