From 26d5dcc91e9bbf92a28892382094022997d07b5a Mon Sep 17 00:00:00 2001 From: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Date: Tue, 26 Jan 2016 13:49:59 +0000 Subject: Add simple VxLAN decapsulation performance test Measure OVS DPDK VXLAN decapsulation performance. The DUT is configured as a VTEP (VXLAN Tunnel Endpoint) which performs decapsulation of frames and sends traffic to the 2nd traffic generator port. This test is unidirectional. Recent changes: * Userguide update * Move src/dstport from L2 to L4 (conf, TCL) * Fix 'TestCase' object has no attribute '_tunnel_operation' error when running non overlay tests * Fix merge conflict * Move doc to docs/userguide/integration.rst * Add setting of DUT_NIC1_MAC and setting of other variables to docs/userguide/integration.rst Change-Id: Ia44f8888ef727831543c80f5c98c866686c5c92c JIRA: VSPERF-190 Signed-off-by: Dino Simeon Madarang <dino.simeonx.madarang@intel.com> Signed-off-by: Robert Wojciechowicz <robertx.wojciechowicz@intel.com> Signed-off-by: Timo Puha <timox.puha@intel.com> Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com> Reviewed-by: Billy O Mahony <billy.o.mahony@intel.com> Reviewed-by: Martin Klozik <martinx.klozik@intel.com> Reviewed-by: Al Morton <acmorton@att.com> Reviewed-by: Brian Castelli <brian.castelli@spirent.com --- tools/pkt_gen/ixia/pass_fail.tcl | 42 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'tools/pkt_gen/ixia') diff --git a/tools/pkt_gen/ixia/pass_fail.tcl b/tools/pkt_gen/ixia/pass_fail.tcl index e10b393c..acb4443f 100755 --- a/tools/pkt_gen/ixia/pass_fail.tcl +++ b/tools/pkt_gen/ixia/pass_fail.tcl @@ -1,7 +1,7 @@ #!/usr/bin/env tclsh # Copyright (c) 2014, Ixia -# Copyright (c) 2015, Intel Corporation +# Copyright (c) 2015-2016, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -246,18 +246,24 @@ proc sendTraffic { flowSpec trafficSpec } { # extract nested dictionaries set trafficSpec_l2 [dict get $trafficSpec l2] set trafficSpec_l3 [dict get $trafficSpec l3] + set trafficSpec_l4 [dict get $trafficSpec l4] set trafficSpec_vlan [dict get $trafficSpec vlan] set frameSize [dict get $trafficSpec_l2 framesize] set srcMac [dict get $trafficSpec_l2 srcmac] set dstMac [dict get $trafficSpec_l2 dstmac] - set srcPort [dict get $trafficSpec_l2 srcport] - set dstPort [dict get $trafficSpec_l2 dstport] + set srcPort [dict get $trafficSpec_l4 srcport] + set dstPort [dict get $trafficSpec_l4 dstport] set proto [dict get $trafficSpec_l3 proto] set srcIp [dict get $trafficSpec_l3 srcip] set dstIp [dict get $trafficSpec_l3 dstip] + if {[dict exists $trafficSpec_l3 protocolpadbytes]} { + set protocolPad [dict get $trafficSpec_l4 protocolpad] + set protocolPadBytes [dict get $trafficSpec_l4 protocolpadbytes] + } + set vlanEnabled [dict get $trafficSpec_vlan enabled] if {$vlanEnabled == 1 } { # these keys won't exist if vlan wasn't enabled @@ -306,6 +312,10 @@ proc sendTraffic { flowSpec trafficSpec } { protocol config -enable802dot1qTag vlanSingle } + if {[info exists protocolPad]} { + protocol config -enableProtocolPad $protocolPad + } + ip setDefault ip config -ipProtocol ipV4Protocol[string totitle $proto] ip config -checksum "f6 75" @@ -328,6 +338,26 @@ proc sendTraffic { flowSpec trafficSpec } { errorMsg "Error calling $proto set $::chassis $::card $::port" } + if {[info exists protocolPad]} { + protocolPad setDefault + # VxLAN header with VNI 99 (0x63) + # Inner SRC 01:02:03:04:05:06 + # Inner DST 06:05:04:03:02:01 + # IP SRC 192.168.0.2 + # IP DST 192.168.240.9 + # SRC port 3000 (0x0BB8) + # DST port 3001 (0x0BB9) + # length 26 + # UDP Checksum 0x2E93 + + # From encap case capture + protocolPad config -dataBytes "$protocolPadBytes" + if {[protocolPad set $::chassis $::card $::port1]} { + errorMsg "Error calling protocolPad set $::chassis $::card $::port" + set retCode $::TCL_ERROR + } + } + if {$vlanEnabled == 1 } { vlan setDefault vlan config -vlanID $vlanId @@ -392,9 +422,15 @@ proc sendTraffic { flowSpec trafficSpec } { udp setDefault udp config -sourcePort $srcPort udp config -destPort $dstPort + set packetSize [dict get $trafficSpec_l3 packetsize] + stream config -framesize $packetSize if {[udp set $::chassis $::card $::port1]} { errorMsg "Error setting udp on port $::chassis.$::card.$::port1" } + errorMsg "frameSize: $frameSize, packetSize: $packetSize, srcMac: $srcMac, dstMac: $dstMac, srcPort: $srcPort, dstPort: $dstPort" + if {[info exists protocolPad]} { + errorMsg "protocolPad: $protocolPad, protocolPadBytes: $protocolPadBytes" + } } if {[stream set $::chassis $::card $::port1 $streamId]} { -- cgit