Skip to contentSkip to conversation

remove old examples

PATCH New Stephen Hemminger 1 participant 4 messages Oct 23, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover remove old examples

Take the old stuff away.

Stephen Hemminger (3):
examples: remove out of date cbq stuff
examples: remove gaiconf
examples: remove diffserv

 examples/README.cbq                  | 122 -----------------
 examples/SYN-DoS.rate.limit          |  49 -------
 examples/cbqinit.eth1                |  76 ----------
 examples/diffserv/Edge1              |  68 ---------
 examples/diffserv/Edge2              |  87 ------------
 examples/diffserv/Edge31-ca-u32      | 170 -----------------------
 examples/diffserv/Edge31-cb-chains   | 132 ------------------
 examples/diffserv/Edge32-ca-u32      | 198 ---------------------------
 examples/diffserv/Edge32-cb-chains   | 144 -------------------
 examples/diffserv/Edge32-cb-u32      | 145 --------------------
 examples/diffserv/README             |  98 -------------
 examples/diffserv/afcbq              | 105 --------------
 examples/diffserv/ef-prio            |  25 ----
 examples/diffserv/efcbq              |  31 -----
 examples/diffserv/regression-testing | 125 -----------------
 examples/gaiconf                     | 134 ------------------
 16 files changed, 1709 deletions(-)
 delete mode 100644 examples/README.cbq
 delete mode 100644 examples/SYN-DoS.rate.limit
 delete mode 100644 examples/cbqinit.eth1
 delete mode 100644 examples/diffserv/Edge1
 delete mode 100644 examples/diffserv/Edge2
 delete mode 100644 examples/diffserv/Edge31-ca-u32
 delete mode 100644 examples/diffserv/Edge31-cb-chains
 delete mode 100644 examples/diffserv/Edge32-ca-u32
 delete mode 100644 examples/diffserv/Edge32-cb-chains
 delete mode 100644 examples/diffserv/Edge32-cb-u32
 delete mode 100644 examples/diffserv/README
 delete mode 100644 examples/diffserv/afcbq
 delete mode 100644 examples/diffserv/ef-prio
 delete mode 100644 examples/diffserv/efcbq
 delete mode 100644 examples/diffserv/regression-testing
 delete mode 100644 examples/gaiconf
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/3 examples: remove out of date cbq stuff

The examples around cbq are out of date and never updated. There are better ways to achieve same kind of thing with more modern qdisc.

---
 examples/README.cbq         | 122 ------------------------------------
 examples/SYN-DoS.rate.limit |  49 ---------------
 examples/cbqinit.eth1       |  76 ----------------------
 3 files changed, 247 deletions(-)
 delete mode 100644 examples/README.cbq
 delete mode 100644 examples/SYN-DoS.rate.limit
 delete mode 100644 examples/cbqinit.eth1
