aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pkt_gen/prox/files
diff options
context:
space:
mode:
Diffstat (limited to 'tools/pkt_gen/prox/files')
-rw-r--r--tools/pkt_gen/prox/files/format.yaml105
-rw-r--r--tools/pkt_gen/prox/files/helper.lua77
-rw-r--r--tools/pkt_gen/prox/files/machine.map14
-rw-r--r--tools/pkt_gen/prox/files/vineperf-baremetal.cfg68
4 files changed, 264 insertions, 0 deletions
diff --git a/tools/pkt_gen/prox/files/format.yaml b/tools/pkt_gen/prox/files/format.yaml
new file mode 100644
index 00000000..6b501040
--- /dev/null
+++ b/tools/pkt_gen/prox/files/format.yaml
@@ -0,0 +1,105 @@
+;Format: PushGateway
+;Format: Xtesting
+;URL:
+ part1: http://testresults.opnfv.org/test/api/v1/results
+;URL:
+ part1: http://192.168.36.61:9091/metrics/job/
+ part2: test
+ part3: /instance/
+ part4: environment_file
+;FlowsizeTest:
+ Flows: Flows
+ Size: Size
+ RequestedSpeed: RequestedSpeed
+ CoreGenerated: pps_req_tx
+ SentByNIC: pps_tx
+ FwdBySUT: pps_sut_tx
+ RevByCore: pps_rx
+ AvgLatency: lat_avg
+ PCTLatency: lat_perc
+ MinLatency: lat_min
+ MaxLatency: lat_max
+ Sent: abs_tx
+ Received: abs_rx
+ Lost: abs_dropped
+ Misordered: mis_ordered
+ Extent: extent
+ Duplicated: duplicate
+FlowSizeTest:
+ Environment: environment_file
+ Test: test
+ Flows: Flows
+ Size: Size
+ Speed (Mpps):
+ RequestedSpeed: RequestedSpeed
+ CoreGenerated: pps_req_tx
+ SentByNIC: pps_tx
+ FwdBySUT: pps_sut_tx
+ RevByCore: pps_rx
+ Latency (usec):
+ AvgLatency: lat_avg
+ PCTLatency: lat_perc
+ MinLatency: lat_min
+ MaxLatency: lat_max
+ Distribution:
+ bucket_size: bucket_size
+ buckets: buckets
+ Absolute Packet Count:
+ Sent: abs_tx
+ Received: abs_rx
+ Lost: abs_dropped
+ Re-ordering:
+ Misordered: mis_ordered
+ Extent: extent
+ Duplicated: duplicate
+IrqTest:
+ Environment: environment_file
+ Test: test
+ Buckets: buckets
+ Machine_data: machine_data
+ImpairTest:
+ Environment: environment_file
+ Test: test
+ Flows: Flows
+ Size: Size
+ Speed (Mpps):
+ RequestedSpeed: RequestedSpeed
+ CoreGenerated: pps_req_tx
+ SentByNIC: pps_tx
+ FwdBySUT: pps_sut_tx
+ RevByCore: pps_rx
+ Latency (usec):
+ AvgLatency: lat_avg
+ PCTLatency: lat_perc
+ MinLatency: lat_min
+ MaxLatency: lat_max
+ Distribution:
+ bucket_size: bucket_size
+ buckets: buckets
+ Absolute Packet Count:
+ Sent: abs_tx
+ Received: abs_rx
+ Lost: abs_dropped
+ Re-ordering:
+ Misordered: mis_ordered
+ Extent: extent
+ Duplicated: duplicate
+CoreStatsTest:
+ Environment: environment_file
+ Test: test
+ PROXID: PROXID
+ StepSize: StepSize
+ Received: Received
+ Sent: Sent
+ NonDPReceived: NonDPReceived
+ NonDPSent: NonDPSent
+ Dropped: Dropped
+PortStatsTest:
+ Environment: environment_file
+ Test: test
+ PROXID: PROXID
+ StepSize: StepSize
+ Received: Received
+ Sent: Sent
+ NoMbufs: NoMbufs
+ iErrMiss: iErrMiss
diff --git a/tools/pkt_gen/prox/files/helper.lua b/tools/pkt_gen/prox/files/helper.lua
new file mode 100644
index 00000000..1b4c657b
--- /dev/null
+++ b/tools/pkt_gen/prox/files/helper.lua
@@ -0,0 +1,77 @@
+--
+-- Copyright (c) 2020 Intel Corporation
+--
+-- 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.
+--
+
+function convertIPToHex(ip)
+ local address_chunks = {}
+ if type(ip) ~= "string" then
+ print ("IP ADDRESS ERROR: ", ip)
+ return "IP ADDRESS ERROR"
+ end
+
+ local chunks = {ip:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)(\/%d+)$")}
+ if #chunks == 5 then
+ for i,v in ipairs(chunks) do
+ if i < 5 then
+ if tonumber(v) > 255 then
+ print ("IPV4 ADDRESS ERROR: ", ip)
+ return "IPV4 ADDRESS ERROR"
+ end
+ address_chunks[#address_chunks + 1] = string.format ("%02x", v)
+ end
+ end
+ result = table.concat(address_chunks, " ")
+ print ("Hex IPV4: ", result)
+ return result
+ end
+
+ local chunks = {ip:match("^(%d+)%.(%d+)%.(%d+)%.(%d+)$")}
+ if #chunks == 4 then
+ for i,v in ipairs(chunks) do
+ if tonumber(v) > 255 then
+ print ("IPV4 ADDRESS ERROR: ", ip)
+ return "IPV4 ADDRESS ERROR"
+ end
+ address_chunks[#address_chunks + 1] = string.format ("%02x", v)
+ end
+ result = table.concat(address_chunks, " ")
+ print ("Hex IPV4: ", result)
+ return result
+ end
+
+ delimiter = ":"
+ for match in (ip..delimiter):gmatch("(.-)"..delimiter) do
+ if match ~= "" then
+ number = tonumber(match, 16)
+ if number <= 65535 then
+ table.insert(address_chunks, string.format("%02x %02x",number/256,number % 256))
+ end
+ else
+ table.insert(address_chunks, "")
+ end
+ end
+ for i, chunk in ipairs(address_chunks) do
+ if chunk =="" then
+ table.remove(address_chunks, i)
+ for j = 1,(8-#address_chunks) do
+ table.insert(address_chunks, i, "00 00")
+ end
+ break
+ end
+ end
+ result = table.concat(address_chunks, " ")
+ print ("Hex IPV6: ", result)
+ return result
+end
diff --git a/tools/pkt_gen/prox/files/machine.map b/tools/pkt_gen/prox/files/machine.map
new file mode 100644
index 00000000..2992884e
--- /dev/null
+++ b/tools/pkt_gen/prox/files/machine.map
@@ -0,0 +1,14 @@
+[DEFAULT]
+machine_index=0
+
+[TestM1]
+machine_index=1
+
+[TestM2]
+machine_index=2
+
+[TestM3]
+machine_index=3
+
+[TestM4]
+machine_index=4 \ No newline at end of file
diff --git a/tools/pkt_gen/prox/files/vineperf-baremetal.cfg b/tools/pkt_gen/prox/files/vineperf-baremetal.cfg
new file mode 100644
index 00000000..03299538
--- /dev/null
+++ b/tools/pkt_gen/prox/files/vineperf-baremetal.cfg
@@ -0,0 +1,68 @@
+[lua]
+dofile("params-vineperf.lua")
+
+[eal options]
+-n=4 ; force number of memory channels
+no-output=no ; disable DPDK debug output
+eal=--proc-type auto ${eal}
+
+[port 0]
+name=p0
+rx desc=2048
+tx desc=2048
+vlan=yes
+vdev=gen_tap
+local ipv4= ${local_ip1}
+lsc=no
+
+[port 1]
+name=p1
+rx desc=2048
+tx desc=2048
+vlan=yes
+vdev=rec_tap
+local ipv4=${local_ip2}
+lsc=no
+
+[variables]
+$mbs=8
+
+[defaults]
+mempool size=8K
+
+[global]
+name=${name}
+heartbeat timeout=${heartbeat}
+
+[core $mcore]
+mode=master
+
+[core $gencores]
+name=p0
+task=0
+mode=gen
+tx port=p0
+bps=1250000000
+pkt inline=00 00 00 00 00 00 00 00 00 00 00 00 08 00 45 00 00 2e 00 01 00 00 40 11 f7 7d ${local_hex_ip1} ${local_hex_ip2} 0b b8 0b b9 00 1a 55 7b
+pkt size=60
+min bulk size=$mbs
+max bulk size=16
+drop=yes
+lat pos=42
+accuracy pos=46
+packet id pos=50
+signature=0x98765432
+signature pos=56
+
+[core $latcores]
+name=lat
+task=0
+mode=lat
+rx port=p1
+lat pos=42
+accuracy pos=46
+packet id pos=50
+signature=0x98765432
+signature pos=56
+accuracy limit nsec=1000000
+latency bucket size=${bucket_size_exp}