Skip to contentSkip to conversation

tcng and network processor

LARTC Jacob Teplitsky 1 participant 1 message Feb 15, 2003

lore
Share & tools
lore
#0 lore raw

Hi Chris,
Did find and read docs in tcng/doc ?

We are using tcng external interface to translate something like this:

=================================
/*
* diffserv.tc
*
* Written 2002 by Jacob Teplitsky
* Copyright 2002 Bivio Networks
*/

/*
* Classification:
* - static classification by DSCP
*
* Queuing:
* - traffic selected by static classification:
* EF:
* policed by SLB, and transmitted unshaped.

 *    AF:
 *    - nr_wfq
 *    - GRED for each AF level
 *    - DSMARK implementing marking (AF33 -> AF32 and AF43 -> AF42)

* - other traffic:
* - RED
*/

$ef_rate = 25 Mbps;
$af_rate = 100 Mbps;

dev "s0e0" {
    egress {
	/* Expedited Forwarding, RFC2598 */
	$ef_pol = SLB(cir $ef_rate,cbs 100 kB);
	class (<$ef>) if ip_dscp = 0b101110 && SLB_else_drop($ef_pol);

	/* Assured Forwarding, RFC2597 */
	class (<$af11>) if ip_dscp = 0b001010;
	class (<$af12>) if ip_dscp = 0b001100;
	class (<$af13>) if ip_dscp = 0b001110;
	class (<$af21>) if ip_dscp = 0b010010;
	class (<$af22>) if ip_dscp = 0b010100;
	class (<$af23>) if ip_dscp = 0b010110;
	class (<$af31>) if ip_dscp = 0b011010;
	class (<$af32>) if ip_dscp = 0b011100;
	class (<$af33>,set_dscp(0b011100))
			if ip_dscp = 0b011110;
	class (<$af41>) if ip_dscp = 0b100010;
	class (<$af42>) if ip_dscp = 0b100100;
	class (<$af43>,set_dscp(0b100100))
			if ip_dscp = 0b100110;

	/* Best Effort */
	class (<$be>) if 1;

	nr_cbr {
	    $ef = class (rate 2 Gbps, bounded,prio 1) {
		fifo;
	    }
	    class (rate $af_rate,bounded,prio 1) {
		nr_wfq {
		    nr_wfq_class(weight 2) {
			nr_gred (min 6kB,max 18kB,limit 20kB) {
			    $af11 = class (probability 0.1);
			    $af12 = class (probability 0.2);
			    $af13 = class (probability 0.4,default);
			}
		    }	
		    nr_wfq_class(weight 1) {
			nr_gred (min 8kB,max 24kB,limit 50kB) {
			    $af21 = class (probability 0.1);
			    $af22 = class (probability 0.2);
			    $af23 = class (probability 0.4,default);
			}
		    }
		    nr_wfq_class(weight 3) {
			nr_gred (min 8kB,max 24kB,limit 100kB) {
			    $af31 = class (probability 0.1);
			    $af32 = class (probability 0.2);
			    $af33 = class (probability 0.4,default);
			}
		    }
		    nr_wfq_class(weight 1) {
			nr_gred (min 8kB,max 24kB,limit 100kB) {
			    $af41 = class (probability 0.1);
			    $af42 = class (probability 0.2);
			    $af43 = class (probability 0.4,default);
			}
		    }
		}
	    }
	    $be = class (rate 100MBps,prio 2) { /* rate is ignored */
		fifo;
	    }
	}
    }
}