examples/README.cbq deleted +0 -122
deleted file mode 100644
index 38c1089d1d1e..000000000000
@@ -1,122 +0,0 @@
-# CHANGES
-# -------
-# v0.3a2- fixed bug in "if" operator. Thanks [email protected].
-# v0.3a-  added TIME parameter. Example:
-#         TIME=00:00-19:00;64Kbit/6Kbit
-#         So, between 00:00 and 19:00 RATE will be 64Kbit.
-#         Just start "cbq.init timecheck" periodically from cron (every 10
-#         minutes for example).
-#         !!! Anyway you MUST start "cbq.init start" for CBQ initialize.
-# v0.2 -  Some cosmetique changes. Now it more compatible with
-#         old bash version. Thanks to Stanislav V. Voronyi
-#         <[email protected]>.
-# v0.1 -  First public release
-# 
-# README
-# ------
-# 
-# First of all - this is just a SIMPLE EXAMPLE of CBQ power.
-# Don't ask me "why" and "how" :)
-# 
-# This is an example of using CBQ (Class Based Queueing) and policy-based
-# filter for building smart ethernet shapers. All CBQ parameters are
-# correct only for ETHERNET (eth0,1,2..) linux interfaces. It works for
-# ARCNET too (just set bandwidth parameter to 2Mbit). It was tested
-# on 2.1.125-2.1.129 linux kernels (KSI linux, Nostromo version) and 
-# ip-route utility by A.Kuznetsov (iproute2-ss981101 version). 
-# You can download ip-route from ftp://ftp.inr.ac.ru/ip-routing or
-# get iproute2*.rpm (compiled with glibc) from ftp.ksi-linux.com.
-# 
-# 
-# HOW IT WORKS
-# 
-# Each shaper must be described by config file in $CBQ_PATH
-# (/etc/sysconfig/cbq/) directory - one config file for each CBQ shaper.
-# 
-# Some words about config file name:
-# Each shaper has its personal ID - two byte HEX number. Really ID is 
-# CBQ class.
-# So, filename looks like:
-# 
-# cbq-1280.My_first_shaper
-# ^^^ ^^^  ^^^^^^^^^^^^^
-#  |  |            |______ Shaper name - any word
-#  |  |___________________ ID (0000-FFFF), let ID looks like shaper's rate
-#  |______________________ Filename must begin from "cbq-" 
-# 
-# 
-# Config file describes shaper parameters and source[destination] 
-# address[port].
-# For example let's prepare /etc/sysconfig/cbq/cbq-1280.My_first_shaper:
-# 
-# ----------8<---------------------
-# DEVICE=eth0,10Mbit,1Mbit
-# RATE=128Kbit
-# WEIGHT=10Kbit
-# PRIO=5
-# RULE=192.168.1.0/24
-# ----------8<---------------------
-# 
-# This is minimal configuration, where:
-# DEVICE:  eth0   - device where we do control our traffic
-#          10Mbit - REAL ethernet card bandwidth
-#          1Mbit  - "weight" of :1 class (parent for all shapers for eth0),
-#                   as a rule of thumb weight=batdwidth/10.
-#          100Mbit adapter's example: DEVICE=eth0,100Mbit,10Mbit
-#          *** If you want to build more than one shaper per device it's
-#              enough to describe bandwidth and weight once  - cbq.init
-#              is smart :) You can put only 'DEVICE=eth0' into cbq-* 
-#              config file for eth0.
-# 
-# RATE:    Shaper's speed - Kbit,Mbit or bps (bytes per second)
-# 
-# WEIGHT:  "weight" of shaper (CBQ class). Like for DEVICE - approx. RATE/10
-# 
-# PRIO:    shaper's priority from 1 to 8 where 1 is the highest one.
-#          I do always use "5" for all my shapers.
-# 
-# RULE:    [source addr][:source port],[dest addr][:dest port]
-#          Some examples:
-# RULE=10.1.1.0/24:80         - all traffic for network 10.1.1.0 to port 80
-#                               will be shaped.
-# RULE=10.2.2.5               - shaper works only for IP address 10.2.2.5   
-# RULE=:25,10.2.2.128/25:5000 - all traffic from any address and port 25 to
-#                               address 10.2.2.128 - 10.2.2.255 and port 5000
-#                               will be shaped.
-# RULE=10.5.5.5:80,           - shaper active only for traffic from port 80 of
-#                               address 10.5.5.5
-# Multiple RULE fields per one config file are allowed. For example:
-# RULE=10.1.1.2:80
-# RULE=10.1.1.2:25
-# RULE=10.1.1.2:110
-# 
-# *** ATTENTION!!!
-# All shapers do work only for outgoing traffic!
-# So, if you want to build bidirectional shaper you must set it up for
-# both ethernet card. For example let's build shaper for our linux box like:
-# 
-#                     ---------             192.168.1.1
-# BACKBONE -----eth0-|  linux  |-eth1------*[our client]
-#                     ---------
-# 
-# Let all traffic from backbone to client will be shaped at 28Kbit and
-# traffic from client to backbone - at 128Kbit. We need two config files:
-# 
-# ---8<-----/etc/sysconfig/cbq/cbq-28.client-out----
-# DEVICE=eth1,10Mbit,1Mbit
-# RATE=28Kbit
-# WEIGHT=2Kbit
-# PRIO=5
-# RULE=192.168.1.1
-# ---8<---------------------------------------------
-# 
-# ---8<-----/etc/sysconfig/cbq/cbq-128.client-in----
-# DEVICE=eth0,10Mbit,1Mbit
-# RATE=128Kbit
-# WEIGHT=10Kbit
-# PRIO=5
-# RULE=192.168.1.1,
-# ---8<---------------------------------------------
-#                 ^pay attention to "," - this is source address!
-# 
-# Enjoy.
examples/SYN-DoS.rate.limit deleted +0 -49

