iproute2: tc - update cake support
authorKevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
Mon, 19 Dec 2016 09:13:42 +0000 (09:13 +0000)
committerJohn Crispin <john@phrozen.org>
Tue, 20 Dec 2016 08:35:36 +0000 (09:35 +0100)
Update tc to track upstream cake changes:

diffserv3 - a simple 3 tin classifier

Also make diffserv3 and triple-isolate default

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
package/network/utils/iproute2/Makefile
package/network/utils/iproute2/patches/950-add-cake-to-tc.patch

index d14756792906563d008efa88046609da0acda066..620cce22a05f66ae7f2d4c05cad5cbd541125ca0 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=iproute2
 PKG_VERSION:=4.4.0
-PKG_RELEASE:=5
+PKG_RELEASE:=6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/net/iproute2
index d0fc66daaaa9832cd1b35fb1922870e16acb6722..6c73fbaf25cf9b0fda93e959b822917c268a66ba 100644 (file)
@@ -1,5 +1,3 @@
-diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
-index 8d2530d..028b83c 100644
 --- a/include/linux/pkt_sched.h
 +++ b/include/linux/pkt_sched.h
 @@ -850,4 +850,59 @@ struct tc_pie_xstats {
@@ -62,8 +60,6 @@ index 8d2530d..028b83c 100644
 +};
 +
  #endif
-diff --git a/tc/Makefile b/tc/Makefile
-index 56acbaa..d421b8e 100644
 --- a/tc/Makefile
 +++ b/tc/Makefile
 @@ -63,6 +63,7 @@ TCMODULES += q_codel.o
@@ -74,12 +70,9 @@ index 56acbaa..d421b8e 100644
  TCMODULES += q_hhf.o
  TCMODULES += e_bpf.o
  
-diff --git a/tc/q_cake.c b/tc/q_cake.c
-new file mode 100644
-index 0000000..14e5aab
 --- /dev/null
 +++ b/tc/q_cake.c
-@@ -0,0 +1,654 @@
+@@ -0,0 +1,663 @@
 +/*
 + * Common Applications Kept Enhanced  --  CAKE
 + *
@@ -135,8 +128,8 @@ index 0000000..14e5aab
 +{
 +      fprintf(stderr, "Usage: ... cake [ bandwidth RATE | unlimited* | autorate_ingress ]\n"
 +                      "                [ rtt TIME | datacentre | lan | metro | regional | internet* | oceanic | satellite | interplanetary ]\n"
-+                      "                [ besteffort | precedence | diffserv8 | diffserv4* ]\n"
-+                      "                [ flowblind | srchost | dsthost | hosts | flows* | dual-srchost | dual-dsthost | triple-isolate ] [ nat | nonat* ]\n"
++                      "                [ besteffort | precedence | diffserv8 | diffserv4 | diffserv-llt | diffserv3* ]\n"
++                      "                [ flowblind | srchost | dsthost | hosts | flows | dual-srchost | dual-dsthost | triple-isolate* ] [ nat | nonat* ]\n"
 +                      "                [ ptm | atm | noatm* ] [ overhead N | conservative | raw* ]\n"
 +                      "                [ wash | nowash* ]\n"
 +                      "                [ memlimit LIMIT ]\n"
@@ -224,6 +217,8 @@ index 0000000..14e5aab
 +                      diffserv = 4;
 +              } else if (strcmp(*argv, "diffserv-llt") == 0) {
 +                      diffserv = 5;
++              } else if (strcmp(*argv, "diffserv3") == 0) {
++                      diffserv = 6;
 +
 +              } else if (strcmp(*argv, "nowash") == 0) {
 +                      wash = 0;
@@ -472,6 +467,9 @@ index 0000000..14e5aab
 +              case 5:
 +                      fprintf(f, "diffserv-llt ");
 +                      break;
++              case 6:
++                      fprintf(f, "diffserv3 ");
++                      break;
 +              default:
 +                      fprintf(f, "(?diffserv?) ");
 +                      break;
@@ -621,6 +619,10 @@ index 0000000..14e5aab
 +                      fprintf(f, " capacity estimate: %s\n", sprint_rate(stnc->capacity_estimate, b1));
 +
 +              switch(stnc->tin_cnt) {
++              case 3:
++                      fprintf(f, "                 Bulk   Best Effort      Voice\n");
++                      break;
++
 +              case 4:
 +                      fprintf(f, "                 Bulk   Best Effort      Video       Voice\n");
 +                      break;