delay++ Plugin

<< Comments >>

o This plugin is the plugin chaining version of the delay plugin in
  ../delay/delay.c.  This means that if it is loaded into ME 4, it will
  forward meta-pkts to the QM.  Otherwise, it will forward to ME k+1
  if it is loaded into ME k where k = 0, 1, 2, 3 or 4.
  
<< Function >>

o Delay pkts (default = 50 msec) and forward to ME k+1 if loaded onto ME k
  unless k = 4.  If loaded onto ME 4, forward to QM.
o Can queue atmost 32,000 pkts.  Note at 1 Gbps, and 100 msec delay,
  the BWD = 100 Mb = 12.5 MB = 8,300 max-sized pkts.

<< Control Messages >>

Type	Command Proto	Semantics			Example
set	delay= X	set delay to X msec		IN:  "delay= 100"
							 OUT: "100"
get	=counts		get counts			IN:  "=counts"
			(npkts, maxinq, ndrops)		 OUT: "37124 221 0"
	=delay		get delay (msec)		IN:  "=delay"
							 OUT: "50"
	=ninq		get ninq (#pkts in queue)	IN:  "=ninq"
							 OUT: "25"
misc	reset		reset counters			IN:  "reset"
			 (npkts, maxinq, ndrops)	 OUT: ""

<< Tested Behavior >>

o Configuration
  - Basic dumbbell topology with traffic going from n1p0 to n2p1 over the
	1.1-2.0 link.
  - Filter at port 1.0 that directs pkt to plugin and then on to default
  	datgram queue (17)
  - Threshold of queue 17 at port 1 set to 1,000,000 bytes
  - Port rate of port 2.2 set to 99.718 Mbps
  - delay++ plugin on NPR 1
o Debug output
  - Change Makefile to define DEBUG1 and compile
  - Turn on debug logging
  - Traffic

	n2p1:	iperf -s -u -w 4m

	n1p0:	iperf -c n2p1 -u -b 1m -t 1

	The debug log file will look like:

		Fri Mar 27 14:19:41 Plugin 3: 0 1574337708 4375000
		Fri Mar 27 14:19:41 Plugin 3: 0 1578712708 4375000
		Fri Mar 27 14:19:41 Plugin 3: 0 1575367301 4375000
		Fri Mar 27 14:19:41 Plugin 3: 0 1579742301 4375000
		...

	The first line shows that for pkt 0:

		tnow = (0 1574337708) ticks
		delay = 4375000 ticks

	The second line shows that for pkt 0:

		tnow = (0 1578712708) ticks = 1,574,337,708 + 4,375,000
		expected 50 msec delay = 4375000 ticks

	The third and fourth lines are from pkt 1.

o ping pkts showing delay is 50 msec
  - Turn off debug logging
  - Loaded into ME 4
  - Loaded into ME 3 with mycount plugin loaded into ME 4

o iperf flow with ping

	n2p1:	iperf -s -u -w 4m

	n1p0:	iperf -c n2p1 -u -b 100m -t 10 &
		ping n2p1
		... ping RTT grows from 50 msec to 130 msec ...
		... iperf output:   793/84745 (0.94%) ...

<< Tests Needed >>

o I haven't tried to load onto MEs 0, 1 or 2 

<< Things To Do >>

o ???