49 lines not on this page · raw message

examples/cbqinit.eth1 deleted +0 -76

76 lines not on this page · raw message

Signature · 1 line
2.20.1
#2 lore raw

PATCH 2/3 examples: remove gaiconf

In reply to Stephen Hemminger

The gaiconf script is a workaround for something now handled in distros as part of libc.

---
 examples/gaiconf | 134 -----------------------------------------------
 1 file changed, 134 deletions(-)
 delete mode 100644 examples/gaiconf
examples/gaiconf deleted +0 -134
deleted file mode 100644
index d75292b900cc..000000000000
@@ -1,134 +0,0 @@
-#!/bin/sh
-
-#
-# Setup address label from /etc/gai.conf
-#
-# Written by YOSHIFUJI Hideaki <[email protected]>, 2010.
-#
-
-IP=ip
-DEFAULT_GAICONF=/etc/gai.conf
-verbose=
-debug=
-
-function run ()
-{
-	if [ x"$verbose" != x"" ]; then
-		echo "$@"
-	fi
-	if [ x"$debug" = x"" ]; then
-		"$@"
-	fi
-}
-
-function do_load_config ()
-{
-	file=$1; shift
-	flush=1
-	cat $file | while read command prefix label; do
-		if [ x"$command" = x"#label" ]; then
-			if [ ${flush} = 1 ]; then
-				run ${IP} -6 addrlabel flush
-				flush=0
-			fi
-			run ${IP} -6 addrlabel add prefix $prefix label $label
-		fi
-	done
-}
-
-function do_list_config ()
-{
-	${IP} -6 addrlabel list | while read p pfx l lbl; do
-		echo label ${pfx} ${lbl}
-	done
-}
-
-function help ()
-{
-	echo "Usage: $0 [-v] {--list | --config [ ${DEFAULT_GAICONF} ] | --default}"
-	exit 1
-}
-
-TEMP=`getopt -o c::dlv -l config::,default,list,verbose -n gaiconf -- "$@"`
-
-if [ $? != 0 ]; then
-	echo "Terminating..." >&2
-	exit 1
-fi
-
-TEMPFILE=`mktemp`
-
-eval set -- "$TEMP"
-
-while true ; do
-	case "$1" in
-		-c|--config)
-			if [ x"$cmd" != x"" ]; then
-				help
-			fi
-			case "$2" in
-			"")	gai_conf="${DEFAULT_GAICONF}"
-				shift 2
-				;;
-			*)	gai_conf="$2"
-				shift 2
-			esac
-			cmd=config
-			;;
-		-d|--default)
-			if [ x"$cmd" != x"" ]; then
-				help
-			fi
-			gai_conf=${TEMPFILE}
-			cmd=config
-			;;
-		-l|--list)
-			if [ x"$cmd" != x"" ]; then
-				help
-			fi
-			cmd=list
-			shift
-			;;
-		-v)
-			verbose=1
-			shift
-			;;
-		--)
-			shift;
-			break
-			;;
-		*)
-			echo "Internal error!" >&2
-			exit 1
-			;;
-	esac
-done
-
-case "$cmd" in
-	config)
-		if [ x"$gai_conf" = x"${TEMPFILE}" ]; then
-			sed -e 's/^[[:space:]]*//' <<END_OF_DEFAULT >${TEMPFILE}
-				label ::1/128       0
-				label ::/0          1
-				label 2002::/16     2
-				label ::/96         3
-				label ::ffff:0:0/96 4
-				label fec0::/10     5
-				label fc00::/7      6
-				label 2001:0::/32   7
-END_OF_DEFAULT
-		fi
-		do_load_config "$gai_conf"
-		;;
-	list)
-		do_list_config
-		;;
-	*)
-		help
-		;;
-esac
-
-rm -f "${TEMPFILE}"
-
-exit 0
-
Signature · 1 line
2.20.1
#3 lore raw

PATCH 3/3 examples: remove diffserv

In reply to Stephen Hemminger

The diffserv examples here are out of date and incomplete. Remove them rather than try and fix them.

