summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincenzo Riccobene <vincenzox.m.riccobene@intel.com>2015-12-11 15:13:24 +0000
committerJörgen Karlsson <jorgen.w.karlsson@ericsson.com>2015-12-11 15:26:50 +0000
commitd66678b268c91f411bfcab2a6a759ec4caeabc1a (patch)
treeea48a6b157ba8975007d55bb59c63489e60317c2
parentfc4085f3c62caa32da6f0f7d85d84dcaa0dda6e9 (diff)
Add Constant traffic generation LUA script for DPDK and PCAP files
Inlcude a LUA script that generates constant rate traffic for DPDK pktgen Also include PCAP files of requested size (64, 128, 256, 512, 1024, 1280, 1518) JIRA: YARDSTICK-35 Change-Id: I25c1a6a8763bd14fdf25450619a5e5bbd8e978db Signed-off-by: Vincenzo Riccobene <vincenzox.m.riccobene@intel.com>
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/constant_traffic.lua74
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/igmp.pcapbin0 -> 172 bytes
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1024.pcapbin0 -> 1064 bytes
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_128.pcapbin0 -> 168 bytes
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1280.pcapbin0 -> 1320 bytes
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1514.pcapbin0 -> 1632 bytes
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1518.pcapbin0 -> 1558 bytes
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_256.pcapbin0 -> 295 bytes
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_512.pcapbin0 -> 553 bytes
-rw-r--r--yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_64.pcapbin0 -> 104 bytes
10 files changed, 74 insertions, 0 deletions
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/constant_traffic.lua b/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/constant_traffic.lua
new file mode 100644
index 000000000..3348b286b
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/dpdk_pktgen/constant_traffic.lua
@@ -0,0 +1,74 @@
+-----------------------------------------------------------------------------
+-- Copyright (c) 2015 Intel Research and Development Ireland Ltd.
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+-----------------------------------------------------------------------------
+
+-----------------------------------
+----- Constant traffic sender -----
+-----------------------------------
+
+package.path = package.path ..";?.lua;test/?.lua;app/?.lua;../?.lua"
+require "Pktgen";
+
+----- Packet Gen Configuration
+local sendport = "0";
+pktgen.vlan(sendport, "on");
+pktgen.ping4("all");
+pktgen.icmp_echo("all", "on");
+pktgen.process("all", "on");
+
+
+----- Script Configuration
+local traffic_delay = 0;
+local traffic_rate = 0;
+local out_file = "";
+
+
+function start_traffic(rate)
+ local endStats, diff, prev, iteration, flag, found;
+ flag = false;
+ found = false;
+
+ -- Send traffic at the specified rate
+ print("Start Generation");
+ pktgen.set(sendport, "rate", rate);
+ sleep(1);
+ pktgen.start(sendport);
+ sleep(traffic_delay);
+ pktgen.stop(sendport);
+ print("Stop Generation");
+
+ -- Collect statistics about the experiment
+ endStats = pktgen.portStats("all", "port");
+ sent_packets = endStats[0].opackets
+ return sent_packets;
+end
+
+
+pktgen.clr();
+print("INSTANTIATION VALIDATION TEST")
+
+-- Write output on log file
+file = io.open(out_file, "w");
+
+-- Start experiment
+packets = start_traffic(traffic_rate);
+print("SENT PACKETS: " .. packets);
+file:write(packets);
+
+-- Close the log file
+file:close();
+
+-- Quit the environment
+os.exit(1);
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/igmp.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/igmp.pcap
new file mode 100644
index 000000000..1b8f24b29
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/igmp.pcap
Binary files differ
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1024.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1024.pcap
new file mode 100644
index 000000000..445f05a26
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1024.pcap
Binary files differ
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_128.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_128.pcap
new file mode 100644
index 000000000..df91f9bb9
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_128.pcap
Binary files differ
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1280.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1280.pcap
new file mode 100644
index 000000000..58cb704f9
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1280.pcap
Binary files differ
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1514.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1514.pcap
new file mode 100644
index 000000000..be23d4e96
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1514.pcap
Binary files differ
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1518.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1518.pcap
new file mode 100644
index 000000000..a99c4480a
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_1518.pcap
Binary files differ
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_256.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_256.pcap
new file mode 100644
index 000000000..21c34c2c2
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_256.pcap
Binary files differ
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_512.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_512.pcap
new file mode 100644
index 000000000..8e52ecdd8
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_512.pcap
Binary files differ
diff --git a/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_64.pcap b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_64.pcap
new file mode 100644
index 000000000..9438270bc
--- /dev/null
+++ b/yardstick/vTC/apexlake/experimental_framework/packet_generators/pcap_files/packet_64.pcap
Binary files differ