Romulo Curty Cerqueira
2004-Sep-06 18:55 UTC
example/dsmark+policing => tcsim outputs are different
Hi folks I have created a script file (dsmark+policing.sh attached) to check graphic an text outputs of simutations, against original examples/dsmark+policing coding (see TCNG Reference Manual-pg.90). It uses tcng coding (*.tcsim file attached) and old tc coding (*.tcsim_old file attached) inserted in tcsim files. Observation 1: The graphic outputs from (*.tc included in *.tcsim) and (*.tc_old included in *.tcsim_old) are a little bit different.> Question 1: Is it expected to see exactly the same graphical output fortcng coding or old tc coding included in tcsim files ? Observation 2: The text outputs (dsmark+policing.output attached) from dsmark+policing.tcsim and examples/dsmark+policing are different to each other.> Question 2: Where are tos=0x01 or tos=0xb8 traffic in mydsmark+policing.tcsim output? (We can see these traffics in the output from the original dsmark+policing !)> Question 3: Why packet size is 988 bytes in my dsmark+policing.tcsimoutput? Obs.: a) tcng version 9m + iproute2/tc version 2.4.7-now-ss020116-try + Linux kernel 2.5.4 b) Running at a machine with SuSE Linux Professional 9.1 - kernel 2.6.4-52 Thanks in advance :-) Romulo Curty Cerqueira < curty@ieee.org >>>> ---------- start of dsmark+policing.tc file ----------/* * dsmark+policing - Dsmark with tcindex and policing * * Packets with non-zero TOS/DS field are marked with TOS 0xb8 (EF DSCP). * If they exceed the rate limit, they''re dropped. */ #define LIMIT 1Mbps #define BURST 10kB #define MTU 1500B dev "eth0" { dsmark (indices 64,set_tc_index) { class (0) on tcindex(mask 0xff,pass_on) element (0); class (1,mask 0,value 0xb8) on tcindex(mask 0) element (0) police (rate LIMIT,burst BURST,mtu MTU) drop; } }>>> ---------- end of dsmark+policing.tc file ---------->>> ---------- start of dsmark+policing.tc_old file: ----------# === Device eth0 == tc qdisc add dev eth0 handle 1:0 root dsmark indices 64 set_tc_index tc class change dev eth0 classid 1:1 dsmark mask 0x0 value 0xb8 tc filter add dev eth0 parent 1:0 protocol all prio 1 tcindex mask 0xff pass_on tc filter add dev eth0 parent 1:0 protocol all prio 1 handle 0 tcindex classid 1:0 tc filter add dev eth0 parent 1:0 protocol all prio 2 tcindex mask 0x0 tc filter add dev eth0 parent 1:0 protocol all prio 2 handle 0 tcindex classid 1:1 police index 1 rate 125000bps burst 10240 action drop/pass>>> ---------- end of dsmark+policing.tc_old file: ---------->>> ---------- start of dsmark+policing.tcsim file: ----------/* * dsmark+policing - Dsmark with tcindex and policing * * Packets with non-zero TOS/DS field are marked with TOS 0xb8 (EF DSCP). * If they exceed the rate limit, they''re dropped. */ #define TOS_ZERO UDP_HDR($ip_tos=0) #define TOS_NONZERO UDP_HDR($ip_tos=1) #define PAYLOAD 0 x 980 /* 1000-sizeof(iphdr) = 980 bytes */ dev eth0 10000 { /* 10 Mbps */ #include "dsmark+policing.tc" } every 0.005s send TOS_ZERO PAYLOAD /* 1.6 Mbps */ every 0.005s send TOS_NONZERO PAYLOAD /* 1.6 Mbps */ time 2s end>>> ---------- end of dsmark+policing.tcsim file: ---------->>> ---------- start of dsmark+policing.tcsim_old file: ----------/* * dsmark+policing - Dsmark with tcindex and policing * * Packets with non-zero TOS/DS field are marked with TOS 0xb8 (EF DSCP). * If they exceed the rate limit, they''re dropped. */ #define TOS_ZERO UDP_HDR($ip_tos=0) #define TOS_NONZERO UDP_HDR($ip_tos=1) #define PAYLOAD 0 x 980 /* 1000-sizeof(iphdr) = 980 bytes */ dev eth0 10000 /* 10 Mbps */ #include "dsmark+policing.tc_old" every 0.005s send TOS_ZERO PAYLOAD /* 1.6 Mbps */ every 0.005s send TOS_NONZERO PAYLOAD /* 1.6 Mbps */ time 1s end>>> ---------- end of dsmark+policing.tcsim_old file: ---------->>> ---------- start of dsmark+policing.sh file: ----------#!/bin/sh -e echo " > *.tc_old file will be generated" /home/x0gj/tcng/bin/tcc /home/x0gj/ProQoS/Linux/tcsim/exemplos_do_romulo/dsmark+policing.tc > /home/x0gj/ProQoS/Linux/tcsim/exemplos_do_romulo/dsmark+policing.tc_old echo " > *.tc_old file has been generated" echo " > graphic output by tcng coding will be generated" /home/x0gj/tcng/bin/tcsim /home/x0gj/ProQoS/Linux/tcsim/exemplos_do_romulo/dsmark+policing.tcsim | /home/x0gj/tcng/bin/tcsim_filter tos | /home/x0gj/tcng/bin/tcsim_plot echo " > graphic output by tcng coding has been generated" echo " > graphic output by tc_old coding will be generated" /home/x0gj/tcng/bin/tcsim /home/x0gj/ProQoS/Linux/tcsim/exemplos_do_romulo/dsmark+policing.tcsim_old | /home/x0gj/tcng/bin/tcsim_filter tos | /home/x0gj/tcng/bin/tcsim_plot echo " > graphic output by tc_old coding has been generated" echo "" echo " > tcsim simulator output with tcng code inserted:" echo "" echo " > text output by tcng coding will be generated" /home/x0gj/tcng/bin/tcsim /home/x0gj/ProQoS/Linux/tcsim/exemplos_do_romulo/dsmark+policing.tcsim | /home/x0gj/tcng/bin/tcsim_filter tos | sed 10q echo " > text output by tcng coding has been generated" #/home/x0gj/tcng/bin/tcsim /home/x0gj/ProQoS/Linux/tcsim/exemplos_do_romulo/dsmark+policing.tcsim | /home/x0gj/tcng/bin/tcsim_filter tos echo "" echo "" echo " > tcsim simulator output with old iproute2/tc code inserted:" echo "" echo " > text output by tc_old coding will be generated" /home/x0gj/tcng/bin/tcsim /home/x0gj/ProQoS/Linux/tcsim/exemplos_do_romulo/dsmark+policing.tcsim_old | /home/x0gj/tcng/bin/tcsim_filter tos | sed 10q echo " > text output by tc_old coding has been generated" echo "" echo "" echo "" echo " > tcsim simulator output with original examples/dsmark_policing coding (see TCNG Reference Manual-pg.90):" echo "" echo " > text output by original examples/dsmark_policing coding will be generated" /home/x0gj/tcng/bin/tcsim /home/x0gj/tcng/examples/dsmark+policing | /home/x0gj/tcng/bin/tcsim_filter tos | sed 10q echo " > text output by original examples/dsmark_policing coding has been be generated" echo "">>> ---------- end of dsmark+policing.sh file: ---------->>> ---------- start of dsmark+policing.output file: ----------...> tcsim simulator output with tcng code inserted:> text output by tcng coding will be generated0.000000 E:00 988 0x80b2ac8 0.000000 D:00 988 0x80b2ac8 0.000000 E:00 988 0x80b26d0 0.000790 D:00 988 0x80b26d0 0.005000 E:00 988 0x80b2ac8 0.005000 D:00 988 0x80b2ac8 0.005000 E:00 988 0x80b26d0 0.005790 D:00 988 0x80b26d0 0.010000 E:00 988 0x80b2ac8 0.010000 D:00 988 0x80b2ac8> text output by tcng coding has been generated> tcsim simulator output with old iproute2/tc code inserted:> text output by tc_old coding will be generated0.000000 E:00 988 0x80b82c8 0.000000 D:00 988 0x80b82c8 0.000000 E:00 988 0x80b83a0 0.000790 D:00 988 0x80b83a0 0.005000 E:00 988 0x80b82c8 0.005000 D:00 988 0x80b82c8 0.005000 E:00 988 0x80b83a0 0.005790 D:00 988 0x80b83a0 0.010000 E:00 988 0x80b82c8 0.010000 D:00 988 0x80b82c8> text output by tc_old coding has been generated> tcsim simulator output with original examples/dsmark_policing coding (seeTCNG Reference Manual-pg.90):> text output by original examples/dsmark_policing coding will be generated0.000000 E:00 1000 0x80b6128 0.000000 D:00 1000 0x80b6128 0.000000 E:01 1000 0x80b6200 0.000800 D:b8 1000 0x80b6200 0.005000 E:00 1000 0x80b6128 0.005000 D:00 1000 0x80b6128 0.005000 E:01 1000 0x80b6200 0.005800 D:b8 1000 0x80b6200 0.010000 E:00 1000 0x80b6128 0.010000 D:00 1000 0x80b6128> text output by original examples/dsmark_policing coding has been begenerated>>> ---------- end of dsmark+policing.output file: ----------_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/