---
 examples/diffserv/Edge1              |  68 ---------
 examples/diffserv/Edge2              |  87 ------------
 examples/diffserv/Edge31-ca-u32      | 170 -----------------------
 examples/diffserv/Edge31-cb-chains   | 132 ------------------
 examples/diffserv/Edge32-ca-u32      | 198 ---------------------------
 examples/diffserv/Edge32-cb-chains   | 144 -------------------
 examples/diffserv/Edge32-cb-u32      | 145 --------------------
 examples/diffserv/README             |  98 -------------
 examples/diffserv/afcbq              | 105 --------------
 examples/diffserv/ef-prio            |  25 ----
 examples/diffserv/efcbq              |  31 -----
 examples/diffserv/regression-testing | 125 -----------------
 12 files changed, 1328 deletions(-)
 delete mode 100644 examples/diffserv/Edge1
 delete mode 100644 examples/diffserv/Edge2
 delete mode 100644 examples/diffserv/Edge31-ca-u32
 delete mode 100644 examples/diffserv/Edge31-cb-chains
 delete mode 100644 examples/diffserv/Edge32-ca-u32
 delete mode 100644 examples/diffserv/Edge32-cb-chains
 delete mode 100644 examples/diffserv/Edge32-cb-u32
 delete mode 100644 examples/diffserv/README
 delete mode 100644 examples/diffserv/afcbq
 delete mode 100644 examples/diffserv/ef-prio
 delete mode 100644 examples/diffserv/efcbq
 delete mode 100644 examples/diffserv/regression-testing
examples/diffserv/Edge1 deleted +0 -68
deleted file mode 100644
index 4ddffdd195f1..000000000000
@@ -1,68 +0,0 @@
-#! /bin/sh -x
-#
-# sample script on using the ingress capabilities
-# This script just tags on the ingress interfac using Ipchains
-# the result is used for fast classification and re-marking
-# on the egress interface
-#
-#path to various utilities;
-#change to reflect yours.
-#
-IPROUTE=/root/DS-6-beta/iproute2-990530-dsing
-TC=$IPROUTE/tc/tc
-IP=$IPROUTE/ip/ip
-IPCHAINS=/root/DS-6-beta/ipchains-1.3.9/ipchains
-INDEV=eth2
-EGDEV="dev eth1"
-#
-# tag all incoming packets from host 10.2.0.24 to value 1
-# tag all incoming packets from host 10.2.0.3 to value 2
-# tag the rest of incoming packets from subnet 10.2.0.0/24 to value 3
-#These values are used in the egress
-#
-############################################################ 
-$IPCHAINS -A input -s 10.2.0.4/24 -m 3
-$IPCHAINS -A input -i $INDEV -s 10.2.0.24 -m 1
-$IPCHAINS -A input -i $INDEV -s 10.2.0.3 -m 2
-
-######################## Egress side ########################
-
-
-# attach a dsmarker
-#
-$TC qdisc add $EGDEV handle 1:0 root dsmark indices 64 set_tc_index
-#
-# values of the DSCP to change depending on the class
-#
-#becomes EF
-$TC class change $EGDEV classid 1:1 dsmark mask 0x3 \
-       value 0xb8
-#becomes AF11
-$TC class change $EGDEV classid 1:2 dsmark mask 0x3 \
-       value 0x28
-#becomes AF21
-$TC class change $EGDEV classid 1:3 dsmark mask 0x3 \
-       value 0x48
-#
-#
-# The class mapping
-#
-$TC filter add $EGDEV parent 1:0 protocol ip prio 4 handle 1 fw classid 1:1
-$TC filter add $EGDEV parent 1:0 protocol ip prio 4 handle 2 fw classid 1:2
-$TC filter add $EGDEV parent 1:0 protocol ip prio 4 handle 3 fw classid 1:3
-#
-
-#
-echo "---- qdisc parameters Ingress  ----------"
-$TC qdisc ls dev $INDEV
-echo "---- Class parameters Ingress  ----------"
-$TC class ls dev $INDEV
-echo "---- filter parameters Ingress ----------"
-$TC filter ls dev $INDEV parent 1:0
-
-echo "---- qdisc parameters Egress  ----------"
-$TC qdisc ls $EGDEV
-echo "---- Class parameters Egress  ----------"
-$TC class ls $EGDEV
-echo "---- filter parameters Egress ----------"
-$TC filter ls $EGDEV parent 1:0
examples/diffserv/Edge2 deleted +0 -87

87 lines not on this page · raw message

examples/diffserv/Edge31-ca-u32 deleted +0 -170

