aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2019-04-03 11:20:06 -0400
committerFlorin Coras <florin.coras@gmail.com>2019-04-11 01:19:56 +0000
commit7c91007e1e13b56a29236bd076891709eaa21754 (patch)
treee6d78635a3b53f6db4b0bfa563d98254c464da6f /extras
parent10dc2eabd6e8a266405aef270a819794a3ddd333 (diff)
Make the loss / delay sim available as an output feature
Add binary api and debug cli support. Rewrite for speed: enqueue vlib_buffer_t's to the wheel, instead of memcpy'ing data. Quad-loop the output feature / x-connect (interior) node. Prefetch wheel entries in the input node. Save packet-generator-based unit-test setup in extras/nsim. Simple config example: set nsim delay 20 ms bandwidth 1 gbit packet-size 1024 nsim output-feature enable-disable GigabitEthernet3/0/0 Change-Id: I852a32d4eb596e7e2aa1d9b30bf3b53525e39fd1 Signed-off-by: Dave Barach <dave@barachs.net>c
Diffstat (limited to 'extras')
-rw-r--r--extras/nsim/setup.nsim25
1 files changed, 25 insertions, 0 deletions
diff --git a/extras/nsim/setup.nsim b/extras/nsim/setup.nsim
new file mode 100644
index 00000000000..999b92a901a
--- /dev/null
+++ b/extras/nsim/setup.nsim
@@ -0,0 +1,25 @@
+set term pag off
+
+loop cre
+
+set int ip address loop0 192.168.2.1/24
+set int state loop0 up
+set nsim delay 20 ms bandwidth 1 gbit packet-size 128
+comment { add drop-fraction 0.8 or some such}
+nsim output-feature enable-disable loop0
+
+packet-generator new {
+ name icmp
+ limit 0
+ size 128-128
+ interface local0
+ node ethernet-input
+ data {
+ IP4: 0001.dead.beef -> 0002.dead.beef
+ ICMP: 192.168.1.2 -> 192.168.2.2
+ incrementing 30
+ }
+}
+
+set int ip address pg0 192.168.1.1/24
+set ip arp loop0 192.168.2.2 0003.dead.beef