From b3a7561eca19e19243f71cf74c1b3eaeda740794 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Tue, 24 Oct 2017 09:03:54 +0100 Subject: [PATCH] regression: OVS/DPDK regression tests A set of regression tests for verification of OVS/DPDK features was introduced. Following features are tested: * DPDK NIC Support * DPDK Hotplug Support * RX Checksum Support * Flow Control Support * Multiqueue Support * Vhost User * Virtual Devices Support * NUMA Support * Jumbo Frame Support * Rate Limiting * Quality of Service JIRA: VSPERF-539 Change-Id: I6c83e9c38e29f197a5236ac68c88d7045fef775b Signed-off-by: Martin Klozik Signed-off-by: Martin Goldammer Signed-off-by: Richard Elias Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Sridhar Rao Reviewed-by: Trevor Cooper --- 3rd_party/ixia/ixnetrfc2544v2_random_ip_crc.tcl | 3582 ++++++++++++++++++++++ 3rd_party/ixia/ixnetrfc2544v2_random_udp_crc.tcl | 3582 ++++++++++++++++++++++ conf/integration/01b_dpdk_regression_tests.conf | 1689 ++++++++++ docs/testing/user/userguide/testlist.rst | 281 ++ 4 files changed, 9134 insertions(+) create mode 100755 3rd_party/ixia/ixnetrfc2544v2_random_ip_crc.tcl create mode 100755 3rd_party/ixia/ixnetrfc2544v2_random_udp_crc.tcl create mode 100644 conf/integration/01b_dpdk_regression_tests.conf diff --git a/3rd_party/ixia/ixnetrfc2544v2_random_ip_crc.tcl b/3rd_party/ixia/ixnetrfc2544v2_random_ip_crc.tcl new file mode 100755 index 00000000..7955fd23 --- /dev/null +++ b/3rd_party/ixia/ixnetrfc2544v2_random_ip_crc.tcl @@ -0,0 +1,3582 @@ +#!/usr/bin/env tclsh + +# Copyright (c) 2014, Ixia +# Copyright (c) 2015-2017, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# This file is a modified version of a script generated by Ixia +# IxNetwork. + +lappend auto_path [list $lib_path] + +################################################################### +########################## Configuration ########################## +################################################################### + +# verify that the IXIA chassis spec is given + +set reqVars [list "machine" "port" "user" "chassis" "card" "port1" "port2" "output_dir" "bidir"] +set rfc2544test "" + +foreach var $reqVars { + set var_ns [namespace which -variable "$var"] + if { [string compare $var_ns ""] == 0 } { + errorMsg "The '$var' variable is undefined. Did you set it?" + return -1 + } +} + +# machine configuration + +set ::IxNserver $machine +set ::IxNport $port +set ::biDirect $bidir + +# change to windows path format and append directory +set output_dir [string map {"/" "\\"} $output_dir] +set output_dir "$output_dir\\rfctests" +puts "Output directory is $output_dir" + +proc startRfc2544Test { testSpec trafficSpec } { + # Start RFC2544 quicktest. + + # Configure global variables. See documentation on 'global' for more + # information on why this is necessary + # https://www.tcl.tk/man/tcl8.5/tutorial/Tcl13.html + global rfc2544test + global sg_rfc2544throughput + global sg_rfc2544back2back + + # flow spec + + set rfc2544TestType [dict get $testSpec rfc2544TestType] + + set binary [dict get $testSpec binary] + + set duration [dict get $testSpec duration] + + set L2CountValue 1 + set L2Increment False + set L3ValueType singleValue + set L3CountValue 1 + set L4ValueType singleValue + set L4CountValue 1 + + # RFC2544 to IXIA terminology mapping (it affects Ixia configuration inside this script): + # Test => Trial + # Trial => Iteration + if {$binary} { + set numTests [dict get $testSpec tests] + set frameRate 100 + set tolerance [dict get $testSpec lossrate] + set loadType binary + } else { + set numTests 1 + set frameRate [dict get $testSpec framerate] + set tolerance 0.0 + set loadType custom + } + + set learningFrames True + + if {$learningFrames} { + set learningFrequency oncePerTest + set fastPathEnable True + } else { + set learningFrequency never + set fastPathEnable False + } + + set multipleStreams [dict get $testSpec multipleStreams] + set streamType [dict get $testSpec streamType] + + if {($multipleStreams < 0)} { + set multipleStreams 0 + } + + if {$multipleStreams} { + if {($streamType == "L2")} { + set L2CountValue $multipleStreams + set L2Increment True + } elseif {($streamType == "L3")} { + set L3ValueType increment + set L3CountValue $multipleStreams + } else { + set L4ValueType increment + set L4CountValue $multipleStreams + } + } + + set fastConvergence True + set convergenceDuration [expr $duration/10] + + # traffic spec + + # 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_l4 srcport] + set dstPort [dict get $trafficSpec_l4 dstport] + + # Tested protocols: udp, tcp, gre + set proto [dict get $trafficSpec_l3 proto] + set proto [string tolower $proto] + set srcIp [dict get $trafficSpec_l3 srcip] + set dstIp [dict get $trafficSpec_l3 dstip] + + set proto_value 17 + if { [string compare $proto "tcp"] == 0 } { + set proto_value 6 + } + + # VXLAN + set vxlan_enabled [dict exists $trafficSpec_l4 vni] + set geneve_enabled [dict exists $trafficSpec_l4 geneve_vni] + + if { $vxlan_enabled } { + puts "VXLAN is enabled. Setting VXLAN variables" + set vni [dict get $trafficSpec_l4 vni] + set inner_srcmac [dict get $trafficSpec_l4 inner_srcmac] + set inner_dstmac [dict get $trafficSpec_l4 inner_dstmac] + set inner_srcip [dict get $trafficSpec_l4 inner_srcip] + set inner_dstip [dict get $trafficSpec_l4 inner_dstip] + set inner_proto [dict get $trafficSpec_l4 inner_proto] + set inner_proto [string tolower $inner_proto] + set inner_srcport [dict get $trafficSpec_l4 inner_srcport] + set inner_dstport [dict get $trafficSpec_l4 inner_dstport] + } elseif { $geneve_enabled } { + puts "GENEVE is enabled. Setting GENEVE variables" + set geneve_vni [dict get $trafficSpec_l4 geneve_vni] + set inner_srcmac [dict get $trafficSpec_l4 inner_srcmac] + set inner_dstmac [dict get $trafficSpec_l4 inner_dstmac] + set inner_srcip [dict get $trafficSpec_l4 inner_srcip] + set inner_dstip [dict get $trafficSpec_l4 inner_dstip] + set inner_proto [dict get $trafficSpec_l4 inner_proto] + set inner_proto [string tolower $inner_proto] + set inner_srcport [dict get $trafficSpec_l4 inner_srcport] + set inner_dstport [dict get $trafficSpec_l4 inner_dstport] + } + + set gre_enabled False + if { [string compare $proto "gre"] == 0 } { + puts "GRE is enabled. Setting GRE variables" + set proto_value 47 + set gre_enabled True + set inner_srcmac [dict get $trafficSpec_l4 inner_srcmac] + set inner_dstmac [dict get $trafficSpec_l4 inner_dstmac] + set inner_srcip [dict get $trafficSpec_l4 inner_srcip] + set inner_dstip [dict get $trafficSpec_l4 inner_dstip] + set inner_proto [dict get $trafficSpec_l4 inner_proto] + set inner_proto [string tolower $inner_proto] + set inner_srcport [dict get $trafficSpec_l4 inner_srcport] + set inner_dstport [dict get $trafficSpec_l4 inner_dstport] + } + + if {$frameSize < 68 } { + if {$rfc2544TestType == "back2back"} { + puts "INFO: Packet size too small, packet size will be \ + increased to 68 for this test" + } + } + # constants + + set VERSION [package require IxTclNetwork] + + ################################################################### + ############################ Operation ############################ + ################################################################### + + puts "Connecting to IxNetwork machine..." + + ixNet connect $::IxNserver -port $::IxNport -version $VERSION + + puts "Connected to IxNetwork machine" + + puts "Configuring IxNetwork machine..." + + set ::_sg_cc 0 + proc sg_commit {} {ixNet commit} + + ixNet rollback + ixNet setSessionParameter version 6.30.701.16 + ixNet execute newConfig + set ixNetSG_Stack(0) [ixNet getRoot] + + # + # setting global options + # + set sg_top [ixNet getRoot] + ixNet setMultiAttrs $sg_top/availableHardware \ + -offChassisHwM {} \ + -isOffChassis False + ixNet setMultiAttrs $sg_top/globals/preferences \ + -connectPortsOnLoadConfig True \ + -rebootPortsOnConnect False + ixNet setMultiAttrs $sg_top/globals/interfaces \ + -arpOnLinkup True \ + -nsOnLinkup True \ + -sendSingleArpPerGateway True \ + -sendSingleNsPerGateway True + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/checksums \ + -dropRxL2FcsErrors False \ + -correctTxL2FcsErrors False \ + -alwaysCorrectWhenModifying True \ + -correctTxChecksumOverIp False \ + -correctTxIpv4Checksum False + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/rxRateLimit \ + -enabled False \ + -value 8 \ + -units {kKilobitsPerSecond} + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/drop \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/reorder \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 \ + -skipCount 1 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/duplicate \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 \ + -duplicateCount 1 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/bitError \ + -enabled False \ + -logRate 3 \ + -skipEndOctets 0 \ + -skipStartOctets 0 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/delay \ + -enabled False \ + -value 300 \ + -units {kMicroseconds} + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/delayVariation \ + -uniformSpread 0 \ + -enabled False \ + -units {kMicroseconds} \ + -distribution {kUniform} \ + -exponentialMeanArrival 0 \ + -gaussianStandardDeviation 0 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/customDelayVariation \ + -enabled False \ + -name {} + ixNet setMultiAttrs $sg_top/statistics \ + -additionalFcoeStat2 fcoeInvalidFrames \ + -csvLogPollIntervalMultiplier 1 \ + -pollInterval 2 \ + -guardrailEnabled True \ + -enableCsvLogging False \ + -dataStorePollingIntervalMultiplier 1 \ + -maxNumberOfStatsPerCustomGraph 16 \ + -additionalFcoeStat1 fcoeInvalidDelimiter \ + -timestampPrecision 3 \ + -enableDataCenterSharedStats False \ + -timeSynchronization syncTimeToTestStart \ + -enableAutoDataStore False + ixNet setMultiAttrs $sg_top/statistics/measurementMode \ + -measurementMode mixedMode + ixNet setMultiAttrs $sg_top/eventScheduler \ + -licenseServerLocation {127.0.0.1} + ixNet setMultiAttrs $sg_top/traffic \ + -destMacRetryCount 1 \ + -maxTrafficGenerationQueries 500 \ + -enableStaggeredTransmit False \ + -learningFrameSize $frameSize \ + -useTxRxSync True \ + -enableDestMacRetry True \ + -enableMulticastScalingFactor False \ + -destMacRetryDelay 5 \ + -largeErrorThreshhold 2 \ + -refreshLearnedInfoBeforeApply False \ + -enableMinFrameSize False \ + -macChangeOnFly False \ + -waitTime 1 \ + -enableInstantaneousStatsSupport False \ + -learningFramesCount 10 \ + -globalStreamControl continuous \ + -displayMplsCurrentLabelValue False \ + -mplsLabelLearningTimeout 30 \ + -enableStaggeredStartDelay True \ + -enableDataIntegrityCheck False \ + -enableSequenceChecking False \ + -globalStreamControlIterations 1 \ + -enableStreamOrdering False \ + -frameOrderingMode none \ + -learningFramesRate 100 + ixNet setMultiAttrs $sg_top/traffic/statistics/latency \ + -enabled True \ + -mode storeForward + ixNet setMultiAttrs $sg_top/traffic/statistics/interArrivalTimeRate \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/delayVariation \ + -enabled False \ + -statisticsMode rxDelayVariationErrorsAndRate \ + -latencyMode storeForward \ + -largeSequenceNumberErrorThreshold 2 + ixNet setMultiAttrs $sg_top/traffic/statistics/sequenceChecking \ + -enabled False \ + -sequenceMode rxThreshold + ixNet setMultiAttrs $sg_top/traffic/statistics/advancedSequenceChecking \ + -enabled False \ + -advancedSequenceThreshold 1 + ixNet setMultiAttrs $sg_top/traffic/statistics/cpdpConvergence \ + -enabled False \ + -dataPlaneJitterWindow 10485760 \ + -dataPlaneThreshold 95 \ + -enableDataPlaneEventsRateMonitor False \ + -enableControlPlaneEvents False + ixNet setMultiAttrs $sg_top/traffic/statistics/packetLossDuration \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/dataIntegrity \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/errorStats \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/prbs \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/iptv \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/l1Rates \ + -enabled False + ixNet setMultiAttrs $sg_top/quickTest/globals \ + -productLabel {Your switch/router name here} \ + -serialNumber {Your switch/router serial number here} \ + -version {Your firmware version here} \ + -comments {} \ + -titlePageComments {} \ + -maxLinesToDisplay 100 \ + -enableCheckLinkState False \ + -enableAbortIfLinkDown False \ + -enableSwitchToStats True \ + -enableCapture False \ + -enableSwitchToResult True \ + -enableGenerateReportAfterRun False \ + -enableRebootCpu False \ + -saveCaptureBeforeRun False \ + -linkDownTimeout 5 \ + -sleepTimeAfterReboot 10 \ + -useDefaultRootPath False \ + -outputRootPath $::output_dir + sg_commit + set sg_top [lindex [ixNet remapIds $sg_top] 0] + set ixNetSG_Stack(0) $sg_top + + ### + ### /vport area + ### + + # + # configuring the object that corresponds to /vport:1 + # + set sg_vport [ixNet add $ixNetSG_Stack(0) vport] + ixNet setMultiAttrs $sg_vport \ + -transmitIgnoreLinkStatus False \ + -txGapControlMode averageMode \ + -type tenGigLan \ + -connectedTo ::ixNet::OBJ-null \ + -txMode interleaved \ + -isPullOnly False \ + -rxMode captureAndMeasure \ + -name {10GE LAN - 001} + ixNet setMultiAttrs $sg_vport/l1Config \ + -currentType tenGigLan + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan \ + -ppm 0 \ + -flowControlDirectedAddress "01 80 C2 00 00 01" \ + -enablePPM False \ + -autoInstrumentation endOfFrame \ + -transmitClocking internal \ + -txIgnoreRxLinkFaults False \ + -loopback False \ + -enableLASIMonitoring False \ + -enabledFlowControl True + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan/oam \ + -tlvType {00} \ + -linkEvents False \ + -enabled False \ + -vendorSpecificInformation {00 00 00 00} \ + -macAddress "00:00:00:00:00:00" \ + -loopback False \ + -idleTimer 5 \ + -tlvValue {00} \ + -enableTlvOption False \ + -maxOAMPDUSize 64 \ + -organizationUniqueIdentifier {000000} + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan/fcoe \ + -supportDataCenterMode False \ + -priorityGroupSize priorityGroupSize-8 \ + -pfcPauseDelay 1 \ + -pfcPriorityGroups {0 1 2 3 4 5 6 7} \ + -flowControlType ieee802.1Qbb \ + -enablePFCPauseDelay False + ixNet setMultiAttrs $sg_vport/l1Config/fortyGigLan \ + -ppm 0 \ + -flowControlDirectedAddress "01 80 C2 00 00 01" \ + -enablePPM False \ + -autoInstrumentation endOfFrame \ + -transmitClocking internal \ + -txIgnoreRxLinkFaults False \ + -loopback False \ + -enableLASIMonitoring False \ + -enabledFlowControl False + ixNet setMultiAttrs $sg_vport/l1Config/fortyGigLan/fcoe \ + -supportDataCenterMode False \ + -priorityGroupSize priorityGroupSize-8 \ + -pfcPauseDelay 1 \ + -pfcPriorityGroups {0 1 2 3 4 5 6 7} \ + -flowControlType ieee802.1Qbb \ + -enablePFCPauseDelay False + ixNet setMultiAttrs $sg_vport/l1Config/OAM \ + -tlvType {00} \ + -linkEvents False \ + -enabled False \ + -vendorSpecificInformation {00 00 00 00} \ + -macAddress "00:00:00:00:00:00" \ + -loopback False \ + -idleTimer 5 \ + -tlvValue {00} \ + -enableTlvOption False \ + -maxOAMPDUSize 64 \ + -organizationUniqueIdentifier {000000} + ixNet setMultiAttrs $sg_vport/l1Config/rxFilters/filterPalette \ + -sourceAddress1Mask {00:00:00:00:00:00} \ + -destinationAddress1Mask {00:00:00:00:00:00} \ + -sourceAddress2 {00:00:00:00:00:00} \ + -pattern2OffsetType fromStartOfFrame \ + -pattern2Offset 20 \ + -pattern1Mask {00} \ + -sourceAddress2Mask {00:00:00:00:00:00} \ + -destinationAddress2 {00:00:00:00:00:00} \ + -destinationAddress1 {00:00:00:00:00:00} \ + -sourceAddress1 {00:00:00:00:00:00} \ + -pattern1 {00} \ + -destinationAddress2Mask {00:00:00:00:00:00} \ + -pattern2Mask {00} \ + -pattern1Offset 20 \ + -pattern2 {00} \ + -pattern1OffsetType fromStartOfFrame + ixNet setMultiAttrs $sg_vport/protocols/arp \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/bfd \ + -enabled False \ + -intervalValue 0 \ + -packetsPerInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/bgp \ + -autoFillUpDutIp False \ + -disableReceivedUpdateValidation False \ + -enableAdVplsPrefixLengthInBits False \ + -enableExternalActiveConnect True \ + -enableInternalActiveConnect True \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -externalRetries 0 \ + -externalRetryDelay 120 \ + -internalRetries 0 \ + -internalRetryDelay 120 \ + -mldpP2mpFecType 6 \ + -triggerVplsPwInitiation False + ixNet setMultiAttrs $sg_vport/protocols/cfm \ + -enableOptionalLmFunctionality False \ + -enableOptionalTlvValidation True \ + -enabled False \ + -receiveCcm True \ + -sendCcm True \ + -suppressErrorsOnAis True + ixNet setMultiAttrs $sg_vport/protocols/eigrp \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/elmi \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/igmp \ + -enabled False \ + -numberOfGroups 0 \ + -numberOfQueries 0 \ + -queryTimePeriod 0 \ + -sendLeaveOnStop True \ + -statsEnabled False \ + -timePeriod 0 + ixNet setMultiAttrs $sg_vport/protocols/isis \ + -allL1RbridgesMac "01:80:c2:00:00:40" \ + -emulationType isisL3Routing \ + -enabled False \ + -helloMulticastMac "01:80:c2:00:00:41" \ + -lspMgroupPdusPerInterval 0 \ + -nlpId 192 \ + -rateControlInterval 0 \ + -sendP2PHellosToUnicastMac True \ + -spbAllL1BridgesMac "09:00:2b:00:00:05" \ + -spbHelloMulticastMac "09:00:2b:00:00:05" \ + -spbNlpId 192 + ixNet setMultiAttrs $sg_vport/protocols/lacp \ + -enablePreservePartnerInfo False \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/ldp \ + -enableDiscardSelfAdvFecs False \ + -enableHelloJitter True \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -helloHoldTime 15 \ + -helloInterval 5 \ + -keepAliveHoldTime 30 \ + -keepAliveInterval 10 \ + -p2mpCapabilityParam 1288 \ + -p2mpFecType 6 \ + -targetedHelloInterval 15 \ + -targetedHoldTime 45 \ + -useTransportLabelsForMplsOam False + ixNet setMultiAttrs $sg_vport/protocols/linkOam \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/lisp \ + -burstIntervalInMs 0 \ + -enabled False \ + -ipv4MapRegisterPacketsPerBurst 0 \ + -ipv4MapRequestPacketsPerBurst 0 \ + -ipv4SmrPacketsPerBurst 0 \ + -ipv6MapRegisterPacketsPerBurst 0 \ + -ipv6MapRequestPacketsPerBurst 0 \ + -ipv6SmrPacketsPerBurst 0 + ixNet setMultiAttrs $sg_vport/protocols/mld \ + -enableDoneOnStop True \ + -enabled False \ + -mldv2Report type143 \ + -numberOfGroups 0 \ + -numberOfQueries 0 \ + -queryTimePeriod 0 \ + -timePeriod 0 + ixNet setMultiAttrs $sg_vport/protocols/mplsOam \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/mplsTp \ + -apsChannelType {00 02 } \ + -bfdCcChannelType {00 07 } \ + -delayManagementChannelType {00 05 } \ + -enableHighPerformanceMode True \ + -enabled False \ + -faultManagementChannelType {00 58 } \ + -lossMeasurementChannelType {00 04 } \ + -onDemandCvChannelType {00 09 } \ + -pwStatusChannelType {00 0B } \ + -y1731ChannelType {7F FA } + ixNet setMultiAttrs $sg_vport/protocols/ospf \ + -enableDrOrBdr False \ + -enabled False \ + -floodLinkStateUpdatesPerInterval 0 \ + -rateControlInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/ospfV3 \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/pimsm \ + -bsmFramePerInterval 0 \ + -crpFramePerInterval 0 \ + -dataMdtFramePerInterval 0 \ + -denyGrePimIpPrefix {0.0.0.0/32} \ + -enableDiscardJoinPruneProcessing False \ + -enableRateControl False \ + -enabled False \ + -helloMsgsPerInterval 0 \ + -interval 0 \ + -joinPruneMessagesPerInterval 0 \ + -registerMessagesPerInterval 0 \ + -registerStopMessagesPerInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/ping \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/rip \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/ripng \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/rsvp \ + -enableControlLspInitiationRate False \ + -enableShowTimeValue False \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -maxLspInitiationsPerSec 400 \ + -useTransportLabelsForMplsOam False + ixNet setMultiAttrs $sg_vport/protocols/stp \ + -enabled False + ixNet setMultiAttrs $sg_vport/rateControlParameters \ + -maxRequestsPerBurst 1 \ + -maxRequestsPerSec 250 \ + -minRetryInterval 10 \ + -retryCount 3 \ + -sendInBursts False \ + -sendRequestsAsFastAsPossible False + ixNet setMultiAttrs $sg_vport/capture \ + -controlCaptureTrigger {} \ + -controlCaptureFilter {} \ + -hardwareEnabled False \ + -softwareEnabled False \ + -displayFiltersDataCapture {} \ + -displayFiltersControlCapture {} \ + -controlBufferSize 30 \ + -controlBufferBehaviour bufferLiveNonCircular + ixNet setMultiAttrs $sg_vport/protocolStack/options \ + -routerSolicitationDelay 1 \ + -routerSolicitationInterval 4 \ + -routerSolicitations 3 \ + -retransTime 1000 \ + -dadTransmits 1 \ + -dadEnabled True \ + -ipv4RetransTime 3000 \ + -ipv4McastSolicit 4 + sg_commit + set sg_vport [lindex [ixNet remapIds $sg_vport] 0] + set ixNetSG_ref(2) $sg_vport + set ixNetSG_Stack(1) $sg_vport + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:1 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:1 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:2 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:2 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:3 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:3 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:4 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:4 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:5 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:5 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:6 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:6 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/protocols/static/lan:1 + # + set sg_lan [ixNet add $ixNetSG_Stack(1)/protocols/static lan] + ixNet setMultiAttrs $sg_lan \ + -atmEncapsulation ::ixNet::OBJ-null \ + -count $L2CountValue \ + -countPerVc 1 \ + -enableIncrementMac $L2Increment \ + -enableIncrementVlan False \ + -enableSiteId False \ + -enableVlan False \ + -enabled True \ + -frEncapsulation ::ixNet::OBJ-null \ + -incrementPerVcVlanMode noIncrement \ + -incrementVlanMode noIncrement \ + -mac $srcMac \ + -macRangeMode normal \ + -numberOfVcs 1 \ + -siteId 0 \ + -skipVlanIdZero True \ + -tpid {0x8100} \ + -trafficGroupId ::ixNet::OBJ-null \ + -vlanCount 1 \ + -vlanId {1} \ + -vlanPriority {0} + sg_commit + set sg_lan [lindex [ixNet remapIds $sg_lan] 0] + + # + # configuring the object that corresponds to /vport:2 + # + set sg_vport [ixNet add $ixNetSG_Stack(0) vport] + ixNet setMultiAttrs $sg_vport \ + -transmitIgnoreLinkStatus False \ + -txGapControlMode averageMode \ + -type tenGigLan \ + -connectedTo ::ixNet::OBJ-null \ + -txMode interleaved \ + -isPullOnly False \ + -rxMode captureAndMeasure \ + -name {10GE LAN - 002} + ixNet setMultiAttrs $sg_vport/l1Config \ + -currentType tenGigLan + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan \ + -ppm 0 \ + -flowControlDirectedAddress "01 80 C2 00 00 01" \ + -enablePPM False \ + -autoInstrumentation endOfFrame \ + -transmitClocking internal \ + -txIgnoreRxLinkFaults False \ + -loopback False \ + -enableLASIMonitoring False \ + -enabledFlowControl False + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan/oam \ + -tlvType {00} \ + -linkEvents False \ + -enabled False \ + -vendorSpecificInformation {00 00 00 00} \ + -macAddress "00:00:00:00:00:00" \ + -loopback False \ + -idleTimer 5 \ + -tlvValue {00} \ + -enableTlvOption False \ + -maxOAMPDUSize 64 \ + -organizationUniqueIdentifier {000000} + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan/fcoe \ + -supportDataCenterMode False \ + -priorityGroupSize priorityGroupSize-8 \ + -pfcPauseDelay 1 \ + -pfcPriorityGroups {0 1 2 3 4 5 6 7} \ + -flowControlType ieee802.1Qbb \ + -enablePFCPauseDelay False + ixNet setMultiAttrs $sg_vport/l1Config/fortyGigLan \ + -ppm 0 \ + -flowControlDirectedAddress "01 80 C2 00 00 01" \ + -enablePPM False \ + -autoInstrumentation endOfFrame \ + -transmitClocking internal \ + -txIgnoreRxLinkFaults False \ + -loopback False \ + -enableLASIMonitoring False \ + -enabledFlowControl False + ixNet setMultiAttrs $sg_vport/l1Config/fortyGigLan/fcoe \ + -supportDataCenterMode False \ + -priorityGroupSize priorityGroupSize-8 \ + -pfcPauseDelay 1 \ + -pfcPriorityGroups {0 1 2 3 4 5 6 7} \ + -flowControlType ieee802.1Qbb \ + -enablePFCPauseDelay False + ixNet setMultiAttrs $sg_vport/l1Config/OAM \ + -tlvType {00} \ + -linkEvents False \ + -enabled False \ + -vendorSpecificInformation {00 00 00 00} \ + -macAddress "00:00:00:00:00:00" \ + -loopback False \ + -idleTimer 5 \ + -tlvValue {00} \ + -enableTlvOption False \ + -maxOAMPDUSize 64 \ + -organizationUniqueIdentifier {000000} + ixNet setMultiAttrs $sg_vport/l1Config/rxFilters/filterPalette \ + -sourceAddress1Mask {00:00:00:00:00:00} \ + -destinationAddress1Mask {00:00:00:00:00:00} \ + -sourceAddress2 {00:00:00:00:00:00} \ + -pattern2OffsetType fromStartOfFrame \ + -pattern2Offset 20 \ + -pattern1Mask {00} \ + -sourceAddress2Mask {00:00:00:00:00:00} \ + -destinationAddress2 {00:00:00:00:00:00} \ + -destinationAddress1 {00:00:00:00:00:00} \ + -sourceAddress1 {00:00:00:00:00:00} \ + -pattern1 {00} \ + -destinationAddress2Mask {00:00:00:00:00:00} \ + -pattern2Mask {00} \ + -pattern1Offset 20 \ + -pattern2 {00} \ + -pattern1OffsetType fromStartOfFrame + ixNet setMultiAttrs $sg_vport/protocols/arp \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/bfd \ + -enabled False \ + -intervalValue 0 \ + -packetsPerInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/bgp \ + -autoFillUpDutIp False \ + -disableReceivedUpdateValidation False \ + -enableAdVplsPrefixLengthInBits False \ + -enableExternalActiveConnect True \ + -enableInternalActiveConnect True \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -externalRetries 0 \ + -externalRetryDelay 120 \ + -internalRetries 0 \ + -internalRetryDelay 120 \ + -mldpP2mpFecType 6 \ + -triggerVplsPwInitiation False + ixNet setMultiAttrs $sg_vport/protocols/cfm \ + -enableOptionalLmFunctionality False \ + -enableOptionalTlvValidation True \ + -enabled False \ + -receiveCcm True \ + -sendCcm True \ + -suppressErrorsOnAis True + ixNet setMultiAttrs $sg_vport/protocols/eigrp \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/elmi \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/igmp \ + -enabled False \ + -numberOfGroups 0 \ + -numberOfQueries 0 \ + -queryTimePeriod 0 \ + -sendLeaveOnStop True \ + -statsEnabled False \ + -timePeriod 0 + ixNet setMultiAttrs $sg_vport/protocols/isis \ + -allL1RbridgesMac "01:80:c2:00:00:40" \ + -emulationType isisL3Routing \ + -enabled False \ + -helloMulticastMac "01:80:c2:00:00:41" \ + -lspMgroupPdusPerInterval 0 \ + -nlpId 192 \ + -rateControlInterval 0 \ + -sendP2PHellosToUnicastMac True \ + -spbAllL1BridgesMac "09:00:2b:00:00:05" \ + -spbHelloMulticastMac "09:00:2b:00:00:05" \ + -spbNlpId 192 + ixNet setMultiAttrs $sg_vport/protocols/lacp \ + -enablePreservePartnerInfo False \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/ldp \ + -enableDiscardSelfAdvFecs False \ + -enableHelloJitter True \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -helloHoldTime 15 \ + -helloInterval 5 \ + -keepAliveHoldTime 30 \ + -keepAliveInterval 10 \ + -p2mpCapabilityParam 1288 \ + -p2mpFecType 6 \ + -targetedHelloInterval 15 \ + -targetedHoldTime 45 \ + -useTransportLabelsForMplsOam False + ixNet setMultiAttrs $sg_vport/protocols/linkOam \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/lisp \ + -burstIntervalInMs 0 \ + -enabled False \ + -ipv4MapRegisterPacketsPerBurst 0 \ + -ipv4MapRequestPacketsPerBurst 0 \ + -ipv4SmrPacketsPerBurst 0 \ + -ipv6MapRegisterPacketsPerBurst 0 \ + -ipv6MapRequestPacketsPerBurst 0 \ + -ipv6SmrPacketsPerBurst 0 + ixNet setMultiAttrs $sg_vport/protocols/mld \ + -enableDoneOnStop True \ + -enabled False \ + -mldv2Report type143 \ + -numberOfGroups 0 \ + -numberOfQueries 0 \ + -queryTimePeriod 0 \ + -timePeriod 0 + ixNet setMultiAttrs $sg_vport/protocols/mplsOam \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/mplsTp \ + -apsChannelType {00 02 } \ + -bfdCcChannelType {00 07 } \ + -delayManagementChannelType {00 05 } \ + -enableHighPerformanceMode True \ + -enabled False \ + -faultManagementChannelType {00 58 } \ + -lossMeasurementChannelType {00 04 } \ + -onDemandCvChannelType {00 09 } \ + -pwStatusChannelType {00 0B } \ + -y1731ChannelType {7F FA } + ixNet setMultiAttrs $sg_vport/protocols/ospf \ + -enableDrOrBdr False \ + -enabled False \ + -floodLinkStateUpdatesPerInterval 0 \ + -rateControlInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/ospfV3 \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/pimsm \ + -bsmFramePerInterval 0 \ + -crpFramePerInterval 0 \ + -dataMdtFramePerInterval 0 \ + -denyGrePimIpPrefix {0.0.0.0/32} \ + -enableDiscardJoinPruneProcessing False \ + -enableRateControl False \ + -enabled False \ + -helloMsgsPerInterval 0 \ + -interval 0 \ + -joinPruneMessagesPerInterval 0 \ + -registerMessagesPerInterval 0 \ + -registerStopMessagesPerInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/ping \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/rip \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/ripng \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/rsvp \ + -enableControlLspInitiationRate False \ + -enableShowTimeValue False \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -maxLspInitiationsPerSec 400 \ + -useTransportLabelsForMplsOam False + ixNet setMultiAttrs $sg_vport/protocols/stp \ + -enabled False + ixNet setMultiAttrs $sg_vport/rateControlParameters \ + -maxRequestsPerBurst 1 \ + -maxRequestsPerSec 250 \ + -minRetryInterval 10 \ + -retryCount 3 \ + -sendInBursts False \ + -sendRequestsAsFastAsPossible False + ixNet setMultiAttrs $sg_vport/capture \ + -controlCaptureTrigger {} \ + -controlCaptureFilter {} \ + -hardwareEnabled False \ + -softwareEnabled False \ + -displayFiltersDataCapture {} \ + -displayFiltersControlCapture {} \ + -controlBufferSize 30 \ + -controlBufferBehaviour bufferLiveNonCircular + ixNet setMultiAttrs $sg_vport/protocolStack/options \ + -routerSolicitationDelay 1 \ + -routerSolicitationInterval 4 \ + -routerSolicitations 3 \ + -retransTime 1000 \ + -dadTransmits 1 \ + -dadEnabled True \ + -ipv4RetransTime 3000 \ + -ipv4McastSolicit 4 + sg_commit + set sg_vport [lindex [ixNet remapIds $sg_vport] 0] + set ixNetSG_ref(10) $sg_vport + set ixNetSG_Stack(1) $sg_vport + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:1 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:1 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:2 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:2 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:3 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:3 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:4 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:4 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:5 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:5 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:6 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:6 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/protocols/static/lan:1 + # + set sg_lan [ixNet add $ixNetSG_Stack(1)/protocols/static lan] + ixNet setMultiAttrs $sg_lan \ + -atmEncapsulation ::ixNet::OBJ-null \ + -count $L2CountValue \ + -countPerVc 1 \ + -enableIncrementMac $L2Increment \ + -enableIncrementVlan False \ + -enableSiteId False \ + -enableVlan False \ + -enabled True \ + -frEncapsulation ::ixNet::OBJ-null \ + -incrementPerVcVlanMode noIncrement \ + -incrementVlanMode noIncrement \ + -mac $dstMac \ + -macRangeMode normal \ + -numberOfVcs 1 \ + -siteId 0 \ + -skipVlanIdZero True \ + -tpid {0x8100} \ + -trafficGroupId ::ixNet::OBJ-null \ + -vlanCount 1 \ + -vlanId {1} \ + -vlanPriority {0} + sg_commit + set sg_lan [lindex [ixNet remapIds $sg_lan] 0] + + ### + ### /availableHardware area + ### + + # + # configuring the object that corresponds to /availableHardware/chassis" + # + set sg_chassis [ixNet add $ixNetSG_Stack(0)/availableHardware chassis] + ixNet setMultiAttrs $sg_chassis \ + -masterChassis {} \ + -sequenceId 1 \ + -cableLength 0 \ + -hostname $::chassis + sg_commit + set sg_chassis [lindex [ixNet remapIds $sg_chassis] 0] + set ixNetSG_Stack(1) $sg_chassis + + # + # configuring the object that corresponds to /availableHardware/chassis/card + # + set sg_card $ixNetSG_Stack(1)/card:$::card + ixNet setMultiAttrs $sg_card \ + -aggregationMode normal + sg_commit + set sg_card [lindex [ixNet remapIds $sg_card] 0] + set ixNetSG_ref(19) $sg_card + set ixNetSG_Stack(2) $sg_card + + # + # configuring the object that corresponds to /availableHardware/chassis/card/aggregation:1 + # + set sg_aggregation $ixNetSG_Stack(2)/aggregation:1 + ixNet setMultiAttrs $sg_aggregation \ + -mode normal + sg_commit + set sg_aggregation [lindex [ixNet remapIds $sg_aggregation] 0] + + # + # configuring the object that corresponds to /availableHardware/chassis/card/aggregation:2 + # + set sg_aggregation $ixNetSG_Stack(2)/aggregation:2 + ixNet setMultiAttrs $sg_aggregation \ + -mode normal + sg_commit + set sg_aggregation [lindex [ixNet remapIds $sg_aggregation] 0] + + # + # configuring the object that corresponds to /availableHardware/chassis/card/aggregation:3 + # + set sg_aggregation $ixNetSG_Stack(2)/aggregation:3 + ixNet setMultiAttrs $sg_aggregation \ + -mode normal + sg_commit + set sg_aggregation [lindex [ixNet remapIds $sg_aggregation] 0] + + # + # configuring the object that corresponds to /availableHardware/chassis/card/aggregation:4 + # + set sg_aggregation $ixNetSG_Stack(2)/aggregation:4 + ixNet setMultiAttrs $sg_aggregation \ + -mode normal + sg_commit + set sg_aggregation [lindex [ixNet remapIds $sg_aggregation] 0] + ixNet setMultiAttrs $ixNetSG_ref(2) \ + -connectedTo $ixNetSG_ref(19)/port:$::port1 + sg_commit + ixNet setMultiAttrs $ixNetSG_ref(10) \ + -connectedTo $ixNetSG_ref(19)/port:$::port2 + sg_commit + sg_commit + + ### + ### /impairment area + ### + + # + # configuring the object that corresponds to /impairment/profile:3 + # + set sg_profile [ixNet add $ixNetSG_Stack(0)/impairment profile] + ixNet setMultiAttrs $sg_profile \ + -enabled False \ + -name {Impairment Profile 1} \ + -links {} \ + -allLinks True \ + -priority 1 + ixNet setMultiAttrs $sg_profile/checksums \ + -dropRxL2FcsErrors False \ + -correctTxL2FcsErrors False \ + -alwaysCorrectWhenModifying True \ + -correctTxChecksumOverIp False \ + -correctTxIpv4Checksum False + ixNet setMultiAttrs $sg_profile/rxRateLimit \ + -enabled False \ + -value 8 \ + -units {kKilobitsPerSecond} + ixNet setMultiAttrs $sg_profile/drop \ + -enabled True \ + -clusterSize 1 \ + -percentRate 0 + ixNet setMultiAttrs $sg_profile/reorder \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 \ + -skipCount 1 + ixNet setMultiAttrs $sg_profile/duplicate \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 \ + -duplicateCount 1 + ixNet setMultiAttrs $sg_profile/bitError \ + -enabled False \ + -logRate 3 \ + -skipEndOctets 0 \ + -skipStartOctets 0 + ixNet setMultiAttrs $sg_profile/delay \ + -enabled True \ + -value 300 \ + -units {kMicroseconds} + ixNet setMultiAttrs $sg_profile/delayVariation \ + -uniformSpread 0 \ + -enabled False \ + -units {kMicroseconds} \ + -distribution {kUniform} \ + -exponentialMeanArrival 0 \ + -gaussianStandardDeviation 0 + ixNet setMultiAttrs $sg_profile/customDelayVariation \ + -enabled False \ + -name {} + sg_commit + set sg_profile [lindex [ixNet remapIds $sg_profile] 0] + set ixNetSG_Stack(1) $sg_profile + + # + # configuring the object that corresponds to /impairment/profile:3/fixedClassifier:1 + # + set sg_fixedClassifier [ixNet add $ixNetSG_Stack(1) fixedClassifier] + sg_commit + set sg_fixedClassifier [lindex [ixNet remapIds $sg_fixedClassifier] 0] + + ### + ### /traffic area + ### + + # + # configuring the object that corresponds to /traffic/trafficItem:1 + # + set sg_trafficItem [ixNet add $ixNetSG_Stack(0)/traffic trafficItem] + ixNet setMultiAttrs $sg_trafficItem \ + -transportRsvpTePreference one \ + -trafficItemType l2L3 \ + -biDirectional $::biDirect \ + -mergeDestinations True \ + -hostsPerNetwork 1 \ + -transmitMode interleaved \ + -ordinalNo 0 \ + -trafficType {ethernetVlan} \ + -interAsLdpPreference two \ + -allowSelfDestined False \ + -enabled True \ + -maxNumberOfVpnLabelStack 2 \ + -interAsBgpPreference one \ + -suspend False \ + -transportLdpPreference two \ + -egressEnabled False \ + -enableDynamicMplsLabelValues False \ + -routeMesh oneToOne \ + -name {Traffic Item 1} \ + -srcDestMesh oneToOne + sg_commit + set sg_trafficItem [lindex [ixNet remapIds $sg_trafficItem] 0] + set ixNetSG_ref(26) $sg_trafficItem + set ixNetSG_Stack(1) $sg_trafficItem + + # + # configuring the object that corresponds to /traffic/trafficItem:1/endpointSet:1 + # + set sg_endpointSet [ixNet add $ixNetSG_Stack(1) endpointSet] + ixNet setMultiAttrs $sg_endpointSet \ + -destinations [list $ixNetSG_ref(10)/protocols] \ + -destinationFilter {} \ + -sourceFilter {} \ + -trafficGroups {} \ + -sources [list $ixNetSG_ref(2)/protocols] \ + -name {EndpointSet-1} + sg_commit + set sg_endpointSet [lindex [ixNet remapIds $sg_endpointSet] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1 + # + set sg_configElement $ixNetSG_Stack(1)/configElement:1 + ixNet setMultiAttrs $sg_configElement \ + -crc goodCrc \ + -preambleCustomSize 8 \ + -enableDisparityError False \ + -preambleFrameSizeMode auto \ + -destinationMacMode manual + ixNet setMultiAttrs $sg_configElement/frameSize \ + -weightedPairs {} \ + -fixedSize 64 \ + -incrementFrom 64 \ + -randomMin 64 \ + -randomMax 1518 \ + -quadGaussian {} \ + -type fixed \ + -presetDistribution cisco \ + -incrementStep 1 \ + -incrementTo 1518 + ixNet setMultiAttrs $sg_configElement/frameRate \ + -bitRateUnitsType bitsPerSec \ + -rate 10 \ + -enforceMinimumInterPacketGap 0 \ + -type percentLineRate \ + -interPacketGapUnitsType nanoseconds + ixNet setMultiAttrs $sg_configElement/framePayload \ + -type incrementByte \ + -customRepeat True \ + -customPattern {} + ixNet setMultiAttrs $sg_configElement/frameRateDistribution \ + -streamDistribution applyRateToAll \ + -portDistribution applyRateToAll + ixNet setMultiAttrs $sg_configElement/transmissionControl \ + -frameCount 1 \ + -minGapBytes 12 \ + -interStreamGap 0 \ + -interBurstGap 0 \ + -interBurstGapUnits nanoseconds \ + -type continuous \ + -duration 1 \ + -repeatBurst 1 \ + -enableInterStreamGap False \ + -startDelayUnits bytes \ + -iterationCount 1 \ + -burstPacketCount 1 \ + -enableInterBurstGap False \ + -startDelay 0 + sg_commit + set sg_configElement [lindex [ixNet remapIds $sg_configElement] 0] + set ixNetSG_Stack(2) $sg_configElement + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernet-1" + # + set sg_stack $ixNetSG_Stack(2)/stack:"ethernet-1" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernet-1"/field:"ethernet.header.destinationAddress-1" + # + set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.destinationAddress-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $dstMac \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{00:00:00:00:00:00}} \ + -stepValue {00:00:00:00:00:01} \ + -fixedBits {00:00:00:00:00:00} \ + -fieldValue $dstMac \ + -auto False \ + -randomMask {00:00:00:00:00:00} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue $dstMac \ + -countValue {1} + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernet-1"/field:"ethernet.header.sourceAddress-2" + # + set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.sourceAddress-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $srcMac \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{00:00:00:00:00:00}} \ + -stepValue {00:00:00:00:00:00} \ + -fixedBits {00:00:00:00:00:00} \ + -fieldValue $srcMac \ + -auto False \ + -randomMask {00:00:00:00:00:00} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue $srcMac \ + -countValue {1} + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernet-1"/field:"ethernet.header.etherType-3" + # + set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.etherType-3" + ixNet setMultiAttrs $sg_field \ + -singleValue {800} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0xFFFF}} \ + -stepValue {0xFFFF} \ + -fixedBits {0xFFFF} \ + -fieldValue {800} \ + -auto True \ + -randomMask {0xFFFF} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0xFFFF} \ + -countValue {1} + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2" + # + set sg_stack $ixNetSG_Stack(2)/stack:"ipv4-2" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.version-1" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.version-1" + ixNet setMultiAttrs $sg_field \ + -singleValue {4} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{4}} \ + -stepValue {4} \ + -fixedBits {4} \ + -fieldValue {4} \ + -auto False \ + -randomMask {4} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {4} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.protocol-25" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.protocol-25" + ixNet setMultiAttrs $sg_field \ + -singleValue {$proto_value} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{61}} \ + -stepValue {61} \ + -fixedBits {61} \ + -fieldValue {$proto} \ + -auto True \ + -randomMask {61} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {61} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.checksum-26" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.checksum-26" + ixNet setMultiAttrs $sg_field \ + -singleValue {0} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0}} \ + -stepValue {1} \ + -fixedBits {0} \ + -fieldValue {0} \ + -auto False \ + -randomMask {0} \ + -trackingEnabled False \ + -valueType increment \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue {65536} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.srcIp-27" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.srcIp-27" + ixNet setMultiAttrs $sg_field \ + -singleValue $srcIp \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0.0.0.0}} \ + -stepValue {0.0.0.0} \ + -fixedBits {0.0.0.0} \ + -fieldValue $srcIp \ + -auto False \ + -randomMask {0.0.0.0} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0.0.0.0} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.dstIp-28" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.dstIp-28" + ixNet setMultiAttrs $sg_field \ + -singleValue $dstIp \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0.0.0.0}} \ + -stepValue {0.0.0.1} \ + -fixedBits {0.0.0.0} \ + -fieldValue $dstIp \ + -auto False \ + -randomMask {0.0.0.0} \ + -trackingEnabled False \ + -valueType $L3ValueType \ + -activeFieldChoice False \ + -startValue $dstIp \ + -countValue $L3CountValue + #sg_commit + #set sg_field [lindex [ixNet remapIds $sg_field] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.options.pad-58" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.options.pad-58" + ixNet setMultiAttrs $sg_field \ + -singleValue {0} \ + -seed {1} \ + -optionalEnabled False \ + -fullMesh False \ + -valueList {{0}} \ + -stepValue {0} \ + -fixedBits {0} \ + -fieldValue {0} \ + -auto True \ + -randomMask {0} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue {1} + + # Suffix for stack names + # This variable should be incremented after setting sg_stack like: + # set sg_stack $ixNetSG_Stack(2)/stack:"protocolnamehere-$stack_number" + # incr stack_number + + set stack_number 3 + + if { [string compare $proto "udp"] == 0 } { + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3" + # + set sg_stack $ixNetSG_Stack(2)/stack:"udp-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.srcPort-1" + # + set sg_field $ixNetSG_Stack(3)/field:"udp.header.srcPort-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $srcPort \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{63}} \ + -stepValue {63} \ + -fixedBits {63} \ + -fieldValue $srcPort \ + -auto False \ + -randomMask {63} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue $srcPort \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.dstPort-2" + # + set sg_field $ixNetSG_Stack(3)/field:"udp.header.dstPort-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $dstPort \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{63}} \ + -stepValue {1} \ + -fixedBits {63} \ + -fieldValue $dstPort \ + -auto False \ + -randomMask {63} \ + -trackingEnabled False \ + -valueType $L4ValueType \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue $L4CountValue + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.length-3" + # + set sg_field $ixNetSG_Stack(3)/field:"udp.header.length-3" + ixNet setMultiAttrs $sg_field \ + -singleValue {26} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{8}} \ + -stepValue {8} \ + -fixedBits {8} \ + -fieldValue {26} \ + -auto True \ + -randomMask {8} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {8} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.checksum-4" + # + set sg_field $ixNetSG_Stack(3)/field:"udp.header.checksum-4" + ixNet setMultiAttrs $sg_field \ + -singleValue {0} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0}} \ + -stepValue {0} \ + -fixedBits {0} \ + -fieldValue {0} \ + -auto True \ + -randomMask {0} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue {1} + } elseif { [string compare $proto "tcp"] == 0 } { + # TCP + set sg_stack $ixNetSG_Stack(2)/stack:"tcp-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.srcPort-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $srcPort \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list $srcPort] \ + -stepValue 60 \ + -fixedBits 60 \ + -fieldValue $srcPort \ + -auto false \ + -randomMask 60 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 60 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dstPort-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $dstPort \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list $dstPort] \ + -stepValue 60 \ + -fixedBits 60 \ + -fieldValue $dstPort \ + -auto false \ + -randomMask 60 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.sequenceNumber-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x00000000] \ + -stepValue 0x00000000 \ + -fixedBits 0x00000000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x00000000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x00000000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.acknowledgementNumber-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x00000000] \ + -stepValue 0x00000000 \ + -fixedBits 0x00000000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x00000000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x00000000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dataOffset-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 5 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 5] \ + -stepValue 5 \ + -fixedBits 5 \ + -fieldValue 5 \ + -auto true \ + -randomMask 5 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 5 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.reserved-6" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.nsBit-7" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.cwrBit-8" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.ecnEchoBit-9" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.urgBit-10" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.ackBit-11" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.pshBit-12" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.rstBit-13" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.synBit-14" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.finBit-15" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.window-16" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.checksum-17" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.urgentPtr-18" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + } elseif { [string compare $proto "gre"] == 0 } { + # GRE + set gre_enabled True + } + + if { $vxlan_enabled || $gre_enabled || $geneve_enabled } { + # VXLAN and GRE have similar inner frame data so we set unique fields + # for each protocol then set the common fields. + + + # + if { $vxlan_enabled } { + # VXLAN START + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4" + # + set sg_stack $ixNetSG_Stack(2)/stack:"vxlan-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.flags-1 + # + set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.flags-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 8 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x08] \ + -stepValue 0x08 \ + -fixedBits 0x08 \ + -fieldValue 8 \ + -randomMask 0x08 \ + -startValue 0x08 + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.reserved-2 + # + set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.reserved-2" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.vni-3" + # + set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.vni-3" + ixNet setMultiAttrs $sg_field \ + -singleValue $vni \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 1234] \ + -stepValue 1234 \ + -fixedBits 1234 \ + -fieldValue $vni \ + -randomMask 1234 \ + -startValue 1234 + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.reserved8-4" + # + set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.reserved8-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + } elseif { $geneve_enabled } { + # GENEVE START + # + set sg_stack $ixNetSG_Stack(2)/stack:"geneve-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.version-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x00] \ + -stepValue 0x00 \ + -fixedBits 0x00 \ + -fieldValue 0 \ + -randomMask 0x00 \ + -startValue 0x00 + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.optionsLength-2" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x00] \ + -stepValue 0x00 \ + -fixedBits 0x00 \ + -fieldValue 0 \ + -randomMask 0x00 \ + -startValue 0x00 + + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.flags-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x00] \ + -stepValue 0x00 \ + -fixedBits 0x00 \ + -fieldValue 0 \ + -randomMask 0x00 \ + -startValue 0x00 + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.protocolType-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 6558 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x6558] \ + -stepValue 0x6558 \ + -fixedBits 0x6558 \ + -fieldValue 6558 \ + -randomMask 0x6558 \ + -startValue 0x6558 + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.vni-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + } elseif { $gre_enabled } { + puts "Setting GRE attributes" + # GRE START + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"gre-3" + # + set sg_stack $ixNetSG_Stack(2)/stack:"gre-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumPresent-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "0:No\ Checksum" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.reserved1-2" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyPresent-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "0:No\ Key\ field" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequencePresent-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "0:No\ sequence\ number\ field" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.reserved2-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.version-6" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.protocol-7" + ixNet setMultiAttrs $sg_field \ + -singleValue 6558 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x0] \ + -stepValue 0x0 \ + -fixedBits 0x0 \ + -fieldValue 6558 \ + -auto true \ + -randomMask 0x0 \ + -startValue 0x0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.withChecksum.checksum-8" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.withChecksum.reserved-9" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.noChecksum-10" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyHolder.key-11" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyHolder.noKey-12" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequenceHolder.sequenceNum-13" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequenceHolder.noSequenceNum-14" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + } + + # Common fields for VXLAN and GRE + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernetNoFCS-5"/field:"ethernetNoFCS.header.destinationAddress-1" + set sg_stack $ixNetSG_Stack(2)/stack:"ethernetNoFCS-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"ethernetNoFCS.header.destinationAddress-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_dstmac \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 00:00:00:00:00:00] \ + -stepValue 00:00:00:00:00:00 \ + -fixedBits 00:00:00:00:00:00 \ + -fieldValue $inner_dstmac \ + -randomMask 00:00:00:00:00:00 \ + -startValue 00:00:00:00:00:00 + + set sg_field $ixNetSG_Stack(3)/field:"ethernetNoFCS.header.sourceAddress-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_srcmac \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 00:00:00:00:00:00] \ + -stepValue 00:00:00:00:00:00 \ + -fixedBits 00:00:00:00:00:00 \ + -fieldValue $inner_srcmac \ + -randomMask 00:00:00:00:00:00 \ + -startValue 00:00:00:00:00:00 + + set sg_field $ixNetSG_Stack(3)/field:"ethernetNoFCS.header.etherType-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 800 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0xFFFF] \ + -stepValue 0xFFFF \ + -fixedBits 0xFFFF \ + -fieldValue 800 \ + -auto true \ + -randomMask 0xFFFF \ + -startValue 0xFFFF + + set sg_stack $ixNetSG_Stack(2)/stack:"ipv4-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-6"/field:"ipv4.header.version-1"/ + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.version-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 4 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 4] \ + -stepValue 4 \ + -fixedBits 4 \ + -fieldValue 4 \ + -randomMask 4 \ + -startValue 4 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.headerLength-2" + ixNet setMultiAttrs $sg_field \ + -singleValue 5 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 5 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.raw-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.precedence-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "000\ Routine" \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.delay-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue Normal \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.throughput-6" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue Normal \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.reliability-7" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue Normal \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.monetary-8" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue Normal \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.unused-9" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.totalLength-18" + ixNet setMultiAttrs $sg_field \ + -singleValue 28 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 20] \ + -stepValue 20 \ + -fixedBits 20 \ + -fieldValue 28 \ + -auto true \ + -randomMask 20 \ + -startValue 20 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.identification-19" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.flags.reserved-20" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.flags.fragment-21" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "May\ fragment" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.flags.lastFragment-22" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "Last\ fragment" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.fragmentOffset-23" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.ttl-24" + ixNet setMultiAttrs $sg_field \ + -singleValue 64 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 64] \ + -stepValue 64 \ + -fixedBits 64 \ + -fieldValue 64 \ + -randomMask 64 \ + -startValue 64 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.protocol-25" + ixNet setMultiAttrs $sg_field \ + -singleValue 17 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 61] \ + -stepValue 61 \ + -fixedBits 61 \ + -fieldValue $inner_proto \ + -auto true \ + -randomMask 61 \ + -startValue 61 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.checksum-26" + ixNet setMultiAttrs $sg_field \ + -singleValue 63355 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 63355 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.srcIp-27" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_srcip \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0.0.0.0] \ + -stepValue 0.0.0.0 \ + -fixedBits 0.0.0.0 \ + -fieldValue $inner_srcip \ + -randomMask 0.0.0.0 \ + -startValue 0.0.0.0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.dstIp-28" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_dstip \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0.0.0.0] \ + -stepValue 0.0.0.0 \ + -fixedBits 0.0.0.0 \ + -fieldValue $inner_dstip \ + -randomMask 0.0.0.0 \ + -startValue 0.0.0.0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.options.pad-58" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + if { [string compare $inner_proto "udp"] == 0 } { + # INNER UDP + set sg_stack $ixNetSG_Stack(2)/stack:"udp-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"udp.header.srcPort-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_srcport \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 63] \ + -stepValue 63 \ + -fixedBits 63 \ + -fieldValue $inner_srcport \ + -auto true \ + -randomMask 63 \ + -startValue 63 + + set sg_field $ixNetSG_Stack(3)/field:"udp.header.dstPort-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_dstport \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 63] \ + -stepValue 63 \ + -fixedBits 63 \ + -fieldValue $inner_dstport \ + -auto true \ + -randomMask 63 \ + -startValue 63 + + set sg_field $ixNetSG_Stack(3)/field:"udp.header.length-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 8 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 8] \ + -stepValue 8 \ + -fixedBits 8 \ + -fieldValue 8 \ + -auto true \ + -randomMask 8 \ + -startValue 8 + + set sg_field $ixNetSG_Stack(3)/field:"udp.header.checksum-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + } else { + + # INNER TCP + set sg_stack $ixNetSG_Stack(2)/stack:"tcp-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.srcPort-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_srcport \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list $inner_srcport] \ + -stepValue 60 \ + -fixedBits 60 \ + -fieldValue $inner_srcport \ + -auto false \ + -randomMask 60 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 60 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dstPort-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_dstport \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list $inner_dstport] \ + -stepValue 60 \ + -fixedBits 60 \ + -fieldValue $inner_dstport \ + -auto false \ + -randomMask 60 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 60 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.sequenceNumber-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x00000000] \ + -stepValue 0x00000000 \ + -fixedBits 0x00000000 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0x00000000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x00000000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.acknowledgementNumber-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x00000000] \ + -stepValue 0x00000000 \ + -fixedBits 0x00000000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x00000000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x00000000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dataOffset-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 5 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 5] \ + -stepValue 5 \ + -fixedBits 5 \ + -fieldValue 5 \ + -auto true \ + -randomMask 5 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 5 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.reserved-6" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.nsBit-7" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.cwrBit-8" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.ecnEchoBit-9" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.urgBit-10" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.ackBit-11" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.pshBit-12" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.rstBit-13" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.synBit-14" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.finBit-15" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.window-16" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.checksum-17" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.urgentPtr-18" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + } + + set sg_stack $ixNetSG_Stack(2)/stack:"fcs-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"ethernet.fcs-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + + # VXLAN/GRE END + } else { + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"fcs-4" + # + set sg_stack $ixNetSG_Stack(2)/stack:"fcs-4" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"fcs-4"/field:"ethernet.fcs-1" + # + set sg_field $ixNetSG_Stack(3)/field:"ethernet.fcs-1" + ixNet setMultiAttrs $sg_field \ + -singleValue {0} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0}} \ + -stepValue {0} \ + -fixedBits {0} \ + -fieldValue {0} \ + -auto True \ + -randomMask {0} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue {1} + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + } + + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/transmissionDistribution + # + set sg_transmissionDistribution $ixNetSG_Stack(2)/transmissionDistribution + ixNet setMultiAttrs $sg_transmissionDistribution \ + -distributions {} + sg_commit + set sg_transmissionDistribution [lindex [ixNet remapIds $sg_transmissionDistribution] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/transmissionDistribution + # + set sg_transmissionDistribution $ixNetSG_Stack(1)/transmissionDistribution + ixNet setMultiAttrs $sg_transmissionDistribution \ + -distributions {} + sg_commit + sg_commit + set sg_transmissionDistribution [lindex [ixNet remapIds $sg_transmissionDistribution] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/tracking + # + set sg_tracking $ixNetSG_Stack(1)/tracking + ixNet setMultiAttrs $sg_tracking \ + -offset 0 \ + -oneToOneMesh False \ + -trackBy {} \ + -values {} \ + -fieldWidth thirtyTwoBits \ + -protocolOffset {Root.0} + ixNet setMultiAttrs $sg_tracking/egress \ + -offset {Outer VLAN Priority (3 bits)} \ + -enabled False \ + -customOffsetBits 0 \ + -encapsulation {Ethernet} \ + -customWidthBits 0 + ixNet setMultiAttrs $sg_tracking/latencyBin \ + -enabled False \ + -binLimits {1 1.42 2 2.82 4 5.66 8 11.32} \ + -numberOfBins 8 + sg_commit + set sg_tracking [lindex [ixNet remapIds $sg_tracking] 0] + set ixNetSG_Stack(2) $sg_tracking + + # EGRESS START + # Note: The scriptgen generated egress code were removed because we are not using + # flow tracking in our tests. + # Insert EGRESS lines here if needed + # EGRESS END + + # + # configuring the object that corresponds to /traffic/trafficItem:1/dynamicUpdate + # + set sg_dynamicUpdate $ixNetSG_Stack(1)/dynamicUpdate + ixNet setMultiAttrs $sg_dynamicUpdate \ + -enabledSessionAwareTrafficFields {} \ + -enabledDynamicUpdateFields {} + sg_commit + set sg_dynamicUpdate [lindex [ixNet remapIds $sg_dynamicUpdate] 0] + + ### + ### /quickTest area + ### + + # + # configuring the object that corresponds to /quickTest/rfc2544throughput:1 + # + if {$rfc2544TestType == "throughput"} { + set sg_rfc2544throughput [ixNet add $ixNetSG_Stack(0)/quickTest rfc2544throughput] + ixNet setMultiAttrs $sg_rfc2544throughput \ + -name {QuickTest1} \ + -mode existingMode \ + -inputParameters {{}} + ixNet setMultiAttrs $sg_rfc2544throughput/testConfig \ + -protocolItem {} \ + -enableMinFrameSize False \ + -framesize $frameSize \ + -reportTputRateUnit mbps \ + -duration $duration \ + -numtrials $numTests \ + -trafficType constantLoading \ + -burstSize 1 \ + -framesPerBurstGap 1 \ + -tolerance 0 \ + -frameLossUnit {0} \ + -staggeredStart False \ + -framesizeList $frameSize \ + -frameSizeMode custom \ + -rateSelect percentMaxRate \ + -percentMaxRate 100 \ + -resolution 0.01 \ + -forceRegenerate False \ + -reportSequenceError False \ + -ipv4rate 50 \ + -ipv6rate 50 \ + -loadRateList $frameRate \ + -fixedLoadUnit percentMaxRate \ + -loadRateValue 80 \ + -incrementLoadUnit percentMaxRate \ + -initialIncrementLoadRate 10 \ + -stepIncrementLoadRate 10 \ + -maxIncrementLoadRate 100 \ + -randomLoadUnit percentMaxRate \ + -minRandomLoadRate 10 \ + -maxRandomLoadRate 80 \ + -countRandomLoadRate 1 \ + -minFpsRate 1000 \ + -minKbpsRate 64 \ + -txDelay 2 \ + -delayAfterTransmit 2 \ + -minRandomFrameSize 64 \ + -maxRandomFrameSize 1518 \ + -countRandomFrameSize 1 \ + -minIncrementFrameSize 64 \ + -stepIncrementFrameSize 64 \ + -maxIncrementFrameSize 1518 \ + -calculateLatency True \ + -latencyType storeForward \ + -calculateJitter False \ + -enableDataIntegrity False \ + -enableBackoffIteration False \ + -enableSaturationIteration False \ + -enableStopTestOnHighLoss False \ + -enableBackoffUseAs% False \ + -backoffIteration 1 \ + -saturationIteration 1 \ + -stopTestOnHighLoss 0 \ + -loadType $loadType \ + -stepLoadUnit percentMaxRate \ + -customLoadUnit percentMaxRate \ + -comboLoadUnit percentMaxRate \ + -binaryLoadUnit percentMaxRate \ + -initialBinaryLoadRate 100 \ + -minBinaryLoadRate 1 \ + -maxBinaryLoadRate 100 \ + -binaryResolution 1 \ + -binaryBackoff 50 \ + -binaryTolerance $tolerance \ + -binaryFrameLossUnit % \ + -comboFrameLossUnit % \ + -stepFrameLossUnit % \ + -initialStepLoadRate 10 \ + -maxStepLoadRate 100 \ + -stepStepLoadRate 10 \ + -stepTolerance 0 \ + -initialComboLoadRate 10 \ + -maxComboLoadRate 100 \ + -minComboLoadRate 10 \ + -stepComboLoadRate 10 \ + -comboResolution 1 \ + -comboBackoff 50 \ + -comboTolerance 0 \ + -binarySearchType linear \ + -unchangedValueList {0} \ + -enableFastConvergence $fastConvergence \ + -fastConvergenceDuration $convergenceDuration \ + -fastConvergenceThreshold 10 \ + -framesizeFixedValue $frameSize \ + -gap 3 \ + -unchangedInitial False \ + -generateTrackingOptionAggregationFiles False \ + -enableExtraIterations False \ + -extraIterationOffsets {10, -10} \ + -usePercentOffsets False \ + -imixDistribution weight \ + -imixAdd {0} \ + -imixDelete {0} \ + -imixData {{{{64}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 40}}{{128}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 30}}{{256}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 30}}}} \ + -imixEnabled False \ + -imixTemplates none \ + -framesizeImixList $frameSize \ + -imixTrafficType {UNCHNAGED} \ + -mapType {oneToOne} \ + -supportedTrafficTypes {mac,ipv4,ipv6,ipmix} + ixNet setMultiAttrs $sg_rfc2544throughput/learnFrames \ + -learnFrequency $learningFrequency \ + -learnNumFrames 10 \ + -learnRate 100 \ + -learnWaitTime 1000 \ + -learnFrameSize $frameSize \ + -fastPathLearnFrameSize $frameSize \ + -learnWaitTimeBeforeTransmit 0 \ + -learnSendMacOnly False \ + -learnSendRouterSolicitation False \ + -fastPathEnable $fastPathEnable \ + -fastPathRate 100 \ + -fastPathNumFrames 10 + ixNet setMultiAttrs $sg_rfc2544throughput/passCriteria \ + -passCriteriaLoadRateMode average \ + -passCriteriaLoadRateValue 100 \ + -passCriteriaLoadRateScale mbps \ + -enablePassFail False \ + -enableRatePassFail False \ + -enableLatencyPassFail False \ + -enableStandardDeviationPassFail False \ + -latencyThresholdValue 10 \ + -latencyThresholdScale us \ + -latencyThresholdMode average \ + -latencyVariationThresholdValue 0 \ + -latencyVariationThresholdScale us \ + -latencyVarThresholdMode average \ + -enableSequenceErrorsPassFail False \ + -seqErrorsThresholdValue 0 \ + -seqErrorsThresholdMode average \ + -enableDataIntegrityPassFail False \ + -dataErrorThresholdValue 0 \ + -dataErrorThresholdMode average + sg_commit + set sg_rfc2544throughput [lindex [ixNet remapIds $sg_rfc2544throughput] 0] + set ixNetSG_Stack(1) $sg_rfc2544throughput + + # + # configuring the object that corresponds to /quickTest/rfc2544throughput:1/protocols + # + set sg_protocols $ixNetSG_Stack(1)/protocols + ixNet setMultiAttrs $sg_protocols \ + -protocolState default \ + -waitAfterStart 120 \ + -waitAfterStop 30 + sg_commit + set sg_protocols [lindex [ixNet remapIds $sg_protocols] 0] + + # + # configuring the object that corresponds to /quickTest/rfc2544throughput:1/trafficSelection:1 + # + set sg_trafficSelection [ixNet add $ixNetSG_Stack(1) trafficSelection] + ixNet setMultiAttrs $sg_trafficSelection \ + -id $ixNetSG_ref(26) \ + -includeMode inTest \ + -itemType trafficItem + sg_commit + set sg_trafficSelection [lindex [ixNet remapIds $sg_trafficSelection] 0] + ixNet commit + + } elseif {$rfc2544TestType == "back2back"} { + # + # configuring the object that corresponds to /quickTest/rfc2544back2back:2 + # + set sg_rfc2544back2back [ixNet add $ixNetSG_Stack(0)/quickTest rfc2544back2back] + ixNet setMultiAttrs $sg_rfc2544back2back \ + -name {B2B} \ + -mode existingMode \ + -inputParameters {{}} + ixNet setMultiAttrs $sg_rfc2544back2back/testConfig \ + -protocolItem {} \ + -framesize $frameSize \ + -reportTputRateUnit mbps \ + -rfc2544ImixDataQoS False \ + -detailedResultsEnabled True \ + -rfc2889ordering noOrdering \ + -floodedFramesEnabled False \ + -duration $duration \ + -numtrials $numTests \ + -trafficType constantLoading \ + -burstSize 1 \ + -framesPerBurstGap 1 \ + -tolerance 0 \ + -frameLossUnit {0} \ + -staggeredStart False \ + -framesizeList $frameSize \ + -frameSizeMode custom \ + -rateSelect percentMaxRate \ + -percentMaxRate 100 \ + -resolution 0.01 \ + -forceRegenerate False \ + -reportSequenceError False \ + -ipv4rate 50 \ + -ipv6rate 50 \ + -loadRateList $frameRate \ + -minFpsRate 1000 \ + -minKbpsRate 64 \ + -txDelay 2 \ + -delayAfterTransmit 2 \ + -minRandomFrameSize 64 \ + -maxRandomFrameSize 1518 \ + -countRandomFrameSize 1 \ + -minIncrementFrameSize 64 \ + -stepIncrementFrameSize 64 \ + -maxIncrementFrameSize 1518 \ + -calculateLatency False \ + -calibrateLatency False \ + -latencyType cutThrough \ + -calculateJitter False \ + -enableDataIntegrity False \ + -loadType $loadType \ + -binaryFrameLossUnit % \ + -loadUnit percentMaxRate \ + -customLoadUnit percentMaxRate \ + -randomLoadUnit percentMaxRate \ + -incrementLoadUnit percentMaxRate \ + -binaryResolution 100 \ + -binaryBackoff 50 \ + -binaryTolerance $tolerance \ + -initialIncrementLoadRate 100 \ + -stepIncrementLoadRate 10 \ + -maxIncrementLoadRate 100 \ + -minRandomLoadRate 10 \ + -maxRandomLoadRate 80 \ + -countRandomLoadRate 1 \ + -numFrames {100000} \ + -loadRate 100 \ + -enableMinFrameSize False \ + -gap 3 \ + -generateTrackingOptionAggregationFiles False \ + -sendFullyMeshed False \ + -imixDistribution weight \ + -imixAdd {0} \ + -imixDelete {0} \ + -imixData {{{{64}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 40}}{{128}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 30}}{{256}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 30}}}} \ + -imixEnabled False \ + -imixTemplates none \ + -framesizeImixList $frameSize \ + -imixTrafficType {UNCHNAGED} \ + -ipRatioMode fixed \ + -ipv4RatioList {10,25,50,75,90} \ + -ipv6RatioList {90,75,50,25,10} \ + -minIncrementIpv4Ratio {10} \ + -stepIncrementIpv4Ratio {10} \ + -maxIncrementIpv4Ratio {90} \ + -minIncrementIpv6Ratio {90} \ + -stepIncrementIpv6Ratio {-10} \ + -maxIncrementIpv6Ratio {10} \ + -minRandomIpv4Ratio {10} \ + -maxRandomIpv4Ratio {90} \ + -minRandomIpv6Ratio {90} \ + -maxRandomIpv6Ratio {10} \ + -countRandomIpRatio 1 \ + -mapType {oneToOne|manyToMany|fullMesh} \ + -supportedTrafficTypes {mac,ipv4,ipv6,ipmix} + ixNet setMultiAttrs $sg_rfc2544back2back/learnFrames \ + -learnFrequency $learningFrequency \ + -learnNumFrames 10 \ + -learnRate 100 \ + -learnWaitTime 1000 \ + -learnFrameSize 64 \ + -fastPathLearnFrameSize 64 \ + -learnWaitTimeBeforeTransmit 0 \ + -learnSendMacOnly False \ + -learnSendRouterSolicitation False \ + -fastPathEnable $fastPathEnable \ + -fastPathRate 100 \ + -fastPathNumFrames 10 + ixNet setMultiAttrs $sg_rfc2544back2back/passCriteria \ + -passCriteriaLoadRateMode average \ + -passCriteriaLoadRateValue 100 \ + -passCriteriaLoadRateScale mbps \ + -enablePassFail False \ + -enableRatePassFail False \ + -enableLatencyPassFail False \ + -enableStandardDeviationPassFail False \ + -latencyThresholdValue 10 \ + -latencyThresholdScale us \ + -latencyThresholdMode average \ + -latencyVariationThresholdValue 0 \ + -latencyVariationThresholdScale us \ + -latencyVarThresholdMode average \ + -enableSequenceErrorsPassFail False \ + -seqErrorsThresholdValue 0 \ + -seqErrorsThresholdMode average \ + -enableDataIntegrityPassFail False \ + -dataErrorThresholdValue 0 \ + -dataErrorThresholdMode average \ + -enableFrameCountPassFail False \ + -passCriteriaFrameCountValue 100 \ + -passCriteriaFrameCountMode average + sg_commit + set sg_rfc2544back2back [lindex [ixNet remapIds $sg_rfc2544back2back] 0] + set ixNetSG_Stack(1) $sg_rfc2544back2back + + # + # configuring the object that corresponds to /quickTest/rfc2544back2back:2/protocols + # + set sg_protocols $ixNetSG_Stack(1)/protocols + ixNet setMultiAttrs $sg_protocols \ + -protocolState default \ + -waitAfterStart 120 \ + -waitAfterStop 30 + sg_commit + set sg_protocols [lindex [ixNet remapIds $sg_protocols] 0] + + # + # configuring the object that corresponds to /quickTest/rfc2544back2back:2/trafficSelection:1 + # + set sg_trafficSelection [ixNet add $ixNetSG_Stack(1) trafficSelection] + ixNet setMultiAttrs $sg_trafficSelection \ + -id $ixNetSG_ref(26) \ + -includeMode inTest \ + -itemType trafficItem + sg_commit + set sg_trafficSelection [lindex [ixNet remapIds $sg_trafficSelection] 0] + ixNet commit + } + + # + # getting and applying the RFC2544 test + # + set root [ixNet getRoot] + foreach traf_item [ixNet getList $root/traffic trafficItem] { + ixNet exec generate $traf_item + } + + set qt [ixNet getList $root quickTest] + if {$rfc2544TestType == "throughput"} { + set rfc2544test [ixNet getList $qt rfc2544throughput] + } elseif {$rfc2544TestType == "back2back"} { + set rfc2544test [ixNet getList $qt rfc2544back2back] + } + ixNet exec apply $rfc2544test + after 5000 + + # + # starting the RFC2544 Throughput test + # + puts "Starting test..." + ixNet exec start $rfc2544test +} + +proc waitForRfc2544Test { } { + # Wait for- and return results of- RFC2544 quicktest. + + global rfc2544test + + puts "Waiting for test to complete..." + set result [ixNet exec waitForTest $rfc2544test] + puts "Finished Test" + + return "$result" +} diff --git a/3rd_party/ixia/ixnetrfc2544v2_random_udp_crc.tcl b/3rd_party/ixia/ixnetrfc2544v2_random_udp_crc.tcl new file mode 100755 index 00000000..dc35f78e --- /dev/null +++ b/3rd_party/ixia/ixnetrfc2544v2_random_udp_crc.tcl @@ -0,0 +1,3582 @@ +#!/usr/bin/env tclsh + +# Copyright (c) 2014, Ixia +# Copyright (c) 2015-2017, Intel Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the copyright holder nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +# This file is a modified version of a script generated by Ixia +# IxNetwork. + +lappend auto_path [list $lib_path] + +################################################################### +########################## Configuration ########################## +################################################################### + +# verify that the IXIA chassis spec is given + +set reqVars [list "machine" "port" "user" "chassis" "card" "port1" "port2" "output_dir" "bidir"] +set rfc2544test "" + +foreach var $reqVars { + set var_ns [namespace which -variable "$var"] + if { [string compare $var_ns ""] == 0 } { + errorMsg "The '$var' variable is undefined. Did you set it?" + return -1 + } +} + +# machine configuration + +set ::IxNserver $machine +set ::IxNport $port +set ::biDirect $bidir + +# change to windows path format and append directory +set output_dir [string map {"/" "\\"} $output_dir] +set output_dir "$output_dir\\rfctests" +puts "Output directory is $output_dir" + +proc startRfc2544Test { testSpec trafficSpec } { + # Start RFC2544 quicktest. + + # Configure global variables. See documentation on 'global' for more + # information on why this is necessary + # https://www.tcl.tk/man/tcl8.5/tutorial/Tcl13.html + global rfc2544test + global sg_rfc2544throughput + global sg_rfc2544back2back + + # flow spec + + set rfc2544TestType [dict get $testSpec rfc2544TestType] + + set binary [dict get $testSpec binary] + + set duration [dict get $testSpec duration] + + set L2CountValue 1 + set L2Increment False + set L3ValueType singleValue + set L3CountValue 1 + set L4ValueType singleValue + set L4CountValue 1 + + # RFC2544 to IXIA terminology mapping (it affects Ixia configuration inside this script): + # Test => Trial + # Trial => Iteration + if {$binary} { + set numTests [dict get $testSpec tests] + set frameRate 100 + set tolerance [dict get $testSpec lossrate] + set loadType binary + } else { + set numTests 1 + set frameRate [dict get $testSpec framerate] + set tolerance 0.0 + set loadType custom + } + + set learningFrames True + + if {$learningFrames} { + set learningFrequency oncePerTest + set fastPathEnable True + } else { + set learningFrequency never + set fastPathEnable False + } + + set multipleStreams [dict get $testSpec multipleStreams] + set streamType [dict get $testSpec streamType] + + if {($multipleStreams < 0)} { + set multipleStreams 0 + } + + if {$multipleStreams} { + if {($streamType == "L2")} { + set L2CountValue $multipleStreams + set L2Increment True + } elseif {($streamType == "L3")} { + set L3ValueType increment + set L3CountValue $multipleStreams + } else { + set L4ValueType increment + set L4CountValue $multipleStreams + } + } + + set fastConvergence True + set convergenceDuration [expr $duration/10] + + # traffic spec + + # 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_l4 srcport] + set dstPort [dict get $trafficSpec_l4 dstport] + + # Tested protocols: udp, tcp, gre + set proto [dict get $trafficSpec_l3 proto] + set proto [string tolower $proto] + set srcIp [dict get $trafficSpec_l3 srcip] + set dstIp [dict get $trafficSpec_l3 dstip] + + set proto_value 17 + if { [string compare $proto "tcp"] == 0 } { + set proto_value 6 + } + + # VXLAN + set vxlan_enabled [dict exists $trafficSpec_l4 vni] + set geneve_enabled [dict exists $trafficSpec_l4 geneve_vni] + + if { $vxlan_enabled } { + puts "VXLAN is enabled. Setting VXLAN variables" + set vni [dict get $trafficSpec_l4 vni] + set inner_srcmac [dict get $trafficSpec_l4 inner_srcmac] + set inner_dstmac [dict get $trafficSpec_l4 inner_dstmac] + set inner_srcip [dict get $trafficSpec_l4 inner_srcip] + set inner_dstip [dict get $trafficSpec_l4 inner_dstip] + set inner_proto [dict get $trafficSpec_l4 inner_proto] + set inner_proto [string tolower $inner_proto] + set inner_srcport [dict get $trafficSpec_l4 inner_srcport] + set inner_dstport [dict get $trafficSpec_l4 inner_dstport] + } elseif { $geneve_enabled } { + puts "GENEVE is enabled. Setting GENEVE variables" + set geneve_vni [dict get $trafficSpec_l4 geneve_vni] + set inner_srcmac [dict get $trafficSpec_l4 inner_srcmac] + set inner_dstmac [dict get $trafficSpec_l4 inner_dstmac] + set inner_srcip [dict get $trafficSpec_l4 inner_srcip] + set inner_dstip [dict get $trafficSpec_l4 inner_dstip] + set inner_proto [dict get $trafficSpec_l4 inner_proto] + set inner_proto [string tolower $inner_proto] + set inner_srcport [dict get $trafficSpec_l4 inner_srcport] + set inner_dstport [dict get $trafficSpec_l4 inner_dstport] + } + + set gre_enabled False + if { [string compare $proto "gre"] == 0 } { + puts "GRE is enabled. Setting GRE variables" + set proto_value 47 + set gre_enabled True + set inner_srcmac [dict get $trafficSpec_l4 inner_srcmac] + set inner_dstmac [dict get $trafficSpec_l4 inner_dstmac] + set inner_srcip [dict get $trafficSpec_l4 inner_srcip] + set inner_dstip [dict get $trafficSpec_l4 inner_dstip] + set inner_proto [dict get $trafficSpec_l4 inner_proto] + set inner_proto [string tolower $inner_proto] + set inner_srcport [dict get $trafficSpec_l4 inner_srcport] + set inner_dstport [dict get $trafficSpec_l4 inner_dstport] + } + + if {$frameSize < 68 } { + if {$rfc2544TestType == "back2back"} { + puts "INFO: Packet size too small, packet size will be \ + increased to 68 for this test" + } + } + # constants + + set VERSION [package require IxTclNetwork] + + ################################################################### + ############################ Operation ############################ + ################################################################### + + puts "Connecting to IxNetwork machine..." + + ixNet connect $::IxNserver -port $::IxNport -version $VERSION + + puts "Connected to IxNetwork machine" + + puts "Configuring IxNetwork machine..." + + set ::_sg_cc 0 + proc sg_commit {} {ixNet commit} + + ixNet rollback + ixNet setSessionParameter version 6.30.701.16 + ixNet execute newConfig + set ixNetSG_Stack(0) [ixNet getRoot] + + # + # setting global options + # + set sg_top [ixNet getRoot] + ixNet setMultiAttrs $sg_top/availableHardware \ + -offChassisHwM {} \ + -isOffChassis False + ixNet setMultiAttrs $sg_top/globals/preferences \ + -connectPortsOnLoadConfig True \ + -rebootPortsOnConnect False + ixNet setMultiAttrs $sg_top/globals/interfaces \ + -arpOnLinkup True \ + -nsOnLinkup True \ + -sendSingleArpPerGateway True \ + -sendSingleNsPerGateway True + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/checksums \ + -dropRxL2FcsErrors False \ + -correctTxL2FcsErrors False \ + -alwaysCorrectWhenModifying True \ + -correctTxChecksumOverIp False \ + -correctTxIpv4Checksum False + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/rxRateLimit \ + -enabled False \ + -value 8 \ + -units {kKilobitsPerSecond} + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/drop \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/reorder \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 \ + -skipCount 1 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/duplicate \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 \ + -duplicateCount 1 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/bitError \ + -enabled False \ + -logRate 3 \ + -skipEndOctets 0 \ + -skipStartOctets 0 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/delay \ + -enabled False \ + -value 300 \ + -units {kMicroseconds} + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/delayVariation \ + -uniformSpread 0 \ + -enabled False \ + -units {kMicroseconds} \ + -distribution {kUniform} \ + -exponentialMeanArrival 0 \ + -gaussianStandardDeviation 0 + ixNet setMultiAttrs $sg_top/impairment/defaultProfile/customDelayVariation \ + -enabled False \ + -name {} + ixNet setMultiAttrs $sg_top/statistics \ + -additionalFcoeStat2 fcoeInvalidFrames \ + -csvLogPollIntervalMultiplier 1 \ + -pollInterval 2 \ + -guardrailEnabled True \ + -enableCsvLogging False \ + -dataStorePollingIntervalMultiplier 1 \ + -maxNumberOfStatsPerCustomGraph 16 \ + -additionalFcoeStat1 fcoeInvalidDelimiter \ + -timestampPrecision 3 \ + -enableDataCenterSharedStats False \ + -timeSynchronization syncTimeToTestStart \ + -enableAutoDataStore False + ixNet setMultiAttrs $sg_top/statistics/measurementMode \ + -measurementMode mixedMode + ixNet setMultiAttrs $sg_top/eventScheduler \ + -licenseServerLocation {127.0.0.1} + ixNet setMultiAttrs $sg_top/traffic \ + -destMacRetryCount 1 \ + -maxTrafficGenerationQueries 500 \ + -enableStaggeredTransmit False \ + -learningFrameSize $frameSize \ + -useTxRxSync True \ + -enableDestMacRetry True \ + -enableMulticastScalingFactor False \ + -destMacRetryDelay 5 \ + -largeErrorThreshhold 2 \ + -refreshLearnedInfoBeforeApply False \ + -enableMinFrameSize False \ + -macChangeOnFly False \ + -waitTime 1 \ + -enableInstantaneousStatsSupport False \ + -learningFramesCount 10 \ + -globalStreamControl continuous \ + -displayMplsCurrentLabelValue False \ + -mplsLabelLearningTimeout 30 \ + -enableStaggeredStartDelay True \ + -enableDataIntegrityCheck False \ + -enableSequenceChecking False \ + -globalStreamControlIterations 1 \ + -enableStreamOrdering False \ + -frameOrderingMode none \ + -learningFramesRate 100 + ixNet setMultiAttrs $sg_top/traffic/statistics/latency \ + -enabled True \ + -mode storeForward + ixNet setMultiAttrs $sg_top/traffic/statistics/interArrivalTimeRate \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/delayVariation \ + -enabled False \ + -statisticsMode rxDelayVariationErrorsAndRate \ + -latencyMode storeForward \ + -largeSequenceNumberErrorThreshold 2 + ixNet setMultiAttrs $sg_top/traffic/statistics/sequenceChecking \ + -enabled False \ + -sequenceMode rxThreshold + ixNet setMultiAttrs $sg_top/traffic/statistics/advancedSequenceChecking \ + -enabled False \ + -advancedSequenceThreshold 1 + ixNet setMultiAttrs $sg_top/traffic/statistics/cpdpConvergence \ + -enabled False \ + -dataPlaneJitterWindow 10485760 \ + -dataPlaneThreshold 95 \ + -enableDataPlaneEventsRateMonitor False \ + -enableControlPlaneEvents False + ixNet setMultiAttrs $sg_top/traffic/statistics/packetLossDuration \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/dataIntegrity \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/errorStats \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/prbs \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/iptv \ + -enabled False + ixNet setMultiAttrs $sg_top/traffic/statistics/l1Rates \ + -enabled False + ixNet setMultiAttrs $sg_top/quickTest/globals \ + -productLabel {Your switch/router name here} \ + -serialNumber {Your switch/router serial number here} \ + -version {Your firmware version here} \ + -comments {} \ + -titlePageComments {} \ + -maxLinesToDisplay 100 \ + -enableCheckLinkState False \ + -enableAbortIfLinkDown False \ + -enableSwitchToStats True \ + -enableCapture False \ + -enableSwitchToResult True \ + -enableGenerateReportAfterRun False \ + -enableRebootCpu False \ + -saveCaptureBeforeRun False \ + -linkDownTimeout 5 \ + -sleepTimeAfterReboot 10 \ + -useDefaultRootPath False \ + -outputRootPath $::output_dir + sg_commit + set sg_top [lindex [ixNet remapIds $sg_top] 0] + set ixNetSG_Stack(0) $sg_top + + ### + ### /vport area + ### + + # + # configuring the object that corresponds to /vport:1 + # + set sg_vport [ixNet add $ixNetSG_Stack(0) vport] + ixNet setMultiAttrs $sg_vport \ + -transmitIgnoreLinkStatus False \ + -txGapControlMode averageMode \ + -type tenGigLan \ + -connectedTo ::ixNet::OBJ-null \ + -txMode interleaved \ + -isPullOnly False \ + -rxMode captureAndMeasure \ + -name {10GE LAN - 001} + ixNet setMultiAttrs $sg_vport/l1Config \ + -currentType tenGigLan + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan \ + -ppm 0 \ + -flowControlDirectedAddress "01 80 C2 00 00 01" \ + -enablePPM False \ + -autoInstrumentation endOfFrame \ + -transmitClocking internal \ + -txIgnoreRxLinkFaults False \ + -loopback False \ + -enableLASIMonitoring False \ + -enabledFlowControl True + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan/oam \ + -tlvType {00} \ + -linkEvents False \ + -enabled False \ + -vendorSpecificInformation {00 00 00 00} \ + -macAddress "00:00:00:00:00:00" \ + -loopback False \ + -idleTimer 5 \ + -tlvValue {00} \ + -enableTlvOption False \ + -maxOAMPDUSize 64 \ + -organizationUniqueIdentifier {000000} + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan/fcoe \ + -supportDataCenterMode False \ + -priorityGroupSize priorityGroupSize-8 \ + -pfcPauseDelay 1 \ + -pfcPriorityGroups {0 1 2 3 4 5 6 7} \ + -flowControlType ieee802.1Qbb \ + -enablePFCPauseDelay False + ixNet setMultiAttrs $sg_vport/l1Config/fortyGigLan \ + -ppm 0 \ + -flowControlDirectedAddress "01 80 C2 00 00 01" \ + -enablePPM False \ + -autoInstrumentation endOfFrame \ + -transmitClocking internal \ + -txIgnoreRxLinkFaults False \ + -loopback False \ + -enableLASIMonitoring False \ + -enabledFlowControl False + ixNet setMultiAttrs $sg_vport/l1Config/fortyGigLan/fcoe \ + -supportDataCenterMode False \ + -priorityGroupSize priorityGroupSize-8 \ + -pfcPauseDelay 1 \ + -pfcPriorityGroups {0 1 2 3 4 5 6 7} \ + -flowControlType ieee802.1Qbb \ + -enablePFCPauseDelay False + ixNet setMultiAttrs $sg_vport/l1Config/OAM \ + -tlvType {00} \ + -linkEvents False \ + -enabled False \ + -vendorSpecificInformation {00 00 00 00} \ + -macAddress "00:00:00:00:00:00" \ + -loopback False \ + -idleTimer 5 \ + -tlvValue {00} \ + -enableTlvOption False \ + -maxOAMPDUSize 64 \ + -organizationUniqueIdentifier {000000} + ixNet setMultiAttrs $sg_vport/l1Config/rxFilters/filterPalette \ + -sourceAddress1Mask {00:00:00:00:00:00} \ + -destinationAddress1Mask {00:00:00:00:00:00} \ + -sourceAddress2 {00:00:00:00:00:00} \ + -pattern2OffsetType fromStartOfFrame \ + -pattern2Offset 20 \ + -pattern1Mask {00} \ + -sourceAddress2Mask {00:00:00:00:00:00} \ + -destinationAddress2 {00:00:00:00:00:00} \ + -destinationAddress1 {00:00:00:00:00:00} \ + -sourceAddress1 {00:00:00:00:00:00} \ + -pattern1 {00} \ + -destinationAddress2Mask {00:00:00:00:00:00} \ + -pattern2Mask {00} \ + -pattern1Offset 20 \ + -pattern2 {00} \ + -pattern1OffsetType fromStartOfFrame + ixNet setMultiAttrs $sg_vport/protocols/arp \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/bfd \ + -enabled False \ + -intervalValue 0 \ + -packetsPerInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/bgp \ + -autoFillUpDutIp False \ + -disableReceivedUpdateValidation False \ + -enableAdVplsPrefixLengthInBits False \ + -enableExternalActiveConnect True \ + -enableInternalActiveConnect True \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -externalRetries 0 \ + -externalRetryDelay 120 \ + -internalRetries 0 \ + -internalRetryDelay 120 \ + -mldpP2mpFecType 6 \ + -triggerVplsPwInitiation False + ixNet setMultiAttrs $sg_vport/protocols/cfm \ + -enableOptionalLmFunctionality False \ + -enableOptionalTlvValidation True \ + -enabled False \ + -receiveCcm True \ + -sendCcm True \ + -suppressErrorsOnAis True + ixNet setMultiAttrs $sg_vport/protocols/eigrp \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/elmi \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/igmp \ + -enabled False \ + -numberOfGroups 0 \ + -numberOfQueries 0 \ + -queryTimePeriod 0 \ + -sendLeaveOnStop True \ + -statsEnabled False \ + -timePeriod 0 + ixNet setMultiAttrs $sg_vport/protocols/isis \ + -allL1RbridgesMac "01:80:c2:00:00:40" \ + -emulationType isisL3Routing \ + -enabled False \ + -helloMulticastMac "01:80:c2:00:00:41" \ + -lspMgroupPdusPerInterval 0 \ + -nlpId 192 \ + -rateControlInterval 0 \ + -sendP2PHellosToUnicastMac True \ + -spbAllL1BridgesMac "09:00:2b:00:00:05" \ + -spbHelloMulticastMac "09:00:2b:00:00:05" \ + -spbNlpId 192 + ixNet setMultiAttrs $sg_vport/protocols/lacp \ + -enablePreservePartnerInfo False \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/ldp \ + -enableDiscardSelfAdvFecs False \ + -enableHelloJitter True \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -helloHoldTime 15 \ + -helloInterval 5 \ + -keepAliveHoldTime 30 \ + -keepAliveInterval 10 \ + -p2mpCapabilityParam 1288 \ + -p2mpFecType 6 \ + -targetedHelloInterval 15 \ + -targetedHoldTime 45 \ + -useTransportLabelsForMplsOam False + ixNet setMultiAttrs $sg_vport/protocols/linkOam \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/lisp \ + -burstIntervalInMs 0 \ + -enabled False \ + -ipv4MapRegisterPacketsPerBurst 0 \ + -ipv4MapRequestPacketsPerBurst 0 \ + -ipv4SmrPacketsPerBurst 0 \ + -ipv6MapRegisterPacketsPerBurst 0 \ + -ipv6MapRequestPacketsPerBurst 0 \ + -ipv6SmrPacketsPerBurst 0 + ixNet setMultiAttrs $sg_vport/protocols/mld \ + -enableDoneOnStop True \ + -enabled False \ + -mldv2Report type143 \ + -numberOfGroups 0 \ + -numberOfQueries 0 \ + -queryTimePeriod 0 \ + -timePeriod 0 + ixNet setMultiAttrs $sg_vport/protocols/mplsOam \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/mplsTp \ + -apsChannelType {00 02 } \ + -bfdCcChannelType {00 07 } \ + -delayManagementChannelType {00 05 } \ + -enableHighPerformanceMode True \ + -enabled False \ + -faultManagementChannelType {00 58 } \ + -lossMeasurementChannelType {00 04 } \ + -onDemandCvChannelType {00 09 } \ + -pwStatusChannelType {00 0B } \ + -y1731ChannelType {7F FA } + ixNet setMultiAttrs $sg_vport/protocols/ospf \ + -enableDrOrBdr False \ + -enabled False \ + -floodLinkStateUpdatesPerInterval 0 \ + -rateControlInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/ospfV3 \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/pimsm \ + -bsmFramePerInterval 0 \ + -crpFramePerInterval 0 \ + -dataMdtFramePerInterval 0 \ + -denyGrePimIpPrefix {0.0.0.0/32} \ + -enableDiscardJoinPruneProcessing False \ + -enableRateControl False \ + -enabled False \ + -helloMsgsPerInterval 0 \ + -interval 0 \ + -joinPruneMessagesPerInterval 0 \ + -registerMessagesPerInterval 0 \ + -registerStopMessagesPerInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/ping \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/rip \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/ripng \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/rsvp \ + -enableControlLspInitiationRate False \ + -enableShowTimeValue False \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -maxLspInitiationsPerSec 400 \ + -useTransportLabelsForMplsOam False + ixNet setMultiAttrs $sg_vport/protocols/stp \ + -enabled False + ixNet setMultiAttrs $sg_vport/rateControlParameters \ + -maxRequestsPerBurst 1 \ + -maxRequestsPerSec 250 \ + -minRetryInterval 10 \ + -retryCount 3 \ + -sendInBursts False \ + -sendRequestsAsFastAsPossible False + ixNet setMultiAttrs $sg_vport/capture \ + -controlCaptureTrigger {} \ + -controlCaptureFilter {} \ + -hardwareEnabled False \ + -softwareEnabled False \ + -displayFiltersDataCapture {} \ + -displayFiltersControlCapture {} \ + -controlBufferSize 30 \ + -controlBufferBehaviour bufferLiveNonCircular + ixNet setMultiAttrs $sg_vport/protocolStack/options \ + -routerSolicitationDelay 1 \ + -routerSolicitationInterval 4 \ + -routerSolicitations 3 \ + -retransTime 1000 \ + -dadTransmits 1 \ + -dadEnabled True \ + -ipv4RetransTime 3000 \ + -ipv4McastSolicit 4 + sg_commit + set sg_vport [lindex [ixNet remapIds $sg_vport] 0] + set ixNetSG_ref(2) $sg_vport + set ixNetSG_Stack(1) $sg_vport + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:1 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:1 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:2 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:2 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:3 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:3 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:4 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:4 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:5 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:5 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/l1Config/rxFilters/uds:6 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:6 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:1/protocols/static/lan:1 + # + set sg_lan [ixNet add $ixNetSG_Stack(1)/protocols/static lan] + ixNet setMultiAttrs $sg_lan \ + -atmEncapsulation ::ixNet::OBJ-null \ + -count $L2CountValue \ + -countPerVc 1 \ + -enableIncrementMac $L2Increment \ + -enableIncrementVlan False \ + -enableSiteId False \ + -enableVlan False \ + -enabled True \ + -frEncapsulation ::ixNet::OBJ-null \ + -incrementPerVcVlanMode noIncrement \ + -incrementVlanMode noIncrement \ + -mac $srcMac \ + -macRangeMode normal \ + -numberOfVcs 1 \ + -siteId 0 \ + -skipVlanIdZero True \ + -tpid {0x8100} \ + -trafficGroupId ::ixNet::OBJ-null \ + -vlanCount 1 \ + -vlanId {1} \ + -vlanPriority {0} + sg_commit + set sg_lan [lindex [ixNet remapIds $sg_lan] 0] + + # + # configuring the object that corresponds to /vport:2 + # + set sg_vport [ixNet add $ixNetSG_Stack(0) vport] + ixNet setMultiAttrs $sg_vport \ + -transmitIgnoreLinkStatus False \ + -txGapControlMode averageMode \ + -type tenGigLan \ + -connectedTo ::ixNet::OBJ-null \ + -txMode interleaved \ + -isPullOnly False \ + -rxMode captureAndMeasure \ + -name {10GE LAN - 002} + ixNet setMultiAttrs $sg_vport/l1Config \ + -currentType tenGigLan + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan \ + -ppm 0 \ + -flowControlDirectedAddress "01 80 C2 00 00 01" \ + -enablePPM False \ + -autoInstrumentation endOfFrame \ + -transmitClocking internal \ + -txIgnoreRxLinkFaults False \ + -loopback False \ + -enableLASIMonitoring False \ + -enabledFlowControl False + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan/oam \ + -tlvType {00} \ + -linkEvents False \ + -enabled False \ + -vendorSpecificInformation {00 00 00 00} \ + -macAddress "00:00:00:00:00:00" \ + -loopback False \ + -idleTimer 5 \ + -tlvValue {00} \ + -enableTlvOption False \ + -maxOAMPDUSize 64 \ + -organizationUniqueIdentifier {000000} + ixNet setMultiAttrs $sg_vport/l1Config/tenGigLan/fcoe \ + -supportDataCenterMode False \ + -priorityGroupSize priorityGroupSize-8 \ + -pfcPauseDelay 1 \ + -pfcPriorityGroups {0 1 2 3 4 5 6 7} \ + -flowControlType ieee802.1Qbb \ + -enablePFCPauseDelay False + ixNet setMultiAttrs $sg_vport/l1Config/fortyGigLan \ + -ppm 0 \ + -flowControlDirectedAddress "01 80 C2 00 00 01" \ + -enablePPM False \ + -autoInstrumentation endOfFrame \ + -transmitClocking internal \ + -txIgnoreRxLinkFaults False \ + -loopback False \ + -enableLASIMonitoring False \ + -enabledFlowControl False + ixNet setMultiAttrs $sg_vport/l1Config/fortyGigLan/fcoe \ + -supportDataCenterMode False \ + -priorityGroupSize priorityGroupSize-8 \ + -pfcPauseDelay 1 \ + -pfcPriorityGroups {0 1 2 3 4 5 6 7} \ + -flowControlType ieee802.1Qbb \ + -enablePFCPauseDelay False + ixNet setMultiAttrs $sg_vport/l1Config/OAM \ + -tlvType {00} \ + -linkEvents False \ + -enabled False \ + -vendorSpecificInformation {00 00 00 00} \ + -macAddress "00:00:00:00:00:00" \ + -loopback False \ + -idleTimer 5 \ + -tlvValue {00} \ + -enableTlvOption False \ + -maxOAMPDUSize 64 \ + -organizationUniqueIdentifier {000000} + ixNet setMultiAttrs $sg_vport/l1Config/rxFilters/filterPalette \ + -sourceAddress1Mask {00:00:00:00:00:00} \ + -destinationAddress1Mask {00:00:00:00:00:00} \ + -sourceAddress2 {00:00:00:00:00:00} \ + -pattern2OffsetType fromStartOfFrame \ + -pattern2Offset 20 \ + -pattern1Mask {00} \ + -sourceAddress2Mask {00:00:00:00:00:00} \ + -destinationAddress2 {00:00:00:00:00:00} \ + -destinationAddress1 {00:00:00:00:00:00} \ + -sourceAddress1 {00:00:00:00:00:00} \ + -pattern1 {00} \ + -destinationAddress2Mask {00:00:00:00:00:00} \ + -pattern2Mask {00} \ + -pattern1Offset 20 \ + -pattern2 {00} \ + -pattern1OffsetType fromStartOfFrame + ixNet setMultiAttrs $sg_vport/protocols/arp \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/bfd \ + -enabled False \ + -intervalValue 0 \ + -packetsPerInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/bgp \ + -autoFillUpDutIp False \ + -disableReceivedUpdateValidation False \ + -enableAdVplsPrefixLengthInBits False \ + -enableExternalActiveConnect True \ + -enableInternalActiveConnect True \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -externalRetries 0 \ + -externalRetryDelay 120 \ + -internalRetries 0 \ + -internalRetryDelay 120 \ + -mldpP2mpFecType 6 \ + -triggerVplsPwInitiation False + ixNet setMultiAttrs $sg_vport/protocols/cfm \ + -enableOptionalLmFunctionality False \ + -enableOptionalTlvValidation True \ + -enabled False \ + -receiveCcm True \ + -sendCcm True \ + -suppressErrorsOnAis True + ixNet setMultiAttrs $sg_vport/protocols/eigrp \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/elmi \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/igmp \ + -enabled False \ + -numberOfGroups 0 \ + -numberOfQueries 0 \ + -queryTimePeriod 0 \ + -sendLeaveOnStop True \ + -statsEnabled False \ + -timePeriod 0 + ixNet setMultiAttrs $sg_vport/protocols/isis \ + -allL1RbridgesMac "01:80:c2:00:00:40" \ + -emulationType isisL3Routing \ + -enabled False \ + -helloMulticastMac "01:80:c2:00:00:41" \ + -lspMgroupPdusPerInterval 0 \ + -nlpId 192 \ + -rateControlInterval 0 \ + -sendP2PHellosToUnicastMac True \ + -spbAllL1BridgesMac "09:00:2b:00:00:05" \ + -spbHelloMulticastMac "09:00:2b:00:00:05" \ + -spbNlpId 192 + ixNet setMultiAttrs $sg_vport/protocols/lacp \ + -enablePreservePartnerInfo False \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/ldp \ + -enableDiscardSelfAdvFecs False \ + -enableHelloJitter True \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -helloHoldTime 15 \ + -helloInterval 5 \ + -keepAliveHoldTime 30 \ + -keepAliveInterval 10 \ + -p2mpCapabilityParam 1288 \ + -p2mpFecType 6 \ + -targetedHelloInterval 15 \ + -targetedHoldTime 45 \ + -useTransportLabelsForMplsOam False + ixNet setMultiAttrs $sg_vport/protocols/linkOam \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/lisp \ + -burstIntervalInMs 0 \ + -enabled False \ + -ipv4MapRegisterPacketsPerBurst 0 \ + -ipv4MapRequestPacketsPerBurst 0 \ + -ipv4SmrPacketsPerBurst 0 \ + -ipv6MapRegisterPacketsPerBurst 0 \ + -ipv6MapRequestPacketsPerBurst 0 \ + -ipv6SmrPacketsPerBurst 0 + ixNet setMultiAttrs $sg_vport/protocols/mld \ + -enableDoneOnStop True \ + -enabled False \ + -mldv2Report type143 \ + -numberOfGroups 0 \ + -numberOfQueries 0 \ + -queryTimePeriod 0 \ + -timePeriod 0 + ixNet setMultiAttrs $sg_vport/protocols/mplsOam \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/mplsTp \ + -apsChannelType {00 02 } \ + -bfdCcChannelType {00 07 } \ + -delayManagementChannelType {00 05 } \ + -enableHighPerformanceMode True \ + -enabled False \ + -faultManagementChannelType {00 58 } \ + -lossMeasurementChannelType {00 04 } \ + -onDemandCvChannelType {00 09 } \ + -pwStatusChannelType {00 0B } \ + -y1731ChannelType {7F FA } + ixNet setMultiAttrs $sg_vport/protocols/ospf \ + -enableDrOrBdr False \ + -enabled False \ + -floodLinkStateUpdatesPerInterval 0 \ + -rateControlInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/ospfV3 \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/pimsm \ + -bsmFramePerInterval 0 \ + -crpFramePerInterval 0 \ + -dataMdtFramePerInterval 0 \ + -denyGrePimIpPrefix {0.0.0.0/32} \ + -enableDiscardJoinPruneProcessing False \ + -enableRateControl False \ + -enabled False \ + -helloMsgsPerInterval 0 \ + -interval 0 \ + -joinPruneMessagesPerInterval 0 \ + -registerMessagesPerInterval 0 \ + -registerStopMessagesPerInterval 0 + ixNet setMultiAttrs $sg_vport/protocols/ping \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/rip \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/ripng \ + -enabled False + ixNet setMultiAttrs $sg_vport/protocols/rsvp \ + -enableControlLspInitiationRate False \ + -enableShowTimeValue False \ + -enableVpnLabelExchangeOverLsp True \ + -enabled False \ + -maxLspInitiationsPerSec 400 \ + -useTransportLabelsForMplsOam False + ixNet setMultiAttrs $sg_vport/protocols/stp \ + -enabled False + ixNet setMultiAttrs $sg_vport/rateControlParameters \ + -maxRequestsPerBurst 1 \ + -maxRequestsPerSec 250 \ + -minRetryInterval 10 \ + -retryCount 3 \ + -sendInBursts False \ + -sendRequestsAsFastAsPossible False + ixNet setMultiAttrs $sg_vport/capture \ + -controlCaptureTrigger {} \ + -controlCaptureFilter {} \ + -hardwareEnabled False \ + -softwareEnabled False \ + -displayFiltersDataCapture {} \ + -displayFiltersControlCapture {} \ + -controlBufferSize 30 \ + -controlBufferBehaviour bufferLiveNonCircular + ixNet setMultiAttrs $sg_vport/protocolStack/options \ + -routerSolicitationDelay 1 \ + -routerSolicitationInterval 4 \ + -routerSolicitations 3 \ + -retransTime 1000 \ + -dadTransmits 1 \ + -dadEnabled True \ + -ipv4RetransTime 3000 \ + -ipv4McastSolicit 4 + sg_commit + set sg_vport [lindex [ixNet remapIds $sg_vport] 0] + set ixNetSG_ref(10) $sg_vport + set ixNetSG_Stack(1) $sg_vport + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:1 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:1 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:2 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:2 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:3 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:3 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:4 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:4 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:5 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:5 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/l1Config/rxFilters/uds:6 + # + set sg_uds $ixNetSG_Stack(1)/l1Config/rxFilters/uds:6 + ixNet setMultiAttrs $sg_uds \ + -destinationAddressSelector anyAddr \ + -customFrameSizeTo 0 \ + -customFrameSizeFrom 0 \ + -error errAnyFrame \ + -patternSelector anyPattern \ + -sourceAddressSelector anyAddr \ + -isEnabled True \ + -frameSizeType any + sg_commit + set sg_uds [lindex [ixNet remapIds $sg_uds] 0] + + # + # configuring the object that corresponds to /vport:2/protocols/static/lan:1 + # + set sg_lan [ixNet add $ixNetSG_Stack(1)/protocols/static lan] + ixNet setMultiAttrs $sg_lan \ + -atmEncapsulation ::ixNet::OBJ-null \ + -count $L2CountValue \ + -countPerVc 1 \ + -enableIncrementMac $L2Increment \ + -enableIncrementVlan False \ + -enableSiteId False \ + -enableVlan False \ + -enabled True \ + -frEncapsulation ::ixNet::OBJ-null \ + -incrementPerVcVlanMode noIncrement \ + -incrementVlanMode noIncrement \ + -mac $dstMac \ + -macRangeMode normal \ + -numberOfVcs 1 \ + -siteId 0 \ + -skipVlanIdZero True \ + -tpid {0x8100} \ + -trafficGroupId ::ixNet::OBJ-null \ + -vlanCount 1 \ + -vlanId {1} \ + -vlanPriority {0} + sg_commit + set sg_lan [lindex [ixNet remapIds $sg_lan] 0] + + ### + ### /availableHardware area + ### + + # + # configuring the object that corresponds to /availableHardware/chassis" + # + set sg_chassis [ixNet add $ixNetSG_Stack(0)/availableHardware chassis] + ixNet setMultiAttrs $sg_chassis \ + -masterChassis {} \ + -sequenceId 1 \ + -cableLength 0 \ + -hostname $::chassis + sg_commit + set sg_chassis [lindex [ixNet remapIds $sg_chassis] 0] + set ixNetSG_Stack(1) $sg_chassis + + # + # configuring the object that corresponds to /availableHardware/chassis/card + # + set sg_card $ixNetSG_Stack(1)/card:$::card + ixNet setMultiAttrs $sg_card \ + -aggregationMode normal + sg_commit + set sg_card [lindex [ixNet remapIds $sg_card] 0] + set ixNetSG_ref(19) $sg_card + set ixNetSG_Stack(2) $sg_card + + # + # configuring the object that corresponds to /availableHardware/chassis/card/aggregation:1 + # + set sg_aggregation $ixNetSG_Stack(2)/aggregation:1 + ixNet setMultiAttrs $sg_aggregation \ + -mode normal + sg_commit + set sg_aggregation [lindex [ixNet remapIds $sg_aggregation] 0] + + # + # configuring the object that corresponds to /availableHardware/chassis/card/aggregation:2 + # + set sg_aggregation $ixNetSG_Stack(2)/aggregation:2 + ixNet setMultiAttrs $sg_aggregation \ + -mode normal + sg_commit + set sg_aggregation [lindex [ixNet remapIds $sg_aggregation] 0] + + # + # configuring the object that corresponds to /availableHardware/chassis/card/aggregation:3 + # + set sg_aggregation $ixNetSG_Stack(2)/aggregation:3 + ixNet setMultiAttrs $sg_aggregation \ + -mode normal + sg_commit + set sg_aggregation [lindex [ixNet remapIds $sg_aggregation] 0] + + # + # configuring the object that corresponds to /availableHardware/chassis/card/aggregation:4 + # + set sg_aggregation $ixNetSG_Stack(2)/aggregation:4 + ixNet setMultiAttrs $sg_aggregation \ + -mode normal + sg_commit + set sg_aggregation [lindex [ixNet remapIds $sg_aggregation] 0] + ixNet setMultiAttrs $ixNetSG_ref(2) \ + -connectedTo $ixNetSG_ref(19)/port:$::port1 + sg_commit + ixNet setMultiAttrs $ixNetSG_ref(10) \ + -connectedTo $ixNetSG_ref(19)/port:$::port2 + sg_commit + sg_commit + + ### + ### /impairment area + ### + + # + # configuring the object that corresponds to /impairment/profile:3 + # + set sg_profile [ixNet add $ixNetSG_Stack(0)/impairment profile] + ixNet setMultiAttrs $sg_profile \ + -enabled False \ + -name {Impairment Profile 1} \ + -links {} \ + -allLinks True \ + -priority 1 + ixNet setMultiAttrs $sg_profile/checksums \ + -dropRxL2FcsErrors False \ + -correctTxL2FcsErrors False \ + -alwaysCorrectWhenModifying True \ + -correctTxChecksumOverIp False \ + -correctTxIpv4Checksum False + ixNet setMultiAttrs $sg_profile/rxRateLimit \ + -enabled False \ + -value 8 \ + -units {kKilobitsPerSecond} + ixNet setMultiAttrs $sg_profile/drop \ + -enabled True \ + -clusterSize 1 \ + -percentRate 0 + ixNet setMultiAttrs $sg_profile/reorder \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 \ + -skipCount 1 + ixNet setMultiAttrs $sg_profile/duplicate \ + -enabled False \ + -clusterSize 1 \ + -percentRate 0 \ + -duplicateCount 1 + ixNet setMultiAttrs $sg_profile/bitError \ + -enabled False \ + -logRate 3 \ + -skipEndOctets 0 \ + -skipStartOctets 0 + ixNet setMultiAttrs $sg_profile/delay \ + -enabled True \ + -value 300 \ + -units {kMicroseconds} + ixNet setMultiAttrs $sg_profile/delayVariation \ + -uniformSpread 0 \ + -enabled False \ + -units {kMicroseconds} \ + -distribution {kUniform} \ + -exponentialMeanArrival 0 \ + -gaussianStandardDeviation 0 + ixNet setMultiAttrs $sg_profile/customDelayVariation \ + -enabled False \ + -name {} + sg_commit + set sg_profile [lindex [ixNet remapIds $sg_profile] 0] + set ixNetSG_Stack(1) $sg_profile + + # + # configuring the object that corresponds to /impairment/profile:3/fixedClassifier:1 + # + set sg_fixedClassifier [ixNet add $ixNetSG_Stack(1) fixedClassifier] + sg_commit + set sg_fixedClassifier [lindex [ixNet remapIds $sg_fixedClassifier] 0] + + ### + ### /traffic area + ### + + # + # configuring the object that corresponds to /traffic/trafficItem:1 + # + set sg_trafficItem [ixNet add $ixNetSG_Stack(0)/traffic trafficItem] + ixNet setMultiAttrs $sg_trafficItem \ + -transportRsvpTePreference one \ + -trafficItemType l2L3 \ + -biDirectional $::biDirect \ + -mergeDestinations True \ + -hostsPerNetwork 1 \ + -transmitMode interleaved \ + -ordinalNo 0 \ + -trafficType {ethernetVlan} \ + -interAsLdpPreference two \ + -allowSelfDestined False \ + -enabled True \ + -maxNumberOfVpnLabelStack 2 \ + -interAsBgpPreference one \ + -suspend False \ + -transportLdpPreference two \ + -egressEnabled False \ + -enableDynamicMplsLabelValues False \ + -routeMesh oneToOne \ + -name {Traffic Item 1} \ + -srcDestMesh oneToOne + sg_commit + set sg_trafficItem [lindex [ixNet remapIds $sg_trafficItem] 0] + set ixNetSG_ref(26) $sg_trafficItem + set ixNetSG_Stack(1) $sg_trafficItem + + # + # configuring the object that corresponds to /traffic/trafficItem:1/endpointSet:1 + # + set sg_endpointSet [ixNet add $ixNetSG_Stack(1) endpointSet] + ixNet setMultiAttrs $sg_endpointSet \ + -destinations [list $ixNetSG_ref(10)/protocols] \ + -destinationFilter {} \ + -sourceFilter {} \ + -trafficGroups {} \ + -sources [list $ixNetSG_ref(2)/protocols] \ + -name {EndpointSet-1} + sg_commit + set sg_endpointSet [lindex [ixNet remapIds $sg_endpointSet] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1 + # + set sg_configElement $ixNetSG_Stack(1)/configElement:1 + ixNet setMultiAttrs $sg_configElement \ + -crc goodCrc \ + -preambleCustomSize 8 \ + -enableDisparityError False \ + -preambleFrameSizeMode auto \ + -destinationMacMode manual + ixNet setMultiAttrs $sg_configElement/frameSize \ + -weightedPairs {} \ + -fixedSize 64 \ + -incrementFrom 64 \ + -randomMin 64 \ + -randomMax 1518 \ + -quadGaussian {} \ + -type fixed \ + -presetDistribution cisco \ + -incrementStep 1 \ + -incrementTo 1518 + ixNet setMultiAttrs $sg_configElement/frameRate \ + -bitRateUnitsType bitsPerSec \ + -rate 10 \ + -enforceMinimumInterPacketGap 0 \ + -type percentLineRate \ + -interPacketGapUnitsType nanoseconds + ixNet setMultiAttrs $sg_configElement/framePayload \ + -type incrementByte \ + -customRepeat True \ + -customPattern {} + ixNet setMultiAttrs $sg_configElement/frameRateDistribution \ + -streamDistribution applyRateToAll \ + -portDistribution applyRateToAll + ixNet setMultiAttrs $sg_configElement/transmissionControl \ + -frameCount 1 \ + -minGapBytes 12 \ + -interStreamGap 0 \ + -interBurstGap 0 \ + -interBurstGapUnits nanoseconds \ + -type continuous \ + -duration 1 \ + -repeatBurst 1 \ + -enableInterStreamGap False \ + -startDelayUnits bytes \ + -iterationCount 1 \ + -burstPacketCount 1 \ + -enableInterBurstGap False \ + -startDelay 0 + sg_commit + set sg_configElement [lindex [ixNet remapIds $sg_configElement] 0] + set ixNetSG_Stack(2) $sg_configElement + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernet-1" + # + set sg_stack $ixNetSG_Stack(2)/stack:"ethernet-1" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernet-1"/field:"ethernet.header.destinationAddress-1" + # + set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.destinationAddress-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $dstMac \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{00:00:00:00:00:00}} \ + -stepValue {00:00:00:00:00:01} \ + -fixedBits {00:00:00:00:00:00} \ + -fieldValue $dstMac \ + -auto False \ + -randomMask {00:00:00:00:00:00} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue $dstMac \ + -countValue {1} + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernet-1"/field:"ethernet.header.sourceAddress-2" + # + set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.sourceAddress-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $srcMac \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{00:00:00:00:00:00}} \ + -stepValue {00:00:00:00:00:00} \ + -fixedBits {00:00:00:00:00:00} \ + -fieldValue $srcMac \ + -auto False \ + -randomMask {00:00:00:00:00:00} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue $srcMac \ + -countValue {1} + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernet-1"/field:"ethernet.header.etherType-3" + # + set sg_field $ixNetSG_Stack(3)/field:"ethernet.header.etherType-3" + ixNet setMultiAttrs $sg_field \ + -singleValue {800} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0xFFFF}} \ + -stepValue {0xFFFF} \ + -fixedBits {0xFFFF} \ + -fieldValue {800} \ + -auto True \ + -randomMask {0xFFFF} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0xFFFF} \ + -countValue {1} + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2" + # + set sg_stack $ixNetSG_Stack(2)/stack:"ipv4-2" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.version-1" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.version-1" + ixNet setMultiAttrs $sg_field \ + -singleValue {4} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{4}} \ + -stepValue {4} \ + -fixedBits {4} \ + -fieldValue {4} \ + -auto False \ + -randomMask {4} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {4} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.protocol-25" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.protocol-25" + ixNet setMultiAttrs $sg_field \ + -singleValue {$proto_value} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{61}} \ + -stepValue {61} \ + -fixedBits {61} \ + -fieldValue {$proto} \ + -auto True \ + -randomMask {61} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {61} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.checksum-26" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.checksum-26" + ixNet setMultiAttrs $sg_field \ + -singleValue {0} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0}} \ + -stepValue {0} \ + -fixedBits {0} \ + -fieldValue {0} \ + -auto True \ + -randomMask {0} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.srcIp-27" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.srcIp-27" + ixNet setMultiAttrs $sg_field \ + -singleValue $srcIp \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0.0.0.0}} \ + -stepValue {0.0.0.0} \ + -fixedBits {0.0.0.0} \ + -fieldValue $srcIp \ + -auto False \ + -randomMask {0.0.0.0} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0.0.0.0} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.dstIp-28" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.dstIp-28" + ixNet setMultiAttrs $sg_field \ + -singleValue $dstIp \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0.0.0.0}} \ + -stepValue {0.0.0.1} \ + -fixedBits {0.0.0.0} \ + -fieldValue $dstIp \ + -auto False \ + -randomMask {0.0.0.0} \ + -trackingEnabled False \ + -valueType $L3ValueType \ + -activeFieldChoice False \ + -startValue $dstIp \ + -countValue $L3CountValue + #sg_commit + #set sg_field [lindex [ixNet remapIds $sg_field] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-2"/field:"ipv4.header.options.pad-58" + # + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.options.pad-58" + ixNet setMultiAttrs $sg_field \ + -singleValue {0} \ + -seed {1} \ + -optionalEnabled False \ + -fullMesh False \ + -valueList {{0}} \ + -stepValue {0} \ + -fixedBits {0} \ + -fieldValue {0} \ + -auto True \ + -randomMask {0} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue {1} + + # Suffix for stack names + # This variable should be incremented after setting sg_stack like: + # set sg_stack $ixNetSG_Stack(2)/stack:"protocolnamehere-$stack_number" + # incr stack_number + + set stack_number 3 + + if { [string compare $proto "udp"] == 0 } { + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3" + # + set sg_stack $ixNetSG_Stack(2)/stack:"udp-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.srcPort-1" + # + set sg_field $ixNetSG_Stack(3)/field:"udp.header.srcPort-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $srcPort \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{63}} \ + -stepValue {63} \ + -fixedBits {63} \ + -fieldValue $srcPort \ + -auto False \ + -randomMask {63} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue $srcPort \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.dstPort-2" + # + set sg_field $ixNetSG_Stack(3)/field:"udp.header.dstPort-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $dstPort \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{63}} \ + -stepValue {1} \ + -fixedBits {63} \ + -fieldValue $dstPort \ + -auto False \ + -randomMask {63} \ + -trackingEnabled False \ + -valueType $L4ValueType \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue $L4CountValue + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.length-3" + # + set sg_field $ixNetSG_Stack(3)/field:"udp.header.length-3" + ixNet setMultiAttrs $sg_field \ + -singleValue {26} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{8}} \ + -stepValue {8} \ + -fixedBits {8} \ + -fieldValue {26} \ + -auto True \ + -randomMask {8} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {8} \ + -countValue {1} + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"udp-3"/field:"udp.header.checksum-4" + # + set sg_field $ixNetSG_Stack(3)/field:"udp.header.checksum-4" + ixNet setMultiAttrs $sg_field \ + -singleValue {0} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0}} \ + -stepValue {1} \ + -fixedBits {0} \ + -fieldValue {0} \ + -auto False \ + -randomMask {0} \ + -trackingEnabled False \ + -valueType increment \ + -activeFieldChoice False \ + -startValue {1} \ + -countValue {65535} + } elseif { [string compare $proto "tcp"] == 0 } { + # TCP + set sg_stack $ixNetSG_Stack(2)/stack:"tcp-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.srcPort-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $srcPort \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list $srcPort] \ + -stepValue 60 \ + -fixedBits 60 \ + -fieldValue $srcPort \ + -auto false \ + -randomMask 60 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 60 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dstPort-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $dstPort \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list $dstPort] \ + -stepValue 60 \ + -fixedBits 60 \ + -fieldValue $dstPort \ + -auto false \ + -randomMask 60 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.sequenceNumber-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x00000000] \ + -stepValue 0x00000000 \ + -fixedBits 0x00000000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x00000000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x00000000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.acknowledgementNumber-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x00000000] \ + -stepValue 0x00000000 \ + -fixedBits 0x00000000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x00000000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x00000000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dataOffset-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 5 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 5] \ + -stepValue 5 \ + -fixedBits 5 \ + -fieldValue 5 \ + -auto true \ + -randomMask 5 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 5 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.reserved-6" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.nsBit-7" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.cwrBit-8" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.ecnEchoBit-9" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.urgBit-10" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.ackBit-11" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.pshBit-12" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.rstBit-13" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.synBit-14" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.finBit-15" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.window-16" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.checksum-17" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.urgentPtr-18" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + } elseif { [string compare $proto "gre"] == 0 } { + # GRE + set gre_enabled True + } + + if { $vxlan_enabled || $gre_enabled || $geneve_enabled } { + # VXLAN and GRE have similar inner frame data so we set unique fields + # for each protocol then set the common fields. + + + # + if { $vxlan_enabled } { + # VXLAN START + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4" + # + set sg_stack $ixNetSG_Stack(2)/stack:"vxlan-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.flags-1 + # + set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.flags-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 8 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x08] \ + -stepValue 0x08 \ + -fixedBits 0x08 \ + -fieldValue 8 \ + -randomMask 0x08 \ + -startValue 0x08 + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.reserved-2 + # + set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.reserved-2" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.vni-3" + # + set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.vni-3" + ixNet setMultiAttrs $sg_field \ + -singleValue $vni \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 1234] \ + -stepValue 1234 \ + -fixedBits 1234 \ + -fieldValue $vni \ + -randomMask 1234 \ + -startValue 1234 + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"vxlan-4"/field:"vxlan.header.reserved8-4" + # + set sg_field $ixNetSG_Stack(3)/field:"vxlan.header.reserved8-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + } elseif { $geneve_enabled } { + # GENEVE START + # + set sg_stack $ixNetSG_Stack(2)/stack:"geneve-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.version-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x00] \ + -stepValue 0x00 \ + -fixedBits 0x00 \ + -fieldValue 0 \ + -randomMask 0x00 \ + -startValue 0x00 + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.optionsLength-2" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x00] \ + -stepValue 0x00 \ + -fixedBits 0x00 \ + -fieldValue 0 \ + -randomMask 0x00 \ + -startValue 0x00 + + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.flags-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x00] \ + -stepValue 0x00 \ + -fixedBits 0x00 \ + -fieldValue 0 \ + -randomMask 0x00 \ + -startValue 0x00 + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.protocolType-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 6558 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x6558] \ + -stepValue 0x6558 \ + -fixedBits 0x6558 \ + -fieldValue 6558 \ + -randomMask 0x6558 \ + -startValue 0x6558 + + set sg_field $ixNetSG_Stack(3)/field:"geneve.header.vni-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + } elseif { $gre_enabled } { + puts "Setting GRE attributes" + # GRE START + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"gre-3" + # + set sg_stack $ixNetSG_Stack(2)/stack:"gre-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumPresent-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "0:No\ Checksum" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.reserved1-2" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyPresent-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "0:No\ Key\ field" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequencePresent-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "0:No\ sequence\ number\ field" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.reserved2-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.version-6" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.protocol-7" + ixNet setMultiAttrs $sg_field \ + -singleValue 6558 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0x0] \ + -stepValue 0x0 \ + -fixedBits 0x0 \ + -fieldValue 6558 \ + -auto true \ + -randomMask 0x0 \ + -startValue 0x0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.withChecksum.checksum-8" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.withChecksum.reserved-9" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.checksumHolder.noChecksum-10" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyHolder.key-11" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.keyHolder.noKey-12" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequenceHolder.sequenceNum-13" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"gre.header.sequenceHolder.noSequenceNum-14" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + } + + # Common fields for VXLAN and GRE + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ethernetNoFCS-5"/field:"ethernetNoFCS.header.destinationAddress-1" + set sg_stack $ixNetSG_Stack(2)/stack:"ethernetNoFCS-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"ethernetNoFCS.header.destinationAddress-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_dstmac \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 00:00:00:00:00:00] \ + -stepValue 00:00:00:00:00:00 \ + -fixedBits 00:00:00:00:00:00 \ + -fieldValue $inner_dstmac \ + -randomMask 00:00:00:00:00:00 \ + -startValue 00:00:00:00:00:00 + + set sg_field $ixNetSG_Stack(3)/field:"ethernetNoFCS.header.sourceAddress-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_srcmac \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 00:00:00:00:00:00] \ + -stepValue 00:00:00:00:00:00 \ + -fixedBits 00:00:00:00:00:00 \ + -fieldValue $inner_srcmac \ + -randomMask 00:00:00:00:00:00 \ + -startValue 00:00:00:00:00:00 + + set sg_field $ixNetSG_Stack(3)/field:"ethernetNoFCS.header.etherType-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 800 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0xFFFF] \ + -stepValue 0xFFFF \ + -fixedBits 0xFFFF \ + -fieldValue 800 \ + -auto true \ + -randomMask 0xFFFF \ + -startValue 0xFFFF + + set sg_stack $ixNetSG_Stack(2)/stack:"ipv4-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"ipv4-6"/field:"ipv4.header.version-1"/ + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.version-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 4 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 4] \ + -stepValue 4 \ + -fixedBits 4 \ + -fieldValue 4 \ + -randomMask 4 \ + -startValue 4 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.headerLength-2" + ixNet setMultiAttrs $sg_field \ + -singleValue 5 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 5 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.raw-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.precedence-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "000\ Routine" \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.delay-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue Normal \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.throughput-6" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue Normal \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.reliability-7" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue Normal \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.monetary-8" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue Normal \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.priority.tos.unused-9" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -activeFieldChoice true \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.totalLength-18" + ixNet setMultiAttrs $sg_field \ + -singleValue 28 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 20] \ + -stepValue 20 \ + -fixedBits 20 \ + -fieldValue 28 \ + -auto true \ + -randomMask 20 \ + -startValue 20 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.identification-19" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.flags.reserved-20" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.flags.fragment-21" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "May\ fragment" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.flags.lastFragment-22" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue "Last\ fragment" \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.fragmentOffset-23" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.ttl-24" + ixNet setMultiAttrs $sg_field \ + -singleValue 64 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 64] \ + -stepValue 64 \ + -fixedBits 64 \ + -fieldValue 64 \ + -randomMask 64 \ + -startValue 64 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.protocol-25" + ixNet setMultiAttrs $sg_field \ + -singleValue 17 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 61] \ + -stepValue 61 \ + -fixedBits 61 \ + -fieldValue $inner_proto \ + -auto true \ + -randomMask 61 \ + -startValue 61 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.checksum-26" + ixNet setMultiAttrs $sg_field \ + -singleValue 63355 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 63355 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.srcIp-27" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_srcip \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0.0.0.0] \ + -stepValue 0.0.0.0 \ + -fixedBits 0.0.0.0 \ + -fieldValue $inner_srcip \ + -randomMask 0.0.0.0 \ + -startValue 0.0.0.0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.dstIp-28" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_dstip \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0.0.0.0] \ + -stepValue 0.0.0.0 \ + -fixedBits 0.0.0.0 \ + -fieldValue $inner_dstip \ + -randomMask 0.0.0.0 \ + -startValue 0.0.0.0 + + set sg_field $ixNetSG_Stack(3)/field:"ipv4.header.options.pad-58" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + if { [string compare $inner_proto "udp"] == 0 } { + # INNER UDP + set sg_stack $ixNetSG_Stack(2)/stack:"udp-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"udp.header.srcPort-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_srcport \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 63] \ + -stepValue 63 \ + -fixedBits 63 \ + -fieldValue $inner_srcport \ + -auto true \ + -randomMask 63 \ + -startValue 63 + + set sg_field $ixNetSG_Stack(3)/field:"udp.header.dstPort-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_dstport \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 63] \ + -stepValue 63 \ + -fixedBits 63 \ + -fieldValue $inner_dstport \ + -auto true \ + -randomMask 63 \ + -startValue 63 + + set sg_field $ixNetSG_Stack(3)/field:"udp.header.length-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 8 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 8] \ + -stepValue 8 \ + -fixedBits 8 \ + -fieldValue 8 \ + -auto true \ + -randomMask 8 \ + -startValue 8 + + set sg_field $ixNetSG_Stack(3)/field:"udp.header.checksum-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + } else { + + # INNER TCP + set sg_stack $ixNetSG_Stack(2)/stack:"tcp-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.srcPort-1" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_srcport \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list $inner_srcport] \ + -stepValue 60 \ + -fixedBits 60 \ + -fieldValue $inner_srcport \ + -auto false \ + -randomMask 60 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 60 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dstPort-2" + ixNet setMultiAttrs $sg_field \ + -singleValue $inner_dstport \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list $inner_dstport] \ + -stepValue 60 \ + -fixedBits 60 \ + -fieldValue $inner_dstport \ + -auto false \ + -randomMask 60 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 60 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.sequenceNumber-3" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x00000000] \ + -stepValue 0x00000000 \ + -fixedBits 0x00000000 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0x00000000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x00000000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.acknowledgementNumber-4" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x00000000] \ + -stepValue 0x00000000 \ + -fixedBits 0x00000000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x00000000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x00000000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.dataOffset-5" + ixNet setMultiAttrs $sg_field \ + -singleValue 5 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 5] \ + -stepValue 5 \ + -fixedBits 5 \ + -fieldValue 5 \ + -auto true \ + -randomMask 5 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 5 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.reserved-6" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.nsBit-7" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.cwrBit-8" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.ecn.ecnEchoBit-9" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.urgBit-10" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.ackBit-11" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.pshBit-12" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.rstBit-13" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.synBit-14" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.controlBits.finBit-15" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.window-16" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.checksum-17" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + + set sg_field $ixNetSG_Stack(3)/field:"tcp.header.urgentPtr-18" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -fullMesh false \ + -valueList [list 0x0000] \ + -stepValue 0x0000 \ + -fixedBits 0x0000 \ + -fieldValue 0 \ + -auto false \ + -randomMask 0x0000 \ + -trackingEnabled false \ + -valueType singleValue \ + -activeFieldChoice false \ + -startValue 0x0000 \ + -countValue 1 + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + + } + + set sg_stack $ixNetSG_Stack(2)/stack:"fcs-$stack_number" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + incr stack_number + + set sg_field $ixNetSG_Stack(3)/field:"ethernet.fcs-1" + ixNet setMultiAttrs $sg_field \ + -singleValue 0 \ + -seed 1 \ + -optionalEnabled true \ + -valueList [list 0] \ + -stepValue 0 \ + -fixedBits 0 \ + -fieldValue 0 \ + -auto true \ + -randomMask 0 \ + -startValue 0 + + # VXLAN/GRE END + } else { + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"fcs-4" + # + set sg_stack $ixNetSG_Stack(2)/stack:"fcs-4" + sg_commit + set sg_stack [lindex [ixNet remapIds $sg_stack] 0] + set ixNetSG_Stack(3) $sg_stack + + # + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/stack:"fcs-4"/field:"ethernet.fcs-1" + # + set sg_field $ixNetSG_Stack(3)/field:"ethernet.fcs-1" + ixNet setMultiAttrs $sg_field \ + -singleValue {0} \ + -seed {1} \ + -optionalEnabled True \ + -fullMesh False \ + -valueList {{0}} \ + -stepValue {0} \ + -fixedBits {0} \ + -fieldValue {0} \ + -auto True \ + -randomMask {0} \ + -trackingEnabled False \ + -valueType singleValue \ + -activeFieldChoice False \ + -startValue {0} \ + -countValue {1} + sg_commit + set sg_field [lindex [ixNet remapIds $sg_field] 0] + } + + # configuring the object that corresponds to /traffic/trafficItem:1/configElement:1/transmissionDistribution + # + set sg_transmissionDistribution $ixNetSG_Stack(2)/transmissionDistribution + ixNet setMultiAttrs $sg_transmissionDistribution \ + -distributions {} + sg_commit + set sg_transmissionDistribution [lindex [ixNet remapIds $sg_transmissionDistribution] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/transmissionDistribution + # + set sg_transmissionDistribution $ixNetSG_Stack(1)/transmissionDistribution + ixNet setMultiAttrs $sg_transmissionDistribution \ + -distributions {} + sg_commit + sg_commit + set sg_transmissionDistribution [lindex [ixNet remapIds $sg_transmissionDistribution] 0] + + # + # configuring the object that corresponds to /traffic/trafficItem:1/tracking + # + set sg_tracking $ixNetSG_Stack(1)/tracking + ixNet setMultiAttrs $sg_tracking \ + -offset 0 \ + -oneToOneMesh False \ + -trackBy {} \ + -values {} \ + -fieldWidth thirtyTwoBits \ + -protocolOffset {Root.0} + ixNet setMultiAttrs $sg_tracking/egress \ + -offset {Outer VLAN Priority (3 bits)} \ + -enabled False \ + -customOffsetBits 0 \ + -encapsulation {Ethernet} \ + -customWidthBits 0 + ixNet setMultiAttrs $sg_tracking/latencyBin \ + -enabled False \ + -binLimits {1 1.42 2 2.82 4 5.66 8 11.32} \ + -numberOfBins 8 + sg_commit + set sg_tracking [lindex [ixNet remapIds $sg_tracking] 0] + set ixNetSG_Stack(2) $sg_tracking + + # EGRESS START + # Note: The scriptgen generated egress code were removed because we are not using + # flow tracking in our tests. + # Insert EGRESS lines here if needed + # EGRESS END + + # + # configuring the object that corresponds to /traffic/trafficItem:1/dynamicUpdate + # + set sg_dynamicUpdate $ixNetSG_Stack(1)/dynamicUpdate + ixNet setMultiAttrs $sg_dynamicUpdate \ + -enabledSessionAwareTrafficFields {} \ + -enabledDynamicUpdateFields {} + sg_commit + set sg_dynamicUpdate [lindex [ixNet remapIds $sg_dynamicUpdate] 0] + + ### + ### /quickTest area + ### + + # + # configuring the object that corresponds to /quickTest/rfc2544throughput:1 + # + if {$rfc2544TestType == "throughput"} { + set sg_rfc2544throughput [ixNet add $ixNetSG_Stack(0)/quickTest rfc2544throughput] + ixNet setMultiAttrs $sg_rfc2544throughput \ + -name {QuickTest1} \ + -mode existingMode \ + -inputParameters {{}} + ixNet setMultiAttrs $sg_rfc2544throughput/testConfig \ + -protocolItem {} \ + -enableMinFrameSize False \ + -framesize $frameSize \ + -reportTputRateUnit mbps \ + -duration $duration \ + -numtrials $numTests \ + -trafficType constantLoading \ + -burstSize 1 \ + -framesPerBurstGap 1 \ + -tolerance 0 \ + -frameLossUnit {0} \ + -staggeredStart False \ + -framesizeList $frameSize \ + -frameSizeMode custom \ + -rateSelect percentMaxRate \ + -percentMaxRate 100 \ + -resolution 0.01 \ + -forceRegenerate False \ + -reportSequenceError False \ + -ipv4rate 50 \ + -ipv6rate 50 \ + -loadRateList $frameRate \ + -fixedLoadUnit percentMaxRate \ + -loadRateValue 80 \ + -incrementLoadUnit percentMaxRate \ + -initialIncrementLoadRate 10 \ + -stepIncrementLoadRate 10 \ + -maxIncrementLoadRate 100 \ + -randomLoadUnit percentMaxRate \ + -minRandomLoadRate 10 \ + -maxRandomLoadRate 80 \ + -countRandomLoadRate 1 \ + -minFpsRate 1000 \ + -minKbpsRate 64 \ + -txDelay 2 \ + -delayAfterTransmit 2 \ + -minRandomFrameSize 64 \ + -maxRandomFrameSize 1518 \ + -countRandomFrameSize 1 \ + -minIncrementFrameSize 64 \ + -stepIncrementFrameSize 64 \ + -maxIncrementFrameSize 1518 \ + -calculateLatency True \ + -latencyType storeForward \ + -calculateJitter False \ + -enableDataIntegrity False \ + -enableBackoffIteration False \ + -enableSaturationIteration False \ + -enableStopTestOnHighLoss False \ + -enableBackoffUseAs% False \ + -backoffIteration 1 \ + -saturationIteration 1 \ + -stopTestOnHighLoss 0 \ + -loadType $loadType \ + -stepLoadUnit percentMaxRate \ + -customLoadUnit percentMaxRate \ + -comboLoadUnit percentMaxRate \ + -binaryLoadUnit percentMaxRate \ + -initialBinaryLoadRate 100 \ + -minBinaryLoadRate 1 \ + -maxBinaryLoadRate 100 \ + -binaryResolution 1 \ + -binaryBackoff 50 \ + -binaryTolerance $tolerance \ + -binaryFrameLossUnit % \ + -comboFrameLossUnit % \ + -stepFrameLossUnit % \ + -initialStepLoadRate 10 \ + -maxStepLoadRate 100 \ + -stepStepLoadRate 10 \ + -stepTolerance 0 \ + -initialComboLoadRate 10 \ + -maxComboLoadRate 100 \ + -minComboLoadRate 10 \ + -stepComboLoadRate 10 \ + -comboResolution 1 \ + -comboBackoff 50 \ + -comboTolerance 0 \ + -binarySearchType linear \ + -unchangedValueList {0} \ + -enableFastConvergence $fastConvergence \ + -fastConvergenceDuration $convergenceDuration \ + -fastConvergenceThreshold 10 \ + -framesizeFixedValue $frameSize \ + -gap 3 \ + -unchangedInitial False \ + -generateTrackingOptionAggregationFiles False \ + -enableExtraIterations False \ + -extraIterationOffsets {10, -10} \ + -usePercentOffsets False \ + -imixDistribution weight \ + -imixAdd {0} \ + -imixDelete {0} \ + -imixData {{{{64}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 40}}{{128}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 30}}{{256}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 30}}}} \ + -imixEnabled False \ + -imixTemplates none \ + -framesizeImixList $frameSize \ + -imixTrafficType {UNCHNAGED} \ + -mapType {oneToOne} \ + -supportedTrafficTypes {mac,ipv4,ipv6,ipmix} + ixNet setMultiAttrs $sg_rfc2544throughput/learnFrames \ + -learnFrequency $learningFrequency \ + -learnNumFrames 10 \ + -learnRate 100 \ + -learnWaitTime 1000 \ + -learnFrameSize $frameSize \ + -fastPathLearnFrameSize $frameSize \ + -learnWaitTimeBeforeTransmit 0 \ + -learnSendMacOnly False \ + -learnSendRouterSolicitation False \ + -fastPathEnable $fastPathEnable \ + -fastPathRate 100 \ + -fastPathNumFrames 10 + ixNet setMultiAttrs $sg_rfc2544throughput/passCriteria \ + -passCriteriaLoadRateMode average \ + -passCriteriaLoadRateValue 100 \ + -passCriteriaLoadRateScale mbps \ + -enablePassFail False \ + -enableRatePassFail False \ + -enableLatencyPassFail False \ + -enableStandardDeviationPassFail False \ + -latencyThresholdValue 10 \ + -latencyThresholdScale us \ + -latencyThresholdMode average \ + -latencyVariationThresholdValue 0 \ + -latencyVariationThresholdScale us \ + -latencyVarThresholdMode average \ + -enableSequenceErrorsPassFail False \ + -seqErrorsThresholdValue 0 \ + -seqErrorsThresholdMode average \ + -enableDataIntegrityPassFail False \ + -dataErrorThresholdValue 0 \ + -dataErrorThresholdMode average + sg_commit + set sg_rfc2544throughput [lindex [ixNet remapIds $sg_rfc2544throughput] 0] + set ixNetSG_Stack(1) $sg_rfc2544throughput + + # + # configuring the object that corresponds to /quickTest/rfc2544throughput:1/protocols + # + set sg_protocols $ixNetSG_Stack(1)/protocols + ixNet setMultiAttrs $sg_protocols \ + -protocolState default \ + -waitAfterStart 120 \ + -waitAfterStop 30 + sg_commit + set sg_protocols [lindex [ixNet remapIds $sg_protocols] 0] + + # + # configuring the object that corresponds to /quickTest/rfc2544throughput:1/trafficSelection:1 + # + set sg_trafficSelection [ixNet add $ixNetSG_Stack(1) trafficSelection] + ixNet setMultiAttrs $sg_trafficSelection \ + -id $ixNetSG_ref(26) \ + -includeMode inTest \ + -itemType trafficItem + sg_commit + set sg_trafficSelection [lindex [ixNet remapIds $sg_trafficSelection] 0] + ixNet commit + + } elseif {$rfc2544TestType == "back2back"} { + # + # configuring the object that corresponds to /quickTest/rfc2544back2back:2 + # + set sg_rfc2544back2back [ixNet add $ixNetSG_Stack(0)/quickTest rfc2544back2back] + ixNet setMultiAttrs $sg_rfc2544back2back \ + -name {B2B} \ + -mode existingMode \ + -inputParameters {{}} + ixNet setMultiAttrs $sg_rfc2544back2back/testConfig \ + -protocolItem {} \ + -framesize $frameSize \ + -reportTputRateUnit mbps \ + -rfc2544ImixDataQoS False \ + -detailedResultsEnabled True \ + -rfc2889ordering noOrdering \ + -floodedFramesEnabled False \ + -duration $duration \ + -numtrials $numTests \ + -trafficType constantLoading \ + -burstSize 1 \ + -framesPerBurstGap 1 \ + -tolerance 0 \ + -frameLossUnit {0} \ + -staggeredStart False \ + -framesizeList $frameSize \ + -frameSizeMode custom \ + -rateSelect percentMaxRate \ + -percentMaxRate 100 \ + -resolution 0.01 \ + -forceRegenerate False \ + -reportSequenceError False \ + -ipv4rate 50 \ + -ipv6rate 50 \ + -loadRateList $frameRate \ + -minFpsRate 1000 \ + -minKbpsRate 64 \ + -txDelay 2 \ + -delayAfterTransmit 2 \ + -minRandomFrameSize 64 \ + -maxRandomFrameSize 1518 \ + -countRandomFrameSize 1 \ + -minIncrementFrameSize 64 \ + -stepIncrementFrameSize 64 \ + -maxIncrementFrameSize 1518 \ + -calculateLatency False \ + -calibrateLatency False \ + -latencyType cutThrough \ + -calculateJitter False \ + -enableDataIntegrity False \ + -loadType $loadType \ + -binaryFrameLossUnit % \ + -loadUnit percentMaxRate \ + -customLoadUnit percentMaxRate \ + -randomLoadUnit percentMaxRate \ + -incrementLoadUnit percentMaxRate \ + -binaryResolution 100 \ + -binaryBackoff 50 \ + -binaryTolerance $tolerance \ + -initialIncrementLoadRate 100 \ + -stepIncrementLoadRate 10 \ + -maxIncrementLoadRate 100 \ + -minRandomLoadRate 10 \ + -maxRandomLoadRate 80 \ + -countRandomLoadRate 1 \ + -numFrames {100000} \ + -loadRate 100 \ + -enableMinFrameSize False \ + -gap 3 \ + -generateTrackingOptionAggregationFiles False \ + -sendFullyMeshed False \ + -imixDistribution weight \ + -imixAdd {0} \ + -imixDelete {0} \ + -imixData {{{{64}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 40}}{{128}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 30}}{{256}{{TOS S:0 S:0 S:0 S:0 S:0} S:0}{1 30}}}} \ + -imixEnabled False \ + -imixTemplates none \ + -framesizeImixList $frameSize \ + -imixTrafficType {UNCHNAGED} \ + -ipRatioMode fixed \ + -ipv4RatioList {10,25,50,75,90} \ + -ipv6RatioList {90,75,50,25,10} \ + -minIncrementIpv4Ratio {10} \ + -stepIncrementIpv4Ratio {10} \ + -maxIncrementIpv4Ratio {90} \ + -minIncrementIpv6Ratio {90} \ + -stepIncrementIpv6Ratio {-10} \ + -maxIncrementIpv6Ratio {10} \ + -minRandomIpv4Ratio {10} \ + -maxRandomIpv4Ratio {90} \ + -minRandomIpv6Ratio {90} \ + -maxRandomIpv6Ratio {10} \ + -countRandomIpRatio 1 \ + -mapType {oneToOne|manyToMany|fullMesh} \ + -supportedTrafficTypes {mac,ipv4,ipv6,ipmix} + ixNet setMultiAttrs $sg_rfc2544back2back/learnFrames \ + -learnFrequency $learningFrequency \ + -learnNumFrames 10 \ + -learnRate 100 \ + -learnWaitTime 1000 \ + -learnFrameSize 64 \ + -fastPathLearnFrameSize 64 \ + -learnWaitTimeBeforeTransmit 0 \ + -learnSendMacOnly False \ + -learnSendRouterSolicitation False \ + -fastPathEnable $fastPathEnable \ + -fastPathRate 100 \ + -fastPathNumFrames 10 + ixNet setMultiAttrs $sg_rfc2544back2back/passCriteria \ + -passCriteriaLoadRateMode average \ + -passCriteriaLoadRateValue 100 \ + -passCriteriaLoadRateScale mbps \ + -enablePassFail False \ + -enableRatePassFail False \ + -enableLatencyPassFail False \ + -enableStandardDeviationPassFail False \ + -latencyThresholdValue 10 \ + -latencyThresholdScale us \ + -latencyThresholdMode average \ + -latencyVariationThresholdValue 0 \ + -latencyVariationThresholdScale us \ + -latencyVarThresholdMode average \ + -enableSequenceErrorsPassFail False \ + -seqErrorsThresholdValue 0 \ + -seqErrorsThresholdMode average \ + -enableDataIntegrityPassFail False \ + -dataErrorThresholdValue 0 \ + -dataErrorThresholdMode average \ + -enableFrameCountPassFail False \ + -passCriteriaFrameCountValue 100 \ + -passCriteriaFrameCountMode average + sg_commit + set sg_rfc2544back2back [lindex [ixNet remapIds $sg_rfc2544back2back] 0] + set ixNetSG_Stack(1) $sg_rfc2544back2back + + # + # configuring the object that corresponds to /quickTest/rfc2544back2back:2/protocols + # + set sg_protocols $ixNetSG_Stack(1)/protocols + ixNet setMultiAttrs $sg_protocols \ + -protocolState default \ + -waitAfterStart 120 \ + -waitAfterStop 30 + sg_commit + set sg_protocols [lindex [ixNet remapIds $sg_protocols] 0] + + # + # configuring the object that corresponds to /quickTest/rfc2544back2back:2/trafficSelection:1 + # + set sg_trafficSelection [ixNet add $ixNetSG_Stack(1) trafficSelection] + ixNet setMultiAttrs $sg_trafficSelection \ + -id $ixNetSG_ref(26) \ + -includeMode inTest \ + -itemType trafficItem + sg_commit + set sg_trafficSelection [lindex [ixNet remapIds $sg_trafficSelection] 0] + ixNet commit + } + + # + # getting and applying the RFC2544 test + # + set root [ixNet getRoot] + foreach traf_item [ixNet getList $root/traffic trafficItem] { + ixNet exec generate $traf_item + } + + set qt [ixNet getList $root quickTest] + if {$rfc2544TestType == "throughput"} { + set rfc2544test [ixNet getList $qt rfc2544throughput] + } elseif {$rfc2544TestType == "back2back"} { + set rfc2544test [ixNet getList $qt rfc2544back2back] + } + ixNet exec apply $rfc2544test + after 5000 + + # + # starting the RFC2544 Throughput test + # + puts "Starting test..." + ixNet exec start $rfc2544test +} + +proc waitForRfc2544Test { } { + # Wait for- and return results of- RFC2544 quicktest. + + global rfc2544test + + puts "Waiting for test to complete..." + set result [ixNet exec waitForTest $rfc2544test] + puts "Finished Test" + + return "$result" +} diff --git a/conf/integration/01b_dpdk_regression_tests.conf b/conf/integration/01b_dpdk_regression_tests.conf new file mode 100644 index 00000000..2e63d677 --- /dev/null +++ b/conf/integration/01b_dpdk_regression_tests.conf @@ -0,0 +1,1689 @@ +# Copyright 2017 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. + +# This file introduces a set of regression tests, which verify several DPDK features +# used internally by Open vSwitch. Tests can be used for verification of performance +# and correct functionality of upcoming DPDK and OVS releases and release candidates. + +############################################################ +# +# Generic configuration used by OVSDPDK testcases +# +############################################################ +_OVSDPDK_1st_PMD_CORE = 4 +_OVSDPDK_2nd_PMD_CORE = 5 +# calculate PMD mask from core IDs configured above +_OVSDPDK_PMD_MASK_1_CORE = str(hex(1<<_OVSDPDK_1st_PMD_CORE))[2:] +_OVSDPDK_PMD_MASK_2_CORE = str(hex((1<<_OVSDPDK_1st_PMD_CORE) + (1<<_OVSDPDK_2nd_PMD_CORE))[2:]) + +_OVSDPDK_GUEST_5_CORES = [('7', '8', '9', '10', '11')] + +# number of queues configured in OVS and GUEST +_OVSDPDK_MQ = '2' + +# Path to the log file +_OVSDPDK_VSWITCH_LOG = os.path.join(LOG_DIR, LOG_FILE_VSWITCHD) + +_OVSDPDK_HEADER_LEN = 18 # length of frame headers in bytes, it's used for calculation + # of payload size, i.e. payload = frame_size - header_len + +_OVSDPDK_PKT_SIZES = (64,128,256,512,1024,1500) + +INTEGRATION_TESTS = INTEGRATION_TESTS + [ + ############################################################ + # + # DPDK NIC Support + # + ############################################################ + { + "Name": "ovsdpdk_nic_p2p_single_pmd_unidir_cont", + "Deployment": "p2p", + "Description": "P2P with single PMD in OVS and unidirectional traffic.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'False', + }, + "TRAFFICGEN_PKT_SIZES" : _OVSDPDK_PKT_SIZES, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_1_CORE, + }, + }, + { + "Name": "ovsdpdk_nic_p2p_single_pmd_bidir_cont", + "Deployment": "p2p", + "Description": "P2P with single PMD in OVS and bidirectional traffic.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'True', + }, + "TRAFFICGEN_PKT_SIZES" : _OVSDPDK_PKT_SIZES, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_1_CORE, + }, + }, + { + "Name": "ovsdpdk_nic_p2p_two_pmd_bidir_cont", + "Deployment": "p2p", + "Description": "P2P with two PMDs in OVS and bidirectional traffic.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'True', + }, + "TRAFFICGEN_PKT_SIZES" : _OVSDPDK_PKT_SIZES, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_2_CORE, + }, + }, + { + "Name": "ovsdpdk_nic_p2p_single_pmd_unidir_tput", + "Deployment": "p2p", + "Description": "P2P with single PMD in OVS and unidirectional traffic.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_throughput", + 'bidir' : 'False', + }, + "TRAFFICGEN_PKT_SIZES" : _OVSDPDK_PKT_SIZES, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_1_CORE, + }, + }, + { + "Name": "ovsdpdk_nic_p2p_single_pmd_bidir_tput", + "Deployment": "p2p", + "Description": "P2P with single PMD in OVS and bidirectional traffic.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_throughput", + 'bidir' : 'True', + }, + "TRAFFICGEN_PKT_SIZES" : _OVSDPDK_PKT_SIZES, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_1_CORE, + }, + }, + { + "Name": "ovsdpdk_nic_p2p_two_pmd_bidir_tput", + "Deployment": "p2p", + "Description": "P2P with two PMDs in OVS and bidirectional traffic.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_throughput", + 'bidir' : 'True', + }, + "TRAFFICGEN_PKT_SIZES" : _OVSDPDK_PKT_SIZES, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_2_CORE, + }, + }, + ############################################################ + # + # DPDK Hotplug Support + # + ############################################################ + { + "Name": "ovsdpdk_hotplug_attach", + "Deployment": "clean", + "Description": "Ensure successful port-add after binding a device to igb_uio after ovs-vswitchd is launched.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + # suppress DPDK configuration, so physical interfaces are not bound to DPDK driver + 'WHITELIST_NICS' : [], + 'NICS' : [], + }, + "TestSteps": [ + # restore original NICS configuration, so we can use add/del_phy_port + ['settings', 'setValue', 'TEST_PARAMS', ''], + # add DPDK port, but it should fail + ['vswitch', 'add_switch', 'int_br0'], + ['#port', 'vswitch', 'add_phy_port', 'int_br0'], + # check, that DPDK port is not available and remove it + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', + '|Error attaching device.*$NICS[0]["pci"]'], + # NOTE: it fails in case that NIC was already bound to DPDK driver + ['tools', 'assert', 'len(#STEP[-1])'], + ['vswitch', 'del_port', 'int_br0', '#STEP[port][0]'], + # find out which DPDK driver is being used; it should be the last configured + # DPDK module; optional path and .ko suffix must be removed + ['tools', 'eval', '\'$TOOLS["dpdk_modules"][-1]\'.split("/")[-1].split(".")[0]'], + # bind NIC to DPDK driver + ['tools', 'exec_shell', 'sudo $TOOLS["bind-tool"] --bind #STEP[-1] $NICS[0]["pci"]'], + # and check that DPDK port can be created without errors + ['#port2', 'vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', + '|Error attaching device.*$NICS[0]["pci"]'], + ['tools', 'assert', 'not len(#STEP[-1])'], + # clean up + ['vswitch', 'del_port', 'int_br0', '#STEP[port2][0]'], + ['vswitch', 'del_switch', 'int_br0'], + ] + }, + { + # Support of netdev-dpdk/detach has been removed from OVS, so testcase will fail with recent + # OVS/DPDK versions. There is an ongoing discussion about possible support of netdev-dpdk/detach + # in the future OVS versions. + # Test has been tested with: + # OVS_TAG = 03d6399e618e4136c5da0be2b6f18f0b7d75b2bb + # DPDK_TAG = v16.11 + "Name": "ovsdpdk_hotplug_detach", + "Deployment": "clean", + "Description": "Same as ovsdpdk_hotplug_attach, but delete and detach the device after the hotplug. " + "Note: Support of netdev-dpdk/detach has been removed from OVS, so testcase will fail " + "with recent OVS/DPDK versions.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + # suppress DPDK configuration, so physical interfaces are not bound to DPDK driver + 'WHITELIST_NICS' : [], + 'NICS' : [], + }, + "TestSteps": [ + # check if OVS supports netdev-dpdk/detach, fail otherwise + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] list-commands', '|netdev-dpdk\/detach'], + ['tools', 'assert', 'len(#STEP[-1])'], + # restore original NICS configuration, so we can use add/del_phy_port + ['settings', 'setValue', 'TEST_PARAMS', ''], + # find out which DPDK driver is being used; it should be the last configured + # DPDK module; optional path and .ko suffix must be removed + ['tools', 'eval', '\'$TOOLS["dpdk_modules"][-1]\'.split("/")[-1].split(".")[0]'], + # bind NIC to DPDK driver + ['tools', 'exec_shell', 'sudo $TOOLS["bind-tool"] --bind #STEP[-1] $NICS[0]["pci"]'], + # and check that DPDK port can be created without errors + ['vswitch', 'add_switch', 'int_br0'], + ['#port', 'vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', + '|Error attaching device.*$NICS[0]["pci"]'], + ['tools', 'assert', 'not len(#STEP[-1])'], + # try to unbind port - should fail beause it is being used + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] netdev-dpdk/detach $NICS[0]["pci"] 2>&1; exit 0', + '|Device.*$NICS[0]["pci"].*is being used by interface'], + ['tools', 'assert', 'len(#STEP[-1])'], + # delete port and unbind it - should succeed + ['vswitch', 'del_port', 'int_br0', '#STEP[port][0]'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] netdev-dpdk/detach $NICS[0]["pci"]', + '|Device.*$NICS[0]["pci"].*has been detached'], + ['tools', 'assert', 'len(#STEP[-1])'], + # try to add port again + ['vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', + '|Error attaching device.*$NICS[0]["pci"]'], + # it will work because auto attach was implemented into OVS + ['tools', 'assert', 'not len(#STEP[-1])'], + ['vswitch', 'del_switch', 'int_br0'], + ] + }, +] + +############################################################ +# +# RX Checksum Support +# +############################################################ +# TCL script used for simulation of traffic with wrong CRC +_OVSDPDK_CRC_CRC_TCL = '' +_OVSDPDK_CRC_FRAME_LOSS = '' + +_OVSDPDK_CRC_VERIFY_CRC = [ + # use TCL script with tunneling protocols encap/decap support; + # it must be configured dynamically, otherwise it won't + # be possible to change it again below. + ['settings', 'setValue', 'TRAFFICGEN_IXNET_TCL_SCRIPT', + 'ixnetrfc2544v2.tcl'], + # send traffic before IP or UDP header checksum is randomized + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # packets should flow through OVS without frameloss (frame_rate is low) + ['tools', 'assert', 'float(#STEP[-1][0]["frame_loss_percent"]) == 0'], + # for 2nd run use TCL file with randomized checksum values + ['settings', 'setValue', 'TRAFFICGEN_IXNET_TCL_SCRIPT', + '$_OVSDPDK_CRC_CRC_TCL'], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # and verify that majority of frames but not all of them were lost + ['tools', 'assert', 'round(float(#STEP[-1][0]["frame_loss_percent"]),3) == $_OVSDPDK_CRC_FRAME_LOSS'], +] + +INTEGRATION_TESTS = INTEGRATION_TESTS + [ + { + "Name": "ovsdpdk_checksum_l3", + "Deployment": "op2p", + "Description": "Test verifies RX IP header checksum (offloading) validation for tunneling protocols.", + "Tunnel Type": "vxlan", + "Tunnel Operation": "decapsulation", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFICGEN" : "IxNet", + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 20, + 'bidir' : 'False', + }, + "TRAFFICGEN_DURATION" : 10, + "TRAFFICGEN_PKT_SIZES" : (64,) + }, + "TestSteps": [ + # TCL file with randomized IP header checksum values + ['settings', 'setValue', '_OVSDPDK_CRC_CRC_TCL', + 'ixnetrfc2544v2_random_ip_crc.tcl'], + # IP checksum is a value between 0 and 65536, so only 1 of 65536 + # frames has correct CRC and all other frames will be dropped + ['settings', 'setValue', '_OVSDPDK_CRC_FRAME_LOSS', + round(100 - 1 / 65536 * 100, 3)], + ] + _OVSDPDK_CRC_VERIFY_CRC + }, + { + "Name": "ovsdpdk_checksum_l4", + "Deployment": "op2p", + "Description": "Test verifies RX UDP header checksum (offloading) validation for tunneling protocols.", + "Tunnel Type": "vxlan", + "Tunnel Operation": "decapsulation", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFICGEN" : "IxNet", + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 20, + 'bidir' : 'False', + }, + "TRAFFICGEN_DURATION" : 10, + "TRAFFICGEN_PKT_SIZES" : (64,) + }, + "TestSteps": [ + # TCL file with randomized UDP header checksum values + ['settings', 'setValue', '_OVSDPDK_CRC_CRC_TCL', + 'ixnetrfc2544v2_random_udp_crc.tcl'], + # UDP checksum can be disabled by value 0; so valid checksum + # values are from 1 to 65535; It means that only one of 65535 frames + # has correct checksum and all other frames will be dropped + ['settings', 'setValue', '_OVSDPDK_CRC_FRAME_LOSS', + round(100 - 1 / 65535 * 100, 3)], + ] + _OVSDPDK_CRC_VERIFY_CRC + }, + ############################################################ + # + # Flow Control Support + # + ############################################################ + { + "Name": "ovsdpdk_flow_ctrl_rx", + "Deployment": "p2p", + "Description": "Test the rx flow control functionality of DPDK PHY ports.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFICGEN" : "IxNet", + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + "flow_control" : True, + 'bidir' : 'True', + }, + "TRAFFICGEN_DURATION" : 10, + "TRAFFICGEN_PKT_SIZES" : (64,) + }, + "TestSteps": [ + # send traffic before flow control is applied + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show'], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # frame loss with small packets should be detected + ['tools', 'assert', '#STEP[-1][0]["frame_loss_percent"] > 10'], + # delete phy ports so they can be created with flow control + ['vswitch', 'del_flow', 'br0', {}], + ['vswitch', 'del_port', 'br0', 'dpdk0'], + ['vswitch', 'del_port', 'br0', 'dpdk1'], + # turn on flow control + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port br0 dpdk0 -- set Interface dpdk0 type=dpdk options:dpdk-devargs=$NICS[0]["pci"] options:rx-flow-ctrl=true'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port br0 dpdk1 -- set Interface dpdk1 type=dpdk options:dpdk-devargs=$NICS[1]["pci"] options:rx-flow-ctrl=true'], + ['vswitch', 'add_flow', 'br0', {'in_port': '3', 'actions': ['output:4'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'br0', {'in_port': '4', 'actions': ['output:3'], 'idle_timeout': '0'}], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show'], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # frame loss with flow control enabled should converge to 0% + ['tools', 'assert', 'float(#STEP[-1][0]["frame_loss_percent"]) == 0'], + ] + }, + { + "Name": "ovsdpdk_flow_ctrl_rx_dynamic", + "Deployment": "p2p", + "Description": "Change the rx flow control support at run time and ensure the system honored the changes.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFICGEN" : "IxNet", + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + "flow_control" : True, + 'bidir' : 'True', + }, + "TRAFFICGEN_DURATION" : 10, + "TRAFFICGEN_PKT_SIZES" : (64,) + }, + "TestSteps": [ + # send traffic before flow control is applied + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show'], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # frame loss with small packets should be detected + ['tools', 'assert', '#STEP[-1][0]["frame_loss_percent"] > 10'], + # turn on flow control + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 type=dpdk options:rx-flow-ctrl=true'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk1 type=dpdk options:rx-flow-ctrl=true'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show'], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # frame loss with flow control enabled should converge to 0% + ['tools', 'assert', 'float(#STEP[-1][0]["frame_loss_percent"]) == 0'], + ] + }, + ############################################################ + # + # Multiqueue Support + # + ############################################################ + { + "Name": "ovsdpdk_mq_p2p_rxqs", + "Deployment": "p2p", + "Description": "Setup rxqs on NIC port.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'True', + }, + "TRAFFICGEN_DURATION" : 1, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_2_CORE, + "VSWITCH_DPDK_MULTI_QUEUES" : _OVSDPDK_MQ, + }, + "TestSteps": [ + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk[01]\s+queue-id: \d+'], + # check that requested nr of queues was created on both NICs + ['tools', 'assert', 'len(#STEP[-1])=={}'.format(int(_OVSDPDK_MQ)*2)], + ] + }, + { + "Name": "ovsdpdk_mq_p2p_rxqs_same_core_affinity", + "Deployment": "p2p", + "Description": "Affinitize rxqs to the same core.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'True', + }, + "TRAFFICGEN_DURATION" : 1, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_2_CORE, + "VSWITCH_DPDK_MULTI_QUEUES" : _OVSDPDK_MQ, + }, + "TestSteps": [ + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] -- set Interface dpdk0 other_config:pmd-rxq-affinity="0:{},1:{}"'.format(_OVSDPDK_1st_PMD_CORE, _OVSDPDK_1st_PMD_CORE)], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 0 1'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_mq_p2p_rxqs_multi_core_affinity", + "Deployment": "p2p", + "Description": "Affinitize rxqs to separate cores.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'True', + }, + "TRAFFICGEN_DURATION" : 1, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_2_CORE, + "VSWITCH_DPDK_MULTI_QUEUES" : _OVSDPDK_MQ, + }, + "TestSteps": [ + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] -- set Interface dpdk0 other_config:pmd-rxq-affinity="0:{},1:{}"'.format(_OVSDPDK_1st_PMD_CORE, _OVSDPDK_2nd_PMD_CORE)], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 0$'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpif-netdev/pmd-rxq-show','|dpdk0\s+queue-id: 1$'], + ['tools', 'assert', 'len(#STEP[-2])==1'], + ['tools', 'assert', 'len(#STEP[-2])==1'], + ] + }, + { + "Name" : "ovsdpdk_mq_pvp_rxqs", + "Deployment" : "clean", + "Description" : "Setup rxqs on vhost user port.", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + "VSWITCH_DPDK_MULTI_QUEUES" : _OVSDPDK_MQ, + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_1_CORE, + "GUEST_NIC_QUEUES" : [_OVSDPDK_MQ], + "GUEST_LOOPBACK" : ['clean'], + }, + "TestSteps": STEP_VSWITCH_PVP_INIT + + [ + ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", + '|dpdkvhostuserclient0\s+queue-id: \d'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ['vnf', 'start'], + ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", + '|dpdkvhostuserclient0\s+queue-id: 0 1'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ['vnf', 'stop'], + ] + + STEP_VSWITCH_PVP_FINIT + }, + { + "Name" : "ovsdpdk_mq_pvp_rxqs_linux_bridge", + "Deployment" : "clean", + "Description" : "Confirm traffic received over vhost RXQs with Linux virtio device in guest.", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + # configure 2 queues at both OVS and QEMU + "VSWITCH_DPDK_MULTI_QUEUES" : _OVSDPDK_MQ, + "GUEST_NIC_QUEUES" : [_OVSDPDK_MQ], + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_2_CORE, + "GUEST_LOOPBACK" : ['clean'], + "TRAFFICGEN_DURATION" : 5, + "TRAFFICGEN" : "IxNet", + "TRAFFIC" : { + "bidir" : "false", + "traffic_type" : "rfc2544_continuous", + "multistream" : 6, + "stream_type" : "L3", + "frame_rate" : 1, + 'l2': { + 'srcmac': "00:00:07:00:0E:00", + 'dstmac': "00:00:00:00:00:01" + }, + 'l3': { + 'enabled': True, + 'proto': 'udp', + 'srcip': '6.6.6.6', + 'dstip': '1.1.1.1', + }, + } + }, + "TestSteps": STEP_VSWITCH_PVP_INIT + [ + # one flow will sent data to the VM + ['vswitch', 'add_flow', 'int_br0', + {'in_port': '#STEP[1][1]', 'actions': ['output:#STEP[3][1]'], 'idle_timeout': '0'}], + # second flow just forwards traffic to the traffic generator, + # so send_traffic() will end with success + ['vswitch', 'add_flow', 'int_br0', + {'in_port': '#STEP[2][1]', 'actions': ['output:#STEP[1][1]'], 'idle_timeout': '0'}], + ['vnf', 'start'], + # configure two channels, so multiple cores could be used + ['vnf', 'execute_and_wait', 'ethtool -L eth0 combined 2'], + ['vnf', 'execute_and_wait', 'ethtool -l eth0', '|Combined:\s+2'], + ['tools', 'assert', 'len(#STEP[-1])==2'], + # traffic will be sent to several DST IPs so it can be + # dispatched between channels; We have to insert routes + # and ARPs, otherwise traffic will be dropped + ['vnf', 'execute_and_wait', 'ifconfig eth0 5.5.5.1/24 up'], + ['vnf', 'execute_and_wait', 'sysctl -w net.ipv4.ip_forward=1'], + ['vnf', 'execute_and_wait', 'sysctl -w net.ipv4.conf.all.rp_filter=0'], + ['vnf', 'execute_and_wait', 'ip route add 6.6.6.0/24 dev eth0'], + ['vnf', 'execute_and_wait', 'route add default gw 6.6.6.6 eth0'], + ['vnf', 'execute_and_wait', 'arp -s 6.6.6.6 00:00:07:00:0E:00'], + ['vnf', 'execute_and_wait', 'ip route add 1.1.1.0/31 dev eth0'], + ['vnf', 'execute_and_wait', 'route add default gw 1.1.1.1 eth0'], + ['vnf', 'execute_and_wait', 'arp -s 1.1.1.1 DE:AD:BE:EF:CA:FA'], + ['vnf', 'execute_and_wait', 'ip route add 1.1.1.2/31 dev eth0'], + ['vnf', 'execute_and_wait', 'route add default gw 1.1.1.3 eth0'], + ['vnf', 'execute_and_wait', 'arp -s 1.1.1.3 DE:AD:BE:EF:CA:FB'], + ['vnf', 'execute_and_wait', 'ip route add 1.1.1.4/31 dev eth0'], + ['vnf', 'execute_and_wait', 'route add default gw 1.1.1.5 eth0'], + ['vnf', 'execute_and_wait', 'arp -s 1.1.1.5 DE:AD:BE:EF:CA:FC'], + ['vnf', 'execute_and_wait', 'ip a'], + + ['trafficgen', 'send_traffic',{}], + # check interrupts to verify that traffic was corectly dispatched... + ['#result', 'vnf', 'execute_and_wait', 'cat /proc/interrupts', + '|^\s*\d+:\s+(\d+)\s+(\d+).+virtio0-input'], + # ...it means that two channels were created... + ['tools', 'assert', 'len(#STEP[result])==2'], + # ...and both channels processed data; Check that interrupt count is "much" + # higher than 0 to eliminate impact of rogue interrupts. + ['tools', 'assert', 'int(#STEP[result][0][0]) + int(#STEP[result][0][1]) > 1000'], + ['tools', 'assert', 'int(#STEP[result][1][0]) + int(#STEP[result][1][1]) > 1000'], + ['vnf', 'stop'], + ] + }, + { + "Name" : "ovsdpdk_mq_pvp_rxqs_testpmd", + "Deployment" : "clean", + "Description" : "Confirm traffic received over vhost RXQs with DPDK device in guest.", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + "TRAFFICGEN" : "IxNet", + # configure 2 queues at both OVS and QEMU + "VSWITCH_DPDK_MULTI_QUEUES" : _OVSDPDK_MQ, + "GUEST_NIC_QUEUES" : [_OVSDPDK_MQ], + "VSWITCH_PMD_CPU_MASK" : _OVSDPDK_PMD_MASK_2_CORE, + "GUEST_CORE_BINDING" : _OVSDPDK_GUEST_5_CORES, + "GUEST_LOOPBACK" : ['testpmd'], + # there must be separate CPU for each of RX/TX queues + "GUEST_SMP" : ['5'], + "GUEST_TESTPMD_PARAMS" : ['-c 0x1F -n 4 --socket-mem 512 -- ' + '--burst=64 -i --txqflags=0xf00 --nb-cores=4 ' + # map queue stats to separate regs to verify MQ functionality + '--rx-queue-stats-mapping=\(0,0,0\),\(0,1,1\),\(1,0,2\),\(1,1,3\) ' + '--tx-queue-stats-mapping=\(0,0,4\),\(0,1,5\),\(1,0,6\),\(1,1,7\) ' + '--disable-hw-vlan --rxq=2 --txq=2'], + "TRAFFICGEN_DURATION" : 5, + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "multistream" : 3, + "stream_type" : "L3", + 'l3': { + 'enabled': True, + 'proto': 'udp', + 'srcip': '6.6.6.6', + 'dstip': '1.1.1.1', + }, + }, + }, + "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + + [ + ['vnf', 'start'], + ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] dpif-netdev/pmd-rxq-show", + '|dpdk\w+\s+queue-id: \d'], + # there must be two standalone queue records for every interface (2x4) + ['tools', 'assert', 'len(#STEP[-1])==8'], + ['trafficgen', 'send_traffic', {}], + + # check that packets were received by both queues at both ports + ['vnf', 'execute_and_wait', 'show port stats 0', 60, 'testpmd>', + '|Stats reg [01] RX-packets:\s+(\d+)'], + ['tools', 'assert', '"0" not in #STEP[-1]'], + # rx queue of 2nd port should be mapped to reg 2 and 3, but mapping might not work + # so let us check that exactly two RX regs have non zero values + ['vnf', 'execute_and_wait', 'show port stats 1', 60, 'testpmd>', + '|Stats reg\s+\d+ RX-packets:\s+\d\d+'], + ['tools', 'assert', 'len(#STEP[-1])==2'], + # clean up + ['vnf', 'stop'], + ] + }, + ############################################################ + # + # Vhost User + # + ############################################################ + { + "Name": "ovsdpdk_vhostuser_client", + "Deployment": "pvp", + "Description": "Test vhost-user client mode", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'True', + }, + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "TRAFFICGEN_DURATION" : 1, + }, + "TestSteps": [ + # check that client ports are really used + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', + '|type.*dpdkvhostuserclient'], + ['tools', 'assert', 'len(#STEP[-1])==2'], + # send traffic manually, so TC will fail in case + # that packets won't make it through + ['trafficgen', 'send_traffic', {}], + ], + }, + { + "Name": "ovsdpdk_vhostuser_client_reconnect", + "Deployment": "pvp", + "Description": "Test vhost-user client mode reconnect feature", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'True', + }, + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "TRAFFICGEN_DURATION" : 1, + }, + "TestSteps": [ + # send traffic to verify correct PVP configuration + ['trafficgen', 'send_traffic', {}], + ['vswitch', 'dump_flows', 'br0'], + # restart vswitchd, ovsdb is kept untouched, so ovs configuration + # (except flows) will be restored + ['vswitch', 'restart'], + ['vswitch', 'del_flow', 'br0'], + ['vswitch', 'add_flow', 'br0', {'in_port': '1', 'actions': ['output:3'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'br0', {'in_port': '3', 'actions': ['output:1'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'br0', {'in_port': '2', 'actions': ['output:4'], 'idle_timeout': '0'}], + ['vswitch', 'add_flow', 'br0', {'in_port': '4', 'actions': ['output:2'], 'idle_timeout': '0'}], + # send traffic to verify that OVS works correctly after restart + ['trafficgen', 'send_traffic', {}], + ], + }, + { + "Name": "ovsdpdk_vhostuser_server", + "Deployment": "pvp", + "Description": "Test vhost-user server mode", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'True', + }, + "VSWITCH_VHOSTUSER_SERVER_MODE" : True, + "TRAFFICGEN_DURATION" : 1, + }, + "TestSteps": [ + # check that server ports are really used + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', + '|type.*dpdkvhostuser$'], + ['tools', 'assert', 'len(#STEP[-1])==2'], + # send traffic manually, so TC will fail in case + # that packets won't make it through + ['trafficgen', 'send_traffic', {}], + ], + }, + { + "Name": "ovsdpdk_vhostuser_sock_dir", + "Deployment": "clean", + "Description": "Verify functionality of vhost-sock-dir flag", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : True, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Open_vSwitch . ' + 'other_config:vhost-sock-dir=test_dir'], + # enforce vswitchd to read new configuration + ['vswitch', 'restart'], + ['tools', 'exec_shell', 'sudo mkdir $TOOLS["ovs_var_tmp"]/test_dir'], + ['vswitch', 'add_vport', 'br0'], + ['tools', 'exec_shell', 'ls -1 $TOOLS["ovs_var_tmp"]/test_dir', + '|dpdkvhostuser0'], + ['tools', 'assert', 'len(#STEP[-1])'], + ], + }, +] +############################################################ +# +# Virtual Devices Support +# +############################################################ +_OVSDPDK_VDEV_ADD_NULL = [ + ['vswitch', 'add_switch', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port int_br0 null0 -- ' + 'set Interface null0 type=dpdk options:dpdk-devargs=eth_null0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', '|dpdk-devargs=\S+eth_null0'], + ['tools', 'assert', 'len(#STEP[-1])==1'], +] + +_OVSDPDK_VDEV_ADD_AF_PACKET = [ + # resore original NICS configuration, so we can use NICS dictionary + ['settings', 'setValue', 'TEST_PARAMS', ''], + # check if vsperf was able to read device name + ['tools', 'assert', 'str(\"$NICS[0]["device"]\") != \"None\"'], + ['tools', 'exec_shell', 'sudo ip link set dev $NICS[0]["device"] up'], + ['vswitch', 'add_switch', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] add-port int_br0 myeth0 -- ' + 'set Interface myeth0 type=dpdk options:dpdk-devargs=eth_af_packet0,iface=$NICS[0]["device"]'], + # check if device was created... + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', '|dpdk-devargs=\S+eth_af_packet0'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + # ...without errors + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', '|Error attaching device'], + ['tools', 'assert', 'not len(#STEP[-1])'], +] + +INTEGRATION_TESTS = INTEGRATION_TESTS + [ + { + "Name": "ovsdpdk_vdev_add_null_pmd", + "Deployment": "clean", + "Description": "Test addition of port using the null DPDK PMD driver.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": _OVSDPDK_VDEV_ADD_NULL + }, + { + "Name": "ovsdpdk_vdev_del_null_pmd", + "Deployment": "clean", + "Description": "Test deletion of port using the null DPDK PMD driver.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": _OVSDPDK_VDEV_ADD_NULL + [ + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] del-port null0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', + '|dpdk-devargs=\S+eth_null0'], + ['tools', 'assert', 'not len(#STEP[-1])'], + ] + }, + { + "Name": "ovsdpdk_vdev_add_af_packet_pmd", + "Deployment": "clean", + "Description": "Test addition of port using the af_packet DPDK PMD driver.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + # suppress DPDK configuration, so physical interfaces are not bound to DPDK driver + 'WHITELIST_NICS' : [], + 'NICS' : [], + }, + "TestSteps": _OVSDPDK_VDEV_ADD_AF_PACKET + }, + { + "Name": "ovsdpdk_vdev_del_af_packet_pmd", + "Deployment": "clean", + "Description": "Test deletion of port using the af_packet DPDK PMD driver.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + # suppress DPDK configuration, so physical interfaces are not bound to DPDK driver + 'WHITELIST_NICS' : [], + 'NICS' : [], + }, + "TestSteps": _OVSDPDK_VDEV_ADD_AF_PACKET + [ + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] del-port myeth0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] show', + '|dpdk-devargs=\S+eth_af_packet0'], + ['tools', 'assert', 'not len(#STEP[-1])'], + ] + }, + ############################################################ + # + # NUMA Support + # + ############################################################ + { + "Name": "ovsdpdk_numa", + "Deployment": "clean", + "Description": "Test vhost-user NUMA support. Vhostuser PMD threads should migrate " + "to the same numa slot, where QEMU is executed.", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + # ensure that memory and cpus are available at both numa slots + "DPDK_SOCKET_MEM" : ['1024', '1024'], + "VSWITCH_PMD_CPU_MASK" : 'FFFFFE', + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + # traffic won't be send, so speed up VNF deployment + "GUEST_LOOPBACK" : ['clean'] + }, + "TestSteps": STEP_VSWITCH_PVP_INIT + + [ + # check that at least 2 numa slots are available + ['tools', 'exec_shell', 'numactl -H', '|available: ([0-9]+)'], + ['tools', 'assert', '#STEP[-1][0]>1'], + # check that PMD thread serving dpdkvhostuserclient0 runs at NUMA slot 0 + ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] " + "dpif-netdev/pmd-rxq-show | " + "sed -e '/dpdkvhostuserclient0/,$d' | tac", + '|pmd thread numa_id ([0-9])+' + ], + ['tools', 'assert', '#STEP[-1][0]==0'], + # store last 2 cores from 2nd numa slot + ['tools', 'exec_shell', 'numactl -H', '|node 1 cpus:.*\s+(\\d+) (\\d+)$'], + # pin VNF to 2nd NUMA slot + ['settings', 'setValue', 'GUEST_CORE_BINDING', + [("#STEP[-1][0][0]", "#STEP[-1][0][1]")] + ], + ['vnf', 'start'], + # ...and check that PMD thread serving dpdkvhostuserclient0 + # has migrated to NUMA slot 1 + ['tools', 'exec_shell', "sudo $TOOLS['ovs-appctl'] " + "dpif-netdev/pmd-rxq-show | " + "sed -e '/dpdkvhostuserclient0/,$d' | tac", + '|pmd thread numa_id ([0-9])+' + ], + ['tools', 'assert', '#STEP[-1][0]==1'], + ['vnf', 'stop'], + ] + + STEP_VSWITCH_PVP_FINIT + }, + ############################################################ + # + # Jumbo Frame Support + # + ############################################################ + { + "Name": "ovsdpdk_jumbo_increase_mtu_phy_port_ovsdb", + "Deployment": "clean", + "Description": "Ensure that the increased MTU for a DPDK physical port is updated in OVSDB.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==1500'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ] + }, + { + "Name": "ovsdpdk_jumbo_increase_mtu_vport_ovsdb", + "Deployment": "clean", + "Description": "Ensure that the increased MTU for a DPDK vhost-user port is updated in OVSDB.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==1500'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ] + }, + { + "Name": "ovsdpdk_jumbo_reduce_mtu_phy_port_ovsdb", + "Deployment": "clean", + "Description": "Ensure that the reduced MTU for a DPDK physical port is updated in OVSDB.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_JUMBO_FRAMES_ENABLED" : 'True', + "VSWITCH_JUMBO_FRAMES_SIZE" : 9000, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=2000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==2000'], + ] + }, + { + "Name": "ovsdpdk_jumbo_reduce_mtu_vport_ovsdb", + "Deployment": "clean", + "Description": "Ensure that the reduced MTU for a DPDK vhost-user port is updated in OVSDB.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "VSWITCH_JUMBO_FRAMES_ENABLED" : 'True', + "VSWITCH_JUMBO_FRAMES_SIZE" : 9000, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=2000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==2000'], + ] + }, + { + "Name": "ovsdpdk_jumbo_increase_mtu_phy_port_datapath", + "Deployment": "clean", + "Description": "Ensure that the MTU for a DPDK physical port is updated in the datapath itself when increased to a valid value.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpctl/show', '|mtu=1500'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpctl/show', '|mtu=9000'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_jumbo_increase_mtu_vport_datapath", + "Deployment": "clean", + "Description": "Ensure that the MTU for a DPDK vhost-user port is updated in the datapath itself when increased to a valid value.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpctl/show', '|mtu=1500'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpctl/show', '|mtu=9000'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_jumbo_reduce_mtu_phy_port_datapath", + "Deployment": "clean", + "Description": "Ensure that the MTU for a DPDK physical port is updated in the datapath itself when decreased to a valid value.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_JUMBO_FRAMES_ENABLED" : 'True', + "VSWITCH_JUMBO_FRAMES_SIZE" : 9000, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpctl/show', '|mtu=9000'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=2000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpctl/show', '|mtu=2000'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_jumbo_reduce_mtu_vport_datapath", + "Deployment": "clean", + "Description": "Ensure that the MTU for a DPDK vhost-user port is updated in the datapath itself when decreased to a valid value.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "VSWITCH_JUMBO_FRAMES_ENABLED" : 'True', + "VSWITCH_JUMBO_FRAMES_SIZE" : 9000, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpctl/show', '|mtu=9000'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=2000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] dpctl/show', '|mtu=2000'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_jumbo_mtu_upper_bound_phy_port", + "Deployment": "clean", + "Description": "Verify that the upper bound limit is enforced for OvS DPDK Phy ports.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9710'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9710'], + # get line number of next log file entry + ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=9711'], + # check vswitchd log file, that new MTU request was denied + ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", + '|unsupported MTU 9711'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9710'], + ] + }, + { + "Name": "ovsdpdk_jumbo_mtu_upper_bound_vport", + "Deployment": "clean", + "Description": "Verify that the upper bound limit is enforced for OvS DPDK vhost-user ports.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9710'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9710'], + # get line number of next log file entry + ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=9711'], + # check vswitchd log file, that new MTU request was denied + ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", + '|unsupported MTU 9711'], + ['tools', 'assert', 'len(#STEP[-1])'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9710'], + ] + }, + { + "Name": "ovsdpdk_jumbo_mtu_lower_bound_phy_port", + "Deployment": "clean", + "Description": "Verify that the lower bound limit is enforced for OvS DPDK Phy ports.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=68'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==68'], + # get line number of next log file entry + ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdk0 mtu_request=67'], + # check vswitchd log file, that new MTU request was denied + ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", + '|unsupported MTU 67'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==68'], + ] + }, + { + "Name": "ovsdpdk_jumbo_mtu_lower_bound_vport", + "Deployment": "clean", + "Description": "Verify that the lower bound limit is enforced for OvS DPDK vhost-user ports.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=68'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==68'], + # get line number of next log file entry + ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set Interface dpdkvhostuserclient0 mtu_request=67'], + # check vswitchd log file, that new MTU request was denied + ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", + '|unsupported MTU 67'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==68'], + ] + }, + { + "Name": "ovsdpdk_jumbo_p2p", + "Deployment": "p2p", + "Description": "Ensure that jumbo frames are received, processed and forwarded correctly by DPDK physical ports.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'False', + 'learning_frames' : False, + }, + "TRAFFICGEN_PKT_SIZES" : (9018,), + "VSWITCH_JUMBO_FRAMES_ENABLED" : 'True', + "VSWITCH_JUMBO_FRAMES_SIZE" : 9000, + }, + "TestSteps": [ + # verify jumbo frame configuration + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk1 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ['trafficgen', 'send_traffic', {}], + # check that jumbo frames were received by traffic generator + ['trafficgen', 'get_results'], + # i.e. (RX in Bytes/s) divide (RX frames/s) ~ 9018 Bytes + ['tools', 'assert', 'round(float(#STEP[-1][0]["throughput_rx_mbps"])*1000000/8 / ' + 'float(#STEP[-1][0]["throughput_rx_fps"]))==9018'], + ] + }, +{ + "Name": "ovsdpdk_jumbo_pvp", + "Deployment": "clean", + "Description": "Ensure that jumbo frames are received, processed and forwarded correctly by DPDK vhost-user ports.", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'False', + 'learning_frames' : False, + }, + "TRAFFICGEN_PKT_SIZES" : (9018,), + "VSWITCH_JUMBO_FRAMES_ENABLED" : 'True', + "VSWITCH_JUMBO_FRAMES_SIZE" : 9000, + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "GUEST_LOOPBACK" : ['linux_bridge'], + "GUEST_NIC_MERGE_BUFFERS_DISABLE" : [False], + }, + "TestSteps": STEP_VSWITCH_PVP_FLOWS_INIT + [ + # verify jumbo frame configuration + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk1 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdkvhostuserclient1 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + # VNF startup, MTU configuration + ['vnf', 'start'], + ['vnf', 'execute_and_wait', 'ifconfig eth0 mtu 9000'], + ['vnf', 'execute_and_wait', 'ifconfig eth1 mtu 9000'], + ['trafficgen', 'send_traffic', {}], + # check that jumbo frames were received by traffic generator + ['trafficgen', 'get_results'], + # i.e. (RX in Bytes/s) divide (RX frames/s) ~ 9018 Bytes + ['tools', 'assert', 'round(float(#STEP[-1][0]["throughput_rx_mbps"])*1000000/8 / ' + 'float(#STEP[-1][0]["throughput_rx_fps"]))==9018'], + ['vnf', 'stop'], + ] + STEP_VSWITCH_PVP_FLOWS_FINIT + }, + { + "Name": "ovsdpdk_jumbo_p2p_upper_bound", + "Deployment": "p2p", + "Description": "Ensure that jumbo frames above the configured Rx port's MTU are not accepted", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 10, + 'bidir' : 'False', + 'learning_frames' : False, + }, + "VSWITCH_JUMBO_FRAMES_ENABLED" : 'True', + "VSWITCH_JUMBO_FRAMES_SIZE" : 9000, + }, + "TestSteps": [ + # set and verify jumbo frame support + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk0 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] get Interface dpdk1 mtu'], + ['tools', 'assert', 'int(#STEP[-1])==9000'], + # set packetsize to 9018 and send traffic + ['settings', 'setValue', 'TRAFFICGEN_PKT_SIZES', (9018,)], + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # all traffic should pass through (i.e. 0% frame loss) + ['tools', 'assert', 'float(#STEP[-1][0]["frame_loss_percent"])==0'], + # set packetsize to 9019 and send traffic + ['settings', 'setValue', 'TRAFFICGEN_PKT_SIZES', (9019,)], + # disable verification of send_traffic "!" prefix, otherwise vsperf + # will fail when 100% packet loss is detected + ['!trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # all traffic should be dropped + ['tools', 'assert', 'float(#STEP[-1][0]["frame_loss_percent"])==100'], + ] + }, +] +############################################################ +# +# Rate Limiting +# +############################################################ +# default settings of limiter used in macros and tests +_OVSDPDK_RATE_PORT = 'dpdk' +_OVSDPDK_RATE_NICID = '0' +_OVSDPDK_RATE_RATE = '10000' # desired maximum rate of PAYLOAD carried by frames +_OVSDPDK_RATE_BURST = '8000' +_OVSDPDK_RATE_LIMITER_CREATED = 'True' # set to False to verify that limiter was not created + +_OVSDPDK_RATE_DEVIATION = '5' # acceptable deviation from configured frame rate in % +# Formula used for validation of rate settings. +# Note: OVS parameter "ingress_policing_rate" configures maximum rate of payload in Kbps, +# but traffic generator measures throughput in Mbps based on whole frames including headers. +# Thus measured RX throughput value reported by traffic generator must be deducted by bit +# rate consumed by frame header transmission. +_OVSDPDK_RATE_CHECK = ('abs(1-float(#STEP[{}][{}]["throughput_rx_mbps"])*1000*' + '(1-$_OVSDPDK_HEADER_LEN/float(#STEP[{}][{}]["packet_size"]))' + '/float($_OVSDPDK_RATE_RATE))*100 < $_OVSDPDK_RATE_DEVIATION') + +# macro will setup rate limiter at interface defined by _DPDK_RATE_PORT and +# _DPDK_RATE_NICID; It will verify, that limiter was created by parsing +# vswitchd log file. It will also check that proper limiter values are +# set for given interface. +_OVSDPDK_RATE_set_rate_limiter = [ + # get line number of next log file entry + ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] ' + 'set Interface $_OVSDPDK_RATE_PORT$_OVSDPDK_RATE_NICID ' + 'ingress_policing_burst=$_OVSDPDK_RATE_BURST ' + 'ingress_policing_rate=$_OVSDPDK_RATE_RATE'], + # check vswitchd log file, that rate limiter was created + ['tools', 'exec_shell', "sed -n '#STEP[-2][0],$ p' $_OVSDPDK_VSWITCH_LOG", + '|CIR period'], + ['tools', 'assert', '("CIR period" in #STEP[-1])==$_OVSDPDK_RATE_LIMITER_CREATED'], + # verify that interface has correct rate limiter configuration + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] ' + 'list interface $_OVSDPDK_RATE_PORT$_OVSDPDK_RATE_NICID', + '(ingress_policing_\w+: \d+)'], + ['tools', 'assert', '"ingress_policing_burst: $_OVSDPDK_RATE_BURST" in #STEP[-1]'], + ['tools', 'assert', '"ingress_policing_rate: $_OVSDPDK_RATE_RATE" in #STEP[-2]'], +] + +_OVSDPDK_RATE_set_rate_limiter_NIC0 = [ + ['settings', 'setValue', '_OVSDPDK_RATE_NICID', '0'] +] + _OVSDPDK_RATE_set_rate_limiter + +_OVSDPDK_RATE_set_rate_limiter_NIC1 = [ + ['settings', 'setValue', '_OVSDPDK_RATE_NICID', '1'] +] + _OVSDPDK_RATE_set_rate_limiter + +# macro will set different limiter values and sends traffic to verify proper +# limiter functionality +_OVSDPDK_RATE_confirm_multiple_rate_limit_setup = \ + _OVSDPDK_RATE_set_rate_limiter_NIC0 + _OVSDPDK_RATE_set_rate_limiter_NIC1 + [ + # by default rate limit is 10Mbits/s + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # check result and accept preconfigured deviation to the configured frame rate + ['tools', 'assert', _OVSDPDK_RATE_CHECK.format("-1", "0", "-1", "0")], + # set rate limit to 20Mbits/s + ['settings', 'setValue', '_OVSDPDK_RATE_RATE', '20000'] + ] + _OVSDPDK_RATE_set_rate_limiter_NIC0 + _OVSDPDK_RATE_set_rate_limiter_NIC1 + [ + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # check result and accept preconfigured deviation to the configured frame rate + ['tools', 'assert', _OVSDPDK_RATE_CHECK.format("-1", "0", "-1", "0")], + # set rate limit to 30Mbits/s + ['settings', 'setValue', '_OVSDPDK_RATE_RATE', '30000'] + ] + _OVSDPDK_RATE_set_rate_limiter_NIC0 + _OVSDPDK_RATE_set_rate_limiter_NIC1 + [ + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + # check result and accept preconfigured deviation to the configured frame rate + ['tools', 'assert', _OVSDPDK_RATE_CHECK.format("-1", "0", "-1", "0")], + # disable rate limiter and verify unlimited speed + ['settings', 'setValue', '_OVSDPDK_RATE_RATE', '0'], + ['settings', 'setValue', '_OVSDPDK_RATE_BURST', '0'], + ['settings', 'setValue', '_OVSDPDK_RATE_LIMITER_CREATED', 'False'], + ] + _OVSDPDK_RATE_set_rate_limiter_NIC0 + _OVSDPDK_RATE_set_rate_limiter_NIC1 + [ + ['trafficgen', 'send_traffic', {}], + # check that traffic rate is no longer limited + ['trafficgen', 'get_results'], + ['tools', 'assert', 'int(#STEP[-1][0]["throughput_rx_mbps"])>500'], + ['vswitch', 'dump_flows', 'br0'], + ] + +INTEGRATION_TESTS = INTEGRATION_TESTS + [ + { + "Name": "ovsdpdk_rate_create_phy_port", + "Deployment": "clean", + "Description": "Ensure a rate limiting interface can be created on a physical DPDK port.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ] + _OVSDPDK_RATE_set_rate_limiter + }, + { + "Name": "ovsdpdk_rate_delete_phy_port", + "Deployment": "clean", + "Description": "Ensure a rate limiting interface can be destroyed on a physical DPDK port.", + "vSwitch" : "OvsDpdkVhost", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ] + _OVSDPDK_RATE_set_rate_limiter + [ + ['settings', 'setValue', '_OVSDPDK_RATE_RATE', '0'], + ['settings', 'setValue', '_OVSDPDK_RATE_BURST', '0'], + ['settings', 'setValue', '_OVSDPDK_RATE_LIMITER_CREATED', 'False'], + ] + _OVSDPDK_RATE_set_rate_limiter + }, + { + "Name": "ovsdpdk_rate_create_vport", + "Deployment": "clean", + "Description": "Ensure a rate limiting interface can be created on a vhost-user port.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "_OVSDPDK_RATE_PORT" : 'dpdkvhostuserclient', + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ] + _OVSDPDK_RATE_set_rate_limiter + }, + { + "Name": "ovsdpdk_rate_delete_vport", + "Deployment": "clean", + "Description": "Ensure a rate limiting interface can be destroyed on a vhost-user port.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "_OVSDPDK_RATE_PORT" : 'dpdkvhostuserclient', + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ] + _OVSDPDK_RATE_set_rate_limiter + [ + ['settings', 'setValue', '_OVSDPDK_RATE_RATE', '0'], + ['settings', 'setValue', '_OVSDPDK_RATE_BURST', '0'], + ['settings', 'setValue', '_OVSDPDK_RATE_LIMITER_CREATED', 'False'], + ] + _OVSDPDK_RATE_set_rate_limiter + }, + { + "Name": "ovsdpdk_rate_no_policing", + "Deployment": "clean", + "Description": "Ensure when a user attempts to create a rate limiting interface but is missing policing rate argument, no rate limitiner is created.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "_OVSDPDK_RATE_PORT" : 'dpdkvhostuserclient', + "_OVSDPDK_RATE_RATE" : '0', + "_OVSDPDK_RATE_BURST" : '1000', + "_OVSDPDK_RATE_LIMITER_CREATED" : 'False', + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ] + _OVSDPDK_RATE_set_rate_limiter + }, + { + "Name": "ovsdpdk_rate_no_burst", + "Deployment": "clean", + "Description": "Ensure when a user attempts to create a rate limiting interface but is missing policing burst argument, rate limitiner is created.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "_OVSDPDK_RATE_PORT" : 'dpdkvhostuserclient', + "_OVSDPDK_RATE_RATE" : '10000', + "_OVSDPDK_RATE_BURST" : '0', + "_OVSDPDK_RATE_LIMITER_CREATED" : 'True', + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ] + _OVSDPDK_RATE_set_rate_limiter + }, + { + "Name": "ovsdpdk_rate_p2p", + "Deployment": "p2p", + "Description": "Ensure when a user creates a rate limiting physical interface that the traffic is limited to the specified policer rate in a p2p setup.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "_OVSDPDK_RATE_PORT" : 'dpdk', + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'False', + }, + }, + "TestSteps": _OVSDPDK_RATE_confirm_multiple_rate_limit_setup + }, + { + "Name": "ovsdpdk_rate_pvp", + "Deployment": "pvp", + "Description": "Ensure when a user creates a rate limiting vHost User interface that the traffic is limited to the specified policer rate in a pvp setup.", + "vSwitch" : "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "_OVSDPDK_RATE_PORT" : 'dpdkvhostuserclient', + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'False', + }, + }, + "TestSteps": _OVSDPDK_RATE_confirm_multiple_rate_limit_setup + }, + { + "Name": "ovsdpdk_rate_p2p_multi_pkt_sizes", + "Deployment": "p2p", + "Description": "Ensure that rate limiting works for various frame sizes.", + "vSwitch" : "OvsDpdkVhost", + "Parameters" : { + "_OVSDPDK_RATE_PORT" : 'dpdk', + "_OVSDPDK_RATE_RATE" : '10000', + "TRAFFICGEN_PKT_SIZES" : _OVSDPDK_PKT_SIZES, + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'False', + }, + }, + "TestSteps": _OVSDPDK_RATE_set_rate_limiter_NIC0 + _OVSDPDK_RATE_set_rate_limiter_NIC1 + [ + # dump rate limiter configuration of both NICs + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] ' + 'list interface dpdk0'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] ' + 'list interface dpdk1'], + ['trafficgen', 'send_traffic', {}], + ['#result', 'trafficgen', 'get_results'], + # check results and accept preconfigured deviation to the configured frame rates + ['tools', 'assert', _OVSDPDK_RATE_CHECK.format("result","0", "result","0")], + ['tools', 'assert', _OVSDPDK_RATE_CHECK.format("result","1", "result","1")], + ['tools', 'assert', _OVSDPDK_RATE_CHECK.format("result","2", "result","2")], + ['tools', 'assert', _OVSDPDK_RATE_CHECK.format("result","3", "result","3")], + ['tools', 'assert', _OVSDPDK_RATE_CHECK.format("result","4", "result","4")], + ], + }, +] +############################################################ +# +# Quality of Service +# +############################################################ +# default settings of limiter used in macros and tests +_OVSDPDK_QOS_PORT = 'dpdk' +_OVSDPDK_QOS_NICID = '0' +_OVSDPDK_QOS_CIR = '1250000' # desired maximum rate of PAYLOAD carried by frames in BYTEs +_OVSDPDK_QOS_CBS = '2048' + +_OVSDPDK_QOS_DEVIATION = '5' # acceptable deviation from configured frame rate in % +# Formula used for validation of rate settings. +# Note: OVS parameter "ingress_policing_rate" configures maximum rate of payload in Kbps, +# but traffic generator measures throughput in Mbps based on whole frames including headers. +# Thus measured RX throughput value reported by traffic generator must be deducted by bit +# rate consumed by frame header transmission. +_OVSDPDK_QOS_CHECK = ('abs(1-float(#STEP[{}][{}]["throughput_rx_mbps"])*1000000*' + '(1-$_OVSDPDK_HEADER_LEN/float(#STEP[{}][{}]["packet_size"]))' + '/float($_OVSDPDK_QOS_CIR*8))*100 < $_OVSDPDK_QOS_DEVIATION') + + +# macro will setup QoS at interface defined by _OVSDPDK_QOS_PORT and +# _OVSDPDK_QOS_NICID; It will verify, that QoS was created by parsing +# vswitchd log file. It will also check that proper QoS values are +# set for given interface. +_OVSDPDK_QOS_set_qos = [ + # get line number of next log file entry + ['tools', 'exec_shell', 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], + + # Crete QoS policy and check the returned policy ID + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] ' + 'set port $_OVSDPDK_QOS_PORT$_OVSDPDK_QOS_NICID qos=@newqos -- ' + '--id=@newqos create qos type=egress-policer other-config:cir=$_OVSDPDK_QOS_CIR ' + 'other-config:cbs=$_OVSDPDK_QOS_CBS','|\w{8}-\w{4}-\w{4}-\w{4}-\w{12}'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + + # Check the OVS logs + ['tools', 'exec_shell', "sed -n '#STEP[-3][0],$ p' $_OVSDPDK_VSWITCH_LOG", + '|CIR period'], + ['tools', 'assert', '"CIR period" in #STEP[-1]'], + + # Check the QoS policy and attributes + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] -t ovs-vswitchd qos/show ' + '$_OVSDPDK_QOS_PORT$_OVSDPDK_QOS_NICID', '.+'], + ['tools', 'assert', "'QoS: $_OVSDPDK_QOS_PORT$_OVSDPDK_QOS_NICID egress-policer' in #STEP[-1]"], + ['tools', 'assert', "'cbs: $_OVSDPDK_QOS_CBS' in #STEP[-2]"], + ['tools', 'assert', "'cir: $_OVSDPDK_QOS_CIR' in #STEP[-3]"], +] + +_OVSDPDK_QOS_set_qos_NIC0 = [ + ['settings', 'setValue', '_OVSDPDK_QOS_NICID', '0'] +] + _OVSDPDK_QOS_set_qos + +_OVSDPDK_QOS_set_qos_NIC1 = [ + ['settings', 'setValue', '_OVSDPDK_QOS_NICID', '1'] +] + _OVSDPDK_QOS_set_qos + +# macro will set different limiter values and sends traffic to verify proper +# QoS functionality +_OVSDPDK_QOS_confirm_multiple_qos_setup = [ + # Create QoS policy with payload rate of 23*10^6 Bytes/s + ['settings', 'setValue', '_OVSDPDK_QOS_CIR', '23000000'] + ] + _OVSDPDK_QOS_set_qos_NIC0 + _OVSDPDK_QOS_set_qos_NIC1 + [ + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + ['tools', 'assert', _OVSDPDK_QOS_CHECK.format("-1", "0", "-1", "0")], + # Create QoS policy with payload rate of 46*10^6 Bytes/s + ['settings', 'setValue', '_OVSDPDK_QOS_CIR', '46000000'] + ] + _OVSDPDK_QOS_set_qos_NIC0 + _OVSDPDK_QOS_set_qos_NIC1 + [ + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + ['tools', 'assert', _OVSDPDK_QOS_CHECK.format("-1", "0", "-1", "0")], + # Create QoS policy with payload rate of 92*10^6 Bytes/s + ['settings', 'setValue', '_OVSDPDK_QOS_CIR', '92000000'] + ] + _OVSDPDK_QOS_set_qos_NIC0 + _OVSDPDK_QOS_set_qos_NIC1 + [ + ['trafficgen', 'send_traffic', {}], + ['trafficgen', 'get_results'], + ['tools', 'assert', _OVSDPDK_QOS_CHECK.format("-1", "0", "-1", "0")], + ] + +INTEGRATION_TESTS = INTEGRATION_TESTS + [ + { + "Name": "ovsdpdk_qos_create_phy_port", + "Deployment": "clean", + "Description": "Ensure a QoS policy can be created on a physical DPDK port", + "vSwitch": "OvsDpdkVhost", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ] + _OVSDPDK_QOS_set_qos + }, + { + "Name": "ovsdpdk_qos_delete_phy_port", + "Deployment": "clean", + "Description": "Ensure an existing QoS policy can be destroyed on a physical DPDK port.", + "vSwitch": "OvsDpdkVhost", + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_phy_port', 'int_br0'], + ] + _OVSDPDK_QOS_set_qos + [ + # Destroy the QoS policy and check the attributes + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] -- destroy QoS #STEP[1][0] -- clear Port #STEP[1][0] qos'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] -t ovs-vswitchd qos/show #STEP[1][0]', 'QoS not configured on #STEP[1][0]'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_qos_create_vport", + "Deployment": "clean", + "Description": "Ensure a QoS policy can be created on a virtual vhost user port.", + "vSwitch": "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "_OVSDPDK_QOS_PORT" : 'dpdkvhostuserclient', + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ] + _OVSDPDK_QOS_set_qos + }, + { + "Name": "ovsdpdk_qos_delete_vport", + "Deployment": "clean", + "Description": "Ensure an existing QoS policy can be destroyed on a vhost user port.", + "vSwitch": "OvsDpdkVhost", + "Parameters" : { + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "_OVSDPDK_QOS_PORT" : 'dpdkvhostuserclient', + }, + "TestSteps": [ + ['vswitch', 'add_switch', 'int_br0'], + ['vswitch', 'add_vport', 'int_br0'], + ] + _OVSDPDK_QOS_set_qos + [ + # Destroy the QoS policy and check the attributes + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] -- destroy QoS #STEP[1][0] -- clear Port #STEP[1][0] qos'], + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] -t ovs-vswitchd qos/show #STEP[1][0]', 'QoS not configured on #STEP[1][0]'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_qos_create_no_cir", + "Deployment": "clean", + "Description": "Ensure that a QoS policy cannot be created if the egress policer cir argument is missing.", + "vSwitch": "OvsDpdkVhost", + "Parameters" : {}, + "TestSteps": [ + # Setup switch,port and logs + ['vswitch', 'add_switch', 'br0'], + ['vswitch', 'add_vport', 'br0'], + ['#LOG_MARK', 'tools', 'exec_shell', + 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], + + # Crete QoS policy and check the returned policy ID + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set port #STEP[1][0] qos=@newqos -- ' + '--id=@newqos create qos type=egress-policer other-config:cbs=2048', + '\w{8}-\w{4}-\w{4}-\w{4}-\w{12}'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + + # Check the OVS logs + ['tools', 'exec_shell', "sed -n '#STEP[LOG_MARK][0],$ p' $_OVSDPDK_VSWITCH_LOG", + 'Failed to set QoS type egress-policer on port #STEP[1][0]: No such file or directory'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + + # Check the attributes for vhost0 + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] -t ovs-vswitchd qos/show #STEP[1][0]', + 'QoS not configured on #STEP[1][0]'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_qos_create_no_cbs", + "Deployment": "clean", + "Description": "Ensure that a QoS policy cannot be created if the egress policer cbs argument is missing.", + "vSwitch": "OvsDpdkVhost", + "Parameters" : {}, + "TestSteps": [ + # Setup switch,port and logs + ['vswitch', 'add_switch', 'br0'], + ['vswitch', 'add_vport', 'br0'], + ['#LOG_MARK', 'tools', 'exec_shell', + 'echo $((1+`wc -l $_OVSDPDK_VSWITCH_LOG | cut -d" " -f1`))', '(\d+)'], + + # Crete QoS policy and check the returned policy ID + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-vsctl"] set port #STEP[1][0] qos=@newqos -- ' + '--id=@newqos create qos type=egress-policer other-config:cir=1250000', + '\w{8}-\w{4}-\w{4}-\w{4}-\w{12}'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + + # Check the OVS logs + ['tools', 'exec_shell', "sed -n '#STEP[LOG_MARK][0],$ p' $_OVSDPDK_VSWITCH_LOG", + 'Failed to set QoS type egress-policer on port #STEP[1][0]: No such file or directory'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + + # Check the attributes for vhost0 + ['tools', 'exec_shell', 'sudo $TOOLS["ovs-appctl"] -t ovs-vswitchd qos/show #STEP[1][0]', + 'QoS not configured on #STEP[1][0]'], + ['tools', 'assert', 'len(#STEP[-1])==1'], + ] + }, + { + "Name": "ovsdpdk_qos_p2p", + "Deployment": "p2p", + "Description": "In a p2p setup, ensure when a QoS egress policer is created that the traffic is limited to the specified rate.", + "vSwitch": "OvsDpdkVhost", + "Parameters" : { + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'False', + }, + }, + "TestSteps": _OVSDPDK_QOS_confirm_multiple_qos_setup + }, + { + "Name": "ovsdpdk_qos_pvp", + "Deployment": "pvp", + "Description": "In a pvp setup, ensure when a QoS egress policer is created that the traffic is limited to the specified rate.", + "vSwitch": "OvsDpdkVhost", + "VNF" : "QemuDpdkVhostUser", + "Parameters" : { + "_OVSDPDK_QOS_PORT" : 'dpdkvhostuserclient', + "VSWITCH_VHOSTUSER_SERVER_MODE" : False, + "TRAFFIC" : { + "traffic_type" : "rfc2544_continuous", + "frame_rate" : 100, + 'bidir' : 'False', + }, + }, + "TestSteps": _OVSDPDK_QOS_confirm_multiple_qos_setup + }, +] diff --git a/docs/testing/user/userguide/testlist.rst b/docs/testing/user/userguide/testlist.rst index 4b535494..2b0e9d7f 100644 --- a/docs/testing/user/userguide/testlist.rst +++ b/docs/testing/user/userguide/testlist.rst @@ -107,3 +107,284 @@ List of integration testcases above can be obtained by execution of: .. code-block:: bash $ ./vsperf --integration --list + +OVS/DPDK Regression TestCases +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +These regression tests verify several DPDK features used internally by Open vSwitch. Tests +can be used for verification of performance and correct functionality of upcoming DPDK +and OVS releases and release candidates. + +These tests are part of integration testcases and they must be executed with +``--integration`` CLI parameter. + +Example of execution of all OVS/DPDK regression tests: + +.. code-block:: bash + + $ ./vsperf --integration --tests ovsdpdk_ + +Testcases are defined in the file ``conf/integration/01b_dpdk_regression_tests.conf``. This file +contains a set of configuration options with prefix ``OVSDPDK_``. These parameters can be used +for customization of regression tests and they will override some of standard VSPERF configuration +options. It is recommended to check OVSDPDK configuration parameters and modify them in accordance +with VSPERF configuration. + +At least following parameters should be examined. Their values shall ensure, that DPDK and +QEMU threads are pinned to cpu cores of the same NUMA slot, where tested NICs are connected. + +.. code-block:: python + + _OVSDPDK_1st_PMD_CORE + _OVSDPDK_2nd_PMD_CORE + _OVSDPDK_GUEST_5_CORES + +DPDK NIC Support +++++++++++++++++ + +A set of performance tests to verify support of DPDK accelerated network interface cards. +Testcases use standard physical to physical network scenario with several vSwitch and +traffic configurations, which includes one and two PMD threads, uni and bidirectional traffic +and RFC2544 Continuous or RFC2544 Throughput with 0% packet loss traffic types. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_nic_p2p_single_pmd_unidir_cont P2P with single PMD in OVS and unidirectional traffic. +ovsdpdk_nic_p2p_single_pmd_bidir_cont P2P with single PMD in OVS and bidirectional traffic. +ovsdpdk_nic_p2p_two_pmd_bidir_cont P2P with two PMDs in OVS and bidirectional traffic. +ovsdpdk_nic_p2p_single_pmd_unidir_tput P2P with single PMD in OVS and unidirectional traffic. +ovsdpdk_nic_p2p_single_pmd_bidir_tput P2P with single PMD in OVS and bidirectional traffic. +ovsdpdk_nic_p2p_two_pmd_bidir_tput P2P with two PMDs in OVS and bidirectional traffic. +======================================== ====================================================================================== + +DPDK Hotplug Support +++++++++++++++++++++ + +A set of functional tests to verify DPDK hotplug support. Tests verify, that it is possible +to use port, which was not bound to DPDK driver during vSwitch startup. There is also +a test which verifies a possibility to detach port from DPDK driver. However support +for manual detachment of a port from DPDK has been removed from recent OVS versions and +thus this testcase is expected to fail. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_hotplug_attach Ensure successful port-add after binding a device to igb_uio after + ovs-vswitchd is launched. +ovsdpdk_hotplug_detach Same as ovsdpdk_hotplug_attach, but delete and detach the device + after the hotplug. Note Support of netdev-dpdk/detach has been + removed from OVS, so testcase will fail with recent OVS/DPDK + versions. +======================================== ====================================================================================== + +RX Checksum Support ++++++++++++++++++++ + +A set of functional tests for verification of RX checksum calculation for tunneled traffic. +Open vSwitch enables RX checksum offloading by default if NIC supports it. It is to note, +that it is not possible to disable or enable RX checksum offloading. In order to verify +correct RX checksum calculation in software, user has to execute these testcases +at NIC without HW offloading capabilities. + +Testcases utilize existing overlay physical to physical (op2p) network deployment +implemented in vsperf. This deployment expects, that traffic generator sends unidirectional +tunneled traffic (e.g. vxlan) and Open vSwitch performs data decapsulation and sends them +back to the traffic generator via second port. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_checksum_l3 Test verifies RX IP header checksum (offloading) validation for + tunneling protocols. +ovsdpdk_checksum_l4 Test verifies RX UDP header checksum (offloading) validation for + tunneling protocols. +======================================== ====================================================================================== + +Flow Control Support +++++++++++++++++++++ + +A set of functional testcases for the validation of flow control support in Open vSwitch +with DPDK support. If flow control is enabled in both OVS and Traffic Generator, +the network endpoint (OVS or TGEN) is not able to process incoming data and +thus it detects a RX buffer overflow. It then sends an ethernet pause frame (as defined at 802.3x) +to the TX side. This mechanism will ensure, that the TX side will slow down traffic transmission +and thus no data is lost at RX side. + +Introduced testcases use physical to physical scenario to forward data between +traffic generator ports. It is expected that the processing of small frames in OVS is slower +than line rate. It means that with flow control disabled, traffic generator will +report a frame loss. On the other hand with flow control enabled, there should be 0% +frame loss reported by traffic generator. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_flow_ctrl_rx Test the rx flow control functionality of DPDK PHY ports. +ovsdpdk_flow_ctrl_rx_dynamic Change the rx flow control support at run time and ensure the system + honored the changes. +======================================== ====================================================================================== + +Multiqueue Support +++++++++++++++++++ + +A set of functional testcases for validation of multiqueue support for both physical +and vHost User DPDK ports. Testcases utilize P2P and PVP network deployments and +native support of multiqueue configuration available in VSPERF. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_mq_p2p_rxqs Setup rxqs on NIC port. +ovsdpdk_mq_p2p_rxqs_same_core_affinity Affinitize rxqs to the same core. +ovsdpdk_mq_p2p_rxqs_multi_core_affinity Affinitize rxqs to separate cores. +ovsdpdk_mq_pvp_rxqs Setup rxqs on vhost user port. +ovsdpdk_mq_pvp_rxqs_linux_bridge Confirm traffic received over vhost RXQs with Linux virtio device in + guest. +ovsdpdk_mq_pvp_rxqs_testpmd Confirm traffic received over vhost RXQs with DPDK device in guest. +======================================== ====================================================================================== + +Vhost User +++++++++++ + +A set of functional testcases for validation of vHost User Client and vHost User +Server modes in OVS. + +**NOTE:** Vhost User Server mode is deprecated and it will be removed from OVS +in the future. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_vhostuser_client Test vhost-user client mode +ovsdpdk_vhostuser_client_reconnect Test vhost-user client mode reconnect feature +ovsdpdk_vhostuser_server Test vhost-user server mode +ovsdpdk_vhostuser_sock_dir Verify functionality of vhost-sock-dir flag +======================================== ====================================================================================== + +Virtual Devices Support ++++++++++++++++++++++++ + +A set of functional testcases for verification of correct functionality of virtual +device PMD drivers. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_vdev_add_null_pmd Test addition of port using the null DPDK PMD driver. +ovsdpdk_vdev_del_null_pmd Test deletion of port using the null DPDK PMD driver. +ovsdpdk_vdev_add_af_packet_pmd Test addition of port using the af_packet DPDK PMD driver. +ovsdpdk_vdev_del_af_packet_pmd Test deletion of port using the af_packet DPDK PMD driver. +======================================== ====================================================================================== + +NUMA Support +++++++++++++ + +A functional testcase for validation of NUMA awareness feature in OVS. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_numa Test vhost-user NUMA support. Vhostuser PMD threads should migrate to + the same numa slot, where QEMU is executed. +======================================== ====================================================================================== + +Jumbo Frame Support ++++++++++++++++++++ + +A set of functional testcases for verification of jumbo frame support in OVS. +Testcases utilize P2P and PVP network deployments and native support of jumbo +frames available in VSPERF. + +============================================ ================================================================================== +Testcase Name Description +============================================ ================================================================================== +ovsdpdk_jumbo_increase_mtu_phy_port_ovsdb Ensure that the increased MTU for a DPDK physical port is updated in + OVSDB. +ovsdpdk_jumbo_increase_mtu_vport_ovsdb Ensure that the increased MTU for a DPDK vhost-user port is updated in + OVSDB. +ovsdpdk_jumbo_reduce_mtu_phy_port_ovsdb Ensure that the reduced MTU for a DPDK physical port is updated in + OVSDB. +ovsdpdk_jumbo_reduce_mtu_vport_ovsdb Ensure that the reduced MTU for a DPDK vhost-user port is updated in + OVSDB. +ovsdpdk_jumbo_increase_mtu_phy_port_datapath Ensure that the MTU for a DPDK physical port is updated in the + datapath itself when increased to a valid value. +ovsdpdk_jumbo_increase_mtu_vport_datapath Ensure that the MTU for a DPDK vhost-user port is updated in the + datapath itself when increased to a valid value. +ovsdpdk_jumbo_reduce_mtu_phy_port_datapath + Ensure that the MTU for a DPDK physical port is updated in the + datapath itself when decreased to a valid value. +ovsdpdk_jumbo_reduce_mtu_vport_datapath Ensure that the MTU for a DPDK vhost-user port is updated in the + datapath itself when decreased to a valid value. +ovsdpdk_jumbo_mtu_upper_bound_phy_port Verify that the upper bound limit is enforced for OvS DPDK Phy ports. +ovsdpdk_jumbo_mtu_upper_bound_vport Verify that the upper bound limit is enforced for OvS DPDK vhost-user + ports. +ovsdpdk_jumbo_mtu_lower_bound_phy_port Verify that the lower bound limit is enforced for OvS DPDK Phy ports. +ovsdpdk_jumbo_mtu_lower_bound_vport Verify that the lower bound limit is enforced for OvS DPDK vhost-user + ports. +ovsdpdk_jumbo_p2p Ensure that jumbo frames are received, processed and forwarded + correctly by DPDK physical ports. +ovsdpdk_jumbo_pvp Ensure that jumbo frames are received, processed and forwarded + correctly by DPDK vhost-user ports. +ovsdpdk_jumbo_p2p_upper_bound Ensure that jumbo frames above the configured Rx port's MTU are not + accepted +============================================ ================================================================================== + +Rate Limiting ++++++++++++++ + +A set of functional testcases for validation of rate limiting support. This feature +allows to configure an ingress policing for both physical and vHost User DPDK +ports. + +**NOTE:** Desired maximum rate is specified in kilo bits per second and it defines +the rate of payload only. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_rate_create_phy_port Ensure a rate limiting interface can be created on a physical DPDK + port. +ovsdpdk_rate_delete_phy_port Ensure a rate limiting interface can be destroyed on a physical DPDK + port. +ovsdpdk_rate_create_vport Ensure a rate limiting interface can be created on a vhost-user port. +ovsdpdk_rate_delete_vport Ensure a rate limiting interface can be destroyed on a vhost-user + port. +ovsdpdk_rate_no_policing Ensure when a user attempts to create a rate limiting interface but + is missing policing rate argument, no rate limitiner is created. +ovsdpdk_rate_no_burst Ensure when a user attempts to create a rate limiting interface but + is missing policing burst argument, rate limitiner is created. +ovsdpdk_rate_p2p Ensure when a user creates a rate limiting physical interface that + the traffic is limited to the specified policer rate in a p2p setup. +ovsdpdk_rate_pvp Ensure when a user creates a rate limiting vHost User interface that + the traffic is limited to the specified policer rate in a pvp setup. +ovsdpdk_rate_p2p_multi_pkt_sizes Ensure that rate limiting works for various frame sizes. +======================================== ====================================================================================== + +Quality of Service +++++++++++++++++++ + +A set of functional testcases for validation of QoS support. This feature +allows to configure an egress policing for both physical and vHost User DPDK +ports. + +**NOTE:** Desired maximum rate is specified in bytes per second and it defines +the rate of payload only. + +======================================== ====================================================================================== +Testcase Name Description +======================================== ====================================================================================== +ovsdpdk_qos_create_phy_port Ensure a QoS policy can be created on a physical DPDK port +ovsdpdk_qos_delete_phy_port Ensure an existing QoS policy can be destroyed on a physical DPDK + port. +ovsdpdk_qos_create_vport Ensure a QoS policy can be created on a virtual vhost user port. +ovsdpdk_qos_delete_vport Ensure an existing QoS policy can be destroyed on a vhost user port. +ovsdpdk_qos_create_no_cir Ensure that a QoS policy cannot be created if the egress policer cir + argument is missing. +ovsdpdk_qos_create_no_cbs Ensure that a QoS policy cannot be created if the egress policer cbs + argument is missing. +ovsdpdk_qos_p2p In a p2p setup, ensure when a QoS egress policer is created that the + traffic is limited to the specified rate. +ovsdpdk_qos_pvp In a pvp setup, ensure when a QoS egress policer is created that the + traffic is limited to the specified rate. +======================================== ====================================================================================== -- 2.16.6