170 lines not on this page · raw message

examples/diffserv/Edge31-cb-chains deleted +0 -132

132 lines not on this page · raw message

examples/diffserv/Edge32-ca-u32 deleted +0 -198

198 lines not on this page · raw message

examples/diffserv/Edge32-cb-chains deleted +0 -144

144 lines not on this page · raw message

examples/diffserv/Edge32-cb-u32 deleted +0 -145

145 lines not on this page · raw message

examples/diffserv/README deleted +0 -98

98 lines not on this page · raw message

examples/diffserv/afcbq deleted +0 -105

105 lines not on this page · raw message

examples/diffserv/ef-prio deleted +0 -25
deleted file mode 100644
index 48611bdd65e8..000000000000
@@ -1,25 +0,0 @@
-#!/usr/bin/perl
-$TC = "/root/DS-6-beta/iproute2-990530-dsing/tc/tc";
-$DEV = "dev eth1";
-$efrate="1.5Mbit";
-$MTU="1.5kB";
-print "$TC qdisc add $DEV handle 1:0 root dsmark indices 64 set_tc_index\n";
-print "$TC filter add $DEV parent 1:0 protocol ip prio 1 tcindex ".
-  "mask 0xfc shift 2\n";
-print "$TC qdisc add $DEV parent 1:0 handle 2:0 prio\n";
-#
-# EF class: Maximum about one MTU sized packet allowed on the queue
-#
-print "$TC qdisc add $DEV parent 2:1 tbf rate $efrate burst $MTU limit 1.6kB\n";
-print "$TC filter add $DEV parent 2:0 protocol ip prio 1 ".
-	  "handle 0x2e tcindex classid 2:1 pass_on\n";
-#
-# BE class
-#
-print "#BE class(2:2) \n";
-print "$TC qdisc add $DEV parent 2:2 red limit 60KB ".
-	  "min 15KB max 45KB burst 20 avpkt 1000 bandwidth 10Mbit ".
-	  "probability 0.4\n";
-#
-print "$TC filter add $DEV parent 2:0 protocol ip prio 2 ".
-	  "handle 0 tcindex mask 0 classid 2:2 pass_on\n";
examples/diffserv/efcbq deleted +0 -31
deleted file mode 100644
index bcc437b3d229..000000000000
@@ -1,31 +0,0 @@
-#!/usr/bin/perl
-#
-$TC = "/root/DS-6-beta/iproute2-990530-dsing/tc/tc";
-$DEV = "dev eth1";
-print "$TC qdisc add $DEV handle 1:0 root dsmark indices 64 set_tc_index\n";
-print "$TC filter add $DEV parent 1:0 protocol ip prio 1 tcindex ".
-  "mask 0xfc shift 2\n";
-print "$TC qdisc add $DEV parent 1:0 handle 2:0 cbq bandwidth ".
-	"10Mbit cell 8 avpkt 1000 mpu 64\n";
-#
-# EF class
-#
-print "$TC class add $DEV parent 2:0 classid 2:1 cbq bandwidth ". 
-	"10Mbit rate 1500Kbit avpkt 1000 prio 1 bounded isolated ".
-	"allot 1514 weight 1 maxburst 10 \n";
-# packet fifo for EF?
-print "$TC qdisc add $DEV parent 2:1 pfifo limit 5\n";
-print "$TC filter add $DEV parent 2:0 protocol ip prio 1 ".
-	  "handle 0x2e tcindex classid 2:1 pass_on\n";
-#
-# BE class
-#
-print "#BE class(2:2) \n";
-print "$TC class add $DEV parent 2:0 classid 2:2 cbq bandwidth ". 
-	"10Mbit rate 5Mbit avpkt 1000 prio 7 allot 1514 weight 1 ".
-	"maxburst 21 borrow split 2:0 defmap 0xffff \n";
-print "$TC qdisc add $DEV parent 2:2 red limit 60KB ".
-	  "min 15KB max 45KB burst 20 avpkt 1000 bandwidth 10Mbit ".
-	  "probability 0.4\n";
-print "$TC filter add $DEV parent 2:0 protocol ip prio 2 ".
-	  "handle 0 tcindex mask 0 classid 2:2 pass_on\n";
examples/diffserv/regression-testing deleted +0 -125

125 lines not on this page · raw message

Signature · 1 line
2.20.1