==================================== to:
===================================# b300
bucket 1 = 3125000 0 102400 102400 0
block s0e0 egress
qdisc 3 = fifo
qdisc 5 = gred bandwidth 0 default 2
class 0 = avpkt 1 burst 0 limit 20480 max 18432 min 6144 probability 100000
class 1 = avpkt 1 burst 0 limit 20480 max 18432 min 6144 probability 200000
class 2 = avpkt 1 burst 0 limit 20480 max 18432 min 6144 probability 400000
qdisc 6 = gred bandwidth 0 default 2
class 0 = avpkt 1 burst 0 limit 51200 max 24576 min 8192 probability 100000
class 1 = avpkt 1 burst 0 limit 51200 max 24576 min 8192 probability 200000
class 2 = avpkt 1 burst 0 limit 51200 max 24576 min 8192 probability 400000
qdisc 7 = gred bandwidth 0 default 2
class 0 = avpkt 1 burst 0 limit 102400 max 24576 min 8192 probability 100000
class 1 = avpkt 1 burst 0 limit 102400 max 24576 min 8192 probability 200000
class 2 = avpkt 1 burst 0 limit 102400 max 24576 min 8192 probability 400000
qdisc 8 = gred bandwidth 0 default 2
class 0 = avpkt 1 burst 0 limit 102400 max 24576 min 8192 probability 100000
class 1 = avpkt 1 burst 0 limit 102400 max 24576 min 8192 probability 200000
class 2 = avpkt 1 burst 0 limit 102400 max 24576 min 8192 probability 400000
qdisc 4 = prio bands 4
class 1 = qdisc 5 pragma weight=2.000000
class 2 = qdisc 6 pragma weight=1.000000
class 3 = qdisc 7 pragma weight=3.000000
class 4 = qdisc 8 pragma weight=1.000000
qdisc 9 = fifo
qdisc 2 = cbq
class 0 = allot 1 avpkt 1 bandwidth 2147483647 maxburst 1 rate 2147483647
class 1 = allot 1 avpkt 1 bandwidth 2147483647 bounded 1 maxburst 1 parent 0 prio 1 qdisc 3 rate 250000000 class 2 = allot 1 avpkt 1 bandwidth 2147483647 bounded 1 maxburst 1 parent 0 prio 1 qdisc 4 rate 12500000 class 3 = allot 1 avpkt 1 bandwidth 2147483647 maxburst 1 parent 0 prio 2 qdisc 9 rate 100000000 qdisc 1 = dsmark indices 512
class 0 = qdisc 2
class 128 class 272 class 273 class 274 class 288 class 289 class 290 class 304 class 305 class 306 = mask 3 value 112 class 320 class 321 class 322 = mask 3 value 144
class 384 action 128 = class 1:384,2:3
action 66 = class 1:322,2:2,4:4,8:2
action 65 = class 1:321,2:2,4:4,8:1
action 64 = class 1:320,2:2,4:4,8:0
action 50 = class 1:306,2:2,4:3,7:2
action 49 = class 1:305,2:2,4:3,7:1
action 48 = class 1:304,2:2,4:3,7:0
action 34 = class 1:290,2:2,4:2,6:2
action 33 = class 1:289,2:2,4:2,6:1
action 32 = class 1:288,2:2,4:2,6:0
action 18 = class 1:274,2:2,4:1,5:2
action 17 = class 1:273,2:2,4:1,5:1
action 16 = class 1:272,2:2,4:1,5:0
action 0 = drop
action 1 = class 1:128,2:1
action 2 = count 1 action 1
action 3 = conform 1 action 2 action 0
match 0:152:6=0x2E action 3
match 0:152:6=0x0A action 16
match 0:152:6=0x0C action 17
match 0:152:6=0x0E action 18
match 0:152:6=0x12 action 32
match 0:152:6=0x14 action 33
match 0:152:6=0x16 action 34
match 0:152:6=0x1A action 48
match 0:152:6=0x1C action 49
match 0:152:6=0x1E action 50
match 0:152:6=0x22 action 64
match 0:152:6=0x24 action 65
match 0:152:6=0x26 action 66
match action 128
# END
==================================
Then we use set of routines:
tcng/lib/tcng/include/tccext.h to parse the tccext output
and download the config into our NP.
However, we are not using Intel IXP1200 NP

Thanks
- Jacob

Quoted 17 lines

From: "Chris Clark" <[email protected]>
Subject: RE: [LARTC] tcng and network processor

I see that Bivio uses a network processor with TCNG, but I can't find any more details... There are no whitepapers on the website.

Werner (or anyone else at Bivio), are you able to provide any details?

-----Original Message-----

I am considering a project to translate tcc output (C code or external interface) to network processor code, so that the NP can do the actual traffic shaping. I have a platform using the Intel IXP1200 NP on a PCI card, which functions as a NIC for the host PC running Linux. This approach would reduce the processing load on the host.

Quoted 9 lines

Has anyone attempted anything like this?

I have never used tcng before, but I have been reading all of the available documentation. Is there anything that I should know about tcc or its output before I attempt this?

Thanks,
Chris

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/