new file mode 100644
@@ -0,0 +1,5 @@
+__pycache__
+.git
+.idea
+output
+*.pyc
deleted file mode 100644
@@ -1,42 +0,0 @@
-#DUT crbs Configuration
-#[DUT IP]
-# dut_ip: DUT ip address
-# dut_user: Login DUT username
-# dut_passwd: [INSECURE] Login DUT password, leaving this blank will force using SSH keys
-# os: operation system type linux or freebsd
-# tester_ip: Tester ip address
-# tester_passwd: [INSECURE] Tester password, leaving this blank will force using SSH keys
-# pktgen_group: packet generator group name: ixia/trex/ixia_network
-# channels: Board channel number
-# bypass_core0: Whether by pass core0
-# dut_cores: DUT core list, eg: 1,2,3,4,5,18-22
-# snapshot_load_side: tester/dut, specify the dpdk.tar.gz on side
-# if value is dut, should combine the params --snapshot to use.
-# eg: ./dts --snapshot /root/tester/dpdk.tar.gz
-[DUT IP1]
-dut_ip=xxx.xxx.xxx.xxx
-dut_user=root
-dut_passwd=
-os=linux
-dut_arch=
-tester_ip=xxx.xxx.xxx.xxx
-tester_passwd=
-ixia_group=
-pktgen_group=
-channels=4
-bypass_core0=True
-dut_cores=
-snapshot_load_side=tester
-[DUT IP2]
-dut_ip=yyy.yyy.yyy.yyy
-dut_user=root
-dut_passwd=
-os=linux
-dut_arch=
-tester_ip=yyy.yyy.yyy.yyy
-tester_passwd=
-pktgen_group=
-channels=4
-bypass_core0=True
-dut_cores=
-snapshot_load_side=tester
@@ -2,7 +2,7 @@
# Users could change these configuration on demand:
#
# - port_list defines which ports are used to run testing If not set this key,
-# use default dut port list of dts framework.
+# use default SUT port list of dts framework.
# port_list=[1,2,...]
# - test_parameters defines the combination of frame size and descriptor
# numbers, and the pattern is
@@ -1,4 +1,4 @@
[suite]
-# specify cores to test based on dut cpu specification.
+# specify cores to test based on SUT cpu specification.
frame_size=[64, 128, 256, 512, 1024, 2000]
cores=[2, 4, 8, 16]
@@ -1,16 +1,16 @@
-# DUT Port Configuration
-# [DUT IP]
+# SUT Port Configuration
+# [SUT IP]
# ports=
# pci=Pci BDF,intf=Kernel interface;
-# pci=Pci BDF,mac=Mac address,peer=Tester Pci BDF,numa=Port Numa
+# pci=Pci BDF,mac=Mac address,peer=TG Pci BDF,numa=Port Numa
# pci=Pci BDF,peer=IXIA:card.port
# pci=Pci BDF,peer=TREX:port
-# pci=Pci BDF,peer=Tester Pci BDF,tp_ip=$(IP),tp_path=$({PERL_PATH);
-# pci=Pci BDF,peer=Tester Pci BDF,sec_port=yes,first_port=Pci BDF;
+# pci=Pci BDF,peer=TG Pci BDF,tp_ip=$(IP),tp_path=$({PERL_PATH);
+# pci=Pci BDF,peer=TG Pci BDF,sec_port=yes,first_port=Pci BDF;
# [VM NAME] virtual machine name; This section is for virutal scenario
# ports =
-# dev_idx=device index of ports info, peer=Tester Pci BDF
-[DUT IP]
+# dev_idx=device index of ports info, peer=TG Pci BDF
+[SUT IP]
ports =
pci=XX:XX.X,intf=eth0;
pci=YY:YY.Y,mac=XX:XX:XX:XX:XX:XX,peer=ZZ:ZZ.Z,numa=0;
@@ -12,7 +12,7 @@
# user: user name to login into VM
# password: passwork to login into VM
# device
-# pf_idx: pass-through device index of DUT ports
+# pf_idx: pass-through device index of SUT ports
# guestpci: hardcode value of guest pci address
# virtio_serial_channel
# path: virtio unix socket absolute path
@@ -12,7 +12,7 @@
# user: user name to login into VM
# password: passwork to login into VM
# device
-# pf_idx: pass-through device index of DUT ports
+# pf_idx: pass-through device index of SUT ports
# guestpci: hardcode value of guest pci address
# virtio_serial_channel
# path: virtio unix socket absolute path
@@ -12,7 +12,7 @@
# user: user name to login into VM
# password: passwork to login into VM
# device
-# pf_idx: pass-through device index of DUT ports
+# pf_idx: pass-through device index of SUT ports
# guestpci: hardcode value of guest pci address
# virtio_serial_channel
# path: virtio unix socket absolute path
@@ -3,22 +3,22 @@
# default target will be x86_64-native-linuxapp-gcc
# numa 0,1,yes yes mean cpu numa match the first port
# skipcores list mean those core will not used by vm
-# dut=vm_dut; mean vm_dut act as dut
-# dut=dut; mean host dut act as dut
-# portmap=cfg; mean vm_dut port map will be load from cfg
-# portmap=auto; mean vm_dut will create portmap automatically
+# sut=vm_sut; mean vm_sut act as SUT
+# sut=sut; mean host sut act as SUT
+# portmap=cfg; mean vm_sut port map will be load from cfg
+# portmap=auto; mean vm_sut will create portmap automatically
# devices = dev_gen/host/dev_gen+host not useful now
[scene]
suite =
- dut=vm_dut,portmap=cfg;
+ sut=vm_sut,portmap=cfg;
tester=tester;
type=kvm;
-host =
+host =
dpdk=testpmd,cores=0 1 2 3,target=x86_64-native-linuxapp-gcc;
[vm0]
cpu =
model=host,number=4,numa=auto,skipcores=0 1 2 3;
-mem =
+mem =
size=2048,hugepage=no;
disk =
file=/storage/vm-image/vm0.img;
@@ -28,5 +28,5 @@ dev_gen =
device =
vf_idx=0,pf_dev=0,guestpci=auto;
vf_idx=0,pf_dev=1,guestpci=auto;
-vnc =
+vnc =
displayNum=1;
@@ -1,25 +1,25 @@
# vm configuration for pf passthrough cases
# numa 0,1,yes yes mean cpu numa match the first port
# skipcores list mean those core will not used by vm
-# dut=vm_dut; mean vm_dut act as dut
-# dut=dut; mean host dut act as dut
-# portmap=cfg; mean vm_dut port map will be load from cfg
-# portmap=auto; mean vm_dut will create portmap automatically
+# sut=vm_sut; mean vm_sut act as SUT
+# sut=sut; mean host sut act as SUT
+# portmap=cfg; mean vm_sut port map will be load from cfg
+# portmap=auto; mean vm_sut will create portmap automatically
# devices = dev_gen/host/dev_gen+host not useful now
[scene]
suite =
- dut=vm_dut,portmap=auto;
+ sut=vm_sut,portmap=auto;
tester=tester;
type=kvm;
[vm]
cpu =
model=host,number=4,numa_aware=yes;
-mem =
+mem =
size=2048,hugepage=no;
disk =
file=/storage/vm-image/vm0.img;
device =
pf_idx=0,guestpci=auto;
pf_idx=1,guestpci=auto;
-vnc =
+vnc =
displayNum=1;
@@ -1,20 +1,20 @@
# vm configuration for vf passthrough cases
# numa 0,1,yes yes mean cpu numa match the first port
# skipcores list mean those core will not used by vm
-# dut=vm_dut; mean vm_dut act as dut
-# dut=dut; mean host dut act as dut
-# portmap=cfg; mean vm_dut port map will be load from cfg
-# portmap=auto; mean vm_dut will create portmap automatically
+# sut=vm_sut; mean vm_sut act as SUT
+# sut=sut; mean host sut act as SUT
+# portmap=cfg; mean vm_sut port map will be load from cfg
+# portmap=auto; mean vm_sut will create portmap automatically
# devices = dev_gen/host/dev_gen+host not useful now
[scene]
suite =
- dut=vm_dut,portmap=auto;
+ sut=vm_sut,portmap=auto;
tester=tester;
type=kvm;
[vm0]
cpu =
model=host,number=4,numa=auto,skipcores=0 1 2 3;
-mem =
+mem =
size=2048,hugepage=no;
disk =
file=/storage/vm-image/vm0.img;
@@ -26,5 +26,5 @@ dev_gen =
device =
vf_idx=0,pf_dev=0,guestpci=auto,mac=00:00:00:00:01:01;
vf_idx=0,pf_dev=1,guestpci=auto,mac=00:00:00:00:01:02;
-vnc =
+vnc =
displayNum=1;
@@ -1,20 +1,20 @@
# vm configuration for vf passthrough cases
# numa 0,1,yes yes mean cpu numa match the first port
# skipcores list mean those core will not used by vm
-# dut=vm_dut; mean vm_dut act as dut
-# dut=dut; mean host dut act as dut
-# portmap=cfg; mean vm_dut port map will be load from cfg
-# portmap=auto; mean vm_dut will create portmap automatically
+# sut=vm_sut; mean vm_sut act as SUT
+# sut=sut; mean host sut act as SUT
+# portmap=cfg; mean vm_sut port map will be load from cfg
+# portmap=auto; mean vm_sut will create portmap automatically
# devices = dev_gen/host/dev_gen+host not useful now
[scene]
suite =
- dut=vm_dut,portmap=auto;
+ sut=vm_sut,portmap=auto;
tester=tester;
type=kvm;
[vm0]
cpu =
model=host,number=4,numa=auto,skipcores=0 1 2 3;
-mem =
+mem =
size=2048,hugepage=no;
disk =
file=/storage/vm-image/vm0.img;
@@ -23,5 +23,5 @@ dev_gen =
device =
vf_idx=0,pf_dev=0,guestpci=auto;
vf_idx=1,pf_dev=0,guestpci=auto;
-vnc =
+vnc =
displayNum=1;
@@ -34,7 +34,7 @@
# cores_for_all=True
#
# - port_list
-# defines which ports are used to run testing If not set this key, use default dut port list of dts framework.
+# defines which ports are used to run testing If not set this key, use default SUT port list of dts framework.
#
# e.g.
# port_list=[0,1,...]
new file mode 100644
@@ -0,0 +1,42 @@
+#Topology Configuration
+#[SUT IP]
+# sut_ip: SUT ip address
+# sut_user: SUT username
+# sut_passwd: [INSECURE] Login SUT password, leaving this blank will force using SSH keys
+# os: operation system type linux or freebsd
+# tg_ip: TG ip address
+# tg_passwd: [INSECURE] TG password, leaving this blank will force using SSH keys
+# pktgen_group: packet generator group name: ixia/trex/ixia_network
+# channels: Board channel number
+# bypass_core0: Whether by pass core0
+# sut_cores: sut core list, eg: 1,2,3,4,5,18-22
+# snapshot_load_side: tg/sut, specify the dpdk.tar.gz on side
+# if value is sut, should combine the params --snapshot to use.
+# eg: ./dts --snapshot /root/tg/dpdk.tar.gz
+[SUT IP1]
+sut_ip=xxx.xxx.xxx.xxx
+sut_user=root
+sut_passwd=
+os=linux
+sut_arch=
+tg_ip=xxx.xxx.xxx.xxx
+tg_passwd=
+ixia_group=
+pktgen_group=
+channels=4
+bypass_core0=True
+sut_cores=
+snapshot_load_side=tg
+[SUT IP2]
+sut_ip=yyy.yyy.yyy.yyy
+sut_user=root
+sut_passwd=
+os=linux
+sut_arch=
+tg_ip=yyy.yyy.yyy.yyy
+tg_passwd=
+pktgen_group=
+channels=4
+bypass_core0=True
+sut_cores=
+snapshot_load_side=tg
@@ -1,4 +1,4 @@
-# Connect two fortville 40G nic port directly on DUT
+# Connect two fortville 40G nic port directly on SUT
[peerconf]
# pci of Port0
pci=
@@ -15,7 +15,7 @@
# user: user name to login into VM
# password: passwork to login into VM
# device
-# pf_idx: pass-through device index of DUT ports
+# pf_idx: pass-through device index of SUT ports
# guestpci: hardcode value of guest pci address
# virtio_serial_channel
# path: virtio unix socket absolute path
@@ -12,7 +12,7 @@
# user: user name to login into VM
# password: passwork to login into VM
# device
-# pf_idx: pass-through device index of DUT ports
+# pf_idx: pass-through device index of SUT ports
# guestpci: hardcode value of guest pci address
# virtio_serial_channel
# path: virtio unix socket absolute path
@@ -156,7 +156,7 @@
<v:ud v:nameU="ShowDestruction" v:prompt="" v:val="VT0(0):5"/>
</v:userDefs>
<title>Object lifeline.21</title>
- <desc>vm_dut:Virutal DUT</desc>
+ <desc>vm_sut:Virtual SUT</desc>
<g id="shape22-43" v:mID="22" v:groupContext="shape" transform="translate(36,-5.4)">
<title>Sheet.22</title>
<rect x="0" y="1162.8" width="54" height="25.2" class="st1"/>
@@ -176,7 +176,7 @@
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="63" cy="1170" width="126" height="36"/>
<rect x="0" y="1152" width="126" height="36" class="st1"/>
- <text x="4.9" y="1174.2" class="st3" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>vm_dut:Virutal DUT</text> </g>
+ <text x="4.9" y="1174.2" class="st3" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>vm_sut:Virtual SUT</text> </g>
</g>
<g id="shape26-55" v:mID="26" v:groupContext="shape" transform="translate(-1030.5,288) rotate(-90)">
<title>Activation</title>
@@ -250,14 +250,14 @@
<v:ud v:nameU="ShowDestruction" v:prompt="" v:val="VT0(0):5"/>
</v:userDefs>
<title>Object lifeline.44</title>
- <desc>host:DUT CRB</desc>
+ <desc>host:SUT Node</desc>
<g id="shape45-85" v:mID="45" v:groupContext="shape" transform="translate(31.1588,-5.4)">
<title>Sheet.45</title>
- <desc>Host: DUT CRB</desc>
+ <desc>Host: SUT Node</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="31.8412" cy="1175.4" width="63.69" height="25.2"/>
<rect x="0" y="1162.8" width="63.6823" height="25.2" class="st1"/>
- <text x="5.02" y="1178.1" class="st11" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Host: DUT CRB</text> </g>
+ <text x="5.02" y="1178.1" class="st11" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Host: SUT Node</text> </g>
<g id="shape46-88" v:mID="46" v:groupContext="shape" transform="translate(54,-39.6)">
<title>Sheet.46</title>
<path d="M9 1188 a0 0 0 1 1 0 0 a0 0 0 1 1 0 0 Z" class="st1"/>
@@ -273,7 +273,7 @@
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="63" cy="1170" width="126" height="36"/>
<rect x="0" y="1152" width="126" height="36" class="st1"/>
- <text x="22.73" y="1174.2" class="st3" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>host:DUT CRB</text> </g>
+ <text x="22.73" y="1174.2" class="st3" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>host:SUT Node</text> </g>
</g>
<g id="shape49-98" v:mID="49" v:groupContext="shape" v:layerMember="0" transform="translate(157.5,-927)">
<title>Message.49</title>
@@ -449,11 +449,11 @@
</g>
<g id="shape95-168" v:mID="95" v:groupContext="shape" transform="translate(679.5,-724.5)">
<title>Sheet.95</title>
- <desc>instantiate_vm_dut(autoportmap)</desc>
+ <desc>instantiate_vm_sut(autoportmap)</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="66" cy="1170" width="132.01" height="36"/>
<rect x="0" y="1152" width="132" height="36" class="st9"/>
- <text x="5.26" y="1165.8" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>instantiate_vm_dut<tspan
+ <text x="5.26" y="1165.8" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>instantiate_vm_sut<tspan
x="20.32" dy="1.2em" class="st4">(</tspan>autoportmap)</text> </g>
<g id="shape98-172" v:mID="98" v:groupContext="shape" v:layerMember="0" transform="translate(841.5,-679.5)">
<title>Return Message.98</title>
@@ -467,11 +467,11 @@
</g>
<g id="shape99-177" v:mID="99" v:groupContext="shape" transform="translate(693,-688.5)">
<title>Sheet.99</title>
- <desc>VM DUT object</desc>
+ <desc>VM SUT object</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="58.5" cy="1179" width="117" height="18"/>
<rect x="0" y="1170" width="117" height="18" class="st9"/>
- <text x="10.98" y="1183.2" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>VM DUT object</text> </g>
+ <text x="10.98" y="1183.2" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>VM SUT object</text> </g>
<g id="shape100-180" v:mID="100" v:groupContext="shape" v:layerMember="0" transform="translate(661.5,-814.5)">
<title>Self Message.100</title>
<v:userDefs>
@@ -502,11 +502,11 @@
</g>
<g id="shape104-194" v:mID="104" v:groupContext="shape" transform="translate(324,-666)">
<title>Sheet.104</title>
- <desc>VM DUT object</desc>
+ <desc>VM SUT object</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="88.875" cy="1179" width="177.75" height="18"/>
<rect x="0" y="1170" width="177.75" height="18" class="st9"/>
- <text x="41.36" y="1183.2" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>VM DUT object</text> </g>
+ <text x="41.36" y="1183.2" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>VM SUT object</text> </g>
<g id="group105-197" transform="translate(945,-1080)" v:mID="105" v:groupContext="group">
<v:userDefs>
<v:ud v:nameU="visVersion" v:prompt="" v:val="VT0(15):26"/>
@@ -562,11 +562,11 @@
</g>
<g id="shape114-219" v:mID="114" v:groupContext="shape" transform="translate(837,-630)">
<title>Sheet.114</title>
- <desc>Case(VM DUT, tester, target)</desc>
+ <desc>Case(VM SUT, TG, target)</desc>
<v:textBlock v:margins="rect(4,4,4,4)"/>
<v:textRect cx="85.5" cy="1170" width="171" height="36"/>
<rect x="0" y="1152" width="171" height="36" class="st9"/>
- <text x="19.24" y="1165.8" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Case(VM DUT, tester, <tspan
+ <text x="19.24" y="1165.8" class="st10" v:langID="1033"><v:paragraph v:horizAlign="1"/><v:tabList/>Case(VM SUT, TG, <tspan
x="64.75" dy="1.2em" class="st4">target</tspan>)</text> </g>
<g id="shape116-223" v:mID="116" v:groupContext="shape" v:layerMember="0" transform="translate(999,-612)">
<title>Self Message.116</title>
@@ -8,9 +8,21 @@ Introduction
This document describes how to install and configure the Data Plane Development Kit Test Suite (DTS) in a Linux environment.
It is designed to get user to set up DTS quickly in their environment without going deeply into detail.
-DTS can run on a tester machine or a DUT machine or the third machine to communicate/manage tester/DUT by SSH connection.
+A DTS topology includes an SUT (System under test), a control node and a
+traffic generator node:
+
+* An **SUT** is the host where the Device under test (DUT, the hardware being
+ tested) is located. In case of functional tests that don't require hardware,
+ it is the host where DPDK libraries are installed and where software (e.g.
+ DPDK example apps) using said libraries is executed.
+* A **control node** is the host where DTS code is executed and from which DTS
+ connects to other hosts in the DTS topology.
+* A **traffic generator** node is the host where the traffic generator (TG)
+ runs.
+
+DTS can run on a TG machine or an SUT machine or a third machine to communicate/manage TG/SUT by SSH connection.
DTS supports different kinds of traffic generators, including Scapy, TRex, IXIA.
-The example set up DTS on as tester machine, and use Scapy as traffic generator to run functional testing.
+The example set up DTS on TG machine, and use Scapy as traffic generator to run functional testing.
System Requirements
===================
@@ -27,7 +39,7 @@ The following platforms have been tested and are recommended.
.. |reg| unicode:: U+000AE .. REGISTERED SIGN
.. |trade| unicode:: U+2122 .. TRADE MARK SIGN
-* DTS and Tester system
+* DTS and TG system
* CPU
* Intel\ |reg| Xeon\ |reg| Platinum 8280M CPU @ 2.70GHz
@@ -38,7 +50,7 @@ The following platforms have been tested and are recommended.
* Ubuntu 20.04
* Ubuntu 18.04
-* DUT system
+* SUT
* CPU
@@ -78,7 +90,7 @@ The following platforms have been tested and are recommended.
Topology Example
----------------
-2 Teseter interfaces connect to 2 DUT interfaces back to back.
+2 TG interfaces connect to 2 SUT interfaces back to back.
Dependencies
------------
@@ -86,7 +98,7 @@ Dependencies
SSH Service
~~~~~~~~~~~
-Tester and DUT should have one interface connected to the same internet, so that they can be accessed by each other from local IP address
+TG and SUT should have one interface connected to the same internet, so that they can be accessed by each other from local IP address
.. code-block:: console
@@ -101,7 +113,7 @@ Tester and DUT should have one interface connected to the same internet, so that
systemctl disable firewalld.service
-Python modules for DTS & Tester
+Python modules for DTS & TG
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The python dependences are recorded in requirements.txt.
@@ -112,7 +124,7 @@ Please install them as the following:
apt-get install python3
python3 -m pip install -r requirements.txt
-BIOS setting for DUT
+BIOS setting for SUT
~~~~~~~~~~~~~~~~~~~~
DPDK prefer devices bound to ``vfio-pci`` kernel module, therefore, please enable VT-d and VT-x:
@@ -138,9 +150,9 @@ Get DTS code from remote repo.
.. code-block:: console
- [root@tester ~]# git clone http://dpdk.org/git/tools/dts
- [root@tester ~]# ls dts
- [root@tester dts]# conf CONTRIBUTING.TXT dep doc dts execution.cfg executions framework nics output requirements.txt test_plans tests tools version.py
+ [root@tg ~]# git clone http://dpdk.org/git/tools/dts
+ [root@tg ~]# ls dts
+ [root@tg dts]# conf CONTRIBUTING.TXT dep doc dts execution.cfg executions framework nics output requirements.txt test_plans tests tools version.py
Preparing DPDK tarball
----------------------
@@ -155,7 +167,7 @@ DPDK source code should be packed as "dpdk.tar.gz" and moved into dts/dep:
Configuring DTS
---------------
-A few of files should be configured, including execution.cfg, $DTS_CFG_FOLDER/crbs, $DTS_CFG_FOLDER/ports.cfg.
+A few of files should be configured, including execution.cfg, $DTS_CFG_FOLDER/topology.cfg, $DTS_CFG_FOLDER/ports.cfg.
execution.cfg
~~~~~~~~~~~~~
@@ -163,7 +175,7 @@ execution.cfg
.. code-block:: console
[Execution1]
- crbs=192.168.1.1
+ sut=192.168.1.1
drivername=vfio-pci
build_type=meson
test_suites=
@@ -172,29 +184,29 @@ execution.cfg
x86_64-default-linuxapp-gcc,
parameters=nic_type=cfg:func=true
-* crbs: IP address of the DUT system
+* sut: IP address of the SUT
* test_suites: a list of test suites to be executed
-$DTS_CFG_FOLDER/crbs.cfg
+$DTS_CFG_FOLDER/topology.cfg
~~~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: console
[192.168.1.1]
- dut_ip=192.168.1.1
- dut_user=root
- dut_passwd=dutpasswd
+ sut_ip=192.168.1.1
+ sut_user=root
+ sut_passwd=sutpasswd
os=linux
- tester_ip=192.168.1.2
- tester_passwd=testerpasswd
+ tg_ip=192.168.1.2
+ tg_passwd=tgpasswd
channels=4
bypass_core0=True
-* dut_ip: IP address of the DUT system, same as crbs in execution.cfg
-* dut_user: User name of DUT linux account
-* dut_passwd: Password of DUT linux account
-* tester_ip: IP address of tester
-* tester_passwd: Password of Tester linux account, user name should same as dut_user
+* sut_ip: IP address of the SUT system, same as sut in execution.cfg
+* sut_user: User name of SUT linux account
+* sut_passwd: Password of SUT linux account
+* tg_ip: IP address of TG
+* tg_passwd: Password of TG linux account, user name should same as sut_user
$DTS_CFG_FOLDER/ports.cfg
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -206,16 +218,16 @@ $DTS_CFG_FOLDER/ports.cfg
pci=0000:06:00.0,peer=0000:81:00.0;
pci=0000:06:00.1,peer=0000:81:00.1;
-* [192.168.1.1]: same as crbs in execution.cfg and dut_ip in $DTS_CFG_FOLDER/crbs.cfg
-* pci: pci address of DUT port
-* peer: pci address of Tester port which connected to the DUT port whose pci is `pci`.
+* [192.168.1.1]: same as sut in execution.cfg and sut_ip in $DTS_CFG_FOLDER/topology.cfg
+* pci: pci address of SUT port
+* peer: pci address of TG port which connected to the SUT port whose pci is `pci`.
The topology for the configuration is:
.. code-block:: console
- DUT port0 (0000:06:00.0) --- Tester port0 (0000:81:00.0)
- DUT port0 (0000:06:00.1) --- Tester port0 (0000:81:00.1)
+ SUT port0 (0000:06:00.0) --- TG port0 (0000:81:00.0)
+ SUT port0 (0000:06:00.1) --- TG port0 (0000:81:00.1)
Launch DTS
----------
@@ -224,43 +236,43 @@ As we have prepared the zipped dpdk file and configuration file, just type the f
.. code-block:: console
- [root@tester ~]# ./dts
+ [root@tg ~]# ./dts
dts:
- DUT 192.168.1.1
- tester: ssh root@192.168.1.2
- tester: ssh root@192.168.1.2
- tester: python3 -V
- tester_scapy: ssh root@192.168.1.2
+ SUT 192.168.1.1
+ tg: ssh root@192.168.1.2
+ tg: ssh root@192.168.1.2
+ tg: python3 -V
+ tg_scapy: ssh root@192.168.1.2
...
- dut.192.168.1.1: ssh root@192.168.1.1
- dut.192.168.1.1: ssh root@192.168.1.1
+ sut.192.168.1.1: ssh root@192.168.1.1
+ sut.192.168.1.1: ssh root@192.168.1.1
...
- dut.192.168.1.1: scp -v dep/dpdk.tar.gz root@192.168.1.1:/tmp/
+ sut.192.168.1.1: scp -v dep/dpdk.tar.gz root@192.168.1.1:/tmp/
...
- dut.192.168.1.1: DUT PORT MAP: [0, 1]
+ sut.192.168.1.1: SUT PORT MAP: [0, 1]
...
- dut.192.168.1.1: export RTE_TARGET=x86_64-native-linuxapp-gcc
- dut.192.168.1.1: export RTE_SDK=`pwd`
- dut.192.168.1.1: rm -rf x86_64-native-linuxapp-gcc
- dut.192.168.1.1: CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
+ sut.192.168.1.1: export RTE_TARGET=x86_64-native-linuxapp-gcc
+ sut.192.168.1.1: export RTE_SDK=`pwd`
+ sut.192.168.1.1: rm -rf x86_64-native-linuxapp-gcc
+ sut.192.168.1.1: CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
...
- dut.192.168.1.1: usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:af:00.0 0000:af:00.1
+ sut.192.168.1.1: usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:af:00.0 0000:af:00.1
dts: NIC : fortville_25g
- dut.192.168.1.1: meson configure -Dexamples=helloworld x86_64-native-linuxapp-gcc
- dut.192.168.1.1: ninja -C x86_64-native-linuxapp-gcc
- dut.192.168.1.1: ls x86_64-native-linuxapp-gcc/examples/dpdk-helloworld
+ sut.192.168.1.1: meson configure -Dexamples=helloworld x86_64-native-linuxapp-gcc
+ sut.192.168.1.1: ninja -C x86_64-native-linuxapp-gcc
+ sut.192.168.1.1: ls x86_64-native-linuxapp-gcc/examples/dpdk-helloworld
TestHelloWorld: Test Case test_hello_world_all_cores Begin
- dut.192.168.1.1: ./x86_64-native-linuxapp-gcc/examples/dpdk-helloworld -l 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71 -n 4 --file-prefix=dpdk_25703_20210311003827
+ sut.192.168.1.1: ./x86_64-native-linuxapp-gcc/examples/dpdk-helloworld -l 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71 -n 4 --file-prefix=dpdk_25703_20210311003827
TestHelloWorld: Test Case test_hello_world_all_cores Result PASSED:
TestHelloWorld: Test Case test_hello_world_single_core Begin
- dut.192.168.1.1: ./x86_64-native-linuxapp-gcc/examples/dpdk-helloworld -l 1 -n 4 --file-prefix=dpdk_25703_20210311003827
+ sut.192.168.1.1: ./x86_64-native-linuxapp-gcc/examples/dpdk-helloworld -l 1 -n 4 --file-prefix=dpdk_25703_20210311003827
TestHelloWorld: Test Case test_hello_world_single_core Result PASSED:
dts:
TEST SUITE ENDED: TestHelloWorld
...
dts: DTS ended
- [root@tester ~]#
+ [root@tg ~]#
Check Test Result
==================
@@ -269,14 +281,14 @@ The result files are generated in dts/output.
.. code-block:: console
- [root@tester output]# ls
+ [root@tg output]# ls
rst_report dts.log statistics.txt TestHelloWorld.log test_results.json test_results.xls
* statstics.txt: summary statistics
.. code-block:: console
- [root@tester output]# cat statistics.txt
+ [root@tg output]# cat statistics.txt
dpdk_version = 21.02.0
Passed = 2
Failed = 0
@@ -287,7 +299,7 @@ The result files are generated in dts/output.
.. code-block:: console
- [root@tester output]# cat result.json
+ [root@tg output]# cat result.json
{
"192.168.1.1": {
"dpdk_version": "21.02.0",
@@ -82,7 +82,7 @@ DTS configuration
#. config drivername=igb_uio in execution.cfg::
[Execution1]
- crbs=127.0.0.1
+ sut=127.0.0.1
drivername=igb_uio
build_type=meson
test_suites=
@@ -35,7 +35,7 @@ User Guide
intro
sys_reqs
- setup_dut
+ setup_sut
usage
results
trex
@@ -12,27 +12,29 @@ Everyone can utilize DTS to measure performance and functionality for features.
As a generic test framework, DTS provides the following functions:
-* Communicate/manage DUT and Tester by SSH connection.
-* Able to work with DUT (Device Under Test), which installed Fedora, Ubuntu, CentOS, RHEL, etc.
+* Communicate/manage SUT and TG by SSH connection.
+* Able to work with SUT (System Under Test), which installed Fedora, Ubuntu, CentOS, RHEL, etc.
* Support virtualization hypervisor Qemu.
* Support both software and hardware traffic generators, including Scapy, TRex and IXIA®.
-* Provide configure files to customize test suite and test cases to run under DUT.
+* Provide configure files to customize test suite and test cases to run under SUT.
* Provide debug and log functionalities for tracking test cases execution process.
* Support to output test result by excel, json, log text file, etc.
-DTS environment includes DUT (Device under Test), Tester and Traffic generator. DPDK are deployed on DUT and DTS can run on the Tester or DUT or the third machine.
+DTS environment includes an SUT (System under Test), a Control Node and
+a Traffic Generator node. DPDK is deployed on SUT and DTS can run on any
+of the three nodes.
.. note::
- * If run with functional testing, DTS uses `Scapy` as traffic generator, recommend installing DTS on Tester.
- * If run with performance testing, DTS can use `TRex` or IXIA as traffic gengerator based on your deployment and configuration, recommend installing DTS on DUT.
- * If use `TRex`, recommend deploying `TRex` and DUT on the same machine with different sockets.
+ * If run with functional testing, DTS uses `Scapy` as traffic generator, recommend installing DTS on TG.
+ * If run with performance testing, DTS can use `TRex` or IXIA as traffic gengerator based on your deployment and configuration, recommend installing DTS on SUT.
+ * If use `TRex`, recommend deploying `TRex` and SUT on the same machine with different sockets.
Please see a functional deployment example in the following figure:
.. figure:: image/dts_func_deploy.png
-This architecture provides automatically mechanism to manage tester, DUT and packet generators, and remove dependency between test script and test environment/hardware.
+This architecture provides automatically mechanism to manage the Control Node, SUT and packet generators, and remove dependency between test script and test environment/hardware.
It defines one abstraction layer for DPDK Test Suite, and provides extensibility to add more test script.
In the DPDK Test Suite Test Framework, it provides the following modules to help to manage device, platform, configure and test results.
@@ -12,7 +12,7 @@ First of all, you must configure execution.cfg as below:
.. code-block:: console
[Execution1]
- crbs=192.168.1.1
+ sut=192.168.1.1
drivername=vfio-pci
test_suites=
nic_single_core_perf,
@@ -22,25 +22,25 @@ First of all, you must configure execution.cfg as below:
build_type=meson
rx_mode=avx512
-Configure CRB information
-~~~~~~~~~~~~~~~~~~~~~~~~~
+Configure Node information
+~~~~~~~~~~~~~~~~~~~~~~~~~~
-Then please add the detail information about your CRB in $DTS_CFG_FOLDER/crbs.conf as following:
+Then please add the detail information about your Node in $DTS_CFG_FOLDER/topology.cfg as following:
.. code-block:: console
[192.168.1.1]
- dut_ip=192.168.1.1
- dut_user=root
- dut_passwd=passwd
+ sut_ip=192.168.1.1
+ sut_user=root
+ sut_passwd=passwd
os=linux
- dut_arch=
- tester_ip=192.168.1.1
- tester_passwd=passwd
+ sut_arch=
+ tg_ip=192.168.1.1
+ tg_passwd=passwd
pktgen_group=IXIA
channels=4
bypass_core0=True
- dut_cores=
+ sut_cores=
Configure port information
~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -49,8 +49,8 @@ ports topology as below:
.. code-block:: console
- IXIA port 0 <---------> DUT port 0
- IXIA port 1 <---------> DUT port 1
+ IXIA port 0 <---------> SUT port 0
+ IXIA port 1 <---------> SUT port 1
please add port configuration in $DTS_CFG_FOLDER/ports.cfg as following:
@@ -132,8 +132,8 @@ Now you can start DTS performance test with IXIA:
root@test1:~/dts# ./dts
dts:
- DUT 192.168.1.1
- tester: ssh root@192.168.1.1
+ SUT 192.168.1.1
+ tg: ssh root@192.168.1.1
...
pktgen: ssh root@192.168.1.1
pktgen: tclsh
@@ -153,8 +153,8 @@ Now you can start DTS performance test with IXIA:
TestNicSingleCorePerf: Test Case test_perf_nic_single_core Begin
TestNicSingleCorePerf: Executing Test Using cores: ['28', '29'] of config 1C/1T
TestNicSingleCorePerf: Test running at parameters: framesize: 64, rxd/txd: 512
- dut.192.168.1.1: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 28,29 -n 6 -a 0000:af:00.0 -a 0000:b1:00.0 -- -i --portmask=0x3 --rxq=2 --txq=2 --txd=512 --rxd=512 --nb-cores=1
- dut.192.168.1.1: start
+ sut.192.168.1.1: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 28,29 -n 6 -a 0000:af:00.0 -a 0000:b1:00.0 -- -i --portmask=0x3 --rxq=2 --txq=2 --txd=512 --rxd=512 --nb-cores=1
+ sut.192.168.1.1: start
pktgen: stat getLineSpeed 1 1 1
pktgen: stat getLineSpeed 1 1 2
pktgen: scp -v dumppcap.py root@192.168.1.1:~/
@@ -166,7 +166,7 @@ Now you can start DTS performance test with IXIA:
pktgen: scp -v dumppcap.py root@192.168.1.1:~/
pktgen: scapy -c dumppcap.py 2>/dev/null
pktgen: begin traffic ......
- tester: scp -v ixiaConfig.tcl root@192.168.1.1:~/
+ tg: scp -v ixiaConfig.tcl root@192.168.1.1:~/
pktgen: source ixiaConfig.tcl
pktgen: begin get port statistic ...
pktgen: stat getRate statAllStats 1 3 2
@@ -188,8 +188,8 @@ Now you can start DTS performance test with IXIA:
pktgen: throughput: pps_rx 69504677.000000, bps_rx 35586394625.000000
pktgen: ixStopTransmit portList
pktgen: traffic completed.
- dut.192.168.1.1: stop
- dut.192.168.1.1: quit
+ sut.192.168.1.1: stop
+ sut.192.168.1.1: quit
TestNicSingleCorePerf: Trouthput of framesize: 64, rxd/txd: 512 is :69.504677 Mpps
...
@@ -26,7 +26,7 @@ Please see example as the following. You can cat the sample file, then show this
.. code-block:: console
- [root@tester output]# cat statistics.txt
+ [root@tg output]# cat statistics.txt
dpdk_version = 21.02.0
Passed = 2
Failed = 0
@@ -77,9 +77,9 @@ Please see example for TestHelloWorld suite log as the following. This log file
31/12/2020 11:04:00 INFO:
TEST SUITE : TestHelloWorld
31/12/2020 11:04:00 INFO: NIC : fortville_25g
- 31/12/2020 11:04:00 SUITE_DUT_CMD: meson configure -Dexamples=helloworld x86_64-native-linuxapp-gcc
- 31/12/2020 11:04:01 SUITE_DUT_CMD: ninja -C x86_64-native-linuxapp-gcc
- 31/12/2020 11:04:07 SUITE_DUT_OUTPUT: ninja: Entering directory `x86_64-native-linuxapp-gcc'^M
+ 31/12/2020 11:04:00 SUITE_SUT_CMD: meson configure -Dexamples=helloworld x86_64-native-linuxapp-gcc
+ 31/12/2020 11:04:01 SUITE_SUT_CMD: ninja -C x86_64-native-linuxapp-gcc
+ 31/12/2020 11:04:07 SUITE_SUT_OUTPUT: ninja: Entering directory `x86_64-native-linuxapp-gcc'^M
[0/1] Regenerating build files.^M
The Meson build system^M
Version: 0.55.3^M
@@ -92,8 +92,8 @@ Please see example for TestHelloWorld suite log as the following. This log file
[1/2] Compiling C object examples/dpdk-helloworld.p/helloworld_main.c.o^M
[2/2] Linking target examples/dpdk-helloworld
31/12/2020 11:04:09 INFO: Test Case test_hello_world_single_core Begin
- 31/12/2020 11:04:13 SUITE_DUT_CMD: ./x86_64-native-linuxapp-gcc/examples/dpdk-helloworld -l 1 -n 4 --file-prefix=dpdk_10243_20201231110241
- SUITE_DUT_OUTPUT: EAL: Detected 72 lcore(s)^M
+ 31/12/2020 11:04:13 SUITE_SUT_CMD: ./x86_64-native-linuxapp-gcc/examples/dpdk-helloworld -l 1 -n 4 --file-prefix=dpdk_10243_20201231110241
+ SUITE_SUT_OUTPUT: EAL: Detected 72 lcore(s)^M
…
hello from core 1
31/12/2020 11:04:15 INFO: Test Case test_hello_world_single_core Result PASSED:
similarity index 97%
rename from doc/dts_gsg/usr_guide/setup_dut.rst
rename to doc/dts_gsg/usr_guide/setup_sut.rst
@@ -1,7 +1,7 @@
-Set up DUT
+Set up SUT
===========
-This chapter describes the packages required to compile the DPDK in DUT.
+This chapter describes the packages required to compile the DPDK in SUT.
BIOS Setting Prerequisite on x86
--------------------------------
@@ -125,7 +125,7 @@ For libraries the additional dependencies include:
Compile DPDK
-------------
-Now we can compile the DPDK to check whether the DUT ENV is OK.
+Now we can compile the DPDK to check whether the SUT ENV is OK.
commands::
@@ -133,7 +133,7 @@ commands::
ninja -C x86_64-native-linuxapp-gcc -j 110
if there are no errors occurred during the compilation and the DPDK apps have been generated,
-it means the DUT ENV is OK now.
+it means the SUT ENV is OK now.
Check dpdk-testpmd::
@@ -1,15 +1,15 @@
System Requirements
===================
-This chapter describes the packages required to deploy DTS, including Tester and DUT.
-Tester and DUT should have one interface connected to the same internet, so that they can be accessed by each other from local IP address.
-The tester and DUT are recommended to install the latest Centos, Redhat or Ubuntu for easily installing DTS(DPDK Test Suite) or DPDK required modules.
+This chapter describes the packages required to deploy DTS, including TG and SUT.
+TG and SUT should have one interface connected to the same internet, so that they can be accessed by each other from local IP address.
+The TG and SUT are recommended to install the latest Centos, Redhat or Ubuntu for easily installing DTS(DPDK Test Suite) or DPDK required modules.
.. note::
- Uubuntu 20.04 are installed for Tester and DUT, and The setup instruction and required packages may be different on different operation systems.
+ Uubuntu 20.04 are installed for TG and SUT, and The setup instruction and required packages may be different on different operation systems.
-Firewall should be disabled on Tester and DUT so that all packets can be accepted by NIC Interface.
+Firewall should be disabled on TG and SUT so that all packets can be accepted by NIC Interface.
.. code-block:: console
@@ -19,7 +19,7 @@ Firewall should be disabled on Tester and DUT so that all packets can be accepte
SSH Service
-----------
-Since DPDK Test Suite Tester communicates with DUT via SSH, please install and start sshd service in your Tester and DUT.
+Since DPDK Test Suite TG communicates with SUT via SSH, please install and start sshd service in your TG and SUT.
.. code-block:: console
@@ -51,7 +51,7 @@ They are recorded in `requirements.txt`.
.. code-block:: console
- [root@tester ~]# cat requirements.txt
+ [root@tg ~]# cat requirements.txt
...
xlwt==1.3.0
pexpect==4.7.0
@@ -96,7 +96,7 @@ Here are some differences between scapy 2.4.4 and scapy 2.4.3 about the packet l
BIOS Setting Prerequisite on x86
--------------------------------
-For the majority of platforms, no special BIOS settings for Tester and DUT.
+For the majority of platforms, no special BIOS settings for TG and SUT.
DPDK prefers devices bound to ``vfio-pci`` kernel module, therefore, `VT-x` and `VT-d` should be enabled.
.. code-block:: console
@@ -3,7 +3,7 @@ Practice with TRex
Download TREX
-------------
-TREX should be installed in Tester, it could be downloaded from http://trex-tgn.cisco.com/trex/release/.
+TREX should be installed in TG, it could be downloaded from http://trex-tgn.cisco.com/trex/release/.
We recommend to use the latest version v2.88.
.. code-block:: console
@@ -20,9 +20,9 @@ Extract the downloaded TREX tarball
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Extract the downloaded TREX file to /opt/trex/::
- root@tester:/opt# mkdir trex
- root@tester:/opt# cd trex
- root@tester:/opt/trex# tar -zxvf v2.88.tar.gz
+ root@tg:/opt# mkdir trex
+ root@tg:/opt# cd trex
+ root@tg:/opt/trex# tar -zxvf v2.88.tar.gz
v2.88/
v2.88/_t-rex-64-debug
v2.88/t-rex-64-debug
@@ -32,11 +32,11 @@ Extract the downloaded TREX file to /opt/trex/::
Generate Configure File
~~~~~~~~~~~~~~~~~~~~~~~~
-Identify the performance test ports in tester
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+Identify the performance test ports in TG
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
execute the command like below to list the ports::
- root@tester:/opt/trex/v2.88# ./dpdk_setup_ports.py -s
+ root@tg:/opt/trex/v2.88# ./dpdk_setup_ports.py -s
Network devices using DPDK-compatible driver
============================================
@@ -53,15 +53,15 @@ execute the command like below to list the ports::
Generate Configure File
^^^^^^^^^^^^^^^^^^^^^^^
-Assume that we use 0000:0b:00.0, 0000:0b:00.1 to connect to DUT port.
+Assume that we use 0000:0b:00.0, 0000:0b:00.1 to connect to SUT ports.
And the ports topology as below::
- trex.0 (0b:00.0/40:a6:b7:0b:55:78) <-------> DUT port 0 (05:00.0/b4:96:91:9f:63:68)
- trex.1 (0b:00.1/40:a6:b7:0b:55:79) <-------> DUT port 1 (05:00.1/b4:96:91:9f:63:69)
+ trex.0 (0b:00.0/40:a6:b7:0b:55:78) <-------> SUT port 0 (05:00.0/b4:96:91:9f:63:68)
+ trex.1 (0b:00.1/40:a6:b7:0b:55:79) <-------> SUT port 1 (05:00.1/b4:96:91:9f:63:69)
We need to generate the trex config file as below::
- root@tester:/opt/v2.88# ./dpdk_setup_ports.py -i
+ root@tg:/opt/v2.88# ./dpdk_setup_ports.py -i
By default, IP based configuration file will be created. Do you want to use MAC based config? (y/N)y
+----+------+---------+-------------------+--------------------------------------------+---------+----------+----------+
| ID | NUMA | PCI | MAC | Name | Driver | Linux IF | Active |
@@ -105,7 +105,7 @@ We need to generate the trex config file as below::
Press ENTER to confirm or enter new file:
File /etc/trex_cfg.yaml already exist, overwrite? (y/N)Y
Saved to /etc/trex_cfg.yaml.
- root@tester:/opt/trex/v2.88#
+ root@tg:/opt/trex/v2.88#
We could not modify the DUT mac during the configuration and modify it in the generated file /etc/trex_cfg.yaml.
@@ -113,7 +113,7 @@ Modify Configure File
^^^^^^^^^^^^^^^^^^^^^
Make sure the DUT mac of the generated TREX file is correct, and add prefix and limit_memory is better::
- root@tester:/opt/trex/v2.88# cat /etc/trex_cfg.yaml
+ root@tg:/opt/trex/v2.88# cat /etc/trex_cfg.yaml
### Config file generated by dpdk_setup_ports.py ###
- version: 2
@@ -133,7 +133,7 @@ Make sure the DUT mac of the generated TREX file is correct, and add prefix and
- socket: 0
threads: [2,3,4,5,6,7]
- root@tester:/opt/trex/v2.88#
+ root@tg:/opt/trex/v2.88#
Replace system scapy with TREX scapy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -155,9 +155,9 @@ Configure execution.cfg
~~~~~~~~~~~~~~~~~~~~~~~
Add the performance test suite and set perf=true::
- root@tester:dts# cat execution.cfg
+ root@tg:dts# cat execution.cfg
[Execution1]
- crbs=192.168.1.1
+ sut=192.168.1.1
drivername=vfio-pci
build_type=meson
test_suites=
@@ -165,21 +165,21 @@ Add the performance test suite and set perf=true::
targets=
x86_64-native-linuxapp-gcc
parameters=nic_type=cfg:perf=true
- root@tester:dts#
+ root@tg:dts#
-Configure $DTS_CFG_FOLDER/crbs.cfg
+Configure $DTS_CFG_FOLDER/topology.cfg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set the pktgen_group=trex or pktgen_group=TREX, this item is case insensitive::
- root@tester:dts# cat $DTS_CFG_FOLDER/crbs.cfg
+ root@tg:dts# cat $DTS_CFG_FOLDER/topology.cfg
[192.168.1.1]
- dut_ip=192.168.1.1
- dut_user=root
- dut_passwd=dutpwd
+ sut_ip=192.168.1.1
+ sut_user=root
+ sut_passwd=sutpwd
os=linux
- dut_arch=
- tester_ip=192.168.1.2
- tester_passwd=testerpwd
+ sut_arch=
+ tg_ip=192.168.1.2
+ tg_passwd=tgpwd
ixia_group=
pktgen_group=trex
channels=4
@@ -190,7 +190,7 @@ Configure $DTS_CFG_FOLDER/ports.cfg
This configuration is just same with PF function test, so if you have completed some functional test,
you have no need to modify the $DTS_CFG_FOLDER/ports.cfg, just like below::
- root@tester:dts# cat $DTS_CFG_FOLDER/ports.cfg
+ root@tg:dts# cat $DTS_CFG_FOLDER/ports.cfg
[192.168.1.1]
ports =
pci=0000:05:00.0,peer=0000:0b:00.0;
@@ -198,7 +198,7 @@ you have no need to modify the $DTS_CFG_FOLDER/ports.cfg, just like below::
In addition, it could be configured as below::
- root@tester:dts# cat $DTS_CFG_FOLDER/ports.cfg
+ root@tg:dts# cat $DTS_CFG_FOLDER/ports.cfg
[192.168.1.1]
ports =
pci=0000:05:00.0,peer=TREX:0;
@@ -209,10 +209,10 @@ We recommend to use the first format configuration, as it has no need to do modi
Configure $DTS_CFG_FOLDER/pktgen.cfg
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fill in the $DTS_CFG_FOLDER/pktgen.cfg with your TREX setting, for the first time, you should set start_trex=yes.
-Set the IP address of the device which you installed TREX into item ‘server=’, it should be the tester IP.
+Set the IP address of the device which you installed TREX into item ‘server=’, it should be the TG IP.
The configuration should as below::
- root@tester:dts# cat $DTS_CFG_FOLDER/pktgen.cfg
+ root@tg:dts# cat $DTS_CFG_FOLDER/pktgen.cfg
[TREX]
trex_root_path=/opt/trex/v2.88
trex_lib_path=/opt/trex/v2.88/automation/trex_control_plane/interactive
@@ -229,9 +229,9 @@ The configuration should as below::
As the trex_lib_path may be different in different versions, you could find the correct path as blow command::
- root@tester:/opt/trex/v2.88# find . -name trex_stl_lib
+ root@tg:/opt/trex/v2.88# find . -name trex_stl_lib
./automation/trex_control_plane/interactive/trex_stl_lib
- root@tester:/opt/trex/v2.88#
+ root@tg:/opt/trex/v2.88#
Run DTS performance test with TREX
@@ -239,10 +239,10 @@ Run DTS performance test with TREX
Now you can start DTS performance test with TREX::
- root@tester:/home/zhaohy/dts# ./dts
+ root@tg:/home/zhaohy/dts# ./dts
dts:
- DUT 192.168.1.1
- tester: ssh root@192.168.1.1
+ SUT 192.168.1.1
+ tg: ssh root@192.168.1.1
...
pktgen: ssh root@192.168.1.1
pktgen: cd /opt/trex/v2.88;./t-rex-64 -i --cfg /etc/trex_cfg.yaml -c 4
@@ -251,11 +251,11 @@ Now you can start DTS performance test with TREX::
/usr/bin/python3 dpdk_nic_bind.py --bind=igb_uio 0000:0b:00.0 0000:0b:00.1
...
TestTSO: Test Case test_perf_TSO_2ports Begin
- dut.10.240.183.72:
- tester:
+ sut.10.240.183.72:
+ tg:
TestTSO: Executing PMD using 1S/1C/2T
- dut.10.240.183.72: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1,45 -n 4 -a 0000:05:00.0 -a 0000:05:00.1 --file-prefix=dpdk_31529_20210324143008 -- -i --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=0x3 --max-pkt-len=9000 --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32
- dut.10.240.183.72: EAL: Detected 88 lcore(s)
+ sut.10.240.183.72: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1,45 -n 4 -a 0000:05:00.0 -a 0000:05:00.1 --file-prefix=dpdk_31529_20210324143008 -- -i --rxd=512 --txd=512 --burst=32 --rxfreet=64 --mbcache=128 --portmask=0x3 --max-pkt-len=9000 --txpt=36 --txht=0 --txwt=0 --txfreet=32 --txrst=32
+ sut.10.240.183.72: EAL: Detected 88 lcore(s)
...
pktgen: Rx Port 0 stats:
rx_port: 0, rx_bps: 25354096640.000000, rx_pps: 1239130.250000
@@ -281,10 +281,10 @@ dpdk hugepage management conflict issue
trex use older dpdk version than we release cycle source code. When dpdk change
the memory management merchanism, trex will meet the following issue.
-Trex should run on an independent platform. DUT/Trex should run on two platforms:
+Trex should run on an independent platform. SUT/Trex should run on two platforms:
-* one is used as TESTER and trex server, another one is used as DUT.(dts/pktgen)
-* one is used as trex server, another one is used as DUT/TESTER.(recommended scheme)
+* one is used as Control Node and TG/trex server, another one is used as SUT.
+* one is used as TG/trex server, another one is used as SUT/Control Node.(recommended scheme)
This scheme can make sure that trex run on its full status capability.
When trex run with dts on the same platform, trex server sometimes boot up
@@ -313,7 +313,7 @@ failed for hugepage error.
trex quit when using Niantic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-when bind dut NNT port to igb_uio, peer port will get a link down status, then
+when bind sut NNT port to igb_uio, peer port will get a link down status, then
trex server using NNT nic will quit.
.. code-block:: console
@@ -12,7 +12,7 @@ First of all, you must configure execution.cfg as below:
.. code-block:: console
[Execution1]
- crbs=<CRB IP Address>
+ sut=<Node IP Address>
drivername=vfio-pci
build_type=meson
rx_mode=avx512
@@ -22,7 +22,7 @@ First of all, you must configure execution.cfg as below:
x86_64-native-linuxapp-gcc
parameters=nic_type=cfg:func=true
-* crbs: IP address of the DUT. The detail information is defined in file $DTS_CFG_FOLDER/crbs.cfg.
+* sut: IP address of the SUT. The detail information is defined in file $DTS_CFG_FOLDER/topology.cfg.
* drivername: the driver devices used by DPDK bound to.
* build_type: the tool for building DPDK, it can be meson.
* rx_mode: vector instructions used in tests, it can be novector/sse/avx2/avx512. it is optional, if not set, dpdk uses avx2 by default.
@@ -32,8 +32,8 @@ First of all, you must configure execution.cfg as below:
* nic_type: it is the type of the NIC to use. The types are defined in the file settings.py.
There's a special type named as **cfg**, which mean network information will be loaded from file $DTS_CFG_FOLDER/ports.cfg.
- If use NIC type such as niantic, fortville_25g, it requires all DUT are the same types and no any same devices connected to Tester,
- as DTS will test all devices connected to Tester. Therefore, recommend using **cfg**.
+ If use NIC type such as niantic, fortville_25g, it requires all NICs are the same types and no any same devices connected to TG,
+ as DTS will test all devices connected to TG. Therefore, recommend using **cfg**.
* func=true: run only functional test.
* perf=true: run only performance test.
@@ -46,7 +46,7 @@ Here are an example for functional testing:
.. code-block:: console
[Execution1]
- crbs=192.168.1.1
+ sut=192.168.1.1
drivername=vfio-pci
build_type=meson
test_suites=
@@ -56,48 +56,48 @@ Here are an example for functional testing:
parameters=nic_type=cfg:func=true
-Configure CRB information
-~~~~~~~~~~~~~~~~~~~~~~~~~
+Configure Node information
+~~~~~~~~~~~~~~~~~~~~~~~~~~
-Then please add the detail information about your CRB in $DTS_CFG_FOLDER/crbs.conf as following:
+Then please add the detail information about your Nodes in $DTS_CFG_FOLDER/topology.cfg as following:
.. code-block:: console
- [DUT IP]
- dut_ip=xxx.xxx.xxx.xxx
- dut_user=root
- dut_passwd=
+ [SUT IP]
+ sut_ip=xxx.xxx.xxx.xxx
+ sut_user=root
+ sut_passwd=
os=linux
- dut_arch=
- tester_ip=xxx.xxx.xxx.xxx
- tester_passwd=
+ sut_arch=
+ tg_ip=xxx.xxx.xxx.xxx
+ tg_passwd=
pktgen_group=
channels=4
bypass_core0=True
- dut_cores=
-
-* DUT IP: section name, same as ``crbs`` in execution.cfg.
-* dut_ip: IP address of the DUT, same as ``crbs`` in execution.cfg.
-* dut_user: User name of DUT linux account
-* dut_passwd: Password of DUT linux account
-* tester_ip: IP address of tester
-* tester_passwd: Password of Tester linux account, user name should same as dut_user
+ sut_cores=
+
+* SUT IP: section name, same as ``sut`` in execution.cfg.
+* sut_ip: IP address of the SUT, same as ``sut`` in execution.cfg.
+* sut_user: User name of SUT linux account
+* sut_passwd: Password of SUT linux account
+* tg_ip: IP address of TG
+* tg_passwd: Password of TG linux account, user name should same as sut_user
* pktgen_group: traffic generator name, it can be ``trex`` or ``ixia``, it is optional, if not set, DTS can't do performance tests.
* channels: number of memory channels for DPDK EAL
* bypass_core0: skip the first core when initialize DPDK
-* dut_cores: DUT core list, eg: 1,2,3,4,5,18-22, it is optional, if it is ``None`` or not set, all core list will be used.
+* sut_cores: SUT core list, eg: 1,2,3,4,5,18-22, it is optional, if it is ``None`` or not set, all core list will be used.
Here are an example for functional testing:
.. code-block:: console
[192.168.1.1]
- dut_ip=192.168.1.1
- dut_user=root
- dut_passwd=dutpasswd
+ sut_ip=192.168.1.1
+ sut_user=root
+ sut_passwd=sutpasswd
os=linux
- tester_ip=192.168.1.2
- tester_passwd=testerpasswd
+ tg_ip=192.168.1.2
+ tg_passwd=tgpasswd
channels=4
bypass_core0=True
@@ -109,7 +109,7 @@ If set ``nic_type=cfg`` in execution.cfg, please add port configuration in $DTS_
.. code-block:: console
- [DUT IP]
+ [SUT IP]
ports =
pci=<Pci BDF>,peer=<Pci BDF>;
pci=<Pci BDF>,peer=IXIA:X.Y;
@@ -117,8 +117,8 @@ If set ``nic_type=cfg`` in execution.cfg, please add port configuration in $DTS_
It supports three patterns, the first one is for functional testing, the second one is for ``IXIA``, the third one is for ``TRex``:
-* pci: Device pci address of DUT
-* peer: info of Tester port which connected to the DUT device:
+* pci: Device pci address of SUT
+* peer: info of TG port which connected to the SUT counterpart:
* if it is func testing, it is pci address
* if pktgen is ``TRex``, the `X` in ``TREX:X`` is port id in TRex configuration file, e.g. /etc/trex_cfg.yaml.
@@ -185,8 +185,8 @@ Configure your pktgen
Pktgen information are configured in $DTS_CFG_FOLDER/pktgen.cfg, pktgen_group must be configured too:
-* traffic generator is ``TRex``, set ``pktgen_group=trex`` in crbs.cfg.
-* traffic generator is ``IXIA``, set ``pktgen_group=ixia`` in crbs.cfg.
+* traffic generator is ``TRex``, set ``pktgen_group=trex`` in topology.cfg.
+* traffic generator is ``IXIA``, set ``pktgen_group=ixia`` in topology.cfg.
Then configure $DTS_CFG_FOLDER/pktgen.cfg as following:
@@ -196,7 +196,7 @@ Then configure $DTS_CFG_FOLDER/pktgen.cfg as following:
trex_root_path=/opt/trex/v2.84/
trex_lib_path=/opt/trex/v2.84/automation/trex_control_plane/interactive
config_file=/etc/trex_cfg.yaml
- server=192.168.1.1 # equal to tester IP, TREX should be installed in tester
+ server=192.168.1.1 # equal to TG IP, TREX should be installed in TG
pcap_file=/opt/trex/v2.84/stl/sample.pacp
core_num=16
ip_src=16.0.0.1
@@ -222,7 +222,7 @@ Then configure $DTS_CFG_FOLDER/pktgen.cfg as following:
* IXIA: section name for IXIA.
* ixia_version: the version of IxExplorer.
* ixia_ip: IP of ixia
-* ixia_ports: ixia ports connected to DUT.
+* ixia_ports: ixia ports connected to SUT.
Here are an example for TRex:
@@ -232,7 +232,7 @@ Here are an example for TRex:
trex_root_path=/opt/trex/v2.84/
trex_lib_path=/opt/trex/v2.84/automation/trex_control_plane/interactive
config_file=/etc/trex_cfg.yaml
- server=192.168.1.1 # equal to tester IP, TREX should be installed in tester
+ server=192.168.1.1 # equal to TG IP, TREX should be installed in TG
pcap_file=/opt/trex/v2.84/stl/sample.pacp
core_num=16
ip_src=16.0.0.1
@@ -289,7 +289,7 @@ DTS supports the following parameters:
* ``-s, --skip-setup``
- Skip all possible setup steps done on both DUT and tester.
+ Skip all possible setup steps done on both SUT and TG.
* ``-t TEST_CASES, --test-cases TEST_CASES``
@@ -1,5 +1,5 @@
[Execution1]
-crbs=<CRB IP Address>
+sut=<SUT IP Address>
#using igb_uio please refer to doc/dts_gsg/support_igb_uio.rst
drivername=vfio-pci
build_type=meson
@@ -1,5 +1,5 @@
[Execution1]
-crbs=<CRB IP Address>
+suts=<SUT IP Address>
#using igb_uio please refer to doc/dts_gsg/support_igb_uio.rst
drivername=<driver name igb_uio or vfio-pci or mlx5_core or uio_pci_generic>
build_type=<meson>
@@ -35,7 +35,7 @@ targets=
parameters=nic_type=cfg:func=true
[Execution2]
-crbs=<Performance CRB IP Address>
+suts=<Performance SUT IP Address>
drivername=<driver name igb_uio or vfio-pci>
build_type=<meson>
test_suites=
@@ -1,5 +1,5 @@
[Execution1]
-crbs=<CRB IP Address>
+suts=<SUT IP Address>
#using igb_uio please refer to doc/dts_gsg/support_igb_uio.rst
drivername=<driver name igb_uio or vfio-pci or mlx5_core or uio_pci_generic>
build_type=<meson>
@@ -36,7 +36,7 @@ targets=
parameters=nic_type=cfg:func=true
[Execution2]
-crbs=<Performance CRB IP Address>
+suts=<Performance SUT IP Address>
drivername=<driver name igb_uio or vfio-pci>
build_type=<meson>
test_suites=
@@ -1,5 +1,5 @@
[Execution1]
-crbs=<CRB IP Address>
+suts=<SUT IP Address>
#using igb_uio please refer to doc/dts_gsg/support_igb_uio.rst
drivername=<driver name igb_uio or vfio-pci or uio_pci_generic>
build_type=<meson>
@@ -19,7 +19,7 @@ targets=
parameters=nic_type=cfg:func=true
[Execution2]
-crbs=<Performance CRB IP Address>
+suts=<Performance SUT IP Address>
drivername=<driver name igb_uio or vfio-pci>
build_type=<meson>
test_suites=
@@ -1,5 +1,5 @@
[Execution1]
-crbs=<CRB IP Address>
+suts=<SUT IP Address>
#using igb_uio please refer to doc/dts_gsg/support_igb_uio.rst
drivername=igb_uio
rx_mode=scalar
@@ -22,7 +22,7 @@ targets=
parameters=nic_type=cfg:func=true
[Execution2]
-crbs=<CRB IP Address>
+suts=<SUT IP Address>
drivername=igb_uio
rx_mode=full
build_type=<meson>
@@ -44,7 +44,7 @@ targets=
parameters=nic_type=cfg:func=true
[Execution3]
-crbs=<CRB IP Address>
+suts=<SUT IP Address>
drivername=igb_uio
rx_mode=vector
build_type=<meson>
@@ -1,5 +1,5 @@
[Execution1]
-crbs=<CRB IP Address>
+suts=<SUT IP Address>
#using igb_uio please refer to doc/dts_gsg/support_igb_uio.rst
drivername=<driver name igb_uio or vfio-pci or mlx5_core or uio_pci_generic>
build_type=<meson>
@@ -57,9 +57,9 @@ class _FrameworkADAPTER(object):
def decorator_build_install_dpdk():
added_param = _ASanConfig().build_param
if added_param is not None:
- from framework.project_dpdk import DPDKdut
+ from framework.project_dpdk import DpdkSut
- origin_func = DPDKdut.build_install_dpdk
+ origin_func = DpdkSut.build_install_dpdk
def new_func(*args, **kwargw):
kwargw["extra_options"] = " ".join(
@@ -67,7 +67,7 @@ class _FrameworkADAPTER(object):
)
origin_func(*args, **kwargw)
- DPDKdut.build_install_dpdk = new_func
+ DpdkSut.build_install_dpdk = new_func
@staticmethod
def decorator_dts_run():
@@ -76,14 +76,14 @@ class _FrameworkADAPTER(object):
origin_func = dts.dts_run_suite
def new_func(*args, **kwargs):
- duts = args[0]
- for dut in duts:
- dut.send_expect(COMMAND_OF_CLOSE_ADDRESS_RANDOM, "#")
+ suts = args[0]
+ for sut in suts:
+ sut.send_expect(COMMAND_OF_CLOSE_ADDRESS_RANDOM, "#")
origin_func(*args, **kwargs)
- for dut in duts:
- dut.send_expect(COMMAND_OF_OPEN_ADDRESS_RANDOM, "#")
+ for sut in suts:
+ sut.send_expect(COMMAND_OF_OPEN_ADDRESS_RANDOM, "#")
dts.dts_run_suite = new_func
@@ -290,7 +290,7 @@ class _NewReport(object):
def process_report_header(self):
head_key_list = [
- "dut",
+ "sut",
"kdriver",
"firmware",
"package",
@@ -23,7 +23,7 @@ class CheckCase(object):
"""
def __init__(self):
- self.dut = None
+ self.sut = None
self.comments = ""
self.check_function_dict = {}
@@ -50,17 +50,17 @@ class CheckCase(object):
)
)
- def check_dut(self, dut):
+ def check_sut(self, sut):
"""
- Change DUT instance for environment check
+ Change SUT instance for environment check
"""
- self.dut = dut
+ self.sut = sut
def _check_os(self, os_type):
if "all" == os_type[0].lower():
return True
- dut_os_type = self.dut.get_os_type()
- if dut_os_type in os_type:
+ sut_os_type = self.sut.get_os_type()
+ if sut_os_type in os_type:
return True
else:
return False
@@ -68,8 +68,8 @@ class CheckCase(object):
def _check_nic(self, nic_type):
if "all" == nic_type[0].lower():
return True
- dut_nic_type = get_nic_name(self.dut.ports_info[0]["type"])
- if dut_nic_type in nic_type:
+ sut_nic_type = get_nic_name(self.sut.ports_info[0]["type"])
+ if sut_nic_type in nic_type:
return True
else:
return False
@@ -77,7 +77,7 @@ class CheckCase(object):
def _check_target(self, target):
if "all" == target[0].lower():
return True
- if self.dut.target in target:
+ if self.sut.target in target:
return True
else:
return False
@@ -93,14 +93,14 @@ class CheckCase(object):
def case_skip(self, case_name):
"""
- Check whether test case and DUT match skip criteria
+ Check whether test case and SUT match skip criteria
Return True if skip should skip
"""
skip_flag = False
self.comments = ""
- if self.dut is None:
- print(RED("No Dut assigned before case skip check"))
+ if self.sut is None:
+ print(RED("No SUT assigned before case skip check"))
return skip_flag
if case_name in list(self.check_function_dict.keys()):
@@ -137,14 +137,14 @@ class CheckCase(object):
def case_support(self, case_name):
"""
- Check whether test case and DUT match support criteria
+ Check whether test case and SUT match support criteria
Return False if test case not supported
"""
support_flag = True
self.comments = ""
- if self.dut is None:
- print(RED("No Dut assigned before case support check"))
+ if self.sut is None:
+ print(RED("No SUT assigned before case support check"))
return support_flag
if case_name in list(self.support_function_dict.keys()):
@@ -179,7 +179,7 @@ class CheckCase(object):
return support_flag
-class simple_dut(object):
+class simple_sut(object):
def __init__(self, os="", target="", nic=""):
self.ports_info = [{}]
self.os = os
@@ -191,23 +191,23 @@ class simple_dut(object):
if __name__ == "__main__":
- dut = simple_dut(os="linux", target="x86_64-native-linuxapp-gcc", nic="177d:a034")
- dut1 = simple_dut(
+ sut = simple_sut(os="linux", target="x86_64-native-linuxapp-gcc", nic="177d:a034")
+ sut1 = simple_sut(
os="freebsd", target="x86_64-native-linuxapp-gcc", nic="8086:158b"
)
# create instance for check/support case list
case_inst = CheckCase()
- # check dut
- case_inst.check_dut(dut)
+ # check SUT
+ case_inst.check_sut(sut)
print(case_inst.case_skip("fdir_flexword_drop_ipv4"))
print(case_inst.comments)
print(case_inst.case_support("Vxlan_tunnel"))
print(case_inst.comments)
- # check other dut
- case_inst.check_dut(dut1)
+ # check other SUT
+ case_inst.check_sut(sut1)
print(case_inst.case_skip("fdir_flexword_drop_ipv4"))
print(case_inst.comments)
print(case_inst.case_support("Vxlan_tunnel"))
@@ -30,7 +30,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""
-Generic port and crbs configuration file load function
+Generic port and topology nodes configuration file load function
"""
import argparse # parse arguments module
import configparser # config parse module
@@ -55,7 +55,7 @@ from .settings import (
)
PORTCONF = "%s/ports.cfg" % CONFIG_ROOT_PATH
-CRBCONF = "%s/crbs.cfg" % CONFIG_ROOT_PATH
+TOPOCONF = "%s/topology.cfg" % CONFIG_ROOT_PATH
VIRTCONF = "%s/virt_global.cfg" % CONFIG_ROOT_PATH
IXIACONF = "%s/ixia.cfg" % CONFIG_ROOT_PATH
PKTGENCONF = "%s/pktgen.cfg" % CONFIG_ROOT_PATH
@@ -225,12 +225,12 @@ class PortConf(UserConf):
self.port_conf = None
raise PortConfigParseException
- def load_ports_config(self, crbIP):
+ def load_ports_config(self, nodeIP):
self.ports_cfg = {}
if self.port_conf is None:
return
- ports = self.port_conf.load_section(crbIP)
+ ports = self.port_conf.load_section(nodeIP)
if ports is None:
return
key, config = ports[0]
@@ -274,80 +274,80 @@ class PortConf(UserConf):
return False
-class CrbsConf(UserConf):
- DEF_CRB = {
+class TopologyConf(UserConf):
+ TOPO_DEFAULTS = {
"IP": "",
"board": "default",
"user": "",
"pass": "",
- "tester IP": "",
- "tester pass": "",
+ "tg IP": "",
+ "tg pass": "",
"memory channels": 4,
PKTGEN: None,
"bypass core0": True,
- "dut_cores": "",
- "snapshot_load_side": "tester",
+ "sut_cores": "",
+ "snapshot_load_side": "tg",
}
- def __init__(self, crbs_conf=CRBCONF):
- self.config_file = crbs_conf
- self.crbs_cfg = []
+ def __init__(self, topo_conf=TOPOCONF):
+ self.config_file = topo_conf
+ self.topo_cfg = []
try:
- self.crbs_conf = UserConf(self.config_file)
+ self.topo_conf = UserConf(self.config_file)
except ConfigParseException:
- self.crbs_conf = None
+ self.topo_conf = None
raise ConfigParseException
- def load_crbs_config(self):
- sections = self.crbs_conf.get_sections()
+ def load_topo_config(self):
+ sections = self.topo_conf.get_sections()
if not sections:
- return self.crbs_cfg
+ return self.topo_cfg
- for name in sections:
- crb = self.DEF_CRB.copy()
- crb["section"] = name
- crb_confs = self.crbs_conf.load_section(name)
- if not crb_confs:
+ for node_name in sections:
+ node = self.TOPO_DEFAULTS.copy()
+ node["section"] = node_name
+ node_conf = self.topo_conf.load_section(node_name)
+ if not node_conf:
continue
- # convert file configuration to dts crbs
- for conf in crb_confs:
+ # convert file configuration to dts node configuration
+ for conf in node_conf:
key, value = conf
- if key == "dut_ip":
- crb["IP"] = value
- elif key == "dut_user":
- crb["user"] = value
- elif key == "dut_passwd":
- crb["pass"] = value
+ if key == "sut_ip":
+ node["IP"] = value
+ elif key == "sut_user":
+ node["user"] = value
+ elif key == "sut_passwd":
+ node["pass"] = value
elif key == "os":
- crb["OS"] = value
- elif key == "tester_ip":
- crb["tester IP"] = value
- elif key == "tester_passwd":
- crb["tester pass"] = value
+ node["OS"] = value
+ elif key == "tg_ip":
+ node["tg IP"] = value
+ elif key == "tg_passwd":
+ node["tg pass"] = value
elif key == "pktgen_group":
- crb[PKTGEN] = value.lower()
+ node[PKTGEN] = value.lower()
elif key == "channels":
- crb["memory channels"] = int(value)
+ node["memory channels"] = int(value)
elif key == "bypass_core0":
if value == "True":
- crb["bypass core0"] = True
+ node["bypass core0"] = True
else:
- crb["bypass core0"] = False
+ node["bypass core0"] = False
elif key == "board":
- crb["board"] = value
- elif key == "dut_arch":
- crb["dut arch"] = value
- elif key == "dut_cores":
- crb["dut_cores"] = value
+ node["board"] = value
+ elif key == "sut_arch":
+ node["sut arch"] = value
+ elif key == "sut_cores":
+ node["sut_cores"] = value
elif key == "snapshot_load_side":
- crb["snapshot_load_side"] = value.lower()
+ node["snapshot_load_side"] = value.lower()
- self.crbs_cfg.append(crb)
- return self.crbs_cfg
+ self.topo_cfg.append(node)
+ return self.topo_cfg
-class PktgenConf(UserConf):
+class PacketGeneratorConf(UserConf):
def __init__(self, pktgen_type="ixia", pktgen_conf=PKTGENCONF):
self.config_file = pktgen_conf
self.pktgen_type = pktgen_type.lower()
@@ -468,7 +468,7 @@ class AppNameConf(UserConf):
if __name__ == "__main__":
parser = argparse.ArgumentParser(description="Load DTS configuration files")
parser.add_argument("-p", "--portconf", default=PORTCONF)
- parser.add_argument("-c", "--crbconf", default=CRBCONF)
+ parser.add_argument("-t", "--topoconf", default=TOPOCONF)
parser.add_argument("-v", "--virtconf", default=VIRTCONF)
parser.add_argument("-i", "--ixiaconf", default=IXIACONF)
args = parser.parse_args()
@@ -490,7 +490,7 @@ if __name__ == "__main__":
# example for port configuration file
portconf = PortConf(PORTCONF)
- portconf.load_ports_config("DUT IP")
+ portconf.load_ports_config("SUT IP")
print(portconf.get_ports_config())
portconf.check_port_available("86:00.0")
@@ -499,9 +499,9 @@ if __name__ == "__main__":
virtconf.load_virt_config("LIBVIRT")
print(virtconf.get_virt_config())
- # example for crbs configuration file
- crbsconf = CrbsConf(CRBCONF)
- print(crbsconf.load_crbs_config())
+ # example for nodes configuration file
+ topoconf = TopologyConf(TOPOCONF)
+ print(topoconf.load_topo_config())
# example for suite configure file
suiteconf = SuiteConf("suite_sample")
deleted file mode 100644
@@ -1,37 +0,0 @@
-"""
-Static configuration data for any CRBs that can be used.
-"""
-
-crbs_desc = {
- "CrownPassCRB1": """
- - Intel Grizzly Pass Server Board populated with:
-
- - 2x Intel Xeon CPU E5-2680 @ 2.7GHz with 64 KB L1 D-cache (per
- physical core), 256 KB L2 D-cache (per physical core) and 25 MB of
- L3 D-cache (shared across physical cores).
- - 8x DDR3 DIMMs @ 1333 MHz of 4GB each. Each of the 4 memory channels of each
- CPU is populated with 2 DIMMs.
- - 4x Intel 82599 (Niantic) NICs (2x 10GbE full duplex optical ports per NIC)
- plugged into the available PCIe Gen2 8-lane slots. To avoid PCIe bandwidth
- bottlenecks at high packet rates, a single optical port from each NIC is
- connected to the traffic generator.
-
- - BIOS version R02.01.0002 with the following settings:
-
- - Intel Turbo Boost Technology [Disabled]
- - Enhanced Intel SpeedStep Technology (EIST) [Disabled]
- - Intel Hyper-Threading Technology [Enabled]
- - Direct Cache Access [Disabled]
-
- - Execute DisableBit [Enabled]
- - MLC Streamer [Enabled]
- - MLC Spatial Prefetcher [Disabled]
- - DCU Data Prefetcher [Disabled]
- - DCU Instruction Prefetcher [Enabled]
-
- - Software configuration:
-
- - Linux operating system: Fedora 20 64-bit
- - Linux kernel version: 3.6.10
- """
-}
@@ -46,7 +46,7 @@ def help_command():
console.push("print ' - help(): help messages'")
console.push("print ' - list(): list all connections'")
console.push("print ' - connect(): bind to specified connection'")
- console.push("print ' - : connect(\"dut\")'")
+ console.push("print ' - : connect(\"SUT\")'")
console.push("print ' - quit(): quit debug module'")
console.push("print ' - exit(): exit processing procedure'")
console.push("print ' - debug(): call python debug module for further debug'")
@@ -94,13 +94,13 @@ def rerun_command():
new_module = imp.reload(AliveModule)
# save arguments required to initialize suite
- duts = AliveSuite.__dict__["duts"]
- tester = AliveSuite.__dict__["tester"]
+ suts = AliveSuite.__dict__["suts"]
+ tg = AliveSuite.__dict__["tg"]
target = AliveSuite.__dict__["target"]
suite = AliveSuite.__dict__["suite_name"]
for test_classname, test_class in get_subclasses(new_module, TestCase):
- suite_obj = test_class(duts, tester, target, suite)
+ suite_obj = test_class(suts, tg, target, suite)
# copy all element from previous suite to reloaded suite
copy_instance_attr(AliveSuite, suite_obj)
@@ -50,17 +50,17 @@ import framework.settings as settings # dts settings
from framework.asan_test import ASanTestProcess
from .checkCase import CheckCase
-from .config import CrbsConf
-from .dut import Dut
+from .config import TopologyConf
from .excel_reporter import ExcelReporter
from .exception import ConfigParseException, TimeoutException, VerifyFailure
from .json_reporter import JSONReporter
from .logger import getLogger
from .serializer import Serializer
from .stats_reporter import StatsReporter
+from .sut_node import SutNode
from .test_case import TestCase
from .test_result import Result
-from .tester import Tester
+from .tg_node import TrafficGeneratorNode
from .utils import (
check_dts_python_version,
copy_instance_attr,
@@ -158,7 +158,7 @@ def dts_parse_config(config, section):
"""
Parse execution file configuration.
"""
- duts = [dut_.strip() for dut_ in config.get(section, "crbs").split(",")]
+ suts = [sut_.strip() for sut_ in config.get(section, "sut").split(",")]
targets = [target.strip() for target in config.get(section, "targets").split(",")]
test_suites = [
suite.strip() for suite in config.get(section, "test_suites").split(",")
@@ -174,7 +174,7 @@ def dts_parse_config(config, section):
if suite == "":
test_suites.remove(suite)
- return duts, targets, test_suites
+ return suts, targets, test_suites
def dts_parse_commands(commands):
@@ -186,7 +186,7 @@ def dts_parse_commands(commands):
if commands is None:
return dts_commands
- args_format = {"shell": 0, "crb": 1, "stage": 2, "check": 3, "max_num": 4}
+ args_format = {"shell": 0, "node": 1, "stage": 2, "check": 3, "max_num": 4}
cmd_fmt = r"\[(.*)\]"
for command in commands:
@@ -207,10 +207,10 @@ def dts_parse_commands(commands):
dts_command["command"] = shell_cmd[:-1]
else:
dts_command["command"] = args[0]
- if args[1] == "tester":
- dts_command["host"] = "tester"
+ if args[1] == "tg":
+ dts_command["host"] = "tg"
else:
- dts_command["host"] = "dut"
+ dts_command["host"] = "sut"
if args[2] == "post-init":
dts_command["stage"] = "post-init"
else:
@@ -225,24 +225,24 @@ def dts_parse_commands(commands):
return dts_commands
-def dts_run_commands(crb, dts_commands):
+def dts_run_commands(node, dts_commands):
"""
Run dts input commands
"""
for dts_command in dts_commands:
command = dts_command["command"]
- if dts_command["host"] in crb.NAME:
- if crb.stage == dts_command["stage"]:
- ret = crb.send_expect(command, expected="# ", verify=True)
+ if dts_command["host"] in node.NAME:
+ if node.stage == dts_command["stage"]:
+ ret = node.send_expect(command, expected="# ", verify=True)
if type(ret) is int:
log_handler.error("[%s] return failure" % command)
if dts_command["verify"] is True:
raise VerifyFailure("Command execution failed")
-def get_project_obj(project_name, super_class, crbInst, serializer, dut_id):
+def get_project_obj(project_name, super_class, nodeInst, serializer, sut_id):
"""
- Load project module and return crb instance.
+ Load project module and return node instance.
"""
project_obj = None
PROJECT_MODULE_PREFIX = "project_"
@@ -255,163 +255,163 @@ def get_project_obj(project_name, super_class, crbInst, serializer, dut_id):
for project_subclassname, project_subclass in get_subclasses(
project_module, super_class
):
- project_obj = project_subclass(crbInst, serializer, dut_id)
+ project_obj = project_subclass(nodeInst, serializer, sut_id)
if project_obj is None:
- project_obj = super_class(crbInst, serializer, dut_id)
+ project_obj = super_class(nodeInst, serializer, sut_id)
except Exception as e:
log_handler.info("LOAD PROJECT MODULE INFO: " + str(e))
- project_obj = super_class(crbInst, serializer, dut_id)
+ project_obj = super_class(nodeInst, serializer, sut_id)
return project_obj
-def dts_log_testsuite(duts, tester, suite_obj, log_handler, test_classname):
+def dts_log_testsuite(suts, tg, suite_obj, log_handler, test_classname):
"""
Change to SUITE self logger handler.
"""
log_handler.config_suite(test_classname, "dts")
- tester.logger.config_suite(test_classname, "tester")
- if hasattr(tester, "logger_alt"):
- tester.logger_alt.config_suite(test_classname, "tester")
- if hasattr(tester, "logger_scapy"):
- tester.logger_scapy.config_suite(test_classname, "tester")
+ tg.logger.config_suite(test_classname, "tg")
+ if hasattr(tg, "logger_alt"):
+ tg.logger_alt.config_suite(test_classname, "tg")
+ if hasattr(tg, "logger_scapy"):
+ tg.logger_scapy.config_suite(test_classname, "tg")
- for dutobj in duts:
- dutobj.logger.config_suite(test_classname, "dut")
- dutobj.test_classname = test_classname
+ for sutobj in suts:
+ sutobj.logger.config_suite(test_classname, "sut")
+ sutobj.test_classname = test_classname
try:
- if tester.it_uses_external_generator():
+ if tg.it_uses_external_generator():
if (
- tester.is_pktgen
- and hasattr(tester, "pktgen")
- and getattr(tester, "pktgen")
+ tg.is_pktgen
+ and hasattr(tg, "pktgen")
+ and getattr(tg, "pktgen")
):
- tester.pktgen.logger.config_suite(test_classname, "pktgen")
+ tg.pktgen.logger.config_suite(test_classname, "pktgen")
except Exception as ex:
pass
-def dts_log_execution(duts, tester, log_handler):
+def dts_log_execution(suts, tg, log_handler):
"""
Change to DTS default logger handler.
"""
log_handler.config_execution("dts")
- tester.logger.config_execution("tester")
+ tg.logger.config_execution("tg")
- for dutobj in duts:
- dutobj.logger.config_execution(
- "dut" + settings.LOG_NAME_SEP + "%s" % dutobj.crb["My IP"]
+ for sutobj in suts:
+ sutobj.logger.config_execution(
+ "sut" + settings.LOG_NAME_SEP + "%s" % sutobj.node["My IP"]
)
try:
- if tester.it_uses_external_generator():
+ if tg.it_uses_external_generator():
if (
- tester.is_pktgen
- and hasattr(tester, "pktgen")
- and getattr(tester, "pktgen")
+ tg.is_pktgen
+ and hasattr(tg, "pktgen")
+ and getattr(tg, "pktgen")
):
- tester.pktgen.logger.config_execution("pktgen")
+ tg.pktgen.logger.config_execution("pktgen")
except Exception as ex:
pass
-def dts_crbs_init(
- crbInsts, skip_setup, read_cache, project, base_dir, serializer, virttype
+def dts_nodes_init(
+ nodeInsts, skip_setup, read_cache, project, base_dir, serializer, virttype
):
"""
- Create dts dut/tester instance and initialize them.
+ Create dts SUT/TG instance and initialize them.
"""
- duts = []
+ suts = []
serializer.set_serialized_filename(
- settings.FOLDERS["Output"] + "/.%s.cache" % crbInsts[0]["IP"]
+ settings.FOLDERS["Output"] + "/.%s.cache" % nodeInsts[0]["IP"]
)
serializer.load_from_file()
- testInst = copy.copy(crbInsts[0])
- testInst["My IP"] = crbInsts[0]["tester IP"]
- tester = get_project_obj(project, Tester, testInst, serializer, dut_id=0)
+ testInst = copy.copy(nodeInsts[0])
+ testInst["My IP"] = nodeInsts[0]["tg IP"]
+ tg = get_project_obj(project, TrafficGeneratorNode, testInst, serializer, sut_id=0)
- dut_id = 0
- for crbInst in crbInsts:
- dutInst = copy.copy(crbInst)
- dutInst["My IP"] = crbInst["IP"]
- dutobj = get_project_obj(project, Dut, dutInst, serializer, dut_id=dut_id)
- duts.append(dutobj)
- dut_id += 1
+ sut_id = 0
+ for nodeInst in nodeInsts:
+ sutInst = copy.copy(nodeInst)
+ sutInst["My IP"] = nodeInst["IP"]
+ sutobj = get_project_obj(project, SutNode, sutInst, serializer, sut_id=sut_id)
+ suts.append(sutobj)
+ sut_id += 1
- dts_log_execution(duts, tester, log_handler)
+ dts_log_execution(suts, tg, log_handler)
- tester.duts = duts
+ tg.suts = suts
show_speedup_options_messages(read_cache, skip_setup)
- tester.set_speedup_options(read_cache, skip_setup)
+ tg.set_speedup_options(read_cache, skip_setup)
try:
- tester.init_ext_gen()
+ tg.init_ext_gen()
except Exception as e:
log_handler.error(str(e))
- tester.close()
- for dutobj in duts:
- dutobj.close()
+ tg.close()
+ for sutobj in suts:
+ sutobj.close()
raise e
nic = settings.load_global_setting(settings.HOST_NIC_SETTING)
- for dutobj in duts:
- dutobj.tester = tester
- dutobj.setup_virtenv(virttype)
- dutobj.set_speedup_options(read_cache, skip_setup)
- dutobj.set_directory(base_dir)
+ for sutobj in suts:
+ sutobj.tg = tg
+ sutobj.setup_virtenv(virttype)
+ sutobj.set_speedup_options(read_cache, skip_setup)
+ sutobj.set_directory(base_dir)
# save execution nic setting
- dutobj.set_nic_type(nic)
+ sutobj.set_nic_type(nic)
- return duts, tester
+ return suts, tg
-def dts_crbs_exit(duts, tester):
+def dts_nodes_exit(suts, tg):
"""
- Call dut and tester exit function after execution finished
+ Call SUT and TG exit function after execution finished
"""
- for dutobj in duts:
- dutobj.crb_exit()
+ for sutobj in suts:
+ sutobj.node_exit()
- tester.crb_exit()
+ tg.node_exit()
-def dts_run_prerequisties(duts, tester, pkgName, patch, dts_commands, serializer):
+def dts_run_prerequisties(suts, tg, pkgName, patch, dts_commands, serializer):
"""
Run dts prerequisties function.
"""
try:
- dts_run_commands(tester, dts_commands)
- tester.prerequisites()
- dts_run_commands(tester, dts_commands)
+ dts_run_commands(tg, dts_commands)
+ tg.prerequisites()
+ dts_run_commands(tg, dts_commands)
except Exception as ex:
log_handler.error(" PREREQ EXCEPTION " + traceback.format_exc())
log_handler.info("CACHE: Discarding cache.")
serializer.discard_cache()
- settings.report_error("TESTER_SETUP_ERR")
+ settings.report_error("TG_SETUP_ERR")
return False
try:
- for dutobj in duts:
- dts_run_commands(dutobj, dts_commands)
- dutobj.set_package(pkgName, patch)
- dutobj.prerequisites()
- dts_run_commands(dutobj, dts_commands)
+ for sutobj in suts:
+ dts_run_commands(sutobj, dts_commands)
+ sutobj.set_package(pkgName, patch)
+ sutobj.prerequisites()
+ dts_run_commands(sutobj, dts_commands)
serializer.save_to_file()
except Exception as ex:
log_handler.error(" PREREQ EXCEPTION " + traceback.format_exc())
- result.add_failed_dut(duts[0], str(ex))
+ result.add_failed_sut(suts[0], str(ex))
log_handler.info("CACHE: Discarding cache.")
serializer.discard_cache()
- settings.report_error("DUT_SETUP_ERR")
+ settings.report_error("SUT_SETUP_ERR")
return False
else:
- result.remove_failed_dut(duts[0])
+ result.remove_failed_sut(suts[0])
-def dts_run_target(duts, tester, targets, test_suites, subtitle):
+def dts_run_target(suts, tg, targets, test_suites, subtitle):
"""
Run each target in execution targets.
"""
@@ -422,35 +422,35 @@ def dts_run_target(duts, tester, targets, test_suites, subtitle):
try:
drivername = settings.load_global_setting(settings.HOST_DRIVER_SETTING)
if drivername == "":
- for dutobj in duts:
- dutobj.set_target(target, bind_dev=False)
+ for sutobj in suts:
+ sutobj.set_target(target, bind_dev=False)
else:
- for dutobj in duts:
- dutobj.set_target(target)
+ for sutobj in suts:
+ sutobj.set_target(target)
except AssertionError as ex:
log_handler.error(" TARGET ERROR: " + str(ex))
settings.report_error("DPDK_BUILD_ERR")
- result.add_failed_target(result.dut, target, str(ex))
+ result.add_failed_target(result.sut, target, str(ex))
continue
except Exception as ex:
settings.report_error("GENERIC_ERR")
log_handler.error(" !!! DEBUG IT: " + traceback.format_exc())
- result.add_failed_target(result.dut, target, str(ex))
+ result.add_failed_target(result.sut, target, str(ex))
continue
else:
- result.remove_failed_target(result.dut, target)
+ result.remove_failed_target(result.sut, target)
- dts_run_suite(duts, tester, test_suites, target, subtitle)
+ dts_run_suite(suts, tg, test_suites, target, subtitle)
- tester.restore_interfaces()
+ tg.restore_interfaces()
- for dutobj in duts:
- dutobj.stop_ports()
- dutobj.restore_interfaces()
- dutobj.restore_modules()
+ for sutobj in suts:
+ sutobj.stop_ports()
+ sutobj.restore_interfaces()
+ sutobj.restore_modules()
-def dts_run_suite(duts, tester, test_suites, target, subtitle):
+def dts_run_suite(suts, tg, test_suites, target, subtitle):
"""
Run each suite in test suite list.
"""
@@ -469,7 +469,7 @@ def dts_run_suite(duts, tester, test_suites, target, subtitle):
)
for test_classname, test_class in get_subclasses(suite_module, TestCase):
- suite_obj = test_class(duts, tester, target, suite_name)
+ suite_obj = test_class(suts, tg, target, suite_name)
suite_obj.init_log()
suite_obj.set_requested_cases(requested_tests)
suite_obj.set_requested_cases(append_requested_case_list)
@@ -477,7 +477,7 @@ def dts_run_suite(duts, tester, test_suites, target, subtitle):
suite_obj.set_subtitle(subtitle)
result.nic = suite_obj.nic
- dts_log_testsuite(duts, tester, suite_obj, log_handler, test_classname)
+ dts_log_testsuite(suts, tg, suite_obj, log_handler, test_classname)
log_handler.info("\nTEST SUITE : " + test_classname)
log_handler.info("NIC : " + result.nic)
@@ -489,7 +489,7 @@ def dts_run_suite(duts, tester, test_suites, target, subtitle):
result.copy_suite(suite_obj.get_result())
log_handler.info("\nTEST SUITE ENDED: " + test_classname)
- dts_log_execution(duts, tester, log_handler)
+ dts_log_execution(suts, tg, log_handler)
except VerifyFailure:
settings.report_error("SUITE_EXECUTE_ERR")
log_handler.error(" !!! DEBUG IT: " + traceback.format_exc())
@@ -617,67 +617,67 @@ def run_all(
stats_report = StatsReporter(output_dir + "/statistics.txt")
result = Result()
- crbs_conf = CrbsConf()
- crbs = crbs_conf.load_crbs_config()
+ nodes_conf = TopologyConf()
+ nodes = nodes_conf.load_topo_config()
# for all Execution sections
for section in config.sections():
- crbInsts = list()
+ nodeInsts = list()
dts_parse_param(config, section, log_handler)
# verify if the delimiter is good if the lists are vertical
- duts, targets, test_suites = dts_parse_config(config, section)
- for dut in duts:
- log_handler.info("\nDUT " + dut)
-
- # look up in crbs - to find the matching IP
- for dut in duts:
- for crb in crbs:
- if crb["section"] == dut:
- crbInsts.append(crb)
+ suts, targets, test_suites = dts_parse_config(config, section)
+ for sut in suts:
+ log_handler.info("\nSUT " + sut)
+
+ # look up in nodes - to find the matching IP
+ for sut in suts:
+ for node in nodes:
+ if node["section"] == sut:
+ nodeInsts.append(node)
break
- # only run on the dut in known crbs
- if len(crbInsts) == 0:
- log_handler.error(" SKIP UNKNOWN CRB")
+ # only run on the SUT in known nodes
+ if len(nodeInsts) == 0:
+ log_handler.error(" SKIP UNKNOWN NODE")
continue
- result.dut = duts[0]
+ result.sut = suts[0]
# init global lock
- create_parallel_locks(len(duts))
+ create_parallel_locks(len(suts))
- # init dut, tester crb
- duts, tester = dts_crbs_init(
- crbInsts, skip_setup, read_cache, project, base_dir, serializer, virttype
+ # init SUT, TG node
+ suts, tg = dts_nodes_init(
+ nodeInsts, skip_setup, read_cache, project, base_dir, serializer, virttype
)
- tester.set_re_run(re_run)
+ tg.set_re_run(re_run)
# register exit action
- atexit.register(quit_execution, duts, tester)
+ atexit.register(quit_execution, suts, tg)
- check_case_inst.check_dut(duts[0])
+ check_case_inst.check_sut(suts[0])
- # Run DUT prerequisites
+ # Run SUT prerequisites
if (
dts_run_prerequisties(
- duts, tester, pkgName, patch, dts_commands, serializer
+ suts, tg, pkgName, patch, dts_commands, serializer
)
is False
):
- dts_crbs_exit(duts, tester)
+ dts_nodes_exit(suts, tg)
continue
- result.kdriver = duts[0].nic.default_driver + "-" + duts[0].nic.driver_version
- result.firmware = duts[0].nic.firmware
+ result.kdriver = suts[0].nic.default_driver + "-" + suts[0].nic.driver_version
+ result.firmware = suts[0].nic.firmware
result.package = (
- duts[0].nic.pkg["type"] + " " + duts[0].nic.pkg["version"]
- if duts[0].nic.pkg
+ suts[0].nic.pkg["type"] + " " + suts[0].nic.pkg["version"]
+ if suts[0].nic.pkg
else None
)
result.driver = settings.load_global_setting(settings.HOST_DRIVER_SETTING)
- result.dpdk_version = duts[0].dpdk_version
- dts_run_target(duts, tester, targets, test_suites, subtitle)
+ result.dpdk_version = suts[0].dpdk_version
+ dts_run_target(suts, tg, targets, test_suites, subtitle)
- dts_crbs_exit(duts, tester)
+ dts_nodes_exit(suts, tg)
def show_speedup_options_messages(read_cache, skip_setup):
@@ -701,21 +701,21 @@ def save_all_results():
stats_report.save(result)
-def quit_execution(duts, tester):
+def quit_execution(suts, tg):
"""
- Close session to DUT and tester before quit.
+ Close session to SUT and TG before quit.
Return exit status when failure occurred.
"""
# close all nics
- for dutobj in duts:
- if getattr(dutobj, "ports_info", None) and dutobj.ports_info:
- for port_info in dutobj.ports_info:
+ for sutobj in suts:
+ if getattr(sutobj, "ports_info", None) and sutobj.ports_info:
+ for port_info in sutobj.ports_info:
netdev = port_info["port"]
netdev.close()
# close all session
- dutobj.close()
- if tester is not None:
- tester.close()
+ sutobj.close()
+ if tg is not None:
+ tg.close()
log_handler.info("DTS ended")
# return value
@@ -35,7 +35,7 @@ Excel spreadsheet generator
Example:
excel_report = ExcelReporter('../output/test_results.xls')
result = Result()
- result.dut = dutIP
+ result.sut = sutIP
result.target = target
result.nic = nic
result.test_suite = test_suite
@@ -45,7 +45,7 @@ Example:
Result:
execl will be formatted as
- DUT Target NIC Test suite Test case Results
+ SUT Target NIC Test suite Test case Results
10.239.128.117 x86_64-native-linuxapp-gcc niantic
SUITE CASE PASSED
@@ -74,7 +74,7 @@ class ExcelReporter(object):
self.sheet = self.workbook.add_sheet("Test Results", cell_overwrite_ok=True)
def __add_header(self):
- self.sheet.write(0, 0, "DUT", self.header_style)
+ self.sheet.write(0, 0, "SUT", self.header_style)
self.sheet.write(0, 1, "DPDK version", self.header_style)
self.sheet.write(0, 2, "Target", self.header_style)
self.sheet.write(0, 3, "NIC", self.header_style)
@@ -146,22 +146,22 @@ class ExcelReporter(object):
self.title_style = xlwt.XFStyle()
self.title_style.font = title_font
- def __get_case_result(self, dut, target, suite, case):
- case_list = self.result.all_test_cases(dut, target, suite)
+ def __get_case_result(self, sut, target, suite, case):
+ case_list = self.result.all_test_cases(sut, target, suite)
if case_list.count(case) > 1:
tmp_result = []
for case_name in case_list:
if case == case_name:
- test_result = self.result.result_for(dut, target, suite, case)
+ test_result = self.result.result_for(sut, target, suite, case)
if "PASSED" in test_result:
return ["PASSED", ""]
else:
tmp_result.append(test_result)
return tmp_result[-1]
else:
- return self.result.result_for(dut, target, suite, case)
+ return self.result.result_for(sut, target, suite, case)
- def __write_result(self, dut, target, suite, case, test_result):
+ def __write_result(self, sut, target, suite, case, test_result):
if test_result is not None and len(test_result) > 0:
result = test_result[0]
if test_result[1] != "":
@@ -178,32 +178,32 @@ class ExcelReporter(object):
self.failed_style,
)
- def __write_cases(self, dut, target, suite):
- for case in set(self.result.all_test_cases(dut, target, suite)):
- result = self.__get_case_result(dut, target, suite, case)
+ def __write_cases(self, sut, target, suite):
+ for case in set(self.result.all_test_cases(sut, target, suite)):
+ result = self.__get_case_result(sut, target, suite, case)
self.col += 1
if case[:5] == "test_":
self.sheet.write(self.row, self.col, case[5:])
else:
self.sheet.write(self.row, self.col, case)
- self.__write_result(dut, target, suite, case, result)
+ self.__write_result(sut, target, suite, case, result)
self.row += 1
self.col -= 1
- def __write_suites(self, dut, target):
- for suite in self.result.all_test_suites(dut, target):
+ def __write_suites(self, sut, target):
+ for suite in self.result.all_test_suites(sut, target):
self.row += 1
self.col += 1
self.sheet.write(self.row, self.col, suite)
- self.__write_cases(dut, target, suite)
+ self.__write_cases(sut, target, suite)
self.col -= 1
- def __write_nic(self, dut, target):
- nic = self.result.current_nic(dut, target)
- driver = self.result.current_driver(dut)
- kdriver = self.result.current_kdriver(dut)
- firmware = self.result.current_firmware_version(dut)
- pkg = self.result.current_package_version(dut)
+ def __write_nic(self, sut, target):
+ nic = self.result.current_nic(sut, target)
+ driver = self.result.current_driver(sut)
+ kdriver = self.result.current_kdriver(sut)
+ firmware = self.result.current_firmware_version(sut)
+ pkg = self.result.current_package_version(sut)
self.col += 1
self.sheet.col(self.col).width = 32 * 256 # 32 characters
self.sheet.write(self.row, self.col, nic, self.title_style)
@@ -214,11 +214,11 @@ class ExcelReporter(object):
self.sheet.write(self.row + 4, self.col, "pkg: " + pkg)
self.row = self.row + 1
self.row = self.row + 3
- self.__write_suites(dut, target)
+ self.__write_suites(sut, target)
self.col -= 1
- def __write_failed_target(self, dut, target):
- msg = "TARGET ERROR '%s'" % self.result.target_failed_msg(dut, target)
+ def __write_failed_target(self, sut, target):
+ msg = "TARGET ERROR '%s'" % self.result.target_failed_msg(sut, target)
self.sheet.write(
self.row,
self.col + 4,
@@ -229,19 +229,19 @@ class ExcelReporter(object):
)
self.row += 1
- def __write_targets(self, dut):
- for target in self.result.all_targets(dut):
+ def __write_targets(self, sut):
+ for target in self.result.all_targets(sut):
self.col += 1
self.sheet.write(self.row, self.col, target, self.title_style)
- if self.result.is_target_failed(dut, target):
- self.__write_failed_target(dut, target)
+ if self.result.is_target_failed(sut, target):
+ self.__write_failed_target(sut, target)
else:
- self.__write_nic(dut, target)
+ self.__write_nic(sut, target)
self.row += 1
self.col -= 1
- def __write_failed_dut(self, dut):
- msg = "PREREQ FAILED '%s'" % self.result.dut_failed_msg(dut)
+ def __write_failed_sut(self, sut):
+ msg = "PREREQ FAILED '%s'" % self.result.sut_failed_msg(sut)
self.sheet.write(
self.row,
self.col + 5,
@@ -253,19 +253,19 @@ class ExcelReporter(object):
self.row += 1
def __parse_result(self):
- for dut in self.result.all_duts():
- self.sheet.write(self.row, self.col, dut, self.title_style)
- if self.result.is_dut_failed(dut):
- self.__write_failed_dut(dut)
+ for sut in self.result.all_suts():
+ self.sheet.write(self.row, self.col, sut, self.title_style)
+ if self.result.is_sut_failed(sut):
+ self.__write_failed_sut(sut)
else:
self.col = self.col + 1
self.sheet.write(
self.row,
self.col,
- self.result.current_dpdk_version(dut),
+ self.result.current_dpdk_version(sut),
self.title_style,
)
- self.__write_targets(dut)
+ self.__write_targets(sut)
self.row += 1
def save(self, result):
@@ -127,13 +127,13 @@ class VirtConfigParamException(Exception):
return "Faile to execute param [%s]" % (self.param)
-class VirtDutConnectException(Exception):
+class VirtSutConnectException(Exception):
pass
-class VirtDutInitException(Exception):
- def __init__(self, vm_dut):
- self.vm_dut = vm_dut
+class VirtSutInitException(Exception):
+ def __init__(self, vm_sut):
+ self.vm_sut = vm_sut
class VirtDeviceCreateException(Exception):
@@ -89,7 +89,7 @@ class IxnetTrafficGenerator(object):
return response
def __get_ports(self):
- """Return available tg vports list"""
+ """Return available TG vports list"""
return self.tg_vports
def disable_port_misdirected(self):
@@ -36,10 +36,10 @@ class JSONReporter(object):
def __init__(self, filename):
self.filename = filename
- def __scan_cases(self, result, dut, target, suite):
+ def __scan_cases(self, result, sut, target, suite):
case_results = {}
- for case in result.all_test_cases(dut, target, suite):
- test_result = result.result_for(dut, target, suite, case)
+ for case in result.all_test_cases(sut, target, suite):
+ test_result = result.result_for(sut, target, suite, case)
case_name = "{}/{}".format(suite, case)
case_results[case_name] = test_result
if "PASSED" in test_result:
@@ -52,34 +52,34 @@ class JSONReporter(object):
case_results[case_name] = "blocked"
return case_results
- def __scan_target(self, result, dut, target):
- if result.is_target_failed(dut, target):
+ def __scan_target(self, result, sut, target):
+ if result.is_target_failed(sut, target):
return "fail"
case_results = {}
- for suite in result.all_test_suites(dut, target):
- case_results.update(self.__scan_cases(result, dut, target, suite))
+ for suite in result.all_test_suites(sut, target):
+ case_results.update(self.__scan_cases(result, sut, target, suite))
return case_results
- def __scan_dut(self, result, dut):
- if result.is_dut_failed(dut):
+ def __scan_sut(self, result, sut):
+ if result.is_sut_failed(sut):
return "fail"
target_map = {}
- target_map["dpdk_version"] = result.current_dpdk_version(dut)
+ target_map["dpdk_version"] = result.current_dpdk_version(sut)
target_map["nic"] = {}
- for target in result.all_targets(dut):
- target_map["nic"]["name"] = result.current_nic(dut, target)
- target_map[target] = self.__scan_target(result, dut, target)
- target_map["nic"]["kdriver"] = result.current_kdriver(dut)
- target_map["nic"]["driver"] = result.current_driver(dut)
- target_map["nic"]["firmware"] = result.current_firmware_version(dut)
- if result.current_package_version(dut) is not None:
- target_map["nic"]["pkg"] = result.current_package_version(dut)
+ for target in result.all_targets(sut):
+ target_map["nic"]["name"] = result.current_nic(sut, target)
+ target_map[target] = self.__scan_target(result, sut, target)
+ target_map["nic"]["kdriver"] = result.current_kdriver(sut)
+ target_map["nic"]["driver"] = result.current_driver(sut)
+ target_map["nic"]["firmware"] = result.current_firmware_version(sut)
+ if result.current_package_version(sut) is not None:
+ target_map["nic"]["pkg"] = result.current_package_version(sut)
return target_map
def save(self, result):
result_map = {}
- for dut in result.all_duts():
- result_map[dut] = self.__scan_dut(result, dut)
+ for sut in result.all_suts():
+ result_map[sut] = self.__scan_sut(result, sut)
with open(self.filename, "w") as outfile:
json.dump(
result_map, outfile, indent=4, separators=(",", ": "), sort_keys=True
@@ -44,42 +44,42 @@ will saved into different log files.
"""
verbose = False
-logging.DTS_DUT_CMD = logging.INFO + 1
-logging.DTS_DUT_OUTPUT = logging.DEBUG + 1
-logging.DTS_DUT_RESULT = logging.WARNING + 1
+logging.DTS_SUT_CMD = logging.INFO + 1
+logging.DTS_SUT_OUTPUT = logging.DEBUG + 1
+logging.DTS_SUT_RESULT = logging.WARNING + 1
-logging.DTS_TESTER_CMD = logging.INFO + 2
-logging.DTS_TESTER_OUTPUT = logging.DEBUG + 2
-logging.DTS_TESTER_RESULT = logging.WARNING + 2
+logging.DTS_TG_CMD = logging.INFO + 2
+logging.DTS_TG_OUTPUT = logging.DEBUG + 2
+logging.DTS_TG_RESULT = logging.WARNING + 2
-logging.SUITE_DUT_CMD = logging.INFO + 3
-logging.SUITE_DUT_OUTPUT = logging.DEBUG + 3
+logging.SUITE_SUT_CMD = logging.INFO + 3
+logging.SUITE_SUT_OUTPUT = logging.DEBUG + 3
-logging.SUITE_TESTER_CMD = logging.INFO + 4
-logging.SUITE_TESTER_OUTPUT = logging.DEBUG + 4
+logging.SUITE_TG_CMD = logging.INFO + 4
+logging.SUITE_TG_OUTPUT = logging.DEBUG + 4
-logging.DTS_VIRTDUT_CMD = logging.INFO + 6
-logging.DTS_VIRTDUT_OUTPUT = logging.DEBUG + 6
+logging.DTS_VIRTSUT_CMD = logging.INFO + 6
+logging.DTS_VIRTSUT_OUTPUT = logging.DEBUG + 6
logging.DTS_PKTGEN_CMD = logging.INFO + 7
logging.DTS_PKTGEN_OUTPUT = logging.DEBUG + 7
-logging.addLevelName(logging.DTS_DUT_CMD, "DTS_DUT_CMD")
-logging.addLevelName(logging.DTS_DUT_OUTPUT, "DTS_DUT_OUTPUT")
-logging.addLevelName(logging.DTS_DUT_RESULT, "DTS_DUT_RESULT")
+logging.addLevelName(logging.DTS_SUT_CMD, "DTS_SUT_CMD")
+logging.addLevelName(logging.DTS_SUT_OUTPUT, "DTS_SUT_OUTPUT")
+logging.addLevelName(logging.DTS_SUT_RESULT, "DTS_SUT_RESULT")
-logging.addLevelName(logging.DTS_TESTER_CMD, "DTS_TESTER_CMD")
-logging.addLevelName(logging.DTS_TESTER_OUTPUT, "DTS_TESTER_OUTPUT")
-logging.addLevelName(logging.DTS_TESTER_RESULT, "DTS_TESTER_RESULT")
+logging.addLevelName(logging.DTS_TG_CMD, "DTS_TG_CMD")
+logging.addLevelName(logging.DTS_TG_OUTPUT, "DTS_TG_OUTPUT")
+logging.addLevelName(logging.DTS_TG_RESULT, "DTS_TG_RESULT")
-logging.addLevelName(logging.DTS_VIRTDUT_CMD, "VIRTDUT_CMD")
-logging.addLevelName(logging.DTS_VIRTDUT_OUTPUT, "VIRTDUT_OUTPUT")
+logging.addLevelName(logging.DTS_VIRTSUT_CMD, "VIRTSUT_CMD")
+logging.addLevelName(logging.DTS_VIRTSUT_OUTPUT, "VIRTSUT_OUTPUT")
-logging.addLevelName(logging.SUITE_DUT_CMD, "SUITE_DUT_CMD")
-logging.addLevelName(logging.SUITE_DUT_OUTPUT, "SUITE_DUT_OUTPUT")
+logging.addLevelName(logging.SUITE_SUT_CMD, "SUITE_SUT_CMD")
+logging.addLevelName(logging.SUITE_SUT_OUTPUT, "SUITE_SUT_OUTPUT")
-logging.addLevelName(logging.SUITE_TESTER_CMD, "SUITE_TESTER_CMD")
-logging.addLevelName(logging.SUITE_TESTER_OUTPUT, "SUITE_TESTER_OUTPUT")
+logging.addLevelName(logging.SUITE_TG_CMD, "SUITE_TG_CMD")
+logging.addLevelName(logging.SUITE_TG_OUTPUT, "SUITE_TG_OUTPUT")
logging.addLevelName(logging.DTS_PKTGEN_CMD, "DTS_PKTGEN_CMD")
logging.addLevelName(logging.DTS_PKTGEN_OUTPUT, "DTS_PKTGEN_OUTPUT")
@@ -104,41 +104,41 @@ class BaseLoggerAdapter(logging.LoggerAdapter):
Upper layer of original logging module.
"""
- def dts_dut_cmd(self, msg, *args, **kwargs):
- self.log(logging.DTS_DUT_CMD, msg, *args, **kwargs)
+ def dts_sut_cmd(self, msg, *args, **kwargs):
+ self.log(logging.DTS_SUT_CMD, msg, *args, **kwargs)
- def dts_dut_output(self, msg, *args, **kwargs):
- self.log(logging.DTS_DUT_OUTPUT, msg, *args, **kwargs)
+ def dts_sut_output(self, msg, *args, **kwargs):
+ self.log(logging.DTS_SUT_OUTPUT, msg, *args, **kwargs)
- def dts_dut_result(self, msg, *args, **kwargs):
- self.log(logging.DTS_DUT_RESULT, msg, *args, **kwargs)
+ def dts_sut_result(self, msg, *args, **kwargs):
+ self.log(logging.DTS_SUT_RESULT, msg, *args, **kwargs)
- def dts_tester_cmd(self, msg, *args, **kwargs):
- self.log(logging.DTS_TESTER_CMD, msg, *args, **kwargs)
+ def dts_tg_cmd(self, msg, *args, **kwargs):
+ self.log(logging.DTS_TG_CMD, msg, *args, **kwargs)
- def dts_tester_output(self, msg, *args, **kwargs):
- self.log(logging.DTS_TESTER_CMD, msg, *args, **kwargs)
+ def dts_tg_output(self, msg, *args, **kwargs):
+ self.log(logging.DTS_TG_CMD, msg, *args, **kwargs)
- def dts_tester_result(self, msg, *args, **kwargs):
- self.log(logging.DTS_TESTER_RESULT, msg, *args, **kwargs)
+ def dts_tg_result(self, msg, *args, **kwargs):
+ self.log(logging.DTS_TG_RESULT, msg, *args, **kwargs)
- def suite_dut_cmd(self, msg, *args, **kwargs):
- self.log(logging.SUITE_DUT_CMD, msg, *args, **kwargs)
+ def suite_sut_cmd(self, msg, *args, **kwargs):
+ self.log(logging.SUITE_SUT_CMD, msg, *args, **kwargs)
- def suite_dut_output(self, msg, *args, **kwargs):
- self.log(logging.SUITE_DUT_OUTPUT, msg, *args, **kwargs)
+ def suite_sut_output(self, msg, *args, **kwargs):
+ self.log(logging.SUITE_SUT_OUTPUT, msg, *args, **kwargs)
- def suite_tester_cmd(self, msg, *args, **kwargs):
- self.log(logging.SUITE_TESTER_CMD, msg, *args, **kwargs)
+ def suite_tg_cmd(self, msg, *args, **kwargs):
+ self.log(logging.SUITE_TG_CMD, msg, *args, **kwargs)
- def suite_tester_output(self, msg, *args, **kwargs):
- self.log(logging.SUITE_TESTER_OUTPUT, msg, *args, **kwargs)
+ def suite_tg_output(self, msg, *args, **kwargs):
+ self.log(logging.SUITE_TG_OUTPUT, msg, *args, **kwargs)
- def dts_virtdut_cmd(self, msg, *args, **kwargs):
- self.log(logging.DTS_VIRTDUT_CMD, msg, *args, **kwargs)
+ def dts_virtsut_cmd(self, msg, *args, **kwargs):
+ self.log(logging.DTS_VIRTSUT_CMD, msg, *args, **kwargs)
- def dts_virtdut_output(self, msg, *args, **kwargs):
- self.log(logging.DTS_VIRTDUT_OUTPUT, msg, *args, **kwargs)
+ def dts_virtsut_output(self, msg, *args, **kwargs):
+ self.log(logging.DTS_VIRTSUT_OUTPUT, msg, *args, **kwargs)
def dts_pktgen_cmd(self, msg, *args, **kwargs):
self.log(logging.DTS_PKTGEN_CMD, msg, *args, **kwargs)
@@ -154,22 +154,22 @@ class ColorHandler(logging.StreamHandler):
LEVEL_COLORS = {
logging.DEBUG: "", # SYSTEM
- logging.DTS_DUT_OUTPUT: "\033[00;37m", # WHITE
- logging.DTS_TESTER_OUTPUT: "\033[00;37m", # WHITE
- logging.SUITE_DUT_OUTPUT: "\033[00;37m", # WHITE
- logging.SUITE_TESTER_OUTPUT: "\033[00;37m", # WHITE
+ logging.DTS_SUT_OUTPUT: "\033[00;37m", # WHITE
+ logging.DTS_TG_OUTPUT: "\033[00;37m", # WHITE
+ logging.SUITE_SUT_OUTPUT: "\033[00;37m", # WHITE
+ logging.SUITE_TG_OUTPUT: "\033[00;37m", # WHITE
logging.INFO: "\033[00;36m", # CYAN
- logging.DTS_DUT_CMD: "", # SYSTEM
- logging.DTS_TESTER_CMD: "", # SYSTEM
- logging.SUITE_DUT_CMD: "", # SYSTEM
- logging.SUITE_TESTER_CMD: "", # SYSTEM
+ logging.DTS_SUT_CMD: "", # SYSTEM
+ logging.DTS_TG_CMD: "", # SYSTEM
+ logging.SUITE_SUT_CMD: "", # SYSTEM
+ logging.SUITE_TG_CMD: "", # SYSTEM
logging.DTS_PKTGEN_CMD: "", # SYSTEM
logging.DTS_PKTGEN_OUTPUT: "", # SYSTEM
- logging.DTS_VIRTDUT_CMD: "", # SYSTEM
- logging.DTS_VIRTDUT_OUTPUT: "", # SYSTEM
+ logging.DTS_VIRTSUT_CMD: "", # SYSTEM
+ logging.DTS_VIRTSUT_OUTPUT: "", # SYSTEM
logging.WARN: "\033[01;33m", # BOLD YELLOW
- logging.DTS_DUT_RESULT: "\033[01;34m", # BOLD BLUE
- logging.DTS_TESTER_RESULT: "\033[01;34m", # BOLD BLUE
+ logging.DTS_SUT_RESULT: "\033[01;34m", # BOLD BLUE
+ logging.DTS_TG_RESULT: "\033[01;34m", # BOLD BLUE
logging.ERROR: "\033[01;31m", # BOLD RED
logging.CRITICAL: "\033[01;31m", # BOLD RED
}
@@ -184,7 +184,7 @@ class DTSLOG(BaseLoggerAdapter):
DTS log class for framework and testsuite.
"""
- def __init__(self, logger, crb="suite"):
+ def __init__(self, logger, node="suite"):
global log_dir
filename = inspect.stack()[1][1][:-3]
@@ -197,15 +197,15 @@ class DTSLOG(BaseLoggerAdapter):
self.log_path = os.getcwd() + "/" + FOLDERS["Output"]
else:
self.log_path = (
- log_dir # log dir should contain tag/crb global value and mod in dts
+ log_dir # log dir should contain tag/node global value and mod in dts
)
self.dts_log = "dts.log"
self.logger = logger
self.logger.setLevel(logging.DEBUG)
- self.crb = crb
- super(DTSLOG, self).__init__(self.logger, dict(crb=self.crb))
+ self.node = node
+ super(DTSLOG, self).__init__(self.logger, dict(node=self.node))
self.fh = None
self.ch = None
@@ -289,7 +289,7 @@ class DTSLOG(BaseLoggerAdapter):
"""
self.fh.setLevel(lvl)
- def config_execution(self, crb):
+ def config_execution(self, node):
"""
Reconfigure stream&logfile level and reset info,debug,warn level.
"""
@@ -298,27 +298,27 @@ class DTSLOG(BaseLoggerAdapter):
ch = ColorHandler()
self.__log_handler(fh, ch)
- if crb.startswith("dut"):
- self.info_lvl = logging.DTS_DUT_CMD
- self.debug_lvl = logging.DTS_DUT_OUTPUT
- self.warn_lvl = logging.DTS_DUT_RESULT
- elif crb.startswith("tester"):
- self.info_lvl = logging.DTS_TESTER_CMD
- self.debug_lvl = logging.DTS_TESTER_OUTPUT
- self.warn_lvl = logging.DTS_TESTER_RESULT
- elif crb.startswith("pktgen"):
+ if node.startswith("sut"):
+ self.info_lvl = logging.DTS_SUT_CMD
+ self.debug_lvl = logging.DTS_SUT_OUTPUT
+ self.warn_lvl = logging.DTS_SUT_RESULT
+ elif node.startswith("tg"):
+ self.info_lvl = logging.DTS_TG_CMD
+ self.debug_lvl = logging.DTS_TG_OUTPUT
+ self.warn_lvl = logging.DTS_TG_RESULT
+ elif node.startswith("pktgen"):
self.info_lvl = logging.DTS_PKTGEN_CMD
self.debug_lvl = logging.DTS_PKTGEN_OUTPUT
- elif crb.startswith("virtdut"):
- self.info_lvl = logging.DTS_VIRTDUT_CMD
- self.debug_lvl = logging.DTS_VIRTDUT_OUTPUT
+ elif node.startswith("virtsut"):
+ self.info_lvl = logging.DTS_VIRTSUT_CMD
+ self.debug_lvl = logging.DTS_VIRTSUT_OUTPUT
else:
self.error_lvl = logging.ERROR
self.warn_lvl = logging.WARNING
self.info_lvl = logging.INFO
self.debug_lvl = logging.DEBUG
- def config_suite(self, suitename, crb=None):
+ def config_suite(self, suitename, node=None):
"""
Reconfigure stream&logfile level and reset info,debug level.
"""
@@ -332,18 +332,18 @@ class DTSLOG(BaseLoggerAdapter):
# then add handler
self.__log_handler(fh, ch)
- if crb == "dut":
- self.info_lvl = logging.SUITE_DUT_CMD
- self.debug_lvl = logging.SUITE_DUT_OUTPUT
- elif crb == "tester":
- self.info_lvl = logging.SUITE_TESTER_CMD
- self.debug_lvl = logging.SUITE_TESTER_OUTPUT
- elif crb == "pktgen":
+ if node == "sut":
+ self.info_lvl = logging.SUITE_SUT_CMD
+ self.debug_lvl = logging.SUITE_SUT_OUTPUT
+ elif node == "tg":
+ self.info_lvl = logging.SUITE_TG_CMD
+ self.debug_lvl = logging.SUITE_TG_OUTPUT
+ elif node == "pktgen":
self.info_lvl = logging.DTS_PKTGEN_CMD
self.debug_lvl = logging.DTS_PKTGEN_OUTPUT
- elif crb == "virtdut":
- self.info_lvl = logging.DTS_VIRTDUT_CMD
- self.debug_lvl = logging.DTS_VIRTDUT_OUTPUT
+ elif node == "virtsut":
+ self.info_lvl = logging.DTS_VIRTSUT_CMD
+ self.debug_lvl = logging.DTS_VIRTSUT_OUTPUT
def logger_exit(self):
"""
@@ -355,19 +355,19 @@ class DTSLOG(BaseLoggerAdapter):
self.logger.removeHandler(self.ch)
-def getLogger(name, crb="suite"):
+def getLogger(name, node="suite"):
"""
- Get logger handler and if there's no handler for specified CRB will create one.
+ Get logger handler and if there's no handler for specified Node will create one.
"""
global Loggers
# return saved logger
for logger in Loggers:
- if logger["name"] == name and logger["crb"] == crb:
+ if logger["name"] == name and logger["node"] == node:
return logger["logger"]
# return new logger
- logger = DTSLOG(logging.getLogger(name), crb)
- Loggers.append({"logger": logger, "name": name, "crb": crb})
+ logger = DTSLOG(logging.getLogger(name), node)
+ Loggers.append({"logger": logger, "name": name, "node": node})
return logger
@@ -455,7 +455,7 @@ class LogParser(object):
def parse_logfile(self):
loglist = []
- out_type = "DTS_DUT_OUTPUT"
+ out_type = "DTS_SUT_OUTPUT"
for line in self.log_handler:
tmp = {}
line = line.replace("\n", "")
@@ -12,23 +12,23 @@ from .utils import RED
class MultipleVM(object):
"""
- Module for handle VM related actions in parallel on multiple DUTs
+ Module for handle VM related actions in parallel on multiple SUTs
Supported actions: [start|command|migration]
Param max_vm: maximum number of threads
- Param duts: list of DUT objects
+ Param suts: list of SUT objects
"""
- def __init__(self, max_vm, duts):
+ def __init__(self, max_vm, suts):
self.max_vm = max_vm
- self.duts = duts
+ self.suts = suts
self.pool = threadpool.ThreadPool(max_vm)
- self.pool_result = [dict() for _ in duts]
+ self.pool_result = [dict() for _ in suts]
self._pool_requests = list()
self._pool_executors = dict()
self.logger = getLogger("multiple_vm")
self.logger.info(
- "Created MultipleVM instance with %d DUTs and %d VMs" % (len(duts), max_vm)
+ "Created MultipleVM instance with %d SUTs and %d VMs" % (len(suts), max_vm)
)
def parallel_vm_start(self, args):
@@ -37,7 +37,7 @@ class MultipleVM(object):
Args format:
{
'name': 'VM0',
- 'dut_id': 1,
+ 'sut_id': 1,
'autodetect_topo': False,
'virt_config': { 'suite_name': '',
'vm_name': '',
@@ -62,21 +62,21 @@ class MultipleVM(object):
return format:
{
'name': 'VM0',
- 'dut_id' : 1,
+ 'sut_id' : 1,
'vm_obj': vm_obj
}
"""
result = {}
vm_name = args["name"]
- dut_id = args["dut_id"]
+ sut_id = args["sut_id"]
if "autodetect_topo" in args:
autodetect_topo = args["autodetect_topo"]
else:
autodetect_topo = True
- self.logger.info("Parallel task start for DUT%d %s" % (dut_id, vm_name))
+ self.logger.info("Parallel task start for SUT%d %s" % (sut_id, vm_name))
threading.current_thread().name = vm_name
from .qemu_kvm import QEMUKvm
@@ -85,19 +85,19 @@ class MultipleVM(object):
if "virt_config" in args:
suite_name = args["virt_config"]["suite_name"]
vm_name = args["virt_config"]["vm_name"]
- vm_obj = QEMUKvm(self.duts[dut_id], vm_name, suite_name)
+ vm_obj = QEMUKvm(self.suts[sut_id], vm_name, suite_name)
if "virt_params" in args:
virt_params = args["virt_params"]
else:
virt_params = dict()
else:
# VM configured by parameters
- vm_obj = QEMUKvm(self.duts[dut_id], vm_name, "multi_vm")
+ vm_obj = QEMUKvm(self.suts[sut_id], vm_name, "multi_vm")
virt_params = args["virt_params"]
# just save config, should be list
vm_obj.set_local_config([virt_params])
- vm_dut = None
+ vm_sut = None
if vm_obj.check_alive():
self.logger.debug("Check VM[%s] is alive" % vm_name)
@@ -106,24 +106,24 @@ class MultipleVM(object):
if "migration" in virt_params:
self.logger.debug("Immigrated VM[%s] is ready" % vm_name)
else:
- vm_dut = vm_obj.instantiate_vm_dut(autodetect_topo=autodetect_topo)
- self.logger.debug("VM[%s] instantiate vm dut is done" % vm_name)
+ vm_sut = vm_obj.instantiate_vm_sut(autodetect_topo=autodetect_topo)
+ self.logger.debug("VM[%s] instantiate vm SUT is done" % vm_name)
else:
vm_obj.quick_start()
- self.duts[dut_id].logger.debug("VM[%s] quick start is done" % vm_name)
+ self.suts[sut_id].logger.debug("VM[%s] quick start is done" % vm_name)
if "migration" in virt_params:
self.logger.debug("Immigrated VM[%s] is ready" % vm_name)
else:
vm_obj._check_vm_status()
self.logger.debug("VM[%s] check status is done" % vm_name)
- vm_dut = vm_obj.instantiate_vm_dut(autodetect_topo=autodetect_topo)
- self.logger.debug("VM[%s] instantiate vm dut is done" % vm_name)
+ vm_sut = vm_obj.instantiate_vm_sut(autodetect_topo=autodetect_topo)
+ self.logger.debug("VM[%s] instantiate vm SUT is done" % vm_name)
result["name"] = vm_name
- result["dut_id"] = dut_id
+ result["sut_id"] = sut_id
result["vm_obj"] = vm_obj
- result["vm_dut"] = vm_dut
- self.logger.info("Parallel task DUT%d %s Done and returned" % (dut_id, vm_name))
+ result["vm_sut"] = vm_sut
+ self.logger.info("Parallel task SUT%d %s Done and returned" % (sut_id, vm_name))
return result
def parallel_vm_stop(self, args):
@@ -135,8 +135,8 @@ class MultipleVM(object):
Args format:
{
'name': 'vm1',
- 'vm_dut': self.vm_dut,
- 'dut_id': 0,
+ 'vm_sut': self.vm_sut,
+ 'sut_id': 0,
'commands': ['cd dpdk', 'make install T=x86_64-native-linuxapp-gcc'],
'expects': ['#', "#"],
'timeouts': [5, 120],
@@ -144,8 +144,8 @@ class MultipleVM(object):
"""
result = {}
vm_name = args["name"]
- vm_dut = args["vm_dut"]
- dut_id = args["dut_id"]
+ vm_sut = args["vm_sut"]
+ sut_id = args["sut_id"]
commands = args["commands"]
expects = args["expects"]
timeouts = args["timeouts"]
@@ -154,7 +154,7 @@ class MultipleVM(object):
if "delay" in args:
time.sleep(args["delay"])
- self.logger.debug("Parallel task start for DUT%d %s" % (dut_id, vm_name))
+ self.logger.debug("Parallel task start for SUT%d %s" % (sut_id, vm_name))
combinations = list(zip(commands, expects, timeouts))
for combine in combinations:
@@ -163,16 +163,16 @@ class MultipleVM(object):
add_time = int(self.max_vm * 0.5)
timeout += add_time
if len(expect) == 0:
- output = vm_dut.send_command(command, timeout)
+ output = vm_sut.send_command(command, timeout)
else:
- output = vm_dut.send_expect(command, expect, timeout)
+ output = vm_sut.send_expect(command, expect, timeout)
outputs.append(output)
result["name"] = vm_name
- result["dut_id"] = dut_id
+ result["sut_id"] = sut_id
result["outputs"] = outputs
self.logger.debug(
- "Parallel task for DUT%d %s has been done and returned" % (dut_id, vm_name)
+ "Parallel task for SUT%d %s has been done and returned" % (sut_id, vm_name)
)
return result
@@ -191,7 +191,7 @@ class MultipleVM(object):
result = {}
vm_name = args["name"]
vm_obj = args["vm_obj"]
- dut_id = args["dut_id"]
+ sut_id = args["sut_id"]
remote_ip = args["remote_ip"]
migrate_port = args["migrate_port"]
@@ -199,7 +199,7 @@ class MultipleVM(object):
vm_obj.wait_migration_done()
result["name"] = vm_name
- result["dut_id"] = dut_id
+ result["sut_id"] = sut_id
return result
@@ -207,8 +207,8 @@ class MultipleVM(object):
"""
Save result in local variable, will be used later
"""
- self.pool_result[result["dut_id"]][result["name"]] = result
- self.pool_result[result["dut_id"]][result["name"]]["status"] = 0
+ self.pool_result[result["sut_id"]][result["name"]] = result
+ self.pool_result[result["sut_id"]][result["name"]]["status"] = 0
def handle_vm_exception(self, request, exc_info):
"""
@@ -224,14 +224,14 @@ class MultipleVM(object):
# print traceback info for exception
name = request.args[0]["name"]
self.logger.error(
- ("**** Exception occurred DUT%d:%s" % (request.args[0]["dut_id"], name))
+ ("**** Exception occurred SUT%d:%s" % (request.args[0]["sut_id"], name))
)
exc_type, exc_value, exc_traceback = exc_info
self.logger.error(repr(traceback.format_tb(exc_traceback)))
- result = {"name": name, "dut_id": request.args[0]["dut_id"]}
- self.pool_result[result["dut_id"]][result["name"]] = result
- self.pool_result[result["dut_id"]][result["name"]]["status"] = DTS_ERR_TBL[
+ result = {"name": name, "sut_id": request.args[0]["sut_id"]}
+ self.pool_result[result["sut_id"]][result["name"]] = result
+ self.pool_result[result["sut_id"]][result["name"]]["status"] = DTS_ERR_TBL[
"PARALLEL_EXECUTE_ERR"
]
@@ -267,7 +267,7 @@ class MultipleVM(object):
# set parallel mode
save_global_setting(DTS_PARALLEL_SETTING, "yes")
- self.pool_result = [dict() for _ in self.duts]
+ self.pool_result = [dict() for _ in self.suts]
for req in self._pool_requests:
self.pool.putRequest(req)
similarity index 92%
rename from framework/crb.py
rename to framework/node.py
@@ -33,31 +33,31 @@ import os
import re
import time
-from .config import PORTCONF, PktgenConf, PortConf
+from .config import PORTCONF, PacketGeneratorConf, PortConf
from .logger import getLogger
from .settings import TIMEOUT
from .ssh_connection import SSHConnection
"""
-CRB (customer reference board) basic functions and handlers
+A node is a generic host that DTS connects to and manages.
"""
-class Crb(object):
+class Node(object):
"""
- Basic module for customer reference board. This module implement functions
- interact with CRB. With these function, we can get the information of
- CPU/PCI/NIC on the board and setup running environment for DPDK.
+ Basic module for node management. This module implements methods that
+ manage a node, such as information gathering (of CPU/PCI/NIC) and
+ environment setup.
"""
PCI_DEV_CACHE_KEY = None
NUMBER_CORES_CACHE_KEY = None
CORE_LIST_CACHE_KEY = None
- def __init__(self, crb, serializer, dut_id=0, name=None, alt_session=True):
- self.dut_id = dut_id
- self.crb = crb
+ def __init__(self, node, serializer, sut_id=0, name=None, alt_session=True):
+ self.sut_id = sut_id
+ self.node = node
self.read_cache = False
self.skip_setup = False
self.serializer = serializer
@@ -75,7 +75,7 @@ class Crb(object):
name,
self.get_username(),
self.get_password(),
- dut_id,
+ sut_id,
)
self.session.init_log(self.logger)
if alt_session:
@@ -84,7 +84,7 @@ class Crb(object):
name + "_alt",
self.get_username(),
self.get_password(),
- dut_id,
+ sut_id,
)
self.alt_session.init_log(self.logger)
else:
@@ -92,19 +92,19 @@ class Crb(object):
def get_ip_address(self):
"""
- Get CRB's ip address.
+ Get Node's ip address.
"""
raise NotImplementedError
def get_password(self):
"""
- Get CRB's login password.
+ Get Node's login password.
"""
raise NotImplementedError
def get_username(self):
"""
- Get CRB's login username.
+ Get Node's login username.
"""
raise NotImplementedError
@@ -118,7 +118,7 @@ class Crb(object):
trim_whitespace=True,
):
"""
- Send commands to crb and return string before expected string. If
+ Send commands to node and return string before expected string. If
there's no expected string found before timeout, TimeoutException will
be raised.
@@ -129,7 +129,7 @@ class Crb(object):
if trim_whitespace:
expected = expected.strip()
- # sometimes there will be no alt_session like VM dut
+ # sometimes there will be no alt_session like VM SUT
if alt_session and self.alt_session:
return self.alt_session.session.send_expect(cmds, expected, timeout, verify)
@@ -145,7 +145,7 @@ class Crb(object):
name,
self.get_username(),
self.get_password(),
- dut_id=self.dut_id,
+ sut_id=self.sut_id,
)
session.init_log(logger)
self.sessions.append(session)
@@ -196,7 +196,7 @@ class Crb(object):
def send_command(self, cmds, timeout=TIMEOUT, alt_session=False):
"""
- Send commands to crb and return string before timeout.
+ Send commands to node and return string before timeout.
"""
if alt_session and self.alt_session:
@@ -219,7 +219,7 @@ class Crb(object):
def get_total_huge_pages(self):
"""
- Get the huge page number of CRB.
+ Get the huge page number of Node.
"""
huge_pages = self.send_expect(
"awk '/HugePages_Total/ { print $2 }' /proc/meminfo", "# ", alt_session=True
@@ -230,7 +230,7 @@ class Crb(object):
def mount_huge_pages(self):
"""
- Mount hugepage file system on CRB.
+ Mount hugepage file system on Node.
"""
self.send_expect("umount `awk '/hugetlbfs/ { print $2 }' /proc/mounts`", "# ")
out = self.send_expect("awk '/hugetlbfs/ { print $2 }' /proc/mounts", "# ")
@@ -273,7 +273,7 @@ class Crb(object):
)
self.default_hugepages_cleared = True
- # some platform not support numa, example vm dut
+ # some platform not support numa, example VM SUT
try:
self.send_expect(
"echo %d > /sys/devices/system/node/%s/hugepages/hugepages-%skB/nr_hugepages"
@@ -327,7 +327,7 @@ class Crb(object):
def pci_devices_information(self):
"""
- Scan CRB pci device information and save it into cache file.
+ Scan Node pci device information and save it into cache file.
"""
if self.read_cache:
self.pci_devices_info = self.serializer.load(self.PCI_DEV_CACHE_KEY)
@@ -338,7 +338,7 @@ class Crb(object):
def pci_devices_information_uncached(self):
"""
- Scan CRB NIC's information on different OS.
+ Scan Node NIC's information on different OS.
"""
pci_devices_information_uncached = getattr(
self, "pci_devices_information_uncached_%s" % self.get_os_type()
@@ -356,29 +356,29 @@ class Crb(object):
self.pci_devices_info = []
obj_str = str(self)
- if "VirtDut" in obj_str:
+ if "VirtSut" in obj_str:
# there is no port.cfg in VM, so need to scan all pci in VM.
pass
else:
# only scan configured pcis
portconf = PortConf(PORTCONF)
- portconf.load_ports_config(self.crb["IP"])
+ portconf.load_ports_config(self.node["IP"])
configed_pcis = portconf.get_ports_config()
if configed_pcis:
- if "tester" in str(self):
- tester_pci_in_cfg = []
+ if "tg" in str(self):
+ tg_pci_in_cfg = []
for item in list(configed_pcis.values()):
for pci_info in match:
if item["peer"] == pci_info[0]:
- tester_pci_in_cfg.append(pci_info)
- match = tester_pci_in_cfg[:]
+ tg_pci_in_cfg.append(pci_info)
+ match = tg_pci_in_cfg[:]
else:
- dut_pci_in_cfg = []
+ sut_pci_in_cfg = []
for key in list(configed_pcis.keys()):
for pci_info in match:
if key == pci_info[0]:
- dut_pci_in_cfg.append(pci_info)
- match = dut_pci_in_cfg[:]
+ sut_pci_in_cfg.append(pci_info)
+ match = sut_pci_in_cfg[:]
# keep the original pci sequence
match = sorted(match)
else:
@@ -548,7 +548,7 @@ class Crb(object):
def create_file(self, contents, fileName):
"""
- Create file with contents and copy it to CRB.
+ Create file with contents and copy it to Node.
"""
with open(fileName, "w") as f:
f.write(contents)
@@ -556,16 +556,16 @@ class Crb(object):
def check_trex_process_existed(self):
"""
- if the tester and dut on same server
+ if the TG and SUT on same server
and pktgen is trex, do not kill the process
"""
if (
- "pktgen" in self.crb
- and (self.crb["pktgen"] is not None)
- and (self.crb["pktgen"].lower() == "trex")
+ "pktgen" in self.node
+ and (self.node["pktgen"] is not None)
+ and (self.node["pktgen"].lower() == "trex")
):
- if self.crb["IP"] == self.crb["tester IP"] and self.trex_prefix is None:
- conf_inst = PktgenConf("trex")
+ if self.node["IP"] == self.node["tg IP"] and self.trex_prefix is None:
+ conf_inst = PacketGeneratorConf("trex")
conf_info = conf_inst.load_pktgen_config()
if "config_file" in conf_info:
config_file = conf_info["config_file"]
@@ -581,7 +581,7 @@ class Crb(object):
def get_dpdk_pids(self, prefix_list, alt_session):
"""
- get all dpdk applications on CRB.
+ get all dpdk applications on Node.
"""
trex_prefix = self.check_trex_process_existed()
if trex_prefix is not None and trex_prefix in prefix_list:
@@ -641,19 +641,19 @@ class Crb(object):
def kill_all(self, alt_session=True):
"""
- Kill all dpdk applications on CRB.
+ Kill all dpdk applications on Node.
"""
- if "tester" in str(self):
- self.logger.info("kill_all: called by tester")
+ if "tg" in str(self):
+ self.logger.info("kill_all: called by tg")
pass
else:
if self.prefix_list:
- self.logger.info("kill_all: called by dut and prefix list has value.")
+ self.logger.info("kill_all: called by SUT and prefix list has value.")
self.get_dpdk_pids(self.prefix_list, alt_session)
# init prefix_list
self.prefix_list = []
else:
- self.logger.info("kill_all: called by dut and has no prefix list.")
+ self.logger.info("kill_all: called by SUT and has no prefix list.")
out = self.send_command(
"ls -l /var/run/dpdk |awk '/^d/ {print $NF}'",
timeout=0.5,
@@ -666,7 +666,7 @@ class Crb(object):
def close(self):
"""
- Close ssh session of CRB.
+ Close ssh session of Node.
"""
self.session.close()
self.alt_session.close()
@@ -675,10 +675,10 @@ class Crb(object):
"""
Get OS type from execution configuration file.
"""
- from .dut import Dut
+ from .sut_node import SutNode
- if isinstance(self, Dut) and "OS" in self.crb:
- return str(self.crb["OS"]).lower()
+ if isinstance(self, SutNode) and "OS" in self.node:
+ return str(self.node["OS"]).lower()
return "linux"
@@ -686,17 +686,17 @@ class Crb(object):
"""
Check real OS type whether match configured type.
"""
- from .dut import Dut
+ from .sut_node import SutNode
expected = "Linux.*#"
- if isinstance(self, Dut) and self.get_os_type() == "freebsd":
+ if isinstance(self, SutNode) and self.get_os_type() == "freebsd":
expected = "FreeBSD.*#"
self.send_expect("uname", expected, 2, alt_session=True)
def init_core_list(self):
"""
- Load or create core information of CRB.
+ Load or create core information of Node.
"""
if self.read_cache:
self.number_of_cores = self.serializer.load(self.NUMBER_CORES_CACHE_KEY)
@@ -709,7 +709,7 @@ class Crb(object):
def init_core_list_uncached(self):
"""
- Scan cores on CRB and create core information list.
+ Scan cores on Node and create core information list.
"""
init_core_list_uncached = getattr(
self, "init_core_list_uncached_%s" % self.get_os_type()
@@ -770,12 +770,12 @@ class Crb(object):
coremap[core] = core_id
core_id += 1
- if self.crb["bypass core0"] and core == "0" and socket == "0":
+ if self.node["bypass core0"] and core == "0" and socket == "0":
self.logger.info("Core0 bypassed")
continue
if (
- self.crb.get("dut arch") == "arm64"
- or self.crb.get("dut arch") == "ppc64"
+ self.node.get("sut arch") == "arm64"
+ or self.node.get("sut arch") == "ppc64"
):
self.cores.append(
{"thread": thread, "socket": node, "core": coremap[core]}
@@ -689,46 +689,46 @@ class Packet(object):
self.config_layer("raw", config={"payload": payload})
self.pktgen.append_pkts()
- def save_pcapfile(self, crb=None, filename="saved_pkts.pcap"):
+ def save_pcapfile(self, node=None, filename="saved_pkts.pcap"):
"""
- :param crb: session or crb object
+ :param node: session or node object
:param filename: location and name for packets to be saved
:return: None
"""
- # save pkts to pcap file to local path, then copy to remote tester tmp directory,
- if crb:
- trans_path = crb.tmp_file
+ # save pkts to pcap file to local path, then copy to remote TG tmp directory,
+ if node:
+ trans_path = node.tmp_file
file_name = filename
if os.path.isabs(filename): # check if the given filename with a abs path
file_dir = os.path.dirname(filename)
- out = crb.send_expect("ls -d %s" % file_dir, "# ", verify=True)
+ out = node.send_expect("ls -d %s" % file_dir, "# ", verify=True)
if not isinstance(out, str):
- raise Exception("%s may not existed on %s" % (file_dir, crb.name))
+ raise Exception("%s may not existed on %s" % (file_dir, node.name))
wrpcap(filename, self.pktgen.pkts)
trans_path = os.path.abspath(filename)
file_name = filename.split(os.path.sep)[-1]
# write packets to local tmp path $dts/ouput/tmp/pcap/
wrpcap(TMP_PATH + file_name, self.pktgen.pkts)
- # copy to remote tester tmp path /tmp/tester
- crb.session.copy_file_to(TMP_PATH + file_name, trans_path)
+ # copy to remote TG tmp path /tmp/tg
+ node.session.copy_file_to(TMP_PATH + file_name, trans_path)
else:
wrpcap(filename, self.pktgen.pkts)
- def read_pcapfile(self, filename, crb=None):
+ def read_pcapfile(self, filename, node=None):
"""
:param filename: packet to be read from
- :param crb: session or crb object
+ :param node: session or node object
:return: scapy type packet
"""
# read pcap file from local or remote, then append to pkts list
- # if crb, read pakcet from remote server, else read from local location
- if crb:
- out = crb.send_expect("ls -d %s" % filename, "# ", verify=True)
+ # if node, read pakcet from remote server, else read from local location
+ if node:
+ out = node.send_expect("ls -d %s" % filename, "# ", verify=True)
if not isinstance(out, str):
- raise Exception("%s may not existed on %s" % (filename, crb.name))
- crb.session.copy_file_from(filename, TMP_PATH)
+ raise Exception("%s may not existed on %s" % (filename, node.name))
+ node.session.copy_file_from(filename, TMP_PATH)
p = rdpcap(TMP_PATH + filename.split(os.path.sep)[-1])
else:
p = rdpcap(filename)
@@ -739,21 +739,21 @@ class Packet(object):
self.pktgen.pkts.append(i)
return p
- def send_pkt_bg_with_pcapfile(self, crb, tx_port="", count=1, loop=0, inter=0):
+ def send_pkt_bg_with_pcapfile(self, node, tx_port="", count=1, loop=0, inter=0):
"""
send packet background with a pcap file, got an advantage in sending a large number of packets
- :param crb: session or crb object
+ :param node: session or node object
:param tx_port: ether to send packet
:param count: send times
:param loop: send packet in a loop
:param inter: interval time per packet
:return: send session
"""
- if crb.name != "tester":
- raise Exception("crb should be tester")
+ if node.name != "tg":
+ raise Exception("node should be tg")
wrpcap("_", self.pktgen.pkts)
file_path = "/tmp/%s.pcap" % tx_port
- scapy_session_bg = crb.prepare_scapy_env()
+ scapy_session_bg = node.prepare_scapy_env()
scapy_session_bg.copy_file_to("_", file_path)
scapy_session_bg.send_expect('pkts = rdpcap("%s")' % file_path, ">>> ")
scapy_session_bg.send_command(
@@ -795,7 +795,7 @@ class Packet(object):
pkt_str_list.append(p_str)
return "[" + ",".join(pkt_str_list) + "]"
- def send_pkt(self, crb, tx_port="", count=1, interval=0, timeout=120):
+ def send_pkt(self, node, tx_port="", count=1, interval=0, timeout=120):
p_str = self.gernerator_pkt_str()
pkts_str = self._recompose_pkts_str(pkts_str=p_str)
cmd = (
@@ -803,17 +803,17 @@ class Packet(object):
+ pkts_str
+ f',iface="{tx_port}",count={count},inter={interval},verbose=False)'
)
- if crb.name == "tester":
- crb.scapy_session.send_expect(cmd, ">>> ", timeout=timeout)
- elif crb.name.startswith("tester_scapy"):
- crb.send_expect(cmd, ">>> ", timeout=timeout)
+ if node.name == "tg":
+ node.scapy_session.send_expect(cmd, ">>> ", timeout=timeout)
+ elif node.name.startswith("tg_scapy"):
+ node.send_expect(cmd, ">>> ", timeout=timeout)
else:
- raise Exception("crb should be tester's session and initialized")
+ raise Exception("node should be tg's session and initialized")
- def send_pkt_bg(self, crb, tx_port="", count=-1, interval=0, loop=1):
- if crb.name != "tester":
- raise Exception("crb should be tester")
- scapy_session_bg = crb.prepare_scapy_env()
+ def send_pkt_bg(self, node, tx_port="", count=-1, interval=0, loop=1):
+ if node.name != "tg":
+ raise Exception("node should be tg")
+ scapy_session_bg = node.prepare_scapy_env()
p_str = self.gernerator_pkt_str()
pkts_str = self._recompose_pkts_str(pkts_str=p_str)
cmd = (
@@ -1105,22 +1105,22 @@ def get_filter_cmd(filters=[]):
return ""
-def start_tcpdump(crb, intf, count=0, filters=None, lldp_forbid=True):
+def start_tcpdump(node, intf, count=0, filters=None, lldp_forbid=True):
"""
sniff all packets from certain port
"""
filters = [] if filters is None else filters
- out = crb.send_expect("ls -d %s" % crb.tmp_file, "# ", verify=True)
+ out = node.send_expect("ls -d %s" % node.tmp_file, "# ", verify=True)
if out == 2:
- crb.send_expect("mkdir -p %s" % crb.tmp_file, "# ")
- filename = "{}sniff_{}.pcap".format(crb.tmp_file, intf)
+ node.send_expect("mkdir -p %s" % node.tmp_file, "# ")
+ filename = "{}sniff_{}.pcap".format(node.tmp_file, intf)
# delete old pcap file
- crb.send_expect("rm -rf %s" % filename, "# ")
+ node.send_expect("rm -rf %s" % filename, "# ")
param = ""
direct_param = r"(\s+)\[ (\S+) in\|out\|inout \]"
- tcpdump_session = crb.create_session("tcpdump_session" + str(time.time()))
- setattr(tcpdump_session, "tmp_file", crb.tmp_file)
+ tcpdump_session = node.create_session("tcpdump_session" + str(time.time()))
+ setattr(tcpdump_session, "tmp_file", node.tmp_file)
tcpdump_help = tcpdump_session.send_command("tcpdump -h")
for line in tcpdump_help.split("\n"):
@@ -213,7 +213,7 @@ class PacketGeneratorHelper(object):
return stream_ids
-def getPacketGenerator(tester, pktgen_type=PKTGEN_IXIA):
+def getPacketGenerator(tg, pktgen_type=PKTGEN_IXIA):
"""
Get packet generator object
"""
@@ -228,7 +228,7 @@ def getPacketGenerator(tester, pktgen_type=PKTGEN_IXIA):
if pktgen_type in list(pktgen_cls.keys()):
CLS = pktgen_cls.get(pktgen_type)
- return CLS(tester)
+ return CLS(tg)
else:
msg = "not support <{0}> packet generator".format(pktgen_type)
raise Exception(msg)
@@ -36,7 +36,7 @@ from copy import deepcopy
from enum import Enum, unique
from pprint import pformat
-from .config import PktgenConf
+from .config import PacketGeneratorConf
from .logger import getLogger
# packet generator name
@@ -60,9 +60,9 @@ class PacketGenerator(object):
generators
"""
- def __init__(self, tester):
+ def __init__(self, tg):
self.logger = getLogger(PKTGEN)
- self.tester = tester
+ self.tg = tg
self.__streams = []
self._ports_map = []
self.pktgen_type = None
@@ -86,11 +86,11 @@ class PacketGenerator(object):
if not gen_pci:
msg = "can't get port {0} pci address".format(port_id)
raise Exception(msg)
- for port_idx, info in enumerate(self.tester.ports_info):
+ for port_idx, info in enumerate(self.tg.ports_info):
if "pci" not in info or info["pci"] == "N/A":
return -1
- tester_pci = info["pci"]
- if tester_pci == gen_pci:
+ tg_pci = info["pci"]
+ if tg_pci == gen_pci:
msg = "gen port {0} map test port {1}".format(port_id, port_idx)
self.logger.debug(msg)
return port_idx
@@ -101,21 +101,21 @@ class PacketGenerator(object):
return port
- def _get_gen_port(self, tester_pci):
+ def _get_gen_port(self, tg_pci):
raise NotImplementedError
- def _convert_tester_port(self, port_id):
+ def _convert_tg_port(self, port_id):
"""
:param port_id:
- index of a port in dts tester ports info
+ index of a port in dts TG ports info
"""
try:
- info = self.tester.ports_info[port_id]
+ info = self.tg.ports_info[port_id]
# limit to nic port, not including ixia port
if "pci" not in info or info["pci"] == "N/A":
return -1
- tester_pci = info["pci"]
- port = self._get_gen_port(tester_pci)
+ tg_pci = info["pci"]
+ port = self._get_gen_port(tg_pci)
msg = "test port {0} map gen port {1}".format(port_id, port)
self.logger.debug(msg)
except Exception as e:
@@ -124,8 +124,8 @@ class PacketGenerator(object):
return port
def add_stream(self, tx_port, rx_port, pcap_file):
- pktgen_tx_port = self._convert_tester_port(tx_port)
- pktgen_rx_port = self._convert_tester_port(rx_port)
+ pktgen_tx_port = self._convert_tg_port(tx_port)
+ pktgen_rx_port = self._convert_tg_port(rx_port)
stream_id = len(self.__streams)
stream = {
@@ -702,7 +702,7 @@ class PacketGenerator(object):
return self.__streams[stream_id]
def _get_generator_conf_instance(self):
- conf_inst = PktgenConf(self.pktgen_type)
+ conf_inst = PacketGeneratorConf(self.pktgen_type)
pktgen_inst_type = conf_inst.pktgen_conf.get_sections()
if len(pktgen_inst_type) < 1:
msg = (
@@ -54,13 +54,13 @@ class Ixia(SSHConnection):
IXIA performance measurement class.
"""
- def __init__(self, tester, ixiaPorts, logger):
- self.tester = tester
+ def __init__(self, tg, ixiaPorts, logger):
+ self.tg = tg
self.NAME = PKTGEN_IXIA
super(Ixia, self).__init__(
self.get_ip_address(),
self.NAME,
- self.tester.get_username(),
+ self.tg.get_username(),
self.get_password(),
)
self.logger = logger
@@ -108,10 +108,10 @@ class Ixia(SSHConnection):
return self.send_expect("stat getLineSpeed %s" % ixia_port, "%")
def get_ip_address(self):
- return self.tester.get_ip_address()
+ return self.tg.get_ip_address()
def get_password(self):
- return self.tester.get_password()
+ return self.tg.get_password()
def add_tcl_cmd(self, cmd):
"""
@@ -948,7 +948,7 @@ class Ixia(SSHConnection):
Run commands in command list.
"""
fileContent = "\n".join(self.tcl_cmds) + "\n"
- self.tester.create_file(fileContent, "ixiaConfig.tcl")
+ self.tg.create_file(fileContent, "ixiaConfig.tcl")
self.send_expect("source ixiaConfig.tcl", "% ", 75)
def configure_transmission(self, option=None):
@@ -1114,16 +1114,16 @@ class Ixia(SSHConnection):
"configStream %s %s %s %s" % (stream, rate, prio, types), "% ", 100
)
- def get_connection_relation(self, dutPorts):
+ def get_connection_relation(self, sutPorts):
"""
- Get the connect relations between DUT and Ixia.
+ Get the connect relations between SUT and Ixia.
"""
- for port in dutPorts:
- info = self.tester.get_pci(self.tester.get_local_port(port)).split(".")
+ for port in sutPorts:
+ info = self.tg.get_pci(self.tg.get_local_port(port)).split(".")
self.conRelation[port] = [
int(info[0]),
int(info[1]),
- repr(self.tester.dut.get_mac_address(port).replace(":", " ").upper()),
+ repr(self.tg.sut.get_mac_address(port).replace(":", " ").upper()),
]
return self.conRelation
@@ -1478,8 +1478,8 @@ class IxiaPacketGenerator(PacketGenerator):
Ixia packet generator
"""
- def __init__(self, tester):
- super(IxiaPacketGenerator, self).__init__(tester)
+ def __init__(self, tg):
+ super(IxiaPacketGenerator, self).__init__(tg)
# ixia management
self.pktgen_type = PKTGEN_IXIA
self._conn = None
@@ -1510,7 +1510,7 @@ class IxiaPacketGenerator(PacketGenerator):
"count",
]
- self.tester = tester
+ self.tg = tg
def get_ports(self):
"""only used for ixia packet generator"""
@@ -1519,14 +1519,14 @@ class IxiaPacketGenerator(PacketGenerator):
def _prepare_generator(self):
"""start ixia server"""
try:
- self._connect(self.tester, self.conf)
+ self._connect(self.tg, self.conf)
except Exception as e:
msg = "failed to connect to ixia server"
raise Exception(msg)
- def _connect(self, tester, conf):
+ def _connect(self, tg, conf):
# initialize ixia class
- self._conn = Ixia(tester, conf, self.logger)
+ self._conn = Ixia(tg, conf, self.logger)
for p in self._conn.get_ports():
self._ports.append(p)
@@ -41,8 +41,8 @@ class IxNetworkPacketGenerator(PacketGenerator):
ixNetwork packet generator
"""
- def __init__(self, tester):
- super(IxNetworkPacketGenerator, self).__init__(tester)
+ def __init__(self, tg):
+ super(IxNetworkPacketGenerator, self).__init__(tg)
self.pktgen_type = PKTGEN_IXIA_NETWORK
self._conn = None
# ixNetwork configuration information of dts
@@ -430,8 +430,8 @@ class TrexPacketGenerator(PacketGenerator):
https://trex-tgn.cisco.com/trex/doc/trex_manual.html
"""
- def __init__(self, tester):
- super(TrexPacketGenerator, self).__init__(tester)
+ def __init__(self, tg):
+ super(TrexPacketGenerator, self).__init__(tg)
self.pktgen_type = PKTGEN_TREX
self.trex_app = "t-rex-64"
self._conn = None
@@ -633,7 +633,7 @@ class TrexPacketGenerator(PacketGenerator):
app_param_temp = app_param_temp + " --cfg " + self.conf[key]
elif key == "core_num":
app_param_temp = app_param_temp + " -c " + self.conf[key]
- self.control_session = self.tester.create_session(PKTGEN)
+ self.control_session = self.tg.create_session(PKTGEN)
self.control_session.send_expect(
";".join(
[
@@ -902,7 +902,7 @@ class TrexPacketGenerator(PacketGenerator):
if self._conn is not None:
self._disconnect()
if self.control_session is not None:
- self.tester.alt_session.send_expect("pkill -f _t-rex-64", "# ")
+ self.tg.alt_session.send_expect("pkill -f _t-rex-64", "# ")
time.sleep(5)
- self.tester.destroy_session(self.control_session)
+ self.tg.destroy_session(self.control_session)
self.control_session = None
@@ -78,13 +78,13 @@ class Plotting(object):
default_line_styles = ["--"]
- def __init__(self, crb, target, nic):
+ def __init__(self, node, target, nic):
# Ensure the folder exist
try:
path = "/".join(
- [Plotting.path_2_result, crb, target, nic, Plotting.plots_subfolder]
+ [Plotting.path_2_result, node, target, nic, Plotting.plots_subfolder]
)
if not os.path.exists(path):
@@ -95,7 +95,7 @@ class Plotting(object):
except Exception as e:
raise VerifyFailure("Plot Error: " + str(e))
- def clear_all_plots(self, crb, target):
+ def clear_all_plots(self, node, target):
shutil.rmtree(self.plots_path, True)
def create_bars_plot(
@@ -43,12 +43,12 @@ class PmdOutput:
Module for get all statics value by port in testpmd
"""
- def __init__(self, dut, session=None):
- self.dut = dut
+ def __init__(self, sut, session=None):
+ self.sut = sut
if session is None:
- session = dut
+ session = sut
self.session = session
- self.dut.testpmd = self
+ self.sut.testpmd = self
self.rx_pkts_prefix = "RX-packets:"
self.rx_missed_prefix = "RX-missed:"
self.rx_bytes_prefix = "RX-bytes:"
@@ -75,9 +75,9 @@ class PmdOutput:
"""
set default cores for start testpmd
"""
- core_number = len(self.dut.cores)
+ core_number = len(self.sut.cores)
if core_number < 2:
- raise ValueError(f"Not enough cores on DUT {self.dut}")
+ raise ValueError(f"Not enough cores on SUT {self.sut}")
else:
self.default_cores = "1S/2C/1T"
@@ -160,17 +160,17 @@ class PmdOutput:
)
):
config["ports"] = [
- self.dut.ports_info[i]["pci"] for i in range(len(self.dut.ports_info))
+ self.sut.ports_info[i]["pci"] for i in range(len(self.sut.ports_info))
]
- all_eal_param = self.dut.create_eal_parameters(
+ all_eal_param = self.sut.create_eal_parameters(
fixed_prefix=fixed_prefix, socket=socket, **config
)
- app_name = self.dut.apps_name["test-pmd"]
+ app_name = self.sut.apps_name["test-pmd"]
command = app_name + " %s -- -i %s" % (all_eal_param, param)
command = command.replace(" ", " ")
- if self.session != self.dut:
- self.session.send_expect("cd %s" % self.dut.base_dir, "# ")
+ if self.session != self.sut:
+ self.session.send_expect("cd %s" % self.sut.base_dir, "# ")
out = self.session.send_expect(command, expected, timeout)
self.command = command
# wait 10s to ensure links getting up before test start.
@@ -180,7 +180,7 @@ class PmdOutput:
def execute_cmd(
self, pmd_cmd, expected="testpmd> ", timeout=TIMEOUT, alt_session=False
):
- if "dut" in str(self.session):
+ if "sut" in str(self.session):
return self.session.send_expect(
"%s" % pmd_cmd, expected, timeout=timeout, alt_session=alt_session
)
@@ -188,7 +188,7 @@ class PmdOutput:
return self.session.send_expect("%s" % pmd_cmd, expected, timeout=timeout)
def get_output(self, timeout=1):
- if "dut" in str(self.session):
+ if "sut" in str(self.session):
return self.session.get_session_output(timeout=timeout)
else:
return self.session.get_session_before(timeout=timeout)
@@ -32,9 +32,8 @@
import os
import re
-from .crb import Crb
-from .dut import Dut
from .logger import getLogger
+from .node import Node
from .settings import (
CONFIG_ROOT_PATH,
DPDK_RXMODE_SETTING,
@@ -49,26 +48,27 @@ from .settings import (
save_global_setting,
)
from .ssh_connection import SSHConnection
-from .tester import Tester
+from .sut_node import SutNode
+from .tg_node import TrafficGeneratorNode
from .utils import RED
-class DPDKdut(Dut):
+class DpdkSut(SutNode):
"""
- DPDK project class for DUT. DTS will call set_target function to setup
+ DPDK project class for SUT. DTS will call set_target function to setup
build, memory and kernel module.
"""
- def __init__(self, crb, serializer, dut_id=0, name=None, alt_session=True):
- super(DPDKdut, self).__init__(crb, serializer, dut_id, name, alt_session)
+ def __init__(self, node, serializer, sut_id=0, name=None, alt_session=True):
+ super(DpdkSut, self).__init__(node, serializer, sut_id, name, alt_session)
self.testpmd = None
def set_target(self, target, bind_dev=True):
"""
Set env variable, these have to be setup all the time. Some tests
need to compile example apps by themselves and will fail otherwise.
- Set hugepage on DUT and install modules required by DPDK.
+ Set hugepage on SUT and install modules required by DPDK.
Configure default ixgbe PMD function.
"""
self.target = target
@@ -81,7 +81,7 @@ class DPDKdut(Dut):
self.set_rxtx_mode()
self.apps_name = self.apps_name_conf["meson"]
- # use the dut target directory instead of 'target' string in app name
+ # use the SUT target directory instead of 'target' string in app name
for app in self.apps_name:
cur_app_path = self.apps_name[app].replace("target", self.target)
self.apps_name[app] = cur_app_path + " "
@@ -107,7 +107,7 @@ class DPDKdut(Dut):
def setup_modules(self, target, drivername, drivermode):
"""
- Install DPDK required kernel module on DUT.
+ Install DPDK required kernel module on SUT.
"""
setup_modules = getattr(self, "setup_modules_%s" % self.get_os_type())
setup_modules(target, drivername, drivermode)
@@ -151,7 +151,7 @@ class DPDKdut(Dut):
def setup_modules_freebsd(self, target, drivername, drivermode):
"""
- Install DPDK required Freebsd kernel module on DUT.
+ Install DPDK required Freebsd kernel module on SUT.
"""
binding_list = ""
@@ -167,14 +167,14 @@ class DPDKdut(Dut):
def restore_modules(self):
"""
- Restore DPDK kernel module on DUT.
+ Restore DPDK kernel module on SUT.
"""
restore_modules = getattr(self, "restore_modules_%s" % self.get_os_type())
restore_modules()
def restore_modules_linux(self):
"""
- Restore DPDK Linux kernel module on DUT.
+ Restore DPDK Linux kernel module on SUT.
"""
drivername = load_global_setting(HOST_DRIVER_SETTING)
if drivername == "vfio-pci":
@@ -188,7 +188,7 @@ class DPDKdut(Dut):
def restore_modules_freebsd(self):
"""
- Restore DPDK Freebsd kernel module on DUT.
+ Restore DPDK Freebsd kernel module on SUT.
"""
pass
@@ -204,7 +204,7 @@ class DPDKdut(Dut):
out = self.send_expect("lscpu | grep avx512", "#")
if "avx512f" not in out or "no-avx512f" in out:
self.logger.warning(
- RED("*********The DUT CPU do not support AVX512 test!!!********")
+ RED("*********The SUT CPU do not support AVX512 test!!!********")
)
self.logger.warning(
RED("*********Now set the rx_mode to default!!!**********")
@@ -326,16 +326,16 @@ class DPDKdut(Dut):
def prepare_package(self):
if not self.skip_setup:
session_info = None
- # if snapshot_load_side=dut, will copy the dpdk tar from dut side
- # and will judge whether the path of tar is existed on dut
- if self.crb["snapshot_load_side"] == "dut":
+ # if snapshot_load_side=sut, will copy the dpdk tar from SUT side
+ # and will judge whether the path of tar is existed on SUT
+ if self.node["snapshot_load_side"] == "sut":
if not os.path.isabs(self.package):
raise ValueError(
- "As snapshot_load_side=dut, will copy dpdk.tar "
- "from dut, please specify a abs path use params "
+ "As snapshot_load_side=sut, will copy dpdk.tar "
+ "from SUT, please specify a abs path use params "
"--snapshot when run dts"
)
- # if ':' in session, this is vm dut, use the dut session
+ # if ':' in session, this is vm SUT, use the SUT session
if ":" in self.session.name:
session_info = self.host_session
else:
@@ -361,14 +361,14 @@ class DPDKdut(Dut):
"Directory %s or %s does not exist,"
"please check params -d" % (p_dir, dst_dir)
)
- self.session.copy_file_to(self.package, dst_dir, crb_session=session_info)
+ self.session.copy_file_to(self.package, dst_dir, node_session=session_info)
# put patches to p_dir/patches/
if self.patches is not None:
for p in self.patches:
self.session.copy_file_to("dep/" + p, dst_dir)
- # copy QMP file to dut
+ # copy QMP file to SUT
if ":" not in self.session.name:
out = self.send_expect("ls -d ~/QMP", "# ", verify=True)
if isinstance(out, int):
@@ -412,10 +412,10 @@ class DPDKdut(Dut):
def prerequisites(self):
"""
- Copy DPDK package to DUT and apply patch files.
+ Copy DPDK package to SUT and apply patch files.
"""
self.prepare_package()
- self.dut_prerequisites()
+ self.sut_prerequisites()
self.stage = "post-init"
def extra_nic_setup(self):
@@ -546,12 +546,12 @@ class DPDKdut(Dut):
Get block list command string on Linux.
"""
blocklist = ""
- dutPorts = self.get_ports(nic)
+ sutPorts = self.get_ports(nic)
self.restore_interfaces()
self.send_expect("insmod ./%s/kmod/igb_uio.ko" % target, "# ")
self.bind_interfaces_linux()
for port in range(0, len(self.ports_info)):
- if port not in dutPorts:
+ if port not in sutPorts:
blocklist += "-b %s " % self.ports_info[port]["pci"]
return blocklist
@@ -564,20 +564,20 @@ class DPDKdut(Dut):
return blocklist
-class DPDKtester(Tester):
+class DpdkTrafficGenerator(TrafficGeneratorNode):
"""
- DPDK project class for tester. DTS will call prerequisites function to setup
- interface and generate port map.
+ DPDK project class for traffic generator. DTS will call prerequisites
+ function to setup interfaces and generate port map.
"""
- def __init__(self, crb, serializer, dut_id):
- self.NAME = "tester"
- super(DPDKtester, self).__init__(crb, serializer)
+ def __init__(self, node, serializer, sut_id):
+ self.NAME = "tg"
+ super(DpdkTrafficGenerator, self).__init__(node, serializer)
def prerequisites(self, perf_test=False):
"""
- Setup hugepage on tester and copy validation required files to tester.
+ Setup hugepage on TG and copy validation required files to TG.
"""
self.kill_all()
@@ -604,7 +604,7 @@ class DPDKtester(Tester):
self.send_expect("modprobe uio", "# ")
- self.tester_prerequisites()
+ self.tg_prerequisites()
self.set_promisc()
@@ -612,7 +612,7 @@ class DPDKtester(Tester):
def setup_memory(self, hugepages=-1):
"""
- Setup hugepage on tester.
+ Setup hugepage on TG.
"""
hugepages_size = self.send_expect(
"awk '/Hugepagesize/ {print $2}' /proc/meminfo", "# "
@@ -79,7 +79,7 @@ def handle_control_session(func):
)
)
print(RED(e))
- self.close_control_session(dut_id=self.host_dut.dut_id)
+ self.close_control_session(sut_id=self.host_sut.sut_id)
return "Failed"
return _handle_control_session
@@ -117,8 +117,8 @@ class QEMUKvm(VirtBase):
# Default password prompt
PASSWORD_PROMPT = "Password:"
- def __init__(self, dut, vm_name, suite_name):
- super(QEMUKvm, self).__init__(dut, vm_name, suite_name)
+ def __init__(self, sut, vm_name, suite_name):
+ super(QEMUKvm, self).__init__(sut, vm_name, suite_name)
# initialize qemu emulator, example: qemu-system-x86_64
self.qemu_emulator = self.get_qemu_emulator()
@@ -140,8 +140,8 @@ class QEMUKvm(VirtBase):
self.pci_maps = []
# default login user,password
- self.username = dut.crb["user"]
- self.password = dut.crb["pass"]
+ self.username = sut.node["user"]
+ self.password = sut.node["pass"]
# internal variable to track whether default nic has been added
self.__default_nic = False
@@ -227,7 +227,7 @@ class QEMUKvm(VirtBase):
def get_qemu_emulator(self):
"""
- Get the qemu emulator based on the crb.
+ Get the qemu emulator based on the node.
"""
arch = self.host_session.send_expect("uname -m", "# ")
return "qemu-system-" + arch
@@ -239,8 +239,8 @@ class QEMUKvm(VirtBase):
out = self.host_session.send_expect("ls %s" % qemu_emulator_path, "# ")
if "No such file or directory" in out:
self.host_logger.error(
- "No emulator [ %s ] on the DUT [ %s ]"
- % (qemu_emulator_path, self.host_dut.get_ip_address())
+ "No emulator [ %s ] on the SUT [ %s ]"
+ % (qemu_emulator_path, self.host_sut.get_ip_address())
)
return None
out = self.host_session.send_expect(
@@ -248,8 +248,8 @@ class QEMUKvm(VirtBase):
)
if out != "0":
self.host_logger.error(
- "Emulator [ %s ] not executable on the DUT [ %s ]"
- % (qemu_emulator_path, self.host_dut.get_ip_address())
+ "Emulator [ %s ] not executable on the SUT [ %s ]"
+ % (qemu_emulator_path, self.host_sut.get_ip_address())
)
return None
self.qemu_emulator = qemu_emulator_path
@@ -423,7 +423,7 @@ class QEMUKvm(VirtBase):
mem_boot_huge = (
"-object memory-backend-file,"
+ "id=mem,size=%sM,mem-path=%s,share=on"
- % (options["size"], self.host_dut.hugepage_path)
+ % (options["size"], self.host_sut.hugepage_path)
)
self.__add_boot_line(mem_boot_huge)
@@ -623,7 +623,7 @@ class QEMUKvm(VirtBase):
# get the host addr
host_addr = field(opt_hostfwd, 1)
if not host_addr:
- addr = str(self.host_dut.get_ip_address())
+ addr = str(self.host_sut.get_ip_address())
host_addr = get_host_ip(addr)
# get the host port in the option
@@ -718,7 +718,7 @@ class QEMUKvm(VirtBase):
qemu_ifup = self.QEMU_IFUP % {"switch": switch}
file_name = os.path.basename(self.QEMU_IFUP_PATH)
tmp_file_path = "/tmp/%s" % file_name
- self.host_dut.create_file(qemu_ifup, tmp_file_path)
+ self.host_sut.create_file(qemu_ifup, tmp_file_path)
self.host_session.send_expect(
"mv -f ~/%s %s" % (file_name, self.QEMU_IFUP_PATH), "# "
)
@@ -1063,7 +1063,7 @@ class QEMUKvm(VirtBase):
if len(out) == 0:
raise StartVMFailedException(
"Can't get output from [%s:%s]"
- % (self.host_dut.crb["My IP"], self.vm_name)
+ % (self.host_sut.node["My IP"], self.vm_name)
)
m = re.match(shell_reg, out)
@@ -1103,10 +1103,10 @@ class QEMUKvm(VirtBase):
print(
RED(
"[%s:%s] exception [%s] happened"
- % (self.host_dut.crb["My IP"], self.vm_name, str(e))
+ % (self.host_sut.node["My IP"], self.vm_name, str(e))
)
)
- self.close_control_session(dut_id=self.host_dut.dut_id)
+ self.close_control_session(sut_id=self.host_sut.sut_id)
return False
def connect_telnet_port(self, name=""):
@@ -1165,7 +1165,7 @@ class QEMUKvm(VirtBase):
print(
RED(
"[%s:%s] not ready for login"
- % (self.host_dut.crb["My IP"], self.vm_name)
+ % (self.host_sut.node["My IP"], self.vm_name)
)
)
return False
@@ -1182,10 +1182,10 @@ class QEMUKvm(VirtBase):
print(
RED(
"[%s:%s] exception [%s] happened"
- % (self.host_dut.crb["My IP"], self.vm_name, str(e))
+ % (self.host_sut.node["My IP"], self.vm_name, str(e))
)
)
- self.close_control_session(dut_id=self.host_dut.dut_id)
+ self.close_control_session(sut_id=self.host_sut.sut_id)
return False
def connect_qga_port(self, name=""):
@@ -1209,10 +1209,10 @@ class QEMUKvm(VirtBase):
# when exception happened, force close qga process and reconnect
print(
RED(
- "[%s:%s] QGA not ready" % (self.host_dut.crb["My IP"], self.vm_name)
+ "[%s:%s] QGA not ready" % (self.host_sut.node["My IP"], self.vm_name)
)
)
- self.close_control_session(dut_id=self.host_dut.dut_id)
+ self.close_control_session(sut_id=self.host_sut.sut_id)
return False
def add_vm_vnc(self, **options):
@@ -1401,7 +1401,7 @@ class QEMUKvm(VirtBase):
qemu_boot_line = self.generate_qemu_boot_line()
- self.__send_qemu_cmd(qemu_boot_line, dut_id=self.host_dut.dut_id)
+ self.__send_qemu_cmd(qemu_boot_line, sut_id=self.host_sut.sut_id)
self.__get_pci_mapping()
@@ -1420,7 +1420,7 @@ class QEMUKvm(VirtBase):
# Start VM using the qemu command
# lock critical action like start qemu
@parallel_lock(num=4)
- def __send_qemu_cmd(self, qemu_boot_line, dut_id):
+ def __send_qemu_cmd(self, qemu_boot_line, sut_id):
# add more time for qemu start will be slow when system is busy
ret = self.host_session.send_expect(
qemu_boot_line, "# ", verify=True, timeout=30
@@ -1439,7 +1439,7 @@ class QEMUKvm(VirtBase):
qemu_boot_line = self.generate_qemu_boot_line()
- self.__send_qemu_cmd(qemu_boot_line, dut_id=self.host_dut.dut_id)
+ self.__send_qemu_cmd(qemu_boot_line, sut_id=self.host_sut.sut_id)
self.__get_pci_mapping()
@@ -1465,7 +1465,7 @@ class QEMUKvm(VirtBase):
self.host_logger.warning(
"Can't login [%s] on [%s], retry %d times!!!"
- % (self.vm_name, self.host_dut.crb["My IP"], try_times + 1)
+ % (self.vm_name, self.host_sut.node["My IP"], try_times + 1)
)
time.sleep(self.OPERATION_TIMEOUT)
try_times += 1
@@ -1478,7 +1478,7 @@ class QEMUKvm(VirtBase):
if not logged_in:
if not self.restarted:
# make sure serial session has been quit
- self.close_control_session(dut_id=self.host_dut.dut_id)
+ self.close_control_session(sut_id=self.host_sut.sut_id)
self.vm_status = ST_NOTSTART
self._stop_vm()
self.restarted = True
@@ -1595,7 +1595,7 @@ class QEMUKvm(VirtBase):
self.host_logger.warning(
"[%s] on [%s] network not ready, retry %d times!!!"
- % (self.vm_name, self.host_dut.crb["My IP"], try_times + 1)
+ % (self.vm_name, self.host_sut.node["My IP"], try_times + 1)
)
time.sleep(self.OPERATION_TIMEOUT)
try_times += 1
@@ -1667,7 +1667,7 @@ class QEMUKvm(VirtBase):
"""
Check if the specified PCI dev is a VF.
"""
- for port_info in self.host_dut.ports_info:
+ for port_info in self.host_sut.ports_info:
if "sriov_vfs_pci" in list(port_info.keys()):
if dev_pci in port_info["sriov_vfs_pci"]:
return True
@@ -1677,7 +1677,7 @@ class QEMUKvm(VirtBase):
"""
Map the specified VF to PF.
"""
- for port_info in self.host_dut.ports_info:
+ for port_info in self.host_sut.ports_info:
if "sriov_vfs_pci" in list(port_info.keys()):
if dev_pci in port_info["sriov_vfs_pci"]:
return port_info["pci"]
@@ -1687,7 +1687,7 @@ class QEMUKvm(VirtBase):
"""
Get the NetDevice instance of specified VF.
"""
- for port_info in self.host_dut.ports_info:
+ for port_info in self.host_sut.ports_info:
if "vfs_port" in list(port_info.keys()):
for port in port_info["vfs_port"]:
if dev_pci == port.pci:
@@ -1710,7 +1710,7 @@ class QEMUKvm(VirtBase):
"""
Get NetDevice instance by the specified PCI bus number.
"""
- port_info = self.host_dut.get_port_info(net_device_pci)
+ port_info = self.host_sut.get_port_info(net_device_pci)
return port_info["port"]
def get_vm_ip(self):
@@ -1771,7 +1771,7 @@ class QEMUKvm(VirtBase):
if not self.monitor_sock_path:
self.host_logger.info(
"No monitor between on host [ %s ] for guest [ %s ]"
- % (self.host_dut.NAME, self.vm_name)
+ % (self.host_sut.NAME, self.vm_name)
)
return None
@@ -1807,8 +1807,8 @@ class QEMUKvm(VirtBase):
info = self.host_session.send_expect("cat %s" % self.__pid_file, "# ")
try:
pid = int(info.split()[0])
- # save pid into dut structure
- self.host_dut.virt_pids.append(pid)
+ # save pid into SUT structure
+ self.host_sut.virt_pids.append(pid)
except:
self.host_logger.info("Failed to capture pid!!!")
@@ -1817,7 +1817,7 @@ class QEMUKvm(VirtBase):
try:
# sometimes saw to lines in pid file
pid = int(info.splitlines()[0])
- # save pid into dut structure
+ # save pid into SUT structure
self.pid = pid
return True
except:
@@ -1891,9 +1891,9 @@ class QEMUKvm(VirtBase):
self.control_session = None
@parallel_lock()
- def close_control_session(self, dut_id):
+ def close_control_session(self, sut_id):
"""
- Force kill serial connection from DUT when exception happened
+ Force kill serial connection from SUT when exception happened
"""
# return control_session to host_session
if self.control_type == "socket":
@@ -1901,20 +1901,20 @@ class QEMUKvm(VirtBase):
"ps -e -o pid,cmd |grep 'socat %s STDIO' |grep -v grep"
% self.serial_path
)
- out = self.host_dut.send_expect(scan_cmd, "#")
+ out = self.host_sut.send_expect(scan_cmd, "#")
proc_info = out.strip().split()
try:
pid = int(proc_info[0])
- self.host_dut.send_expect("kill %d" % pid, "#")
+ self.host_sut.send_expect("kill %d" % pid, "#")
except:
pass
- self.host_dut.send_expect("", "# ")
+ self.host_sut.send_expect("", "# ")
elif self.control_type == "telnet":
scan_cmd = "lsof -i:%d | grep telnet | awk '{print $2}'" % self.serial_port
- proc_info = self.host_dut.send_expect(scan_cmd, "#")
+ proc_info = self.host_sut.send_expect(scan_cmd, "#")
try:
pid = int(proc_info)
- self.host_dut.send_expect("kill %d" % pid, "#")
+ self.host_sut.send_expect("kill %d" % pid, "#")
except:
pass
elif self.control_type == "qga":
@@ -1922,11 +1922,11 @@ class QEMUKvm(VirtBase):
"ps -e -o pid,cmd |grep 'address=%s' |grep -v grep"
% self.qga_socket_path
)
- out = self.host_dut.send_expect(scan_cmd, "#")
+ out = self.host_sut.send_expect(scan_cmd, "#")
proc_info = out.strip().split()
try:
pid = int(proc_info[0])
- self.host_dut.send_expect("kill %d" % pid, "#")
+ self.host_sut.send_expect("kill %d" % pid, "#")
except:
pass
@@ -39,10 +39,10 @@ from xml.etree.ElementTree import ElementTree
import framework.utils as utils
from .config import VIRTCONF, VirtConf
-from .dut import Dut
from .exception import StartVMFailedException
from .logger import getLogger
from .ssh_connection import SSHConnection
+from .sut_node import SutNode
from .virt_base import VirtBase
from .virt_resource import VirtResource
@@ -66,14 +66,14 @@ class LibvirtKvm(VirtBase):
)
QEMU_IFUP_PATH = "/etc/qemu-ifup"
- def __init__(self, dut, name, suite):
+ def __init__(self, sut, name, suite):
# initialize virtualization base module
- super(LibvirtKvm, self).__init__(dut, name, suite)
+ super(LibvirtKvm, self).__init__(sut, name, suite)
# initialize qemu emulator, example: qemu-system-x86_64
self.qemu_emulator = self.get_qemu_emulator()
- self.logger = dut.logger
+ self.logger = sut.logger
# disk and pci device default index
self.diskindex = "a"
self.controllerindex = 0
@@ -93,8 +93,8 @@ class LibvirtKvm(VirtBase):
self.pci_maps = []
# default login user,password
- self.username = self.host_dut.crb["user"]
- self.password = self.host_dut.crb["pass"]
+ self.username = self.host_sut.node["user"]
+ self.password = self.host_sut.node["pass"]
# internal variable to track whether default nic has been added
self.__default_nic = False
@@ -106,7 +106,7 @@ class LibvirtKvm(VirtBase):
def get_qemu_emulator(self):
"""
- Get the qemu emulator based on the crb.
+ Get the qemu emulator based on the node.
"""
arch = self.host_session.send_expect("uname -m", "# ")
return "/usr/bin/qemu-system-" + arch
@@ -298,7 +298,7 @@ class LibvirtKvm(VirtBase):
out = self.host_session.send_expect("ls %s" % qemu_emulator_path, "# ")
if "No such file or directory" in out:
self.host_logger.error(
- "No emulator [ %s ] on the DUT" % (qemu_emulator_path)
+ "No emulator [ %s ] on the SUT" % (qemu_emulator_path)
)
return None
out = self.host_session.send_expect(
@@ -306,7 +306,7 @@ class LibvirtKvm(VirtBase):
)
if out != "0":
self.host_logger.error(
- "Emulator [ %s ] " % qemu_emulator_path + "not executable on the DUT"
+ "Emulator [ %s ] " % qemu_emulator_path + "not executable on the SUT"
)
return None
self.qemu_emulator = qemu_emulator_path
@@ -394,7 +394,7 @@ class LibvirtKvm(VirtBase):
if displayNum
else self.virt_pool.alloc_port(self.vm_name, port_type="display")
)
- ip = self.host_dut.get_ip_address()
+ ip = self.host_sut.get_ip_address()
# set main block
graphics = {
"type": "vnc",
@@ -489,7 +489,7 @@ class LibvirtKvm(VirtBase):
qemu_ifup = self.QEMU_IFUP % {"switch": switch}
file_name = os.path.basename(self.QEMU_IFUP_PATH)
tmp_file_path = "/tmp/%s" % file_name
- self.host_dut.create_file(qemu_ifup, tmp_file_path)
+ self.host_sut.create_file(qemu_ifup, tmp_file_path)
self.host_session.send_expect(
"mv -f ~/%s %s" % (file_name, self.QEMU_IFUP_PATH), "# "
)
@@ -714,8 +714,8 @@ class LibvirtKvm(VirtBase):
port = self.virt_pool.alloc_port(self.vm_name)
if port is None:
return
- dut_ip = self.host_dut.crb["IP"]
- self.vm_ip = "%s:%d" % (dut_ip, port)
+ sut_ip = self.host_sut.node["IP"]
+ self.vm_ip = "%s:%d" % (sut_ip, port)
qemu = ET.SubElement(self.domain, "qemu:commandline")
ET.SubElement(qemu, "qemu:arg", {"value": "-net"})
@@ -738,7 +738,7 @@ class LibvirtKvm(VirtBase):
ET.SubElement(
qemu,
"qemu:arg",
- {"value": "user,hostfwd=" "tcp:%s:%d-:22" % (dut_ip, port)},
+ {"value": "user,hostfwd=" "tcp:%s:%d-:22" % (sut_ip, port)},
)
def __add_vm_net_tap(self, **options):
@@ -814,7 +814,7 @@ class LibvirtKvm(VirtBase):
if not self.qga_sock_path:
self.host_logger.info(
"No QGA service between host [ %s ] and guest [ %s ]"
- % (self.host_dut.Name, self.vm_name)
+ % (self.host_sut.Name, self.vm_name)
)
return None
@@ -58,12 +58,12 @@ path2Result = "output"
class RstReport(object):
- def __init__(self, crbName, target, nic, suite, perf=False):
+ def __init__(self, node_name, target, nic, suite, perf=False):
"""
copy desc from #Name#_test_plan.rst to TestResult_#Name#.rst
"""
try:
- path = [path2Result, crbName, target, nic]
+ path = [path2Result, node_name, target, nic]
# ensure the level folder exist
for node in range(0, len(path)):
if not os.path.exists("/".join(path[: node + 1])):
@@ -95,8 +95,8 @@ class RstReport(object):
except Exception as e:
raise VerifyFailure("RST Error: " + str(e))
- def clear_all_rst(self, crbName, target):
- path = [path2Result, crbName, target]
+ def clear_all_rst(self, nodeName, target):
+ path = [path2Result, nodeName, target]
shutil.rmtree("/".join(path), True)
def write_title(self, text):
@@ -188,7 +188,7 @@ SCAPY2IXIA = ["Ether", "Dot1Q", "IP", "IPv6", "TCP", "UDP", "SCTP"]
USERNAME = "root"
# A user used to test functionality for a non-root user
-UNPRIVILEGED_USERNAME = "dtsunprivilegedtester"
+UNPRIVILEGED_USERNAME = "dtsunprivilegedtg"
"""
Helpful header sizes.
@@ -259,8 +259,8 @@ DTS global error table
DTS_ERR_TBL = {
"GENERIC_ERR": 1,
"DPDK_BUILD_ERR": 2,
- "DUT_SETUP_ERR": 3,
- "TESTER_SETUP_ERR": 4,
+ "SUT_SETUP_ERR": 3,
+ "TG_SETUP_ERR": 4,
"SUITE_SETUP_ERR": 5,
"SUITE_EXECUTE_ERR": 6,
"PARALLEL_EXECUTE_ERR": 7,
@@ -288,8 +288,8 @@ def get_nic_driver(pci_id):
return driver
-def get_netdev(crb, pci):
- for port in crb.ports_info:
+def get_netdev(node, pci):
+ for port in node.ports_info:
if pci == port["pci"]:
return port["port"]
if "vfs_port" in list(port.keys()):
@@ -45,8 +45,8 @@ class SSHConnection(object):
Implement send_expect/copy function upper SSHPexpect module.
"""
- def __init__(self, host, session_name, username, password="", dut_id=0):
- self.session = SSHPexpect(host, username, password, dut_id)
+ def __init__(self, host, session_name, username, password="", sut_id=0):
+ self.session = SSHPexpect(host, username, password, sut_id)
self.name = session_name
connection = {}
connection[self.name] = self.session
@@ -110,8 +110,8 @@ class SSHConnection(object):
return True
- def copy_file_from(self, src, dst=".", password="", crb_session=None):
- self.session.copy_file_from(src, dst, password, crb_session)
+ def copy_file_from(self, src, dst=".", password="", node_session=None):
+ self.session.copy_file_from(src, dst, password, node_session)
- def copy_file_to(self, src, dst="~/", password="", crb_session=None):
- self.session.copy_file_to(src, dst, password, crb_session)
+ def copy_file_to(self, src, dst="~/", password="", node_session=None):
+ self.session.copy_file_to(src, dst, password, node_session)
@@ -8,14 +8,14 @@ from .exception import SSHConnectionException, SSHSessionDeadException, TimeoutE
from .utils import GREEN, RED, parallel_lock
"""
-Module handle ssh sessions between tester and DUT.
+Module handles ssh sessions between TG and SUT.
Implements send_expect function to send command and get output data.
-Also supports transfer files to tester or DUT.
+Also supports transfer files to TG or SUT.
"""
class SSHPexpect:
- def __init__(self, host, username, password, dut_id):
+ def __init__(self, host, username, password, sut_id):
self.magic_prompt = "MAGIC PROMPT"
self.logger = None
@@ -23,13 +23,13 @@ class SSHPexpect:
self.username = username
self.password = password
- self._connect_host(dut_id=dut_id)
+ self._connect_host(sut_id=sut_id)
@parallel_lock(num=8)
- def _connect_host(self, dut_id=0):
+ def _connect_host(self, sut_id=0):
"""
- Create connection to assigned crb, parameter dut_id will be used in
- parallel_lock thus can assure isolated locks for each crb.
+ Create connection to assigned node, parameter sut_id will be used in
+ parallel_lock thus can assure isolated locks for each node.
Parallel ssh connections are limited to MaxStartups option in SSHD
configuration file. By default concurrent number is 10, so default
threads number is limited to 8 which less than 10. Lock number can
@@ -199,7 +199,7 @@ class SSHPexpect:
def isalive(self):
return self.session.isalive()
- def copy_file_from(self, src, dst=".", password="", crb_session=None):
+ def copy_file_from(self, src, dst=".", password="", node_session=None):
"""
Copies a file from a remote place into local.
"""
@@ -209,11 +209,11 @@ class SSHPexpect:
str(self.port), self.username, self.ip, src, dst
)
if password == "":
- self._spawn_scp(command, self.password, crb_session)
+ self._spawn_scp(command, self.password, node_session)
else:
- self._spawn_scp(command, password, crb_session)
+ self._spawn_scp(command, password, node_session)
- def copy_file_to(self, src, dst="~/", password="", crb_session=None):
+ def copy_file_to(self, src, dst="~/", password="", node_session=None):
"""
Sends a local file to a remote place.
"""
@@ -227,21 +227,21 @@ class SSHPexpect:
src, self.username, self.host, dst
)
if password == "":
- self._spawn_scp(command, self.password, crb_session)
+ self._spawn_scp(command, self.password, node_session)
else:
- self._spawn_scp(command, password, crb_session)
+ self._spawn_scp(command, password, node_session)
- def _spawn_scp(self, scp_cmd, password, crb_session):
+ def _spawn_scp(self, scp_cmd, password, node_session):
"""
Transfer a file with SCP
"""
self.logger.info(scp_cmd)
- # if crb_session is not None, copy file from/to crb env
- # if crb_session is None, copy file from/to current dts env
- if crb_session is not None:
- crb_session.session.clean_session()
- crb_session.session.__sendline(scp_cmd)
- p = crb_session.session.session
+ # if node_session is not None, copy file from/to node env
+ # if node_session is None, copy file from/to current dts env
+ if node_session is not None:
+ node_session.session.clean_session()
+ node_session.session.__sendline(scp_cmd)
+ p = node_session.session.session
else:
p = pexpect.spawn(scp_cmd)
time.sleep(0.5)
@@ -259,5 +259,5 @@ class SSHPexpect:
p.expect("Exit status 0", 60)
if i == 4:
self.logger.error("SCP TIMEOUT error %d" % i)
- if crb_session is None:
+ if node_session is None:
p.close()
@@ -55,25 +55,25 @@ class StatsReporter(object):
self.total += 1
def __count_stats(self):
- for dut in self.result.all_duts():
- for target in self.result.all_targets(dut):
- for suite in self.result.all_test_suites(dut, target):
- for case in self.result.all_test_cases(dut, target, suite):
- test_result = self.result.result_for(dut, target, suite, case)
+ for sut in self.result.all_suts():
+ for target in self.result.all_targets(sut):
+ for suite in self.result.all_test_suites(sut, target):
+ for case in self.result.all_test_cases(sut, target, suite):
+ test_result = self.result.result_for(sut, target, suite, case)
if len(test_result):
self.__add_stat(test_result)
def __write_stats(self):
- duts = self.result.all_duts()
- if len(duts) == 1:
+ suts = self.result.all_suts()
+ if len(suts) == 1:
self.stats_file.write(
- "dpdk_version = {}\n".format(self.result.current_dpdk_version(duts[0]))
+ "dpdk_version = {}\n".format(self.result.current_dpdk_version(suts[0]))
)
else:
- for dut in duts():
- dpdk_version = self.result.current_dpdk_version(dut)
+ for sut in suts():
+ dpdk_version = self.result.current_dpdk_version(sut)
self.stats_file.write(
- "{}.dpdk_version = {}\n".format(dut, dpdk_version)
+ "{}.dpdk_version = {}\n".format(sut, dpdk_version)
)
self.__count_stats()
self.stats_file.write("Passed = %d\n" % self.passed)
similarity index 89%
rename from framework/dut.py
rename to framework/sut_node.py
@@ -40,8 +40,8 @@ import framework.settings as settings
from nics.net_device import GetNicObj
from .config import AppNameConf, PortConf
-from .crb import Crb
from .exception import ParameterInvalidException
+from .node import Node
from .settings import LOG_NAME_SEP, NICS
from .ssh_connection import SSHConnection
from .test_result import ResultTable
@@ -49,31 +49,28 @@ from .utils import RED, remove_old_rsa_key
from .virt_resource import VirtResource
-class Dut(Crb):
+class SutNode(Node):
"""
- A connection to the CRB under test.
- This class sends commands to the CRB and validates the responses. It is
- implemented using either ssh for linuxapp or the terminal server for
- baremetal.
- All operations are in fact delegated to an instance of either CRBLinuxApp
- or CRBBareMetal.
+ A class for managing connections to the System under test, providing
+ methods that retrieve the necessary information about the node (such as
+ cpu, memory and NIC details) and configuration capabilities.
"""
- PORT_MAP_CACHE_KEY = "dut_port_map"
- PORT_INFO_CACHE_KEY = "dut_port_info"
- NUMBER_CORES_CACHE_KEY = "dut_number_cores"
- CORE_LIST_CACHE_KEY = "dut_core_list"
- PCI_DEV_CACHE_KEY = "dut_pci_dev_info"
+ PORT_MAP_CACHE_KEY = "sut_port_map"
+ PORT_INFO_CACHE_KEY = "sut_port_info"
+ NUMBER_CORES_CACHE_KEY = "sut_number_cores"
+ CORE_LIST_CACHE_KEY = "sut_core_list"
+ PCI_DEV_CACHE_KEY = "sut_pci_dev_info"
- def __init__(self, crb, serializer, dut_id=0, name=None, alt_session=True):
+ def __init__(self, node, serializer, sut_id=0, name=None, alt_session=True):
if not name:
- name = "dut" + LOG_NAME_SEP + "%s" % crb["My IP"]
+ name = "sut" + LOG_NAME_SEP + "%s" % node["My IP"]
self.NAME = name
- super(Dut, self).__init__(crb, serializer, dut_id, name, alt_session)
+ super(SutNode, self).__init__(node, serializer, sut_id, name, alt_session)
self.host_init_flag = False
self.number_of_cores = 0
- self.tester = None
+ self.tg = None
self.cores = []
self.architecture = None
self.conf = PortConf()
@@ -90,11 +87,11 @@ class Dut(Crb):
self.dpdk_version = ""
self.nic = None
- def filter_cores_from_crb_cfg(self):
- # get core list from crbs.cfg
+ def filter_cores_from_node_cfg(self):
+ # get core list from nodes.cfg
core_list = []
all_core_list = [str(core["core"]) for core in self.cores]
- core_list_str = self.crb["dut_cores"]
+ core_list_str = self.node["sut_cores"]
if core_list_str == "":
core_list = all_core_list
split_by_comma = core_list_str.split(",")
@@ -198,7 +195,7 @@ class Dut(Crb):
}
eal_parameter_creator = _EalParameter(
- dut=self, fixed_prefix=fixed_prefix, socket=socket, **config
+ sut=self, fixed_prefix=fixed_prefix, socket=socket, **config
)
eal_str = eal_parameter_creator.make_eal_param()
@@ -232,7 +229,7 @@ class Dut(Crb):
def new_session(self, suite=""):
"""
- Create new session for dut instance. Session name will be unique.
+ Create new session for SUT instance. Session name will be unique.
"""
if len(suite):
session_name = self.NAME + "_" + suite
@@ -251,13 +248,13 @@ class Dut(Crb):
def close_session(self, session):
"""
- close new session in dut instance
+ close new session in SUT instance
"""
self.destroy_session(session)
def set_nic_type(self, nic_type):
"""
- Set CRB NICS ready to validated.
+ Set Node NICS ready to validated.
"""
self.nic_type = nic_type
if "cfg" in nic_type:
@@ -266,7 +263,7 @@ class Dut(Crb):
def set_toolchain(self, target):
"""
This looks at the current target and instantiates an attribute to
- be either a CRBLinuxApp or CRBBareMetal object. These latter two
+ be either a NodeLinuxApp or NodeBareMetal object. These latter two
classes are private and should not be used directly by client code.
"""
self.kill_all()
@@ -303,28 +300,28 @@ class Dut(Crb):
def get_ip_address(self):
"""
- Get DUT's ip address.
+ Get SUT's ip address.
"""
- return self.crb["IP"]
+ return self.node["IP"]
def get_password(self):
"""
- Get DUT's login password.
+ Get SUT's login password.
"""
- return self.crb["pass"]
+ return self.node["pass"]
def get_username(self):
"""
- Get DUT's login username.
+ Get SUT's login username.
"""
- return self.crb["user"]
+ return self.node["user"]
- def dut_prerequisites(self):
+ def sut_prerequisites(self):
"""
Prerequest function should be called before execute any test case.
- Will call function to scan all lcore's information which on DUT.
+ Will call function to scan all lcore's information which on SUT.
Then call pci scan function to collect nic device information.
- At last setup DUT' environment for validation.
+ At last setup SUT' environment for validation.
"""
out = self.send_expect("cd %s" % self.base_dir, "# ")
assert "No such file or directory" not in out, "Can't switch to dpdk folder!!!"
@@ -340,13 +337,13 @@ class Dut(Crb):
self.send_expect("alias sed=gsed", "# ")
self.init_core_list()
- self.filter_cores_from_crb_cfg()
+ self.filter_cores_from_node_cfg()
self.pci_devices_information()
# make sure ipv6 enable before scan
- self.enable_tester_ipv6()
+ self.enable_tg_ipv6()
# scan ports before restore interface
self.scan_ports()
- # restore dut ports to kernel
+ # restore SUT ports to kernel
self.restore_interfaces()
# rescan ports after interface up
self.rescan_ports()
@@ -355,8 +352,8 @@ class Dut(Crb):
self.mount_procfs()
# auto detect network topology
self.map_available_ports()
- # disable tester port ipv6
- self.disable_tester_ipv6()
+ # disable TG port ipv6
+ self.disable_tg_ipv6()
self.get_nic_configurations()
# print latest ports_info
@@ -492,7 +489,7 @@ class Dut(Crb):
def setup_memory(self, hugepages=-1):
"""
- Setup hugepage on DUT.
+ Setup hugepage on SUT.
"""
try:
function_name = "setup_memory_%s" % self.get_os_type()
@@ -523,7 +520,7 @@ class Dut(Crb):
if int(hugepages_size) < (1024 * 1024):
if self.architecture == "x86_64":
- arch_huge_pages = hugepages if hugepages > 0 else 4096
+ arch_huge_pages = hugepages if hugepages > 0 else 512
elif self.architecture == "i686":
arch_huge_pages = hugepages if hugepages > 0 else 512
force_socket = True
@@ -579,7 +576,7 @@ class Dut(Crb):
def is_ssh_session_port(self, pci_bus):
"""
- Check if the pci device is the dut SSH session port.
+ Check if the pci device is the SUT SSH session port.
"""
port = None
for port_info in self.ports_info:
@@ -710,7 +707,7 @@ class Dut(Crb):
def get_ports(self, nic_type="any", perf=None, socket=None):
"""
- Return DUT port list with the filter of NIC type, whether run IXIA
+ Return SUT port list with the filter of NIC type, whether run IXIA
performance test, whether request specified socket.
"""
ports = []
@@ -743,7 +740,7 @@ class Dut(Crb):
or socket == port_info["numa"]
):
# port has link,
- if self.tester.get_local_port(portid) != -1:
+ if self.tg.get_local_port(portid) != -1:
ports.append(portid)
return ports
@@ -798,7 +795,7 @@ class Dut(Crb):
def get_peer_pci(self, port_num):
"""
- return the peer pci address of dut port
+ return the peer pci address of SUT port
"""
if "peer" not in self.ports_info[port_num]:
return None
@@ -807,13 +804,13 @@ class Dut(Crb):
def get_mac_address(self, port_num):
"""
- return the port mac on dut
+ return the port mac on SUT
"""
return self.ports_info[port_num]["mac"]
def get_ipv6_address(self, port_num):
"""
- return the IPv6 address on dut
+ return the IPv6 address on SUT
"""
return self.ports_info[port_num]["ipv6"]
@@ -841,7 +838,7 @@ class Dut(Crb):
result_table.table_print()
def get_memory_channels(self):
- n = self.crb["memory channels"]
+ n = self.node["memory channels"]
if n is not None and n > 0:
return n
else:
@@ -925,7 +922,7 @@ class Dut(Crb):
port = port_info["port"]
intf = port.get_interface_name()
if "No such file" in intf:
- self.logger.info("DUT: [%s] %s" % (port_info["pci"], unknow_interface))
+ self.logger.info("SUT: [%s] %s" % (port_info["pci"], unknow_interface))
continue
self.send_expect("ifconfig %s up" % intf, "# ")
time.sleep(5)
@@ -969,14 +966,14 @@ class Dut(Crb):
def scan_ports_cached(self):
"""
- Scan cached ports, instantiate tester port
+ Scan cached ports, instantiate TG port
"""
scan_ports_cached = getattr(self, "scan_ports_cached_%s" % self.get_os_type())
return scan_ports_cached()
def scan_ports_cached_linux(self):
"""
- Scan Linux ports and instantiate tester port
+ Scan Linux ports and instantiate TG port
"""
if self.ports_info is None:
return
@@ -991,7 +988,7 @@ class Dut(Crb):
port_info["port"] = port
self.logger.info(
- "DUT cached: [%s %s] %s"
+ "SUT cached: [%s %s] %s"
% (port_info["pci"], port_info["type"], port_info["intf"])
)
@@ -1015,7 +1012,7 @@ class Dut(Crb):
for (pci_bus, pci_id) in self.pci_devices_info:
if self.check_ports_available(pci_bus, pci_id) is False:
- self.logger.info("DUT: [%s %s] %s" % (pci_bus, pci_id, skipped))
+ self.logger.info("SUT: [%s %s] %s" % (pci_bus, pci_id, skipped))
continue
addr_array = pci_bus.split(":")
@@ -1026,12 +1023,12 @@ class Dut(Crb):
port = GetNicObj(self, domain_id, bus_id, devfun_id)
intf = port.get_interface_name()
if "No such file" in intf:
- self.logger.info("DUT: [%s] %s" % (pci_bus, unknow_interface))
+ self.logger.info("SUT: [%s] %s" % (pci_bus, unknow_interface))
continue
macaddr = port.get_mac_addr()
if "No such file" in intf:
- self.logger.info("DUT: [%s] %s" % (pci_bus, unknow_interface))
+ self.logger.info("SUT: [%s] %s" % (pci_bus, unknow_interface))
continue
numa = port.socket
@@ -1076,7 +1073,7 @@ class Dut(Crb):
for (pci_bus, pci_id) in self.pci_devices_info:
if not settings.accepted_nic(pci_id):
- self.logger.info("DUT: [%s %s] %s" % (pci_bus, pci_id, skipped))
+ self.logger.info("SUT: [%s %s] %s" % (pci_bus, pci_id, skipped))
continue
addr_array = pci_bus.split(":")
domain_id = addr_array[0]
@@ -1096,7 +1093,7 @@ class Dut(Crb):
self.logger.warning("NUMA not available on FreeBSD")
- self.logger.info("DUT: [%s %s] %s %s" % (pci_bus, pci_id, intf, ipv6))
+ self.logger.info("SUT: [%s %s] %s %s" % (pci_bus, pci_id, intf, ipv6))
# convert bsd format to linux format
pci_split = pci_bus.split(":")
@@ -1126,8 +1123,8 @@ class Dut(Crb):
Setup current virtualization hypervisor type and remove elder VM ssh keys
"""
self.virttype = virttype
- # remove VM rsa keys from tester
- remove_old_rsa_key(self.tester, self.crb["My IP"])
+ # remove VM rsa keys from TG
+ remove_old_rsa_key(self.tg, self.node["My IP"])
def generate_sriov_vfs_by_port(self, port_id, vf_num, driver="default"):
"""
@@ -1232,7 +1229,7 @@ class Dut(Crb):
self.map_available_ports_uncached()
self.serializer.save(self.PORT_MAP_CACHE_KEY, self.ports_map)
- self.logger.warning("DUT PORT MAP: " + str(self.ports_map))
+ self.logger.warning("SUT PORT MAP: " + str(self.ports_map))
def map_available_ports_uncached(self):
"""
@@ -1245,103 +1242,103 @@ class Dut(Crb):
remove = []
self.ports_map = [-1] * nrPorts
- hits = [False] * len(self.tester.ports_info)
+ hits = [False] * len(self.tg.ports_info)
- for dutPort in range(nrPorts):
- peer = self.get_peer_pci(dutPort)
- dutpci = self.ports_info[dutPort]["pci"]
+ for sutPort in range(nrPorts):
+ peer = self.get_peer_pci(sutPort)
+ sutpci = self.ports_info[sutPort]["pci"]
if peer is not None:
- for remotePort in range(len(self.tester.ports_info)):
- if self.tester.ports_info[remotePort]["type"].lower() == "trex":
+ for remotePort in range(len(self.tg.ports_info)):
+ if self.tg.ports_info[remotePort]["type"].lower() == "trex":
if (
- self.tester.ports_info[remotePort]["intf"].lower()
+ self.tg.ports_info[remotePort]["intf"].lower()
== peer.lower()
- or self.tester.ports_info[remotePort]["pci"].lower()
+ or self.tg.ports_info[remotePort]["pci"].lower()
== peer.lower()
):
hits[remotePort] = True
- self.ports_map[dutPort] = remotePort
+ self.ports_map[sutPort] = remotePort
break
elif (
- self.tester.ports_info[remotePort]["pci"].lower()
+ self.tg.ports_info[remotePort]["pci"].lower()
== peer.lower()
):
hits[remotePort] = True
- self.ports_map[dutPort] = remotePort
+ self.ports_map[sutPort] = remotePort
break
- if self.ports_map[dutPort] == -1:
- self.logger.error("CONFIGURED TESTER PORT CANNOT BE FOUND!!!")
+ if self.ports_map[sutPort] == -1:
+ self.logger.error("CONFIGURED TG PORT CANNOT BE FOUND!!!")
else:
continue # skip ping6 map
- for remotePort in range(len(self.tester.ports_info)):
+ for remotePort in range(len(self.tg.ports_info)):
if hits[remotePort]:
continue
# skip ping self port
- remotepci = self.tester.ports_info[remotePort]["pci"]
- if (self.crb["IP"] == self.crb["tester IP"]) and (dutpci == remotepci):
+ remotepci = self.tg.ports_info[remotePort]["pci"]
+ if (self.node["IP"] == self.node["tg IP"]) and (sutpci == remotepci):
continue
# skip ping those not connected port
- ipv6 = self.get_ipv6_address(dutPort)
+ ipv6 = self.get_ipv6_address(sutPort)
if ipv6 == "Not connected":
- if "ipv4" in self.tester.ports_info[remotePort]:
- out = self.tester.send_ping(
- dutPort,
- self.tester.ports_info[remotePort]["ipv4"],
- self.get_mac_address(dutPort),
+ if "ipv4" in self.tg.ports_info[remotePort]:
+ out = self.tg.send_ping(
+ sutPort,
+ self.tg.ports_info[remotePort]["ipv4"],
+ self.get_mac_address(sutPort),
)
else:
continue
else:
if getattr(self, "send_ping6", None):
out = self.send_ping6(
- dutPort,
- self.tester.ports_info[remotePort]["ipv6"],
- self.get_mac_address(dutPort),
+ sutPort,
+ self.tg.ports_info[remotePort]["ipv6"],
+ self.get_mac_address(sutPort),
)
else:
- out = self.tester.send_ping6(
- remotePort, ipv6, self.get_mac_address(dutPort)
+ out = self.tg.send_ping6(
+ remotePort, ipv6, self.get_mac_address(sutPort)
)
if out and "64 bytes from" in out:
self.logger.info(
- "PORT MAP: [dut %d: tester %d]" % (dutPort, remotePort)
+ "PORT MAP: [SUT %d: tg %d]" % (sutPort, remotePort)
)
- self.ports_map[dutPort] = remotePort
+ self.ports_map[sutPort] = remotePort
hits[remotePort] = True
- if self.crb["IP"] == self.crb["tester IP"]:
- # remove dut port act as tester port
+ if self.node["IP"] == self.node["tg IP"]:
+ # remove SUT port act as TG port
remove_port = self.get_port_info(remotepci)
if remove_port is not None:
remove.append(remove_port)
- # skip ping from those port already act as dut port
- testerPort = self.tester.get_local_index(dutpci)
- if testerPort != -1:
- hits[testerPort] = True
+ # skip ping from those port already act as SUT port
+ tgPort = self.tg.get_local_index(sutpci)
+ if tgPort != -1:
+ hits[tgPort] = True
break
for port in remove:
self.ports_info.remove(port)
- def disable_tester_ipv6(self):
- for tester_port in self.ports_map:
- if self.tester.ports_info[tester_port]["type"].lower() not in (
+ def disable_tg_ipv6(self):
+ for tg_port in self.ports_map:
+ if self.tg.ports_info[tg_port]["type"].lower() not in (
"ixia",
"trex",
):
- port = self.tester.ports_info[tester_port]["port"]
+ port = self.tg.ports_info[tg_port]["port"]
port.disable_ipv6()
- def enable_tester_ipv6(self):
- for tester_port in range(len(self.tester.ports_info)):
- if self.tester.ports_info[tester_port]["type"].lower() not in (
+ def enable_tg_ipv6(self):
+ for tg_port in range(len(self.tg.ports_info)):
+ if self.tg.ports_info[tg_port]["type"].lower() not in (
"ixia",
"trex",
):
- port = self.tester.ports_info[tester_port]["port"]
+ port = self.tg.ports_info[tg_port]["port"]
port.enable_ipv6()
def check_port_occupied(self, port):
@@ -1366,7 +1363,7 @@ class Dut(Crb):
def close(self):
"""
- Close ssh session of DUT.
+ Close ssh session of SUT.
"""
if self.session:
self.session.close()
@@ -1387,11 +1384,11 @@ class Dut(Crb):
time.sleep(3)
self.virt_pids = []
- def crb_exit(self):
+ def node_exit(self):
"""
- Recover all resource before crb exit
+ Recover all resource before node exit
"""
- self.enable_tester_ipv6()
+ self.enable_tg_ipv6()
self.close()
self.logger.logger_exit()
@@ -1399,7 +1396,7 @@ class Dut(Crb):
class _EalParameter(object):
def __init__(
self,
- dut: Dut,
+ sut: SutNode,
fixed_prefix: bool,
socket: int,
cores: Union[str, List[int], List[str]],
@@ -1413,7 +1410,7 @@ class _EalParameter(object):
):
"""
generate eal parameters character string;
- :param dut: dut device;
+ :param sut: SUT Node;
:param fixed_prefix: use fixed file-prefix or not, when it is true,
the file-prefix will not be added a timestamp
:param socket: the physical CPU socket index, -1 means no care cpu socket;
@@ -1441,10 +1438,10 @@ class _EalParameter(object):
param other_eal_param: user defined DPDK eal parameters, eg:
other_eal_param='--single-file-segments';
"""
- self.os_type = dut.get_os_type()
+ self.os_type = sut.get_os_type()
self.fixed_prefix = fixed_prefix
self.socket = socket
- self.dut = dut
+ self.sut = sut
self.cores = self._validate_cores(cores)
self.ports = self._validate_ports(ports)
self.port_options: Dict = self._validate_port_options(port_options)
@@ -1516,7 +1513,7 @@ class _EalParameter(object):
)
if is_use_default_cores:
default_cores = "1S/2C/1T"
- core_list = self.dut.get_core_list(default_cores)
+ core_list = self.sut.get_core_list(default_cores)
else:
core_list = self._get_cores()
@@ -1551,7 +1548,7 @@ class _EalParameter(object):
def _make_memory_channels(self) -> str:
param_template = "-n {}"
- return param_template.format(self.dut.get_memory_channels())
+ return param_template.format(self.sut.get_memory_channels())
def _make_ports_param(self) -> str:
no_port_config = (
@@ -1570,10 +1567,10 @@ class _EalParameter(object):
def _make_default_ports_param(self) -> str:
pci_list = []
allow_option = self._make_allow_option()
- if len(self.dut.ports_info) != 0:
- for port_info in self.dut.ports_info:
+ if len(self.sut.ports_info) != 0:
+ for port_info in self.sut.ports_info:
pci_list.append("%s %s" % (allow_option, port_info["pci"]))
- self.dut.logger.info(pci_list)
+ self.sut.logger.info(pci_list)
return " ".join(pci_list)
def _make_b_ports_param(self) -> str:
@@ -1581,7 +1578,7 @@ class _EalParameter(object):
if len(self.b_ports) != 0:
for port in self.b_ports:
if type(port) == int:
- b_pci_list.append("-b %s" % self.dut.ports_info[port]["pci"])
+ b_pci_list.append("-b %s" % self.sut.ports_info[port]["pci"])
else:
b_pci_list = ["-b %s" % pci for pci in self.b_ports]
return " ".join(b_pci_list)
@@ -1594,11 +1591,11 @@ class _EalParameter(object):
def _make_prefix_param(self) -> str:
if self.prefix == "":
- fixed_file_prefix = "dpdk" + "_" + self.dut.prefix_subfix
+ fixed_file_prefix = "dpdk" + "_" + self.sut.prefix_subfix
else:
fixed_file_prefix = self.prefix
if not self.fixed_prefix:
- fixed_file_prefix = fixed_file_prefix + "_" + self.dut.prefix_subfix
+ fixed_file_prefix = fixed_file_prefix + "_" + self.sut.prefix_subfix
fixed_file_prefix = self._do_os_handle_with_prefix_param(fixed_file_prefix)
return fixed_file_prefix
@@ -1612,7 +1609,7 @@ class _EalParameter(object):
def _make_share_library_path_param(self) -> str:
use_shared_lib = settings.load_global_setting(settings.HOST_SHARED_LIB_SETTING)
shared_lib_path = settings.load_global_setting(settings.HOST_SHARED_LIB_PATH)
- if use_shared_lib == "true" and shared_lib_path and "Virt" not in str(self.dut):
+ if use_shared_lib == "true" and shared_lib_path and "Virt" not in str(self.sut):
return " -d {} ".format(shared_lib_path)
return ""
@@ -1638,7 +1635,7 @@ class _EalParameter(object):
if type(self.cores) == list:
return self.cores
elif isinstance(self.cores, str):
- return self.dut.get_core_list(self.cores, socket=self.socket)
+ return self.sut.get_core_list(self.cores, socket=self.socket)
def _get_ports_and_wraped_port_with_port_options(self) -> str:
w_pci_list = []
@@ -1648,7 +1645,7 @@ class _EalParameter(object):
def _add_port_options_to(self, port: Union[str, int]) -> str:
allow_option = self._make_allow_option()
- port_mac_addr = self.dut.ports_info[port]["pci"] if type(port) == int else port
+ port_mac_addr = self.sut.ports_info[port]["pci"] if type(port) == int else port
port_param = f"{allow_option} {port_mac_addr}"
port_option = self._get_port_options_from_config(port)
if port_option:
@@ -1663,16 +1660,16 @@ class _EalParameter(object):
def _make_allow_option(self) -> str:
is_new_dpdk_version = (
- self.dut.dpdk_version > "20.11.0-rc3" or self.dut.dpdk_version == "20.11.0"
+ self.sut.dpdk_version > "20.11.0-rc3" or self.sut.dpdk_version == "20.11.0"
)
return "-a" if is_new_dpdk_version else "-w"
def _do_os_handle_with_prefix_param(self, file_prefix: str) -> str:
- if self.dut.get_os_type() == "freebsd":
- self.dut.prefix_list = []
+ if self.sut.get_os_type() == "freebsd":
+ self.sut.prefix_list = []
file_prefix = ""
else:
- self.dut.prefix_list.append(file_prefix)
+ self.sut.prefix_list.append(file_prefix)
file_prefix = "--file-prefix=" + file_prefix
return file_prefix
@@ -62,11 +62,11 @@ from .utils import BLUE, RED
class TestCase(object):
- def __init__(self, duts, tester, target, suitename):
+ def __init__(self, suts, tg, target, suitename):
self.suite_name = suitename
- self.dut = duts[0]
- self.duts = duts
- self.tester = tester
+ self.sut = suts[0]
+ self.suts = suts
+ self.tg = tg
self.target = target
# local variable
@@ -74,19 +74,19 @@ class TestCase(object):
self._subtitle = None
# check session and reconnect if possible
- for dutobj in self.duts:
- self._check_and_reconnect(crb=dutobj)
- self._check_and_reconnect(crb=self.tester)
+ for sutobj in self.suts:
+ self._check_and_reconnect(node=sutobj)
+ self._check_and_reconnect(node=self.tg)
# convert netdevice to codename
- self.nic = self.dut.nic.name
- self.nic_obj = self.dut.nic
- self.kdriver = self.dut.nic.default_driver
- self.pkg = self.dut.nic.pkg
+ self.nic = self.sut.nic.name
+ self.nic_obj = self.sut.nic
+ self.kdriver = self.sut.nic.default_driver
+ self.pkg = self.sut.nic.pkg
# result object for save suite result
self._suite_result = Result()
- self._suite_result.dut = self.dut.crb["IP"]
+ self._suite_result.sut = self.sut.node["IP"]
self._suite_result.target = target
self._suite_result.nic = self.nic
self._suite_result.test_suite = self.suite_name
@@ -135,25 +135,25 @@ class TestCase(object):
self.logger = getLogger(class_name)
self.logger.config_suite(class_name)
- def _check_and_reconnect(self, crb=None):
+ def _check_and_reconnect(self, node=None):
try:
- result = crb.session.check_available()
+ result = node.session.check_available()
except:
result = False
if result is False:
- crb.reconnect_session()
- if "dut" in str(type(crb)):
- crb.send_expect("cd %s" % crb.base_dir, "#")
- crb.set_env_variable()
+ node.reconnect_session()
+ if "sut" in str(type(node)):
+ node.send_expect("cd %s" % node.base_dir, "#")
+ node.set_env_variable()
try:
- result = crb.alt_session.check_available()
+ result = node.alt_session.check_available()
except:
result = False
if result is False:
- crb.reconnect_session(alt_session=True)
+ node.reconnect_session(alt_session=True)
def set_up_all(self):
pass
@@ -263,9 +263,9 @@ class TestCase(object):
Execute suite setup_all function before cases.
"""
# clear all previous output
- for dutobj in self.duts:
- dutobj.get_session_output(timeout=0.1)
- self.tester.get_session_output(timeout=0.1)
+ for sutobj in self.suts:
+ sutobj.get_session_output(timeout=0.1)
+ self.tg.get_session_output(timeout=0.1)
# save into setup history list
self.enable_history(self.setup_history)
@@ -341,9 +341,9 @@ class TestCase(object):
self.running_case = case_name
# clean session
- for dutobj in self.duts:
- dutobj.get_session_output(timeout=0.1)
- self.tester.get_session_output(timeout=0.1)
+ for sutobj in self.suts:
+ sutobj.get_session_output(timeout=0.1)
+ self.tg.get_session_output(timeout=0.1)
# run set_up function for each case
self.set_up()
# run test case
@@ -404,13 +404,13 @@ class TestCase(object):
if load_global_setting(FUNC_SETTING) == "yes":
for case_obj in self._get_functional_cases():
- for i in range(self.tester.re_run_time + 1):
+ for i in range(self.tg.re_run_time + 1):
ret = self.execute_test_case(case_obj)
- if ret is False and self.tester.re_run_time:
- for dutobj in self.duts:
- dutobj.get_session_output(timeout=0.5 * (i + 1))
- self.tester.get_session_output(timeout=0.5 * (i + 1))
+ if ret is False and self.tg.re_run_time:
+ for sutobj in self.suts:
+ sutobj.get_session_output(timeout=0.5 * (i + 1))
+ self.tg.get_session_output(timeout=0.5 * (i + 1))
time.sleep(i + 1)
self.logger.info(
" Test case %s failed and re-run %d time"
@@ -474,14 +474,14 @@ class TestCase(object):
except Exception:
self.logger.error("tear_down_all failed:\n" + traceback.format_exc())
- for dutobj in self.duts:
- dutobj.kill_all()
- self.tester.kill_all()
+ for sutobj in self.suts:
+ sutobj.kill_all()
+ self.tg.kill_all()
- for dutobj in self.duts:
- dutobj.virt_exit()
+ for sutobj in self.suts:
+ sutobj.virt_exit()
# destroy all vfs
- dutobj.destroy_all_sriov_vfs()
+ sutobj.destroy_all_sriov_vfs()
def execute_tear_down(self):
"""
@@ -498,12 +498,12 @@ class TestCase(object):
def enable_history(self, history):
"""
- Enable history for all CRB's default session
+ Enable history for all Node's default session
"""
- for dutobj in self.duts:
- dutobj.session.set_history(history)
+ for sutobj in self.suts:
+ sutobj.session.set_history(history)
- self.tester.session.set_history(history)
+ self.tg.session.set_history(history)
def dump_history(self):
"""
@@ -520,8 +520,8 @@ class TestCase(object):
"""
bitrate = 1000.0 # 1Gb ('.0' forces to operate as float)
if self.nic == "any" or self.nic == "cfg":
- driver = self._get_nic_driver(self.dut.ports_info[0]["type"])
- nic = get_nic_name(self.dut.ports_info[0]["type"])
+ driver = self._get_nic_driver(self.sut.ports_info[0]["type"])
+ nic = get_nic_name(self.sut.ports_info[0]["type"])
else:
driver = self._get_nic_driver(self.nic)
nic = self.nic
@@ -551,7 +551,7 @@ class TestCase(object):
def bind_nic_driver(self, ports, driver=""):
for port in ports:
- netdev = self.dut.ports_info[port]["port"]
+ netdev = self.sut.ports_info[port]["port"]
driver_now = netdev.get_nic_driver()
driver_new = driver if driver else netdev.default_driver
if driver_new != driver_now:
@@ -44,7 +44,7 @@ class Result(object):
This is presented to the user with a property based interface.
internals = [
- 'dut1', [
+ 'sut1', [
'kdriver',
'firmware',
'pkg',
@@ -71,156 +71,156 @@ class Result(object):
"""
def __init__(self):
- self.__dut = 0
+ self.__sut = 0
self.__target = 0
self.__test_suite = 0
self.__test_case = 0
self.__test_result = None
self.__message = None
self.__internals = []
- self.__failed_duts = {}
+ self.__failed_suts = {}
self.__failed_targets = {}
- def __set_dut(self, dut):
- if dut not in self.__internals:
- self.__internals.append(dut)
+ def __set_sut(self, sut):
+ if sut not in self.__internals:
+ self.__internals.append(sut)
self.__internals.append([])
- self.__dut = self.__internals.index(dut)
+ self.__sut = self.__internals.index(sut)
- def __get_dut(self):
- return self.__internals[self.__dut]
+ def __get_sut(self):
+ return self.__internals[self.__sut]
- def current_dpdk_version(self, dut):
+ def current_dpdk_version(self, sut):
"""
- Returns the dpdk version for a given DUT
+ Returns the dpdk version for a given SUT
"""
try:
- dut_idx = self.__internals.index(dut)
- return self.__internals[dut_idx + 1][4]
+ sut_idx = self.__internals.index(sut)
+ return self.__internals[sut_idx + 1][4]
except:
return ""
def __set_dpdk_version(self, dpdk_version):
- if dpdk_version not in self.internals[self.__dut + 1]:
+ if dpdk_version not in self.internals[self.__sut + 1]:
dpdk_current = self.__get_dpdk_version()
if dpdk_current:
if dpdk_version not in dpdk_current:
- self.internals[self.__dut + 1][4] = (
+ self.internals[self.__sut + 1][4] = (
dpdk_current + "/" + dpdk_version
)
else:
- self.internals[self.__dut + 1].append(dpdk_version)
+ self.internals[self.__sut + 1].append(dpdk_version)
def __get_dpdk_version(self):
try:
- return self.internals[self.__dut + 1][4]
+ return self.internals[self.__sut + 1][4]
except:
return ""
- def current_kdriver(self, dut):
+ def current_kdriver(self, sut):
"""
- Returns the driver version for a given DUT
+ Returns the driver version for a given SUT
"""
try:
- dut_idx = self.__internals.index(dut)
- return self.__internals[dut_idx + 1][0]
+ sut_idx = self.__internals.index(sut)
+ return self.__internals[sut_idx + 1][0]
except:
return ""
def __set_kdriver(self, driver):
- if not self.internals[self.__dut + 1]:
+ if not self.internals[self.__sut + 1]:
kdriver_current = self.__get_kdriver()
if kdriver_current:
if driver not in kdriver_current:
- self.internals[self.__dut + 1][0] = kdriver_current + "/" + driver
+ self.internals[self.__sut + 1][0] = kdriver_current + "/" + driver
else:
- self.internals[self.__dut + 1].append(driver)
+ self.internals[self.__sut + 1].append(driver)
def __get_kdriver(self):
try:
- return self.internals[self.__dut + 1][0]
+ return self.internals[self.__sut + 1][0]
except:
return ""
- def current_firmware_version(self, dut):
+ def current_firmware_version(self, sut):
"""
- Returns the firmware version for a given DUT
+ Returns the firmware version for a given SUT
"""
try:
- dut_idx = self.__internals.index(dut)
- return self.__internals[dut_idx + 1][1]
+ sut_idx = self.__internals.index(sut)
+ return self.__internals[sut_idx + 1][1]
except:
return ""
def __set_firmware(self, firmware):
- if firmware not in self.internals[self.__dut + 1]:
+ if firmware not in self.internals[self.__sut + 1]:
firmware_current = self.__get_firmware()
if firmware_current:
if firmware not in firmware_current:
- self.internals[self.__dut + 1][1] = (
+ self.internals[self.__sut + 1][1] = (
firmware_current + "/" + firmware
)
else:
- self.internals[self.__dut + 1].append(firmware)
+ self.internals[self.__sut + 1].append(firmware)
def __get_firmware(self):
try:
- return self.internals[self.__dut + 1][1]
+ return self.internals[self.__sut + 1][1]
except:
return ""
- def current_package_version(self, dut):
+ def current_package_version(self, sut):
"""
- Returns the DDP package version for a given DUT
+ Returns the DDP package version for a given SUT
"""
try:
- dut_idx = self.__internals.index(dut)
- return self.__internals[dut_idx + 1][2]
+ sut_idx = self.__internals.index(sut)
+ return self.__internals[sut_idx + 1][2]
except:
return ""
def __set_ddp_package(self, package):
- if package not in self.internals[self.__dut + 1]:
+ if package not in self.internals[self.__sut + 1]:
pkg_current = self.__get_ddp_package()
if pkg_current != "":
if pkg_current and package not in pkg_current:
- self.internals[self.__dut + 1][2] = pkg_current + "/" + package
+ self.internals[self.__sut + 1][2] = pkg_current + "/" + package
else:
- self.internals[self.__dut + 1].append(package)
+ self.internals[self.__sut + 1].append(package)
def __get_ddp_package(self):
try:
- return self.internals[self.__dut + 1][2]
+ return self.internals[self.__sut + 1][2]
except:
return ""
- def current_driver(self, dut):
+ def current_driver(self, sut):
"""
- Returns the DDP package version for a given DUT
+ Returns the DDP package version for a given SUT
"""
try:
- dut_idx = self.__internals.index(dut)
- return self.__internals[dut_idx + 1][3]
+ sut_idx = self.__internals.index(sut)
+ return self.__internals[sut_idx + 1][3]
except:
return ""
def __set_driver(self, driver):
- if driver not in self.internals[self.__dut + 1]:
+ if driver not in self.internals[self.__sut + 1]:
driver_current = self.__get_driver()
if driver_current:
if driver not in driver_current:
- self.internals[self.__dut + 1][3] = driver_current + "/" + driver
+ self.internals[self.__sut + 1][3] = driver_current + "/" + driver
else:
- self.internals[self.__dut + 1].append(driver)
+ self.internals[self.__sut + 1].append(driver)
def __get_driver(self):
try:
- return self.internals[self.__dut + 1][3]
+ return self.internals[self.__sut + 1][3]
except:
return ""
def __current_targets(self):
- return self.internals[self.__dut + 1]
+ return self.internals[self.__sut + 1]
def __set_target(self, target):
targets = self.__current_targets()
@@ -312,130 +312,130 @@ class Result(object):
"""
self.__set_test_case_result(result="BLOCKED", message=message)
- def all_duts(self):
+ def all_suts(self):
"""
- Returns all the DUTs it's aware of.
+ Returns all the SUTs it's aware of.
"""
return self.__internals[::2]
- def all_targets(self, dut):
+ def all_targets(self, sut):
"""
- Returns the targets for a given DUT
+ Returns the targets for a given SUT
"""
try:
- dut_idx = self.__internals.index(dut)
+ sut_idx = self.__internals.index(sut)
except:
return None
- return self.__internals[dut_idx + 1][5::3]
+ return self.__internals[sut_idx + 1][5::3]
- def current_nic(self, dut, target):
+ def current_nic(self, sut, target):
"""
- Returns the NIC for a given DUT and target
+ Returns the NIC for a given SUT and target
"""
try:
- dut_idx = self.__internals.index(dut)
- target_idx = self.__internals[dut_idx + 1].index(target)
+ sut_idx = self.__internals.index(sut)
+ target_idx = self.__internals[sut_idx + 1].index(target)
except:
return None
- return self.__internals[dut_idx + 1][target_idx + 1]
+ return self.__internals[sut_idx + 1][target_idx + 1]
- def all_test_suites(self, dut, target):
+ def all_test_suites(self, sut, target):
"""
- Returns all the test suites for a given DUT and target.
+ Returns all the test suites for a given SUT and target.
"""
try:
- dut_idx = self.__internals.index(dut)
- target_idx = self.__internals[dut_idx + 1].index(target)
+ sut_idx = self.__internals.index(sut)
+ target_idx = self.__internals[sut_idx + 1].index(target)
except:
return None
- return self.__internals[dut_idx + 1][target_idx + 2][::2]
+ return self.__internals[sut_idx + 1][target_idx + 2][::2]
- def all_test_cases(self, dut, target, suite):
+ def all_test_cases(self, sut, target, suite):
"""
- Returns all the test cases for a given DUT, target and test case.
+ Returns all the test cases for a given SUT, target and test case.
"""
try:
- dut_idx = self.__internals.index(dut)
- target_idx = self.__internals[dut_idx + 1].index(target)
- suite_idx = self.__internals[dut_idx + 1][target_idx + 2].index(suite)
+ sut_idx = self.__internals.index(sut)
+ target_idx = self.__internals[sut_idx + 1].index(target)
+ suite_idx = self.__internals[sut_idx + 1][target_idx + 2].index(suite)
except:
return None
- return self.__internals[dut_idx + 1][target_idx + 2][suite_idx + 1][::2]
+ return self.__internals[sut_idx + 1][target_idx + 2][suite_idx + 1][::2]
- def result_for(self, dut, target, suite, case):
+ def result_for(self, sut, target, suite, case):
"""
- Returns the test case result/message for a given DUT, target, test
+ Returns the test case result/message for a given SUT, target, test
suite and test case.
"""
try:
- dut_idx = self.__internals.index(dut)
- target_idx = self.__internals[dut_idx + 1].index(target)
- suite_idx = self.__internals[dut_idx + 1][target_idx + 2].index(suite)
- case_idx = self.__internals[dut_idx + 1][target_idx + 2][
+ sut_idx = self.__internals.index(sut)
+ target_idx = self.__internals[sut_idx + 1].index(target)
+ suite_idx = self.__internals[sut_idx + 1][target_idx + 2].index(suite)
+ case_idx = self.__internals[sut_idx + 1][target_idx + 2][
suite_idx + 1
].index(case)
except:
return None
- return self.__internals[dut_idx + 1][target_idx + 2][suite_idx + 1][
+ return self.__internals[sut_idx + 1][target_idx + 2][suite_idx + 1][
case_idx + 1
]
- def add_failed_dut(self, dut, msg):
+ def add_failed_sut(self, sut, msg):
"""
- Sets the given DUT as failing due to msg
+ Sets the given SUT as failing due to msg
"""
- self.__failed_duts[dut] = msg
+ self.__failed_suts[sut] = msg
- def remove_failed_dut(self, dut):
+ def remove_failed_sut(self, sut):
"""
- Remove the given DUT from failed duts collection
+ Remove the given SUT from failed SUTs collection
"""
- if dut in self.__failed_duts:
- self.__failed_duts.pop(dut)
+ if sut in self.__failed_suts:
+ self.__failed_suts.pop(sut)
- def is_dut_failed(self, dut):
+ def is_sut_failed(self, sut):
"""
- True if the given DUT was marked as failing
+ True if the given SUT was marked as failing
"""
- return dut in self.__failed_duts
+ return sut in self.__failed_suts
- def dut_failed_msg(self, dut):
+ def sut_failed_msg(self, sut):
"""
- Returns the reason of failure for a given DUT
+ Returns the reason of failure for a given SUT
"""
- return self.__failed_duts[dut]
+ return self.__failed_suts[sut]
- def add_failed_target(self, dut, target, msg):
+ def add_failed_target(self, sut, target, msg):
"""
- Sets the given DUT, target as failing due to msg
+ Sets the given SUT, target as failing due to msg
"""
- self.__failed_targets[dut + target] = msg
+ self.__failed_targets[sut + target] = msg
- def remove_failed_target(self, dut, target):
+ def remove_failed_target(self, sut, target):
"""
- Remove the given DUT, target from failed targets collection
+ Remove the given SUT, target from failed targets collection
"""
- key_word = dut + target
+ key_word = sut + target
if key_word in self.__failed_targets:
self.__failed_targets.pop(key_word)
- def is_target_failed(self, dut, target):
+ def is_target_failed(self, sut, target):
"""
- True if the given DUT,target were marked as failing
+ True if the given SUT,target were marked as failing
"""
- return (dut + target) in self.__failed_targets
+ return (sut + target) in self.__failed_targets
- def target_failed_msg(self, dut, target):
+ def target_failed_msg(self, sut, target):
"""
- Returns the reason of failure for a given DUT,target
+ Returns the reason of failure for a given SUT,target
"""
- return self.__failed_targets[dut + target]
+ return self.__failed_targets[sut + target]
"""
Attributes defined as properties to hide the implementation from the
presented interface.
"""
- dut = property(__get_dut, __set_dut)
+ sut = property(__get_sut, __set_sut)
dpdk_version = property(__get_dpdk_version, __set_dpdk_version)
kdriver = property(__get_kdriver, __set_kdriver)
driver = property(__get_driver, __set_driver)
similarity index 89%
rename from framework/tester.py
rename to framework/tg_node.py
@@ -42,9 +42,9 @@ from time import sleep
from nics.net_device import GetNicObj
-from .config import PktgenConf
-from .crb import Crb
+from .config import PacketGeneratorConf
from .exception import ParameterInvalidException
+from .node import Node
from .packet import (
Packet,
compare_pktload,
@@ -62,31 +62,32 @@ from .settings import (
USERNAME,
load_global_setting,
)
-from .utils import GREEN, check_crb_python_version, convert_int2ip, convert_ip2int
+from .utils import GREEN, check_node_python_version, convert_int2ip, convert_ip2int
-class Tester(Crb):
+class TrafficGeneratorNode(Node):
"""
- Start the DPDK traffic generator on the machine `target`.
- A config file and pcap file must have previously been copied
- to this machine.
+ A class for managing connections to the node running the Traffic generator,
+ providing methods that retrieve the necessary information about the node
+ (such as cpu, memory and NIC details), configure it and configure and
+ manage the Traffic generator.
"""
- PORT_INFO_CACHE_KEY = "tester_port_info"
- CORE_LIST_CACHE_KEY = "tester_core_list"
- NUMBER_CORES_CACHE_KEY = "tester_number_cores"
- PCI_DEV_CACHE_KEY = "tester_pci_dev_info"
+ PORT_INFO_CACHE_KEY = "tg_port_info"
+ CORE_LIST_CACHE_KEY = "tg_core_list"
+ NUMBER_CORES_CACHE_KEY = "tg_number_cores"
+ PCI_DEV_CACHE_KEY = "tg_pci_dev_info"
- def __init__(self, crb, serializer):
- self.NAME = "tester"
+ def __init__(self, node, serializer):
+ self.NAME = "tg"
self.scapy_session = None
- super(Tester, self).__init__(crb, serializer, name=self.NAME)
- # check the python version of tester
- check_crb_python_version(self)
+ super(TrafficGeneratorNode, self).__init__(node, serializer, name=self.NAME)
+ # check the python version of TG
+ check_node_python_version(self)
self.bgProcIsRunning = False
- self.duts = []
+ self.suts = []
self.inBg = 0
self.scapyCmds = []
self.bgCmds = []
@@ -97,16 +98,16 @@ class Tester(Crb):
self.scapy_sessions_li = list()
self.scapy_session = self.prepare_scapy_env()
self.check_scapy_version()
- self.tmp_file = "/tmp/tester/"
+ self.tmp_file = "/tmp/tg/"
out = self.send_expect("ls -d %s" % self.tmp_file, "# ", verify=True)
if out == 2:
self.send_expect("mkdir -p %s" % self.tmp_file, "# ")
def prepare_scapy_env(self):
session_name = (
- "tester_scapy"
+ "tg_scapy"
if not self.scapy_sessions_li
- else f"tester_scapy_{random.random()}"
+ else f"tg_scapy_{random.random()}"
)
session = self.create_session(session_name)
self.scapy_sessions_li.append(session)
@@ -131,13 +132,13 @@ class Tester(Crb):
require_version = value.group(1)
if cur_version != require_version:
self.logger.warning(
- "The scapy vesrion not meet the requirement on tester,"
+ "The scapy vesrion not meet the requirement on TG,"
+ "please update your scapy, otherwise maybe some suite will failed"
)
def init_ext_gen(self):
"""
- Initialize tester packet generator object.
+ Initialize TG packet generator object.
"""
if self.it_uses_external_generator():
if self.is_pktgen:
@@ -152,36 +153,36 @@ class Tester(Crb):
def get_ip_address(self):
"""
- Get ip address of tester CRB.
+ Get ip address of TG Node.
"""
- return self.crb["tester IP"]
+ return self.node["tg IP"]
def get_username(self):
"""
- Get login username of tester CRB.
+ Get login username of TG Node.
"""
return USERNAME
def get_password(self):
"""
- Get tester login password of tester CRB.
+ Get TG login password of TG Node.
"""
- return self.crb["tester pass"]
+ return self.node["tg pass"]
@property
def is_pktgen(self):
"""
Check whether packet generator is configured.
"""
- if PKTGEN not in self.crb or not self.crb[PKTGEN]:
+ if PKTGEN not in self.node or not self.node[PKTGEN]:
return False
- if self.crb[PKTGEN].lower() in PKTGEN_GRP:
+ if self.node[PKTGEN].lower() in PKTGEN_GRP:
return True
else:
msg = os.linesep.join(
[
- "Packet generator <{0}> is not supported".format(self.crb[PKTGEN]),
+ "Packet generator <{0}> is not supported".format(self.node[PKTGEN]),
"Current supports: {0}".format(" | ".join(PKTGEN_GRP)),
]
)
@@ -210,13 +211,13 @@ class Tester(Crb):
and self.has_external_traffic_generator()
)
- def tester_prerequisites(self):
+ def tg_prerequisites(self):
"""
Prerequest function should be called before execute any test case.
- Will call function to scan all lcore's information which on Tester.
+ Will call function to scan all lcore's information which on TG.
Then call pci scan function to collect nic device information.
Then discovery the network topology and save it into cache file.
- At last setup DUT' environment for validation.
+ At last setup SUT' environment for validation.
"""
self.init_core_list()
self.pci_devices_information()
@@ -227,7 +228,7 @@ class Tester(Crb):
def disable_lldp(self):
"""
- Disable tester ports LLDP.
+ Disable TG ports LLDP.
"""
result = self.send_expect("lldpad -d", "# ")
if result:
@@ -254,27 +255,27 @@ class Tester(Crb):
def get_local_port(self, remotePort):
"""
- Return tester local port connect to specified dut port.
+ Return TG local port connect to specified SUT port.
"""
- return self.duts[0].ports_map[remotePort]
+ return self.suts[0].ports_map[remotePort]
def get_local_port_type(self, remotePort):
"""
- Return tester local port type connect to specified dut port.
+ Return TG local port type connect to specified SUT port.
"""
return self.ports_info[self.get_local_port(remotePort)]["type"]
- def get_local_port_bydut(self, remotePort, dutIp):
+ def get_local_port_bysut(self, remotePort, sutIp):
"""
- Return tester local port connect to specified port and specified dut.
+ Return TG local port connect to specified port and specified SUT.
"""
- for dut in self.duts:
- if dut.crb["My IP"] == dutIp:
- return dut.ports_map[remotePort]
+ for sut in self.suts:
+ if sut.node["My IP"] == sutIp:
+ return sut.ports_map[remotePort]
def get_local_index(self, pci):
"""
- Return tester local port index by pci id
+ Return TG local port index by pci id
"""
index = -1
for port in self.ports_info:
@@ -285,7 +286,7 @@ class Tester(Crb):
def get_pci(self, localPort):
"""
- Return tester local port pci id.
+ Return TG local port pci id.
"""
if localPort == -1:
raise ParameterInvalidException("local port should not be -1")
@@ -294,7 +295,7 @@ class Tester(Crb):
def get_interface(self, localPort):
"""
- Return tester local port interface name.
+ Return TG local port interface name.
"""
if localPort == -1:
raise ParameterInvalidException("local port should not be -1")
@@ -306,7 +307,7 @@ class Tester(Crb):
def get_mac(self, localPort):
"""
- Return tester local port mac address.
+ Return TG local port mac address.
"""
if localPort == -1:
raise ParameterInvalidException("local port should not be -1")
@@ -419,7 +420,7 @@ class Tester(Crb):
def _scan_pktgen_ports(self):
"""packet generator port setting
- Currently, trex run on tester node
+ Currently, trex run on TG node
"""
new_ports_info = []
pktgen_ports_info = self.pktgen.get_ports()
@@ -439,8 +440,8 @@ class Tester(Crb):
port_info["type"] = pktgen_port_type
port_info["mac"] = pktgen_mac
break
- # Since tester port scanning work flow change, non-functional port
- # mapping config will be ignored. Add tester port mapping if no
+ # Since TG port scanning work flow change, non-functional port
+ # mapping config will be ignored. Add TG port mapping if no
# port in ports info
else:
addr_array = pktgen_pci.split(":")
@@ -461,7 +462,7 @@ class Tester(Crb):
def scan_ports(self):
"""
- Scan all ports on tester and save port's pci/mac/interface.
+ Scan all ports on TG and save port's pci/mac/interface.
"""
if self.read_cache:
self.load_serializer_ports()
@@ -494,21 +495,21 @@ class Tester(Crb):
intf = port.get_interface_name()
self.logger.info(
- "Tester cached: [000:%s %s] %s"
+ "TG cached: [000:%s %s] %s"
% (port_info["pci"], port_info["type"], intf)
)
port_info["port"] = port
def scan_ports_uncached(self):
"""
- Return tester port pci/mac/interface information.
+ Return TG port pci/mac/interface information.
"""
self.ports_info = []
for (pci_bus, pci_id) in self.pci_devices_info:
# ignore unknown card types
if pci_id not in list(NICS.values()):
- self.logger.info("Tester: [%s %s] %s" % (pci_bus, pci_id, "unknow_nic"))
+ self.logger.info("TG: [%s %s] %s" % (pci_bus, pci_id, "unknow_nic"))
continue
addr_array = pci_bus.split(":")
@@ -521,11 +522,11 @@ class Tester(Crb):
if "No such file" in intf:
self.logger.info(
- "Tester: [%s %s] %s" % (pci_bus, pci_id, "unknow_interface")
+ "TG: [%s %s] %s" % (pci_bus, pci_id, "unknow_interface")
)
continue
- self.logger.info("Tester: [%s %s] %s" % (pci_bus, pci_id, intf))
+ self.logger.info("TG: [%s %s] %s" % (pci_bus, pci_id, intf))
macaddr = port.get_mac_addr()
ipv6 = port.get_ipv6_addr()
@@ -550,7 +551,7 @@ class Tester(Crb):
intf = port.get_interface2_name()
- self.logger.info("Tester: [%s %s] %s" % (pci_bus, pci_id, intf))
+ self.logger.info("TG: [%s %s] %s" % (pci_bus, pci_id, intf))
macaddr = port.get_intf2_mac_addr()
ipv6 = port.get_ipv6_addr()
@@ -571,7 +572,7 @@ class Tester(Crb):
"""
initialize packet generator instance
"""
- pktgen_type = self.crb[PKTGEN]
+ pktgen_type = self.node[PKTGEN]
# init packet generator instance
self.pktgen = getPacketGenerator(self, pktgen_type)
# prepare running environment
@@ -612,7 +613,7 @@ class Tester(Crb):
def get_port_numa(self, port):
"""
- Return tester local port numa.
+ Return TG local port numa.
"""
pci = self.ports_info[port]["pci"]
out = self.send_expect("cat /sys/bus/pci/devices/%s/numa_node" % pci, "#")
@@ -716,7 +717,7 @@ class Tester(Crb):
"""
print(GREEN("Transmitting and sniffing packets, please wait few minutes..."))
return pkt.send_pkt_bg_with_pcapfile(
- crb=self, tx_port=intf, count=send_times, loop=0, inter=interval
+ node=self, tx_port=intf, count=send_times, loop=0, inter=interval
)
def check_random_pkts(
@@ -867,14 +868,14 @@ class Tester(Crb):
def kill_all(self, killall=False):
"""
- Kill all scapy process or DPDK application on tester.
+ Kill all scapy process or DPDK application on TG.
"""
if not self.has_external_traffic_generator():
out = self.session.send_command("")
if ">>>" in out:
self.session.send_expect("quit()", "# ", timeout=3)
if killall:
- super(Tester, self).kill_all()
+ super(TrafficGeneratorNode, self).kill_all()
def close(self):
"""
@@ -902,9 +903,9 @@ class Tester(Crb):
self.session.close()
self.session = None
- def crb_exit(self):
+ def node_exit(self):
"""
- Close all resource before crb exit
+ Close all resource before node exit
"""
self.close()
self.logger.logger_exit()
@@ -43,13 +43,13 @@ from functools import wraps
DTS_ENV_PAT = r"DTS_*"
-def create_parallel_locks(num_duts):
+def create_parallel_locks(num_suts):
"""
- Create thread lock dictionary based on DUTs number
+ Create thread lock dictionary based on SUTs number
"""
global locks_info
locks_info = []
- for _ in range(num_duts):
+ for _ in range(num_suts):
lock_info = dict()
lock_info["update_lock"] = threading.RLock()
locks_info.append(lock_info)
@@ -59,7 +59,7 @@ def parallel_lock(num=1):
"""
Wrapper function for protect parallel threads, allow multiple threads
share one lock. Locks are created based on function name. Thread locks are
- separated between duts according to argument 'dut_id'.
+ separated between SUTs according to argument 'sut_id'.
Parameter:
num: Number of parallel threads for the lock
"""
@@ -68,16 +68,16 @@ def parallel_lock(num=1):
def decorate(func):
@wraps(func)
def wrapper(*args, **kwargs):
- if "dut_id" in kwargs:
- dut_id = kwargs["dut_id"]
+ if "sut_id" in kwargs:
+ sut_id = kwargs["sut_id"]
else:
- dut_id = 0
+ sut_id = 0
# in case function arguments is not correct
- if dut_id >= len(locks_info):
- dut_id = 0
+ if sut_id >= len(locks_info):
+ sut_id = 0
- lock_info = locks_info[dut_id]
+ lock_info = locks_info[sut_id]
uplock = lock_info["update_lock"]
name = func.__name__
@@ -97,8 +97,8 @@ def parallel_lock(num=1):
if lock._is_owned():
print(
RED(
- "DUT%d %s waiting for func lock %s"
- % (dut_id, threading.current_thread().name, func.__name__)
+ "SUT%d %s waiting for func lock %s"
+ % (sut_id, threading.current_thread().name, func.__name__)
)
)
lock.acquire()
@@ -178,13 +178,13 @@ def get_obj_funcs(obj, func_name_regex):
@parallel_lock()
-def remove_old_rsa_key(crb, ip):
+def remove_old_rsa_key(node, ip):
"""
- Remove the old RSA key of specified IP on crb.
+ Remove the old RSA key of specified IP on node.
"""
rsa_key_path = "~/.ssh/known_hosts"
remove_rsa_key_cmd = "sed -i '/%s/d' %s" % (ip, rsa_key_path)
- crb.send_expect(remove_rsa_key_cmd, "# ")
+ node.send_expect(remove_rsa_key_cmd, "# ")
def human_read_number(num):
@@ -300,9 +300,9 @@ def get_backtrace_object(file_name, obj_name):
return obj
-def check_crb_python_version(crb):
+def check_node_python_version(node):
cmd = "python3 -V"
- out = crb.send_expect(cmd, "#", 5)
+ out = node.send_expect(cmd, "#", 5)
pat = "Python (\d+).(\d+).(\d+)"
result = re.findall(pat, out)
if (
@@ -311,14 +311,14 @@ def check_crb_python_version(crb):
or (int(result[0][0]) == 3 and int(result[0][1]) < 6)
or (int(result[0][0]) == 3 and int(result[0][1]) == 6 and int(result[0][2]) < 9)
):
- crb.logger.warning(
+ node.logger.warning(
(
- "WARNING: Tester node python version is lower than python 3.6, "
+ "WARNING: TG node python version is lower than python 3.6, "
"it is deprecated for use in DTS, "
"and will not work in future releases."
)
)
- crb.logger.warning("Please use Python >= 3.6.9 instead")
+ node.logger.warning("Please use Python >= 3.6.9 instead")
def check_dts_python_version():
@@ -38,10 +38,10 @@ import framework.exception as exception
import framework.utils as utils
from .config import VIRTCONF, VirtConf
-from .dut import Dut
from .logger import getLogger
from .settings import CONFIG_ROOT_PATH
-from .virt_dut import VirtDut
+from .sut_node import SutNode
+from .virt_sut import VirtSut
ST_NOTSTART = "NOTSTART"
ST_PAUSE = "PAUSE"
@@ -58,32 +58,32 @@ class VirtBase(object):
function, we can get and set the VM boot command, and instantiate the VM.
"""
- def __init__(self, dut, vm_name, suite_name):
+ def __init__(self, sut, vm_name, suite_name):
"""
Initialize the VirtBase.
- dut: the instance of Dut
+ sut: the instance of SUT
vm_name: the name of VM which you have configured in the configure
suite_name: the name of test suite
"""
- self.host_dut = dut
+ self.host_sut = sut
self.vm_name = vm_name
self.suite = suite_name
# indicate whether the current vm is migration vm
self.migration_vm = False
# create self used host session, need close it later
- self.host_session = self.host_dut.new_session(self.vm_name)
+ self.host_session = self.host_sut.new_session(self.vm_name)
- self.host_logger = self.host_dut.logger
- # base_dir existed for host dut has prepared it
- self.host_session.send_expect("cd %s" % self.host_dut.base_dir, "# ")
+ self.host_logger = self.host_sut.logger
+ # base_dir existed for host SUT has prepared it
+ self.host_session.send_expect("cd %s" % self.host_sut.base_dir, "# ")
# init the host resource pool for VM
- self.virt_pool = self.host_dut.virt_pool
+ self.virt_pool = self.host_sut.virt_pool
if not self.has_virtual_ability():
if not self.enable_virtual_ability():
- raise Exception("Dut [ %s ] cannot have the virtual ability!!!")
+ raise Exception("SUT [ %s ] cannot have the virtual ability!!!")
self.virt_type = self.get_virt_type()
@@ -114,7 +114,7 @@ class VirtBase(object):
def enable_virtual_ability(self):
"""
- Enable the virtual ability on the DUT.
+ Enable the virtual ability on the SUT.
"""
NotImplemented
@@ -243,7 +243,7 @@ class VirtBase(object):
def generate_unique_mac(self):
"""
- Generate a unique MAC based on the DUT.
+ Generate a unique MAC based on the SUT.
"""
mac_head = "00:00:00:"
mac_tail = ":".join(
@@ -301,7 +301,7 @@ class VirtBase(object):
def start(self, load_config=True, set_target=True, cpu_topo="", bind_dev=True):
"""
- Start VM and instantiate the VM with VirtDut.
+ Start VM and instantiate the VM with VirtSut.
"""
try:
if load_config is True:
@@ -313,12 +313,12 @@ class VirtBase(object):
self._start_vm()
if self.vm_status is ST_RUNNING:
- # connect vm dut and init running environment
- vm_dut = self.instantiate_vm_dut(
+ # connect vm SUT and init running environment
+ vm_sut = self.instantiate_vm_sut(
set_target, cpu_topo, bind_dev=bind_dev, autodetect_topo=True
)
else:
- vm_dut = None
+ vm_sut = None
except Exception as vm_except:
if self.handle_exception(vm_except):
@@ -330,7 +330,7 @@ class VirtBase(object):
self.callback()
return None
- return vm_dut
+ return vm_sut
def quick_start(self, load_config=True, set_target=True, cpu_topo=""):
"""
@@ -363,8 +363,8 @@ class VirtBase(object):
if self.vm_status is ST_PAUSE:
# flag current vm is migration vm
self.migration_vm = True
- # connect backup vm dut and it just inherited from host
- vm_dut = self.instantiate_vm_dut(
+ # connect backup vm SUT and it just inherited from host
+ vm_sut = self.instantiate_vm_sut(
set_target, cpu_topo, bind_dev=False, autodetect_topo=False
)
except Exception as vm_except:
@@ -375,7 +375,7 @@ class VirtBase(object):
return None
- return vm_dut
+ return vm_sut
def handle_exception(self, vm_except):
# show exception back trace
@@ -395,13 +395,13 @@ class VirtBase(object):
elif type(vm_except) is exception.StartVMFailedException:
# start vm failure
return True
- elif type(vm_except) is exception.VirtDutConnectException:
+ elif type(vm_except) is exception.VirtSutConnectException:
# need stop vm
self._stop_vm()
return True
- elif type(vm_except) is exception.VirtDutInitException:
+ elif type(vm_except) is exception.VirtSutInitException:
# need close session
- vm_except.vm_dut.close()
+ vm_except.vm_sut.close()
# need stop vm
self.stop()
return True
@@ -430,83 +430,83 @@ class VirtBase(object):
if "disk" in list(self.params[i].keys()):
value = self.params[i]["disk"][0]
if "file" in list(value.keys()):
- host_ip = self.host_dut.get_ip_address()
+ host_ip = self.host_sut.get_ip_address()
return (
host_ip
+ ":"
- + self.host_dut.test_classname
+ + self.host_sut.test_classname
+ ":"
+ value["file"]
)
return None
- def instantiate_vm_dut(
+ def instantiate_vm_sut(
self, set_target=True, cpu_topo="", bind_dev=True, autodetect_topo=True
):
"""
- Instantiate the Dut class for VM.
+ Instantiate the SUT class for VM.
"""
- crb = self.host_dut.crb.copy()
- crb["bypass core0"] = False
+ node = self.host_sut.node.copy()
+ node["bypass core0"] = False
vm_ip = self.get_vm_ip()
- crb["IP"] = vm_ip
- crb["My IP"] = vm_ip
+ node["IP"] = vm_ip
+ node["My IP"] = vm_ip
username, password = self.get_vm_login()
- crb["user"] = username
- crb["pass"] = password
+ node["user"] = username
+ node["pass"] = password
- serializer = self.host_dut.serializer
+ serializer = self.host_sut.serializer
try:
- vm_dut = VirtDut(
+ vm_sut = VirtSut(
self,
- crb,
+ node,
serializer,
self.virt_type,
self.vm_name,
self.suite,
cpu_topo,
- dut_id=self.host_dut.dut_id,
+ sut_id=self.host_sut.sut_id,
)
except Exception as vm_except:
self.handle_exception(vm_except)
- raise exception.VirtDutConnectException
+ raise exception.VirtSutConnectException
return None
- vm_dut.nic_type = "any"
- vm_dut.tester = self.host_dut.tester
- vm_dut.host_dut = self.host_dut
- vm_dut.host_session = self.host_session
- vm_dut.init_log()
- vm_dut.migration_vm = self.migration_vm
+ vm_sut.nic_type = "any"
+ vm_sut.tg = self.host_sut.tg
+ vm_sut.host_sut = self.host_sut
+ vm_sut.host_session = self.host_session
+ vm_sut.init_log()
+ vm_sut.migration_vm = self.migration_vm
read_cache = False
- skip_setup = self.host_dut.skip_setup
+ skip_setup = self.host_sut.skip_setup
vm_img = self.get_vm_img()
# if current vm is migration vm, skip compile dpdk
# if VM_IMG_list include the vm_img, it means the vm have complie the dpdk ok, skip it
if self.migration_vm or vm_img in VM_IMG_LIST:
skip_setup = True
- base_dir = self.host_dut.base_dir
- vm_dut.set_speedup_options(read_cache, skip_setup)
+ base_dir = self.host_sut.base_dir
+ vm_sut.set_speedup_options(read_cache, skip_setup)
# package and patch should be set before prerequisites
- vm_dut.set_package(self.host_dut.package, self.host_dut.patches)
+ vm_sut.set_package(self.host_sut.package, self.host_sut.patches)
# base_dir should be set before prerequisites
- vm_dut.set_directory(base_dir)
+ vm_sut.set_directory(base_dir)
try:
# setting up dpdk in vm, must call at last
- vm_dut.target = self.host_dut.target
- vm_dut.prerequisites(
- self.host_dut.package, self.host_dut.patches, autodetect_topo
+ vm_sut.target = self.host_sut.target
+ vm_sut.prerequisites(
+ self.host_sut.package, self.host_sut.patches, autodetect_topo
)
if set_target:
- target = self.host_dut.target
- vm_dut.set_target(target, bind_dev, self.def_driver, self.driver_mode)
+ target = self.host_sut.target
+ vm_sut.set_target(target, bind_dev, self.def_driver, self.driver_mode)
except:
- raise exception.VirtDutInitException(vm_dut)
+ raise exception.VirtSutInitException(vm_sut)
return None
# after prerequisites and set_target, the dpdk compile is ok, add this vm img to list
@@ -515,8 +515,8 @@ class VirtBase(object):
VM_IMG_LIST.append(vm_img)
mutex_vm_list.release()
- self.vm_dut = vm_dut
- return vm_dut
+ self.vm_sut = vm_sut
+ return vm_sut
def stop(self):
"""
@@ -535,16 +535,16 @@ class VirtBase(object):
self.host_session.close()
self.host_session = None
- # vm_dut may not init in migration case
- if getattr(self, "vm_dut", None):
+ # vm_sut may not init in migration case
+ if getattr(self, "vm_sut", None):
if self.vm_status is ST_RUNNING:
- self.vm_dut.close()
+ self.vm_sut.close()
else:
# when vm is not running, not close session forcely
- self.vm_dut.close(force=True)
+ self.vm_sut.close(force=True)
- self.vm_dut.logger.logger_exit()
- self.vm_dut = None
+ self.vm_sut.logger.logger_exit()
+ self.vm_sut = None
def register_exit_callback(self, callback):
"""
@@ -36,7 +36,7 @@ from .qemu_libvirt import LibvirtKvm
from .settings import CONFIG_ROOT_PATH
-def VM(dut, vm_name, suite_name):
+def VM(sut, vm_name, suite_name):
conf = VirtConf(CONFIG_ROOT_PATH + os.sep + suite_name + ".cfg")
conf.load_virt_config(vm_name)
local_conf = conf.get_virt_config()
@@ -47,8 +47,8 @@ def VM(dut, vm_name, suite_name):
virt_type = param["virt_type"][0]["virt_type"]
if virt_type == "KVM":
- return QEMUKvm(dut, vm_name, suite_name)
+ return QEMUKvm(sut, vm_name, suite_name)
elif virt_type == "LIBVIRT":
- return LibvirtKvm(dut, vm_name, suite_name)
+ return LibvirtKvm(sut, vm_name, suite_name)
else:
raise Exception("Virt type %s is not supported!" % virt_type)
@@ -43,21 +43,21 @@ QuickScan = True
class VirtResource(object):
"""
- Class handle dut resource, like cpu, memory, net devices
+ Class handle SUT resource, like cpu, memory, net devices
"""
- def __init__(self, dut):
- self.dut = dut
+ def __init__(self, sut):
+ self.sut = sut
- self.cores = [int(core["thread"]) for core in dut.cores]
+ self.cores = [int(core["thread"]) for core in sut.cores]
# initialized unused cores
self.unused_cores = self.cores[:]
# initialized used cores
self.used_cores = [-1] * len(self.unused_cores)
- self.ports_info = dut.ports_info
+ self.ports_info = sut.ports_info
# initialized unused ports
- self.ports = [port["pci"] for port in dut.ports_info]
+ self.ports = [port["pci"] for port in sut.ports_info]
self.unused_ports = self.ports[:]
# initialized used ports
self.used_ports = ["unused"] * len(self.unused_ports)
@@ -120,12 +120,12 @@ class VirtResource(object):
self.used_cores[index] = -1
def __core_on_socket(self, core, socket):
- for dut_core in self.dut.cores:
- if int(dut_core["thread"]) == core:
+ for sut_core in self.sut.cores:
+ if int(sut_core["thread"]) == core:
if socket == -1:
return True
- if int(dut_core["socket"]) == socket:
+ if int(sut_core["socket"]) == socket:
return True
else:
return False
@@ -200,15 +200,15 @@ class VirtResource(object):
def __vm_has_resource(self, vm, resource=""):
if vm == "":
- self.dut.logger.info("VM name can't be NULL!!!")
+ self.sut.logger.info("VM name can't be NULL!!!")
raise Exception("VM name can't be NULL!!!")
if vm not in self.allocated_info:
- self.dut.logger.info("There is no resource allocated to VM [%s]." % vm)
+ self.sut.logger.info("There is no resource allocated to VM [%s]." % vm)
return False
if resource == "":
return True
if resource not in self.allocated_info[vm]:
- self.dut.logger.info(
+ self.sut.logger.info(
"There is no resource [%s] allocated to VM [%s] " % (resource, vm)
)
return False
@@ -382,7 +382,7 @@ class VirtResource(object):
while True:
if (
- self.dut.check_port_occupied(port) is False
+ self.sut.check_port_occupied(port) is False
and self._check_port_allocated(port) is False
):
break
@@ -465,7 +465,7 @@ class VirtResource(object):
return self.allocated_info[vm]["ports"]
-class simple_dut(object):
+class simple_sut(object):
def __init__(self):
self.ports_info = []
self.cores = []
@@ -475,8 +475,8 @@ class simple_dut(object):
if __name__ == "__main__":
- dut = simple_dut()
- dut.cores = [
+ sut = simple_sut()
+ sut.cores = [
{"thread": "1", "socket": "0"},
{"thread": "2", "socket": "0"},
{"thread": "3", "socket": "0"},
@@ -491,7 +491,7 @@ if __name__ == "__main__":
{"thread": "12", "socket": "1"},
]
- dut.ports_info = [
+ sut.ports_info = [
{
"intf": "p786p1",
"source": "cfg",
@@ -534,7 +534,7 @@ if __name__ == "__main__":
},
]
- virt_pool = VirtResource(dut)
+ virt_pool = VirtResource(sut)
print("Alloc two PF devices on socket 1 from VM")
print(virt_pool.alloc_pf(vm="test1", number=2, socket=1))
@@ -56,22 +56,22 @@ from .utils import create_mask
class VirtScene(object):
- def __init__(self, dut, tester, scene_name):
+ def __init__(self, sut, tg, scene_name):
self.name = scene_name
- self.host_dut = dut
- self.tester_dut = tester
- self.vm_dut = None
+ self.host_sut = sut
+ self.tg_sut = tg
+ self.vm_sut = None
self.pre_cmds = []
self.post_cmds = []
- self.vm_dut_enable = False
+ self.vm_sut_enable = False
self.auto_portmap = True
self.vm_type = "kvm"
self.def_target = "x86_64-native-linuxapp-gcc"
self.host_bound = False
- # for vm dut init_log
- self.host_dut.test_classname = "dts"
+ # for vm SUT init_log
+ self.host_sut.test_classname = "dts"
def load_config(self):
try:
@@ -118,9 +118,9 @@ class VirtScene(object):
def prepare_suite(self, conf):
for param in conf:
- if "dut" in list(param.keys()):
- if param["dut"] == "vm_dut":
- self.vm_dut_enable = True
+ if "sut" in list(param.keys()):
+ if param["sut"] == "vm_sut":
+ self.vm_sut_enable = True
if "type" in list(param.keys()):
if param["type"] == "xen":
self.vm_type = "xen"
@@ -148,10 +148,10 @@ class VirtScene(object):
else:
target = self.def_target
- self.host_dut.set_target(target, bind_dev=True)
+ self.host_sut.set_target(target, bind_dev=True)
if opts["dpdk"] == "testpmd":
- self.pmdout = PmdOutput(self.host_dut)
+ self.pmdout = PmdOutput(self.host_sut)
cores = opts["cores"].split()
out = self.pmdout.start_testpmd(cores)
if "Error" in out:
@@ -168,16 +168,16 @@ class VirtScene(object):
cpus = cpu_conf["skipcores"].split()
# remove invalid configured core
for cpu in cpus:
- if int(cpu) not in self.host_dut.virt_pool.cores:
+ if int(cpu) not in self.host_sut.virt_pool.cores:
cpus.remove(cpu)
# create core mask for reserved cores
core_mask = create_mask(cpus)
# reserve those skipped cores
- self.host_dut.virt_pool.reserve_cpu(core_mask)
+ self.host_sut.virt_pool.reserve_cpu(core_mask)
if "numa" in list(cpu_conf.keys()):
if cpu_conf["numa"] == "auto":
- numa = self.host_dut.ports_info[0]["port"].socket
+ numa = self.host_sut.ports_info[0]["port"].socket
else:
numa = int(cpu_conf["numa"])
else:
@@ -202,9 +202,9 @@ class VirtScene(object):
pin_cores = cpu_conf["cpu_pin"].split()
if len(pin_cores):
- cores = self.host_dut.virt_pool.alloc_cpu(vm=vm_name, corelist=pin_cores)
+ cores = self.host_sut.virt_pool.alloc_cpu(vm=vm_name, corelist=pin_cores)
else:
- cores = self.host_dut.virt_pool.alloc_cpu(
+ cores = self.host_sut.virt_pool.alloc_cpu(
vm=vm_name, number=num, socket=numa
)
core_cfg = ""
@@ -249,7 +249,7 @@ class VirtScene(object):
params["device"][index] = new_param
for param in params["device"]:
- netdev = get_netdev(self.host_dut, param["opt_host"])
+ netdev = get_netdev(self.host_sut, param["opt_host"])
if netdev is not None:
netdev.bind_driver("pci-stub")
@@ -257,9 +257,9 @@ class VirtScene(object):
pf_param = {}
# strip pf pci id
pf = int(param["pf_idx"])
- if pf >= len(self.host_dut.ports_info):
+ if pf >= len(self.host_sut.ports_info):
raise VirtDeviceCreateException
- pf_pci = self.host_dut.ports_info[pf]["pci"]
+ pf_pci = self.host_sut.ports_info[pf]["pci"]
pf_param["driver"] = "pci-assign"
pf_param["opt_host"] = pf_pci
if param["guestpci"] != "auto":
@@ -272,8 +272,8 @@ class VirtScene(object):
# strip vf pci id
if "pf_dev" in list(param.keys()):
pf = int(param["pf_dev"])
- pf_net = self.host_dut.ports_info[pf]["port"]
- vfs = self.host_dut.ports_info[pf]["vfs_port"]
+ pf_net = self.host_sut.ports_info[pf]["port"]
+ vfs = self.host_sut.ports_info[pf]["vfs_port"]
vf_idx = int(param["vf_idx"])
if vf_idx >= len(vfs):
raise VirtDeviceCreateException
@@ -293,7 +293,7 @@ class VirtScene(object):
command = {}
command["type"] = "host"
if not self.host_bound:
- intf = self.host_dut.ports_info[port]["intf"]
+ intf = self.host_sut.ports_info[port]["intf"]
command["command"] = "ifconfig %s up" % intf
self.reg_postvm_cmds(command)
@@ -310,7 +310,7 @@ class VirtScene(object):
try:
print(utils.GREEN("create vf %d %d %s" % (port, vf_num, driver)))
- self.host_dut.generate_sriov_vfs_by_port(port, vf_num, driver)
+ self.host_sut.generate_sriov_vfs_by_port(port, vf_num, driver)
self.reset_pf_cmds(port)
except:
print(utils.RED("Failed to create vf as requested!!!"))
@@ -322,16 +322,16 @@ class VirtScene(object):
try:
print(utils.GREEN("destroy vfs on port %d" % port))
- self.host_dut.destroy_sriov_vfs_by_port(port)
+ self.host_sut.destroy_sriov_vfs_by_port(port)
except:
print(utils.RED("Failed to destroy vf as requested!!!"))
def reg_prevm_cmds(self, command):
"""
- command: {'type':'host/tester/vm',
- define which crb command progress
+ command: {'type':'host/tg/vm',
+ define which node command progress
'command':'XXX',
- command send to crb
+ command send to node
'expect':'XXX',
expected output for command
'timeout': 60,
@@ -346,11 +346,11 @@ class VirtScene(object):
if cmd["type"] == "vm":
print(utils.RED("Can't run vm command when vm not ready"))
elif cmd["type"] == "host":
- crb = self.host_dut
- elif cmd["type"] == "tester":
- crb = self.tester_dut
+ node = self.host_sut
+ elif cmd["type"] == "tg":
+ node = self.tg_sut
else:
- crb = self.host_dut
+ node = self.host_sut
if "expect" not in list(cmd.keys()):
expect = "# "
@@ -367,7 +367,7 @@ class VirtScene(object):
else:
timeout = cmd["timeout"]
- ret = crb.send_expect(
+ ret = node.send_expect(
cmd["command"], expect, timeout=timeout, verify=verify
)
@@ -377,10 +377,10 @@ class VirtScene(object):
def reg_postvm_cmds(self, command):
"""
- command: {'type':'host/tester/vm',
- define which crb command progress
+ command: {'type':'host/tg/vm',
+ define which node command progress
'command':'XXX',
- command send to crb
+ command send to node
'expect':'XXX',
expected output for command
'verify':'yes or no'
@@ -392,13 +392,13 @@ class VirtScene(object):
def run_post_cmds(self):
for cmd in self.post_cmds:
if cmd["type"] == "vm":
- crb = self.vm_dut
+ node = self.vm_sut
elif cmd["type"] == "host":
- crb = self.host_dut
- elif cmd["type"] == "tester":
- crb = self.tester_dut
+ node = self.host_sut
+ elif cmd["type"] == "tg":
+ node = self.tg_sut
else:
- crb = self.host_dut
+ node = self.host_sut
if "expect" not in list(cmd.keys()):
expect = "# "
@@ -415,7 +415,7 @@ class VirtScene(object):
else:
timeout = cmd["timeout"]
- ret = crb.send_expect(
+ ret = node.send_expect(
cmd["command"], expect, timeout=timeout, verify=verify
)
@@ -446,7 +446,7 @@ class VirtScene(object):
for vm_name in list(self.vm_confs.keys()):
# tricky here, QEMUKvm based on suite and vm name
# suite is virt_global, vm_name just the type
- vm = QEMUKvm(self.host_dut, self.vm_type.upper(), "virt_global")
+ vm = QEMUKvm(self.host_sut, self.vm_type.upper(), "virt_global")
vm.load_config()
vm.vm_name = vm_name
vm.set_vm_default()
@@ -457,28 +457,28 @@ class VirtScene(object):
# get cpu topo
topo = self.get_cputopo(scene_params)
try:
- vm_dut = vm.start(
+ vm_sut = vm.start(
load_config=False, set_target=False, cpu_topo=topo
)
- if vm_dut is None:
+ if vm_sut is None:
raise Exception("Set up VM ENV failed!")
vm_info = {}
vm_info[vm_name] = vm
- vm_info[vm_name + "_session"] = vm_dut
+ vm_info[vm_name + "_session"] = vm_sut
self.vms.append(vm_info)
except Exception as e:
print(utils.RED("Failure for %s" % str(e)))
- def get_vm_duts(self):
- duts = []
+ def get_vm_suts(self):
+ suts = []
for vm_info in self.vms:
for vm_obj in list(vm_info.keys()):
if "session" in vm_obj:
- duts.append(vm_info[vm_obj])
+ suts.append(vm_info[vm_obj])
- return duts
+ return suts
def create_scene(self):
self.prepare_vm()
@@ -510,7 +510,7 @@ class VirtScene(object):
if __name__ == "__main__":
class QEMUKvmTmp:
- def __init__(self, dut, vm_name, suite_name):
+ def __init__(self, sut, vm_name, suite_name):
print(vm_name)
print(suite_name)
@@ -530,7 +530,7 @@ if __name__ == "__main__":
emu_dev3 = simple_dev("00:00.3")
emu_dev4 = simple_dev("00:00.4")
- class simple_dut(object):
+ class simple_sut(object):
def __init__(self):
self.ports_info = [
{"vfs_port": [emu_dev1, emu_dev2]},
@@ -553,8 +553,8 @@ if __name__ == "__main__":
def alloc_cpu(self, vm="", number=-1, socket=-1, corelist=None):
print("alloc %s num %d on socket %d" % (vm, number, socket))
- dut = simple_dut()
- scene = VirtScene(dut, None, "vf_passthrough")
+ sut = simple_sut()
+ scene = VirtScene(sut, None, "vf_passthrough")
scene.load_config()
scene.create_scene()
scene.destroy_scene()
similarity index 84%
rename from framework/virt_dut.py
rename to framework/virt_sut.py
@@ -37,31 +37,31 @@ import framework.settings as settings
from nics.net_device import GetNicObj, RemoveNicObj
from .config import AppNameConf, PortConf
-from .dut import Dut
-from .project_dpdk import DPDKdut
+from .project_dpdk import DpdkSut
from .settings import LOG_NAME_SEP, NICS, get_netdev, load_global_setting
+from .sut_node import SutNode
from .utils import RED, parallel_lock
-class VirtDut(DPDKdut):
+class VirtSut(DpdkSut):
"""
- A connection to the CRB under test.
- This class sends commands to the CRB and validates the responses. It is
+ A connection to the Node under test.
+ This class sends commands to the Node and validates the responses. It is
implemented using either ssh for linuxapp or the terminal server for
baremetal.
- All operations are in fact delegated to an instance of either CRBLinuxApp
- or CRBBareMetal.
+ All operations are in fact delegated to an instance of either NodeLinuxApp
+ or NodeBareMetal.
"""
def __init__(
- self, hyper, crb, serializer, virttype, vm_name, suite, cpu_topo, dut_id
+ self, hyper, node, serializer, virttype, vm_name, suite, cpu_topo, sut_id
):
- self.vm_ip = crb["IP"]
- self.NAME = "virtdut" + LOG_NAME_SEP + "%s" % self.vm_ip
+ self.vm_ip = node["IP"]
+ self.NAME = "virtsut" + LOG_NAME_SEP + "%s" % self.vm_ip
# do not create addition alt_session
- super(VirtDut, self).__init__(
- crb, serializer, dut_id, self.NAME, alt_session=False
+ super(VirtSut, self).__init__(
+ node, serializer, sut_id, self.NAME, alt_session=False
)
self.vm_name = vm_name
self.hyper = hyper
@@ -72,7 +72,7 @@ class VirtDut(DPDKdut):
self.suite = suite
self.number_of_cores = 0
- self.tester = None
+ self.tg = None
self.cores = []
self.architecture = None
self.ports_map = []
@@ -84,8 +84,8 @@ class VirtDut(DPDKdut):
self.apps_name = {}
def init_log(self):
- if hasattr(self.host_dut, "test_classname"):
- self.logger.config_suite(self.host_dut.test_classname, "virtdut")
+ if hasattr(self.host_sut, "test_classname"):
+ self.logger.config_suite(self.host_sut.test_classname, "virtsut")
def close(self, force=False):
if self.session:
@@ -95,10 +95,10 @@ class VirtDut(DPDKdut):
def set_nic_type(self, nic_type):
"""
- Set CRB NICS ready to validated.
+ Set Node NICS ready to validated.
"""
self.nic_type = nic_type
- # vm_dut config will load from vm configuration file
+ # vm_sut config will load from vm configuration file
@parallel_lock()
def load_portconf(self):
@@ -110,18 +110,18 @@ class VirtDut(DPDKdut):
self.ports_cfg = self.conf.get_ports_config()
@parallel_lock()
- def detect_portmap(self, dut_id):
+ def detect_portmap(self, sut_id):
"""
Detect port mapping with ping6 message, should be locked for protect
- tester operations.
+ TG operations.
"""
- # enable tester port ipv6
- self.host_dut.enable_tester_ipv6()
+ # enable TG port ipv6
+ self.host_sut.enable_tg_ipv6()
self.map_available_ports()
- # disable tester port ipv6
- self.host_dut.disable_tester_ipv6()
+ # disable TG port ipv6
+ self.host_sut.disable_tg_ipv6()
def load_portmap(self):
"""
@@ -136,16 +136,16 @@ class VirtDut(DPDKdut):
continue
if "peer" in list(self.ports_cfg[key].keys()):
- tester_pci = self.ports_cfg[key]["peer"]
- # find tester_pci index
- pci_idx = self.tester.get_local_index(tester_pci)
+ tg_pci = self.ports_cfg[key]["peer"]
+ # find tg_pci index
+ pci_idx = self.tg.get_local_index(tg_pci)
self.ports_map[index] = pci_idx
def set_target(self, target, bind_dev=True, driver_name="", driver_mode=""):
"""
Set env variable, these have to be setup all the time. Some tests
need to compile example apps by themselves and will fail otherwise.
- Set hugepage on DUT and install modules required by DPDK.
+ Set hugepage on SUT and install modules required by DPDK.
Configure default ixgbe PMD function.
"""
self.set_toolchain(target)
@@ -168,9 +168,9 @@ class VirtDut(DPDKdut):
def prerequisites(self, pkgName, patch, autodetect_topo):
"""
Prerequest function should be called before execute any test case.
- Will call function to scan all lcore's information which on DUT.
+ Will call function to scan all lcore's information which on SUT.
Then call pci scan function to collect nic device information.
- At last setup DUT' environment for validation.
+ At last setup SUT' environment for validation.
"""
if not self.skip_setup:
self.prepare_package()
@@ -198,8 +198,8 @@ class VirtDut(DPDKdut):
# update with real numa id
self.update_ports()
- # restore dut ports to kernel
- # if current vm is migration vm, skip restore dut ports
+ # restore SUT ports to kernel
+ # if current vm is migration vm, skip restore SUT ports
# because there maybe have some app have run
if not self.migration_vm:
if self.virttype != "XEN":
@@ -220,7 +220,7 @@ class VirtDut(DPDKdut):
else:
# if no config ports in port config file, will auto-detect portmap
if autodetect_topo:
- self.detect_portmap(dut_id=self.dut_id)
+ self.detect_portmap(sut_id=self.sut_id)
# print latest ports_info
for port_info in self.ports_info:
@@ -231,7 +231,7 @@ class VirtDut(DPDKdut):
self.apps_name_conf = name_cfg.load_app_name_conf()
self.apps_name = self.apps_name_conf["meson"]
- # use the dut target directory instead of 'target' string in app name
+ # use the SUT target directory instead of 'target' string in app name
for app in self.apps_name:
cur_app_path = self.apps_name[app].replace("target", self.target)
self.apps_name[app] = cur_app_path + " "
@@ -353,7 +353,7 @@ class VirtDut(DPDKdut):
if vmpci == pci_map["guestpci"]:
hostpci = pci_map["hostpci"]
# search host port info structure
- for hostport in self.host_dut.ports_info:
+ for hostport in self.host_sut.ports_info:
# update port numa
if hostpci == hostport["pci"]:
port["numa"] = hostport["numa"]
@@ -372,7 +372,7 @@ class VirtDut(DPDKdut):
Load or generate network connection mapping list.
"""
self.map_available_ports_uncached()
- self.logger.warning("VM DUT PORT MAP: " + str(self.ports_map))
+ self.logger.warning("VM SUT PORT MAP: " + str(self.ports_map))
def map_available_ports_uncached(self):
"""
@@ -385,20 +385,20 @@ class VirtDut(DPDKdut):
remove = []
self.ports_map = [-1] * nrPorts
- hits = [False] * len(self.tester.ports_info)
+ hits = [False] * len(self.tg.ports_info)
for vmPort in range(nrPorts):
vmpci = self.ports_info[vmPort]["pci"]
peer = self.get_peer_pci(vmPort)
# if peer pci configured
if peer is not None:
- for remotePort in range(len(self.tester.ports_info)):
- if self.tester.ports_info[remotePort]["pci"] == peer:
+ for remotePort in range(len(self.tg.ports_info)):
+ if self.tg.ports_info[remotePort]["pci"] == peer:
hits[remotePort] = True
self.ports_map[vmPort] = remotePort
break
if self.ports_map[vmPort] == -1:
- self.logger.error("CONFIGURED TESTER PORT CANNOT FOUND!!!")
+ self.logger.error("CONFIGURED TG PORT CANNOT FOUND!!!")
else:
continue # skip ping6 map
@@ -410,20 +410,20 @@ class VirtDut(DPDKdut):
break
# auto ping port map
- for remotePort in range(len(self.tester.ports_info)):
- # for two vfs connected to same tester port
+ for remotePort in range(len(self.tg.ports_info)):
+ # for two vfs connected to same TG port
# need skip ping from devices on same pf device
- remotepci = self.tester.ports_info[remotePort]["pci"]
- port_type = self.tester.ports_info[remotePort]["type"]
+ remotepci = self.tg.ports_info[remotePort]["pci"]
+ port_type = self.tg.ports_info[remotePort]["type"]
# IXIA port should not check whether has vfs
if port_type.lower() not in ("ixia", "trex"):
- remoteport = self.tester.ports_info[remotePort]["port"]
+ remoteport = self.tg.ports_info[remotePort]["port"]
vfs = []
- # vm_dut and tester in same dut
- host_ip = self.crb["IP"].split(":")[0]
- if self.crb["tester IP"] == host_ip:
+ # vm_sut and TG in same SUT
+ host_ip = self.node["IP"].split(":")[0]
+ if self.node["tg IP"] == host_ip:
vfs = remoteport.get_sriov_vfs_pci()
- # if hostpci is vf of tester port
+ # if hostpci is vf of TG port
if hostpci == remotepci or hostpci in vfs:
print(RED("Skip ping from same PF device"))
continue
@@ -432,13 +432,13 @@ class VirtDut(DPDKdut):
if ipv6 == "Not connected":
continue
- out = self.tester.send_ping6(
+ out = self.tg.send_ping6(
remotePort, ipv6, self.get_mac_address(vmPort)
)
if out and "64 bytes from" in out:
self.logger.info(
- "PORT MAP: [dut %d: tester %d]" % (vmPort, remotePort)
+ "PORT MAP: [SUT %d: tg %d]" % (vmPort, remotePort)
)
self.ports_map[vmPort] = remotePort
hits[remotePort] = True
@@ -96,7 +96,7 @@ parser = argparse.ArgumentParser(description="DPDK test framework.")
parser.add_argument(
"--config-file",
default="execution.cfg",
- help="configuration file that describes the test " + "cases, DUTs and targets",
+ help="configuration file that describes the test " + "cases, SUTs and targets",
)
parser.add_argument("--git", help="git label to use as input")
@@ -117,15 +117,15 @@ parser.add_argument(
"-s",
"--skip-setup",
action="store_true",
- help="skips all possible setup steps done on both DUT" + " and tester boards.",
+ help="skips all possible setup steps done on both SUT" + " and TG boards.",
)
parser.add_argument(
"-r",
"--read-cache",
action="store_true",
- help="reads the DUT configuration from a cache. If not "
- + "specified, the DUT configuration will be calculated "
+ help="reads the SUT configuration from a cache. If not "
+ + "specified, the SUT configuration will be calculated "
+ "as usual and cached.",
)
@@ -184,8 +184,8 @@ parser.add_argument(
parser.add_argument(
"--commands",
action="append",
- help="run command on tester or dut. The command format is "
- + "[commands]:dut|tester:pre-init|post-init:check|ignore",
+ help="run command on TG or SUT. The command format is "
+ + "[commands]:sut|tg:pre-init|post-init:check|ignore",
)
parser.add_argument("--subtitle", help="add a subtitle to the rst report")
@@ -36,7 +36,7 @@ import time
from functools import wraps
import framework.settings as settings
-from framework.crb import Crb
+from framework.node import Node
from framework.settings import HEADER_SIZE, TIMEOUT
from framework.utils import RED
@@ -67,15 +67,15 @@ class NetDevice(object):
Abstract the device which is PF or VF.
"""
- def __init__(self, crb, domain_id, bus_id, devfun_id):
- if not isinstance(crb, Crb):
- raise Exception(" Please input the instance of Crb!!!")
- self.crb = crb
+ def __init__(self, node, domain_id, bus_id, devfun_id):
+ if not isinstance(node, Node):
+ raise Exception(" Please input an instance of Node!!!")
+ self.node = node
self.domain_id = domain_id
self.bus_id = bus_id
self.devfun_id = devfun_id
self.pci = domain_id + ":" + bus_id + ":" + devfun_id
- self.pci_id = get_pci_id(crb, domain_id, bus_id, devfun_id)
+ self.pci_id = get_pci_id(node, domain_id, bus_id, devfun_id)
self.default_driver = settings.get_nic_driver(self.pci_id)
self.name = settings.get_nic_name(self.pci_id)
@@ -102,9 +102,9 @@ class NetDevice(object):
def __send_expect(self, cmds, expected, timeout=TIMEOUT, alt_session=True):
"""
- Wrap the crb`s session as private session for sending expect.
+ Wrap the node`s session as private session for sending expect.
"""
- return self.crb.send_expect(
+ return self.node.send_expect(
cmds, expected, timeout=timeout, alt_session=alt_session
)
@@ -112,7 +112,7 @@ class NetDevice(object):
"""
Get OS type.
"""
- return self.crb.get_os_type()
+ return self.node.get_os_type()
def nic_is_pf(self):
"""
@@ -124,7 +124,7 @@ class NetDevice(object):
"""
Get the NIC driver.
"""
- return self.crb.get_pci_dev_driver(self.domain_id, self.bus_id, self.devfun_id)
+ return self.node.get_pci_dev_driver(self.domain_id, self.bus_id, self.devfun_id)
def get_nic_pkg(self):
"""
@@ -594,13 +594,13 @@ class NetDevice(object):
"""
Get numa number of specified pci device.
"""
- self.crb.get_device_numa(self.domain_id, self.bus_id, self.devfun_id)
+ self.node.get_device_numa(self.domain_id, self.bus_id, self.devfun_id)
def get_card_type(self):
"""
Get card type of specified pci device.
"""
- return self.crb.get_pci_dev_id(self.domain_id, self.bus_id, self.devfun_id)
+ return self.node.get_pci_dev_id(self.domain_id, self.bus_id, self.devfun_id)
@nic_has_driver
def get_nic_speed(self):
@@ -718,7 +718,7 @@ class NetDevice(object):
bus_id = addr_array[1]
devfun_id = addr_array[2]
- self.default_vf_driver = self.crb.get_pci_dev_driver(
+ self.default_vf_driver = self.node.get_pci_dev_driver(
domain_id, bus_id, devfun_id
)
else:
@@ -932,7 +932,7 @@ class NetDevice(object):
self.__send_expect(cmd % (self.intf_name, mtu), "# ")
-def get_pci_id(crb, domain_id, bus_id, devfun_id):
+def get_pci_id(node, domain_id, bus_id, devfun_id):
"""
Return pci device type
"""
@@ -941,14 +941,14 @@ def get_pci_id(crb, domain_id, bus_id, devfun_id):
bus_id,
devfun_id,
)
- out = crb.send_expect(command, "# ")
+ out = node.send_expect(command, "# ")
vendor = out[2:]
command = "cat /sys/bus/pci/devices/%s\:%s\:%s/device" % (
domain_id,
bus_id,
devfun_id,
)
- out = crb.send_expect(command, "# ")
+ out = node.send_expect(command, "# ")
device = out[2:]
return "%s:%s" % (vendor, device)
@@ -973,7 +973,7 @@ def get_from_list(host, domain_id, bus_id, devfun_id):
for nic in NICS_LIST:
if host == nic["host"]:
pci = ":".join((domain_id, bus_id, devfun_id))
- if pci == nic["pci"] and nic["port"].crb.session:
+ if pci == nic["pci"] and nic["port"].node.session:
return nic["port"]
return None
@@ -988,26 +988,26 @@ def remove_from_list(host):
NICS_LIST.remove(nic)
-def GetNicObj(crb, domain_id, bus_id, devfun_id):
+def GetNicObj(node, domain_id, bus_id, devfun_id):
"""
Get network device object. If network device has been initialized, just
return object.
"""
# find existed NetDevice object
- obj = get_from_list(crb.crb["My IP"], domain_id, bus_id, devfun_id)
+ obj = get_from_list(node.node["My IP"], domain_id, bus_id, devfun_id)
if obj:
return obj
# generate NetDevice object
- obj = NetDevice(crb, domain_id, bus_id, devfun_id)
+ obj = NetDevice(node, domain_id, bus_id, devfun_id)
# save NetDevice object to cache, directly get it from cache next time
- add_to_list(crb.crb["My IP"], obj)
+ add_to_list(node.node["My IP"], obj)
return obj
-def RemoveNicObj(crb):
+def RemoveNicObj(node):
"""
Remove network device object.
"""
- remove_from_list(crb.crb["My IP"])
+ remove_from_list(node.node["My IP"])
@@ -39,10 +39,10 @@ from git import Repo
class SystemInfo(object):
- def __init__(self, dut, pci_device_id):
- self.dut = dut
+ def __init__(self, sut, pci_device_id):
+ self.sut = sut
self.pci_device_id = pci_device_id
- self.session = self.dut.session
+ self.session = self.sut.session
self.system_info = OrderedDict()
self.nic_info = OrderedDict()
deleted file mode 100644
@@ -1,2 +0,0 @@
-Output dir for DTF results.
-
@@ -55,7 +55,7 @@ The core configuration description is:
Prerequisites
=============
-Each of the 10Gb Ethernet* ports of the DUT is directly connected in
+Each of the 10Gb Ethernet* ports of the SUT is directly connected in
full-duplex to a different port of the peer traffic generator.
Using interactive commands, the traffic generator can be configured to
@@ -77,7 +77,7 @@ Prerequisites
CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc
-6. Set DUT port only has one queue::
+6. Set SUT port only has one queue::
ethtool -L enp216s0f0 combined 1
ethtool -L enp216s0f1 combined 1
@@ -318,9 +318,9 @@ Start the packet forwarding::
TX threshold registers: pthresh=32 hthresh=8 wthresh=8
-Start a packet capture on the tester in the background::
+Start a packet capture on the TG in the background::
- # tcpdump -i <iface> -s 65535 -w /tmp/tester/test_hardware_checksum_check_l4_tx_capture.pcap &
+ # tcpdump -i <iface> -s 65535 -w /tmp/tg/test_hardware_checksum_check_l4_tx_capture.pcap &
Send a packet with a good checksum::
@@ -358,9 +358,9 @@ Start the packet forwarding::
TX threshold registers: pthresh=32 hthresh=8 wthresh=8
-Start a packet capture on the tester in the background::
+Start a packet capture on the TG in the background::
- # tcpdump -i <iface> -s 65535 -w /tmp/tester/test_hardware_checksum_check_l3_tx_capture.pcap &
+ # tcpdump -i <iface> -s 65535 -w /tmp/tg/test_hardware_checksum_check_l3_tx_capture.pcap &
Send a packet with a good checksum with a 1 in it's payload::
@@ -48,7 +48,7 @@ Prerequisites
Topology
--------
-DUT port 0 <----> Tester port 0
+SUT port 0 <----> TG port 0
Hardware
--------
@@ -66,7 +66,7 @@ General set up
# CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static <dpdk build dir>
# ninja -C <dpdk build dir> -j 110
-2. Get the pci device id and interface of DUT and tester.
+2. Get the pci device id and interface of NICs.
For example, 0000:18:00.0 and 0000:18:00.1 is pci device id,
ens785f0 and ens785f1 is interface::
@@ -75,9 +75,9 @@ General set up
0000:18:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci
0000:18:00.1 'Device 159b' if=ens785f1 drv=ice unused=vfio-pci
-3. Bind the DUT port to dpdk::
+3. Bind the NIC port to dpdk::
- <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <DUT port pci device id>
+ <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <NIC port pci device id>
Test case
@@ -92,7 +92,7 @@ test steps
~~~~~~~~~~
1. start testpmd with different pin_id and dump registers::
- <dpdk build dir>/app/dpdk-testpmd <EAL options> -a <DUT port pci device id>,pps_out='[pin:0]' -- -i --rxq=4 --txq=4
+ <dpdk build dir>/app/dpdk-testpmd <EAL options> -a <NIC port pci device id>,pps_out='[pin:0]' -- -i --rxq=4 --txq=4
testpmd> read reg 0 0x00088998
testpmd> read reg 0 0x000889B8
testpmd> read reg 0 0x00088928
@@ -74,7 +74,7 @@ Prerequisites
CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc -j 110
-5. Get the pci device id of DUT, for example::
+5. Get the pci device id of NIC, for example::
./usertools/dpdk-devbind.py -s
@@ -110,7 +110,7 @@ Prerequisites
testpmd> set verbose 1
testpmd> start
-10. start scapy and configuration GTP profile in tester
+10. start scapy and configuration GTP profile in TG
scapy::
>>> import sys
@@ -31,7 +31,7 @@
OF THE POSSIBILITY OF SUCH DAMAGE.
===============================
-CVL IAVF: Advanced RSS For GTPU
+CVL IAVF: Advanced RSS For GTPU
===============================
Description
@@ -49,7 +49,7 @@ It can support ipv4+ipv6 combination of GTP-U packet.
IAVF also support symmetric hash function by rte_flow for GTP-U packets. But simple-xor hash function is not supported in IAVF.
And it need DDP Comms Package to support GTP-U protocol.
-support pattern and input set
+support pattern and input set
-----------------------------
.. table::
@@ -197,7 +197,7 @@ Prerequisites
This rss feature designed for CVL NIC 25G and 100G, so below cases only support CVL NIC.
-3. create a VF from a PF in DUT, set mac address for thi VF::
+3. create a VF from a PF in SUT, set mac address for this VF::
echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs
ip link set enp24s0f0 vf 0 mac 00:11:22:33:44:55
@@ -211,13 +211,13 @@ Prerequisites
The kernel must be >= 3.6+ and VT-d must be enabled in bios.
-5. Launch the testpmd to configuration queue of rx and tx number 16 in DUT::
+5. Launch the testpmd to configuration queue of rx and tx number 16 in SUT::
testpmd>./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16
testpmd>set fwd rxonly
testpmd>set verbose 1
-6. start scapy and configuration NVGRE and GTP profile in tester
+6. start scapy and configuration NVGRE and GTP profile in TG
scapy::
>>> import sys
@@ -513,7 +513,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -528,7 +528,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -543,7 +543,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -558,7 +558,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -572,7 +572,7 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.10.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -586,7 +586,7 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.10.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -753,7 +753,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -768,7 +768,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -783,7 +783,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -798,7 +798,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -812,7 +812,7 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.10.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -826,7 +826,7 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.10.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -1157,7 +1157,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -1173,7 +1173,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -1189,7 +1189,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -1205,7 +1205,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -1324,7 +1324,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -1340,7 +1340,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -1356,7 +1356,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -1372,7 +1372,7 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
@@ -1448,7 +1448,7 @@ basic hit pattern packets are the same in this test case.
ipv4-nonfrag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0")
-
+
ipv4-frag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2",frag=6)/("X"*480)],iface="enp134s0f0")
@@ -1475,7 +1475,7 @@ hit pattern and defined input set:
ipv4-nonfrag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.10.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0")
-
+
ipv4-frag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.10.1", src="192.168.0.2",frag=6)/("X"*480)],iface="enp134s0f0")
@@ -1496,7 +1496,7 @@ hit pattern but not defined input set:
ipv4-nonfrag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.10.2")/("X"*480)],iface="enp134s0f0")
-
+
ipv4-frag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.10.2",frag=6)/("X"*480)],iface="enp134s0f0")
@@ -1523,7 +1523,7 @@ hit pattern and defined input set:
ipv4-nonfrag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.10.2")/("X"*480)],iface="enp134s0f0")
-
+
ipv4-frag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.10.2",frag=6)/("X"*480)],iface="enp134s0f0")
@@ -1544,7 +1544,7 @@ hit pattern but not defined input set:
ipv4-nonfrag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.10.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0")
-
+
ipv4-frag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.10.1", src="192.168.0.2",frag=6)/("X"*480)],iface="enp134s0f0")
@@ -1608,19 +1608,19 @@ hit pattern and defined input set:
ipv4-nonfrag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123457)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)],iface="enp134s0f0")
-
+
ipv4-frag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123457)/IP(dst="192.168.0.1", src="192.168.0.2",frag=6)/("X"*480)],iface="enp134s0f0")
-
+
ipv4-icmp packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123457)/IP(dst="192.168.0.1", src="192.168.0.2")/ICMP()/("X"*480)],iface="enp134s0f0")
-
+
ipv4-tcp packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123457)/IP(dst="192.168.0.1", src="192.168.0.2")/TCP()/("X"*480)],iface="enp134s0f0")
-
+
ipv4-udp packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123457)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP()/("X"*480)],iface="enp134s0f0")
@@ -1629,7 +1629,7 @@ hit pattern but not defined input set:
ipv4-nonfrag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.10.1", src="192.168.10.2")/("X"*480)],iface="enp134s0f0")
-
+
ipv4-frag packet::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.10.1", src="192.168.10.2",frag=6)/("X"*480)],iface="enp134s0f0")
@@ -1652,7 +1652,7 @@ Test case: MAC_IPV4_GTPU_IPV4_UDP
basic hit pattern packets are the same in this test case::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_UDP_L3DST
:::::::::::::::::::::::::::::::::::::
rule::
@@ -1662,11 +1662,11 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=12, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_UDP_L3SRC
:::::::::::::::::::::::::::::::::::::
rule::
@@ -1676,11 +1676,11 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=12, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_UDP_L3SRC_L4SRC
:::::::::::::::::::::::::::::::::::::::::::
rule::
@@ -1691,11 +1691,11 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_UDP_L3SRC_L4DST
:::::::::::::::::::::::::::::::::::::::::::
rule::
@@ -1706,11 +1706,11 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_UDP_L3DST_L4SRC
:::::::::::::::::::::::::::::::::::::::::::
rule::
@@ -1721,11 +1721,11 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_UDP_L3DST_L4DST
:::::::::::::::::::::::::::::::::::::::::::
rule::
@@ -1736,11 +1736,11 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/UDP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_UDP_L4DST
:::::::::::::::::::::::::::::::::::::
rule::
@@ -1750,11 +1750,11 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.10.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_UDP_L4SRC
:::::::::::::::::::::::::::::::::::::
rule::
@@ -1764,7 +1764,7 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.10.2")/UDP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -1803,7 +1803,7 @@ Test case: MAC_IPV4_GTPU_IPV4_TCP
basic hit pattern packets are the same in this test case::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_TCP_L3DST
:::::::::::::::::::::::::::::::::::::
rule::
@@ -1813,11 +1813,11 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=12, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_TCP_L3SRC
:::::::::::::::::::::::::::::::::::::
rule::
@@ -1827,11 +1827,11 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=12, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_TCP_L3SRC_L4SRC
:::::::::::::::::::::::::::::::::::::::::::
rule::
@@ -1842,11 +1842,11 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_TCP_L3SRC_L4DST
:::::::::::::::::::::::::::::::::::::::::::
rule::
@@ -1857,11 +1857,11 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_TCP_L3DST_L4SRC
:::::::::::::::::::::::::::::::::::::::::::
rule::
@@ -1872,11 +1872,11 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_TCP_L3DST_L4DST
:::::::::::::::::::::::::::::::::::::::::::
rule::
@@ -1887,11 +1887,11 @@ hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.10.2")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_TCP_L4DST
:::::::::::::::::::::::::::::::::::::
rule::
@@ -1901,11 +1901,11 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.10.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
Subcase: MAC_IPV4_GTPU_IPV4_TCP_L4SRC
:::::::::::::::::::::::::::::::::::::
rule::
@@ -1915,7 +1915,7 @@ rule::
hit pattern and defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
-
+
hit pattern but not defined input set::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.10.1", dst="192.168.10.2")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -3653,7 +3653,7 @@ so the following step don't need to be run.
14. repeat step 5 and 7, check packets have no hash value, and distributed to queue 0.
-
+
Subcase: IPV4_GTPU_EH_IPV4 with/without UL/DL
---------------------------------------------
1. create IPV4_GTPU_EH_DL_IPV4 rule::
@@ -3679,7 +3679,7 @@ Subcase: IPV4_GTPU_EH_IPV4 with/without UL/DL
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/("X"*480)], iface="enp134s0f0")
6. check packet 2 has different hash value with packet 1, packet 3 has same hash value with packet 1.
-
+
7. send packets::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)], iface="enp134s0f0")
@@ -3711,7 +3711,7 @@ Subcase: IPV4_GTPU_EH_IPV4 without/with UL/DL
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/("X"*480)], iface="enp134s0f0")
3. check packet 2 has different hash value with packet 1, packet 3 has same hash value with packet 1.
-
+
4. send packets::
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)], iface="enp134s0f0")
@@ -3893,7 +3893,7 @@ toeplitz and symmetric rules combination case
Subcase: toeplitz/symmetric with same pattern
---------------------------------------------
-1. DUT create rule for the RSS function is toeplitz::
+1. SUT create rule for the RSS function is toeplitz::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end
@@ -3905,7 +3905,7 @@ Subcase: toeplitz/symmetric with same pattern
3. check packet 2 has different hash value with packet 1, packet 3 has same hash value with packet 1.
-4. DUT create rule for the RSS function is symmetric::
+4. SUT create rule for the RSS function is symmetric::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end
@@ -3920,7 +3920,7 @@ Subcase: toeplitz/symmetric with same pattern
6. check each 2 pkts has same hash value.
-7. DUT verify rule can be listed::
+7. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -3943,7 +3943,7 @@ so the following step don't need to be run.
Subcase: toeplitz/symmetric with same ptype different UL/DL
-----------------------------------------------------------
-1. DUT create rule for the RSS function is toeplitz::
+1. SUT create rule for the RSS function is toeplitz::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end
@@ -3955,7 +3955,7 @@ Subcase: toeplitz/symmetric with same ptype different UL/DL
3. check packet 2 has different hash value with packet 1, packet 3 has same hash value with packet 1.
-4. DUT create rule for the RSS function is symmetric::
+4. SUT create rule for the RSS function is symmetric::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end
@@ -3970,7 +3970,7 @@ Subcase: toeplitz/symmetric with same ptype different UL/DL
6. check each 2 pkts has same hash value.
-7. DUT verify rule can be listed::
+7. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -3990,7 +3990,7 @@ so the following step don't need to be run.
11. repeat step 2, check the toeplitz also can work now.
-12. DUT recreate rule for the RSS function is symmetric::
+12. SUT recreate rule for the RSS function is symmetric::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end
@@ -4007,7 +4007,7 @@ so the following step don't need to be run.
Subcase: toeplitz/symmetric with different pattern
--------------------------------------------------
-1. DUT create rule for the RSS function is toeplitz::
+1. SUT create rule for the RSS function is toeplitz::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-src-only end key_len 0 queues end / end
@@ -4020,7 +4020,7 @@ Subcase: toeplitz/symmetric with different pattern
3. check packet 2 and 3 has different hash value with packet 1, packet 4 has same hash value with packet 1.
-4. DUT create rule for the RSS function is symmetric::
+4. SUT create rule for the RSS function is symmetric::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end
@@ -4035,7 +4035,7 @@ Subcase: toeplitz/symmetric with different pattern
6. check each 2 pkts has same hash value.
-7. DUT verify rule can be listed::
+7. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -4055,7 +4055,7 @@ so the following step don't need to be run.
11. repeat step 2, check the toeplitz also can work now.
-12. DUT recreate rule for the RSS function is symmetric::
+12. SUT recreate rule for the RSS function is symmetric::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end
@@ -4072,7 +4072,7 @@ so the following step don't need to be run.
Subcase: toeplitz/symmetric with different pattern (with/without UL/DL)
-----------------------------------------------------------------------
-1. DUT create rule for the RSS function is toeplitz::
+1. SUT create rule for the RSS function is toeplitz::
flow create 0 ingress pattern eth / ipv6 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only end key_len 0 queues end / end
@@ -4084,7 +4084,7 @@ Subcase: toeplitz/symmetric with different pattern (with/without UL/DL)
3. check packet 2 has different hash value with packet 1, packet 3 has same hash value with packet 1.
-4. DUT create rule for the same pattern without UL/DL::
+4. SUT create rule for the same pattern without UL/DL::
flow create 0 ingress pattern eth / ipv6 / udp / gtpu / gtp_psc / ipv6 / tcp / end actions rss types ipv6-tcp l4-src-only end key_len 0 queues end / end
@@ -4093,7 +4093,7 @@ Subcase: toeplitz/symmetric with different pattern (with/without UL/DL)
sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", dst="2222:3333:4444:5555:6666:7777:8888:9999")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", dst="2222:3333:4444:5555:6666:7777:8888:9999")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:1111", dst="2222:3333:4444:5555:6666:7777:8888:1111")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
-
+
sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", dst="2222:3333:4444:5555:6666:7777:8888:9999")/TCP(sport=22, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", dst="2222:3333:4444:5555:6666:7777:8888:9999")/TCP(sport=12, dport=23)/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:1111", dst="2222:3333:4444:5555:6666:7777:8888:1111")/TCP(sport=22, dport=13)/("X"*480)], iface="enp134s0f0")
@@ -4106,7 +4106,7 @@ Subcase: toeplitz/symmetric with different pattern (with/without UL/DL)
check packet 5 has different hash value with packet 4, packet 6 has same hash value with packet 4.
check packet 8 has different hash value with packet 7, packet 9 has same hash value with packet 7.
-7. DUT verify rule can be listed::
+7. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -4153,7 +4153,7 @@ Subcase: add/delete IPV4_GTPU_DL_IPV4 rules
-------------------------------------------
1. create/delete IPV4_GTPU_DL_IPV4 rule for 100 times::
- flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end
+ flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end
flow destroy 0 rule 0
2. create the rule again, and list the rule::
@@ -4167,5 +4167,5 @@ Subcase: add/delete IPV4_GTPU_DL_IPV4 rules
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.0.1", dst="192.168.10.2")/("X"*480)], iface="enp134s0f0")
sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="192.168.10.1", dst="192.168.0.2")/("X"*480)], iface="enp134s0f0")
-
+
4. check packet 2 has different hash value with packet 1, packet 3 has same hash value with packet 1.
@@ -58,7 +58,7 @@ Prerequisites
3. load PPPoL2TPv2oUDP package
-4. create a VF from a PF in DUT, set mac address for thi VF::
+4. create a VF from a PF in SUT, set mac address for this VF::
echo 1 > /sys/bus/pci/devices/0000\:3b\:00.0/sriov_numvfs
ip link set enp59s0f0 vf 0 mac 00:11:22:33:44:55
@@ -72,7 +72,7 @@ Prerequisites
The kernel must be >= 3.6+ and VT-d must be enabled in bios.
-6. Launch the testpmd to configuration queue of rx and tx number 16 in DUT::
+6. Launch the testpmd to configuration queue of rx and tx number 16 in SUT::
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -a 0000:3b:01.0 -- -i --disable-rss --rxq=16 --txq=16 --rxd=384 --txd=384
testpmd>set fwd rxonly
@@ -3102,7 +3102,7 @@ Test case 10: eth_l2_src_only_MAC_IPV4_L2TPV2_DATA_S
flow create 0 ingress pattern eth / ipv4 / udp / l2tpv2 type data_s / end actions rss types eth l2-src-only end key_len 0 queues end / end
- check there is a rss rule listed successfully.
+ check there is a rss rule listed successfully.
3. send a basic hit pattern packet,record the hash value::
@@ -333,12 +333,12 @@ Prerequisites
This rss feature designed for CVL NIC 25G and 100g, so below the case only support CVL nic.
-3. create a VF from a PF in DUT, set mac address for thi VF::
+3. create a VF from a PF in SUT, set mac address for this VF::
echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs
ip link set enp24s0f0 vf 0 mac 00:11:22:33:44:55
-4. bind the VF to dpdk driver in DUT::
+4. bind the VF to dpdk driver in SUT::
modprobe vfio-pci
usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:18:01.0
@@ -347,7 +347,7 @@ Prerequisites
The kernel must be >= 3.6+ and VT-d must be enabled in bios.
-5. Launch the testpmd to configuration queue of rx and tx number 16 in DUT::
+5. Launch the testpmd to configuration queue of rx and tx number 16 in SUT::
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16
testpmd>set fwd rxonly
@@ -2977,14 +2977,14 @@ Test case: Set HW csum, flow rule does not impact RX checksum and TX checksum
set verbose 1
start
-3. Capture the tx packet at tester port and check checksum values same as expect pkts::
+3. Capture the tx packet at TG port and check checksum values same as expect pkts::
take a IPV4 for example:
p = Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)
p.show2()
expect pkts checksum value: chksum= 0x3b0f
- tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] != 0x88cc' -Q in -w /tmp/tester/sniff_ens7.pcap -c 7
+ tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] != 0x88cc' -Q in -w /tmp/tg/sniff_ens7.pcap -c 7
4. Send packets::
@@ -103,12 +103,12 @@ Prerequisites
rmmod ice
insmod ice.ko
-4. create a VF from a PF in DUT, set mac address for thi VF::
+4. create a VF from a PF in SUT, set mac address for this VF::
echo 1 > /sys/bus/pci/devices/0000\:18\:00.0/sriov_numvfs
ip link set enp24s0f0 vf 0 mac 00:11:22:33:44:55
-5. bind the VF to dpdk driver in DUT::
+5. bind the VF to dpdk driver in SUT::
modprobe vfio-pci
usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:18:01.0
@@ -117,13 +117,13 @@ Prerequisites
The kernel must be >= 3.6+ and VT-d must be enabled in bios.
-6. Launch the testpmd to configuration queue of rx and tx number 16 in DUT::
+6. Launch the testpmd to configuration queue of rx and tx number 16 in SUT::
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -a 0000:18:01.0 -- -i --rxq=16 --txq=16
testpmd>set fwd rxonly
testpmd>set verbose 1
-7. on tester side, copy the layer python file to /root::
+7. on TG side, copy the layer python file to /root::
cp pfcp.py to /root
@@ -190,7 +190,7 @@ Prerequisites
3. Copy gtpogre pkg to /lib/firmware/updates/intel/ice/ddp/ice.pkg
Then reload ice driver
-4. bind the CVL port to dpdk driver in DUT::
+4. bind the CVL port to dpdk driver in SUT::
modprobe vfio-pci
usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:3b:00.0
@@ -199,7 +199,7 @@ Prerequisites
The kernel must be >= 3.6+ and VT-d must be enabled in bios.
-5. Launch the testpmd to configuration queue of rx and tx number 64 in DUT::
+5. Launch the testpmd to configuration queue of rx and tx number 64 in SUT::
testpmd>./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -- -i --rxq=64 --txq=64 --disable-rss --port-topology=loop
testpmd>set fwd rxonly
@@ -236,7 +236,7 @@ Prerequisites
+#endif
#endif
-7. start scapy and configuration NVGRE and GTP profile in tester
+7. start scapy and configuration NVGRE and GTP profile in TG
scapy::
>>> import sys
@@ -182,7 +182,7 @@ Prerequisites
This rss feature designed for CVL NIC 25G and 100g, so below the case only support CVL nic.
-3. bind the CVL port to dpdk driver in DUT::
+3. bind the CVL port to dpdk driver in SUT::
modprobe vfio-pci
usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:3b:00.0
@@ -191,13 +191,13 @@ Prerequisites
The kernel must be >= 3.6+ and VT-d must be enabled in bios.
-4. Launch the testpmd to configuration queue of rx and tx number 64 in DUT::
+4. Launch the testpmd to configuration queue of rx and tx number 64 in SUT::
testpmd>./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -- -i --rxq=64 --txq=64 --disable-rss --port-topology=loop
testpmd>set fwd rxonly
testpmd>set verbose 1
-5. start scapy and configuration NVGRE and GTP profile in tester
+5. start scapy and configuration NVGRE and GTP profile in TG
scapy::
>>> import sys
@@ -1519,7 +1519,7 @@ reconfig all the cases of "Pattern: outer ipv4 + inner ipv4"
negative case
=============
-Subcase: invalid input set
+Subcase: invalid input set
--------------------------
1. create rules with invalid input set::
@@ -2241,7 +2241,7 @@ Subcase: toeplitz/symmetric with same pattern
check packet 2 has different hash value with packet 1, packet 3 has same hash value with packet 1.
-3. create a symmetric rule::
+3. create a symmetric rule::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end
@@ -2252,7 +2252,7 @@ Subcase: toeplitz/symmetric with same pattern
check the two packets have same hash value.
-5. DUT verify rule can be listed::
+5. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -2297,7 +2297,7 @@ Subcase: toeplitz/symmetric with same pattern (switched rule order)
check packet 2 has different hash value with packet 1, packet 3 has same hash value with packet 1.
-5. DUT verify rule can be listed::
+5. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -2342,7 +2342,7 @@ Subcase: toeplitz/symmetric with different pattern (different UL/DL)
check the two packets have same hash value.
-5. DUT verify rule can be listed::
+5. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -2362,7 +2362,7 @@ so the following step don't need to be run.
9. repeat step 2, check the toeplitz also can work now.
-10. DUT re-create the symmetric rule::
+10. SUT re-create the symmetric rule::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end
@@ -2403,7 +2403,7 @@ Subcase: toeplitz/symmetric with different pattern (with/without UL/DL)
check the two packets have same hash value.
-5. DUT verify rule can be listed::
+5. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -2424,7 +2424,7 @@ so the following step don't need to be run.
9. repeat step 2, check the toeplitz can work for both UL and DL packets.
-10. DUT re-create the symmetric rule::
+10. SUT re-create the symmetric rule::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end
@@ -2464,7 +2464,7 @@ Subcase: toeplitz/symmetric with different pattern
check the two packets have same hash value.
-5. DUT verify rule can be listed::
+5. SUT verify rule can be listed::
testpmd> flow list 0
ID Group Prio Attr Rule
@@ -2484,7 +2484,7 @@ so the following step don't need to be run.
9. repeat step 2, check the toeplitz also can work now.
-10. DUT re-create a symmetric rule::
+10. SUT re-create a symmetric rule::
flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end
@@ -2608,7 +2608,7 @@ MAC_IPV4_GTPU_EH_DL_IPV4_UDP::
sendp([Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP()/("X"*480)],iface="enp216s0f0")
sendp([Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(dst="192.168.0.2", src="192.168.0.1")/UDP()/("X"*480)],iface="enp216s0f0")
-
+
not hit pattern with switched value of input set in the rule:
MAC_IPV4_GTPU_EH_UL_IPV4 nonfrag::
@@ -123,7 +123,7 @@ Prerequisites
./usertools/dpdk-devbind.py -b vfio-pci 0000:18:00.0
-5. Launch the testpmd in DUT for cases with toeplitz hash function::
+5. Launch the testpmd in SUT for cases with toeplitz hash function::
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:00.0 -- -i --rxq=16 --txq=16 --disable-rss
testpmd> port config 0 rss-hash-key ipv4 1b9d58a4b961d9cd1c56ad1621c3ad51632c16a5d16c21c3513d132c135d132c13ad1531c23a51d6ac49879c499d798a7d949c8a
@@ -135,7 +135,7 @@ Prerequisites
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:00.0 -- -i --rxq=16 --txq=16
-6. on tester side, copy the layer python file to /root::
+6. on TG side, copy the layer python file to /root::
cp pfcp.py to /root
@@ -301,7 +301,7 @@ Prerequisites
This rss feature designed for CVL NIC 25G and 100g, so below the case only support CVL nic.
-3. bind the CVL port to dpdk driver in DUT::
+3. bind the CVL port to dpdk driver in SUT::
modprobe vfio-pci
usertools/dpdk-devbind.py --force --bind=vfio-pci 0000:18:00.0
@@ -310,7 +310,7 @@ Prerequisites
The kernel must be >= 3.6+ and VT-d must be enabled in bios.
-4. Launch the testpmd to configuration queue of rx and tx number 64 in DUT::
+4. Launch the testpmd to configuration queue of rx and tx number 64 in SUT::
testpmd>./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xff -n 4 -- -i --rxq=64 --txq=64 --port-topology=loop
@@ -321,7 +321,7 @@ Prerequisites
testpmd>set verbose 1
testpmd>rx_vxlan_port add 4789 0
-5. start scapy and configuration NVGRE and GTP profile in tester
+5. start scapy and configuration NVGRE and GTP profile in TG
scapy::
>>> import sys
@@ -2394,14 +2394,14 @@ Test case: Set HW csum, flow rule does not impact RX checksum and TX checksum
set verbose 1
start
-3. Capture the tx packet at tester port and check checksum values same as expect pkts::
+3. Capture the tx packet at TG port and check checksum values same as expect pkts::
take a IPV4 for example:
p = Ether(dst="00:11:22:33:44:55", src="52:00:00:00:00:00")/IP(src="192.168.0.1")/("X"*48)
p.show2()
expect pkts checksum value: chksum= 0x3b0f
- tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] != 0x88cc' -Q in -w /tmp/tester/sniff_ens7.pcap -c 7
+ tcpdump -i ens7 'ether src 40:a6:b7:0b:76:28 and ether[12:2] != 0x88cc' -Q in -w /tmp/tg/sniff_ens7.pcap -c 7
4. Send packets::
@@ -114,7 +114,7 @@ Prerequisites
./usertools/dpdk-devbind.py -b vfio-pci 0000:18:00.0
-5. Launch the testpmd in DUT for cases with toeplitz hash function::
+5. Launch the testpmd in SUT for cases with toeplitz hash function::
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:00.0 -- -i --rxq=16 --txq=16 --disable-rss
testpmd> port config 0 rss-hash-key ipv4 1b9d58a4b961d9cd1c56ad1621c3ad51632c16a5d16c21c3513d132c135d132c13ad1531c23a51d6ac49879c499d798a7d949c8a
@@ -126,7 +126,7 @@ Prerequisites
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:00.0 -- -i --rxq=16 --txq=16
-6. on tester side, copy the layer python file to /root::
+6. on TG side, copy the layer python file to /root::
cp pfcp.py to /root
@@ -66,7 +66,7 @@ Prerequisites
CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc
-5. Get the pci device id of DUT, for example::
+5. Get the pci device id of NIC ports, for example::
./usertools/dpdk-devbind.py -s
@@ -561,14 +561,14 @@ while we can create 256 ipv4-udp/ipv4-tcp/ipv4-sctp rules at most.
sendp([Ether(dst="00:01:23:45:67:89")/IP(src="192.168.1.0", dst="192.168.100.2")/UDP(sport=8010,dport=8017)/Raw(load='X'*30)], iface="enp134s0f1")
check the packet can't be received by VF1. stop the forward::
-
+
---------------------- Forward statistics for port 1 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
----------------------------------------------------------------------------
8. delete the rule 256 and 257::
-
+
flow destroy 0 rule 256
flow destroy 0 rule 257
@@ -581,7 +581,7 @@ while we can create 256 ipv4-udp/ipv4-tcp/ipv4-sctp rules at most.
9. create the rule in the step6 again,
check the rule can be created as acl rule successfully.
list the rules, there are rule 0-256 listed.
-
+
10.send packet2 again, check the packet dropped. stop the forward::
---------------------- Forward statistics for port 1 ----------------------
@@ -604,7 +604,7 @@ Test Case 6: max entry number ipv4-other
flow create 0 ingress pattern eth / ipv4 src spec 192.168.0.1 src mask 255.255.255.255 / end actions drop / end
3. create 64 ipv4-other ACL rules::
-
+
flow create 0 ingress pattern eth / ipv4 src spec 192.168.1.1 src mask 255.255.0.255 / end actions drop / end
flow create 0 ingress pattern eth / ipv4 src spec 192.168.1.2 src mask 255.255.0.255 / end actions drop / end
flow create 0 ingress pattern eth / ipv4 src spec 192.168.1.3 src mask 255.255.0.255 / end actions drop / end
@@ -638,12 +638,12 @@ Test Case 6: max entry number ipv4-other
sendp([Ether(dst="00:01:23:45:67:89")/IP(src="192.168.0.2", dst="192.168.1.2")/Raw(load='X'*30)], iface="enp134s0f1")
check the packet can't be received by vf1. stop forward::
-
+
---------------------- Forward statistics for port 1 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
----------------------------------------------------------------------------
-
+
8. delete the rule 64 and 65::
flow destroy 0 rule 64
@@ -34,12 +34,12 @@ Launch tcpdump to sniffer the packets from DCF ::
tcpdump -i enp24s0f1 -vvv -Q in
-Send packets from tester(scapy) to the VF by MAC address(D2:6B:4C:EB:1C:26) ::
+Send packets from TG(scapy) to the VF by MAC address(D2:6B:4C:EB:1C:26) ::
p = Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55")/IP(src="192.168.1.1",dst="192.168.1.3")/Raw('x'*64)
sendp(p, iface=intf, count=100)
-Expect tester can get packets which loopbacked by DCF.
+Expect TG can get packets which loopbacked by DCF.
Test Case: Check default rss for L3
@@ -55,10 +55,10 @@ Set rxonly forward mode ::
set fwd rxonly
set verbose 1
start
-
+
Send a series packets to check if DCF RSS is correct for IPv4 ::
- intf="enp175s0f0"
+ intf="enp175s0f0"
sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55")/IP(src="192.168.1.1", dst="192.168.1.2")/Raw('x'*64), iface=intf)
sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55")/IP(src="192.168.1.1", dst="192.168.1.3")/Raw('x'*64), iface=intf)
sendp(Ether(dst="D2:6B:4C:EB:1C:26", src="00:11:22:33:44:55")/IP(src="192.168.1.3", dst="192.168.1.2")/Raw('x'*64), iface=intf)
@@ -175,7 +175,7 @@ Set rxonly forward mode ::
start
Send a packet, check the DCF can't recieve the packet (Dest mac address is not DCF's mac) ::
-
+
sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/("X"*480)], iface=intf, count=1)
Create a rule to DCF ::
@@ -198,6 +198,6 @@ Send the packet agiain, check DCF can't recieve the packet ::
Test Case: Measure performance of DCF interface
===============================================
-The steps are same to iAVF performance test, a slight difference on
+The steps are same to iAVF performance test, a slight difference on
launching testpmd devarg. DCF need cap=dcf option.
Expect the performance is same to iAVF
@@ -64,7 +64,7 @@ Prerequisites
CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc -j 110
-5. Get the pci device id of DUT, for example::
+5. Get the pci device id of NIC ports, for example::
./usertools/dpdk-devbind.py -s
@@ -86,7 +86,7 @@ Prerequisites
The connection is as below table::
+---------------------------------+
- | DUT | IXIA |
+ | SUT | IXIA |
+=================================+
| 100G |
| NIC-1,Port-1 --- IXIA, Port-1 |
@@ -162,25 +162,25 @@ when the scheduler use strict priority mode in different user priority.
1. DCB setting, set 3 TCs bandwidth with strict mode::
- ./dcbgetset ens785f0 --ieee --up2tc 0,0,0,1,2,0,0,0 --tcbw 10,30,60,0,0,0,0,0 --tsa 0,0,0,0,0,0,0,0 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens785f0 --ieee --up2tc 0,0,0,1,2,0,0,0 --tcbw 10,30,60,0,0,0,0,0 --tsa 0,0,0,0,0,0,0,0 --pfc 0,0,0,0,0,0,0,0
ifconfig ens785f0 up
2. Start testpmd with 100G setting, then set profile and TC mapping::
port stop all
- add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
- add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
-
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
+ add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
+ add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
+
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
add port tm leaf node 0 3 800 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
port tm hierarchy commit 0 no
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
@@ -217,16 +217,16 @@ when the scheduler use strict priority mode in different user priority.
port stop all
add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
add port tm leaf node 0 3 800 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
port tm hierarchy commit 0 no
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -265,8 +265,8 @@ when the scheduler use ETS mode in different user priority.
1. DCB setting, set 2 TCs bandwidth with ets mode::
- ./dcbgetset ens785f0 --ieee --up2tc 0,0,0,0,1,1,1,1 --tcbw 20,80,0,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
- ./dcbgetset ens802f0 --ieee --up2tc 0,0,0,0,1,1,1,1 --tcbw 20,80,0,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens785f0 --ieee --up2tc 0,0,0,0,1,1,1,1 --tcbw 20,80,0,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens802f0 --ieee --up2tc 0,0,0,0,1,1,1,1 --tcbw 20,80,0,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
ifconfig ens785f0 up
ifconfig ens802f0 up
@@ -275,23 +275,23 @@ when the scheduler use ETS mode in different user priority.
set portlist 0,2,1,3
show config fwd
port stop all
- add port tm node shaper profile 0 1 10000000 0 4000000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 3 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm node shaper profile 0 1 10000000 0 4000000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 3 800 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 0 yes
- add port tm node shaper profile 2 1 10000000 0 1000000000 0 0 0
- add port tm nonleaf node 2 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 2 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 2 800 1000 0 1 1 -1 1 0 0
- add port tm leaf node 2 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 2 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 2 2 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 2 3 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm node shaper profile 2 1 10000000 0 1000000000 0 0 0
+ add port tm nonleaf node 2 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 2 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 2 800 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 2 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 2 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 2 2 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 2 3 800 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 2 yes
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -489,21 +489,21 @@ Each VF's max rate is limited by the sum of peak_tb_rate of all TCs binded to it
./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 2-10 -n 4 -a 18:01.0,cap=dcf -a 18:01.1 -a 18:01.2 -a 18:01.3 -- -i --txq=8 --rxq=8 --port-topology=loop --nb-cores=8
port stop all
- add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
- add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 -1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 3 800 0 1 2 -1 0 0xffffffff 0 0
+ add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
+ add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 -1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 3 800 0 1 2 -1 0 0xffffffff 0 0
add port tm leaf node 0 4 800 0 1 2 2 0 0xffffffff 0 0
add port tm leaf node 0 5 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 6 700 0 1 2 -1 0 0xffffffff 0 0
- add port tm leaf node 0 7 700 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 8 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 6 700 0 1 2 -1 0 0xffffffff 0 0
+ add port tm leaf node 0 7 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 8 700 0 1 2 2 0 0xffffffff 0 0
port tm hierarchy commit 0 yes
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -578,27 +578,27 @@ Note: now, the cmit_tb_rate setting can't take work, it is not supported by kern
set portlist 0,3,1,4,2,5
show config fwd
port stop all
- add port tm node shaper profile 0 1 100000000 0 4000000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 3 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 4 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 5 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm node shaper profile 0 1 100000000 0 4000000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 3 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 4 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 5 800 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 0 no
- add port tm node shaper profile 3 1 100000000 0 500000000 0 0 0
- add port tm nonleaf node 3 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 3 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 3 800 1000 0 1 1 -1 1 0 0
- add port tm leaf node 3 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 2 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 3 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 4 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 5 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm node shaper profile 3 1 100000000 0 500000000 0 0 0
+ add port tm nonleaf node 3 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 3 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 3 800 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 3 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 2 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 3 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 4 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 5 800 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 3 no
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -674,8 +674,8 @@ the proportion of the value of different TC is consistent to TC bandwitch distri
1. DCB setting, set 3 TCs bandwidth with ets mode::
- ./dcbgetset ens785f0 --ieee --up2tc 0,0,0,1,2,0,0,0 --tcbw 10,30,60,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
- ./dcbgetset ens802f0 --ieee --up2tc 0,0,0,1,2,0,0,0 --tcbw 10,30,60,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens785f0 --ieee --up2tc 0,0,0,1,2,0,0,0 --tcbw 10,30,60,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens802f0 --ieee --up2tc 0,0,0,1,2,0,0,0 --tcbw 10,30,60,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
2. Create 3 VFs on each pf::
@@ -696,35 +696,35 @@ the proportion of the value of different TC is consistent to TC bandwitch distri
set portlist 0,3,1,4,2,5
show config fwd
port stop all
- add port tm node shaper profile 0 1 0 0 0 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 3 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm node shaper profile 0 1 0 0 0 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 3 800 0 1 2 1 0 0xffffffff 0 0
add port tm leaf node 0 4 800 0 1 2 1 0 0xffffffff 0 0
add port tm leaf node 0 5 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 6 700 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 7 700 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 8 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 6 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 7 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 8 700 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 0 yes
- add port tm node shaper profile 3 1 0 0 0 0 0 0
- add port tm nonleaf node 3 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 3 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 3 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 3 700 1000 0 1 1 -1 1 0 0
- add port tm leaf node 3 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 2 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 3 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm node shaper profile 3 1 0 0 0 0 0 0
+ add port tm nonleaf node 3 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 3 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 3 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 3 700 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 3 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 2 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 3 800 0 1 2 1 0 0xffffffff 0 0
add port tm leaf node 3 4 800 0 1 2 1 0 0xffffffff 0 0
add port tm leaf node 3 5 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 6 700 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 7 700 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 3 8 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 6 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 7 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 3 8 700 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 3 yes
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -869,31 +869,31 @@ This case is to check QoS Tx side processing with max TC number set in strict pr
port stop all
add port tm node shaper profile 0 1 1000000 0 1780000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 600 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 500 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 400 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 300 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 200 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 800 0 1 2 1 0 0xffffffff 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 600 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 500 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 400 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 300 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 200 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 800 0 1 2 1 0 0xffffffff 0 0
add port tm leaf node 0 3 800 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 4 700 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 5 700 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 6 600 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 7 600 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 4 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 5 700 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 6 600 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 7 600 0 1 2 1 0 0xffffffff 0 0
add port tm leaf node 0 8 500 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 9 500 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 10 400 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 11 400 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 9 500 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 10 400 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 11 400 0 1 2 1 0 0xffffffff 0 0
add port tm leaf node 0 12 300 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 13 300 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 14 200 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 15 200 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 13 300 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 14 200 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 15 200 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 0 yes
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -968,8 +968,8 @@ This case is to check QoS Tx side processing with max TC number set in ETS mode.
1. DCB setting, set 8 TCs bandwidth with ets mode::
- ./dcbgetset ens785f0 --ieee --up2tc 0,1,2,3,4,5,6,7 --tcbw 5,10,15,10,20,1,30,9 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
- ./dcbgetset ens802f0 --ieee --up2tc 0,1,2,3,4,5,6,7 --tcbw 5,10,15,10,20,1,30,9 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens785f0 --ieee --up2tc 0,1,2,3,4,5,6,7 --tcbw 5,10,15,10,20,1,30,9 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens802f0 --ieee --up2tc 0,1,2,3,4,5,6,7 --tcbw 5,10,15,10,20,1,30,9 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
2. Start testpmd with 10G setting::
@@ -1085,21 +1085,21 @@ This case is to check QoS Tx side processing with max TC number set in ETS mode.
4. Set profile of port2 as below::
- add port tm node shaper profile 2 1 1000000 0 100000000 0 0 0
- add port tm node shaper profile 2 2 1000000 0 250000000 0 0 0
- add port tm node shaper profile 2 3 1000000 0 100000000 0 0 0
+ add port tm node shaper profile 2 1 1000000 0 100000000 0 0 0
+ add port tm node shaper profile 2 2 1000000 0 250000000 0 0 0
+ add port tm node shaper profile 2 3 1000000 0 100000000 0 0 0
Send the same 8 streams synchronously,
check port3 stats, the Tx rate is 7.3Gbps.
stop forward, check the tx rate, queue0-queue4 and queue6-7 can reach PIR(are limited by PIR),
- queue5(corresponds to TC5) is the lowest priority (1% BW set by DCB),
+ queue5(corresponds to TC5) is the lowest priority (1% BW set by DCB),
the rest rate are put to queue 5, may be more than 1% of whole throughput.
5. Set all the profile PIR=0::
- add port tm node shaper profile 2 1 0 0 0 0 0 0
- add port tm node shaper profile 2 2 0 0 0 0 0 0
- add port tm node shaper profile 2 3 0 0 0 0 0 0
+ add port tm node shaper profile 2 1 0 0 0 0 0 0
+ add port tm node shaper profile 2 2 0 0 0 0 0 0
+ add port tm node shaper profile 2 3 0 0 0 0 0 0
Send the same 8 streams synchronously,
check port3 stats, the Tx rate is 7.3Gbps.
@@ -1111,8 +1111,8 @@ This case is to check QoS Tx side processing with min TC number set in ETS mode.
1. DCB setting, set 1 TC bandwidth with ets mode::
- ./dcbgetset ens785f0 --ieee --up2tc 0,0,0,0,0,0,0,0 --tcbw 100,0,0,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
- ./dcbgetset ens802f0 --ieee --up2tc 0,0,0,0,0,0,0,0 --tcbw 100,0,0,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens785f0 --ieee --up2tc 0,0,0,0,0,0,0,0 --tcbw 100,0,0,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
+ ./dcbgetset ens802f0 --ieee --up2tc 0,0,0,0,0,0,0,0 --tcbw 100,0,0,0,0,0,0,0 --tsa 2,2,2,2,2,2,2,2 --pfc 0,0,0,0,0,0,0,0
2. Start testpmd with 10G setting::
@@ -1120,11 +1120,11 @@ This case is to check QoS Tx side processing with min TC number set in ETS mode.
set portlist 0,2,1,3
show config fwd
port stop all
- add port tm node shaper profile 0 1 1000000 0 10000000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm node shaper profile 0 1 1000000 0 10000000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 0 yes
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -1137,11 +1137,11 @@ This case is to check QoS Tx side processing with min TC number set in ETS mode.
add port tm leaf node 1 6 900 0 1 2 0 0 0xffffffff 0 0
add port tm leaf node 1 7 900 0 1 2 0 0 0xffffffff 0 0
port tm hierarchy commit 1 yes
- add port tm node shaper profile 2 1 1000000 0 1000000000 0 0 0
- add port tm nonleaf node 2 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 2 900 1000 0 1 1 -1 1 0 0
- add port tm leaf node 2 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 2 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm node shaper profile 2 1 1000000 0 1000000000 0 0 0
+ add port tm nonleaf node 2 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 2 900 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 2 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 2 1 900 0 1 2 1 0 0xffffffff 0 0
port tm hierarchy commit 2 yes
add port tm nonleaf node 3 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 3 900 1000 0 1 1 0 1 0 0
@@ -1174,18 +1174,18 @@ The case is to check the support to query QoS settings.
2. Start testpmd with 100G setting, then set profile and TC mapping::
port stop all
- add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
- add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 3 800 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
+ add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 3 800 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
port tm hierarchy commit 0 no
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -1350,19 +1350,19 @@ Subcase 1: Requested VF id is valid
-----------------------------------
Set 3 VSIs, more than 2 VFs created::
- add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 900 0 1 2 1 0 0xffffffff 0 0
- node id: too many VSI for one TC (error 33)
+ add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 900 0 1 2 1 0 0xffffffff 0 0
+ node id: too many VSI for one TC (error 33)
Subcase 2: Valid number of TCs for the target VF
------------------------------------------------
1. Configured 2 TCs by DCB, but only set 1 TC node::
- add port tm node shaper profile 0 1 63000 0 12500000000 0 0 0
+ add port tm node shaper profile 0 1 63000 0 12500000000 0 0 0
add port tm nonleaf node 0 1000000 -1 0 1 0 -1 1 0 0
add port tm nonleaf node 0 900000 1000000 0 1 1 -1 1 0 0
add port tm leaf node 0 0 900000 0 1 2 1 0 0xffffffff 0 0
@@ -1386,20 +1386,20 @@ Subcase 2: Valid number of TCs for the target VF
3. Add 1 profile, but use 2 profiles::
- add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
shaper profile id field (node params): shaper profile not exist (error 23)
Subcase 3: Valid Min and Max values
-----------------------------------
1. Min default value is 500Kbps::
- add port tm node shaper profile 0 1 62999 0 2000000 0 0 0
+ add port tm node shaper profile 0 1 62999 0 2000000 0 0 0
add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
add port tm nonleaf node 0 1000000 -1 0 1 0 -1 1 0 0
add port tm nonleaf node 0 900000 1000000 0 1 1 -1 1 0 0
@@ -1495,7 +1495,7 @@ Subcase 3: Valid Min and Max values
4. Max BW cannot be 0 and must be greater than or equal to Min BW
If set max BW to 0, there is not max rate limit::
- add port tm node shaper profile 0 1 0 0 0 0 0 0
+ add port tm node shaper profile 0 1 0 0 0 0 0 0
add port tm nonleaf node 0 1000000 -1 0 1 0 -1 1 0 0
add port tm nonleaf node 0 900000 1000000 0 1 1 -1 1 0 0
add port tm nonleaf node 0 800000 1000000 0 1 1 -1 1 0 0
@@ -1665,24 +1665,24 @@ Run the below steps sequentially.
1. TC node number is more than TC enabled by lldptool::
- add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
- add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 600 1000 0 1 1 -1 1 0 0
+ add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
+ add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 600 1000 0 1 1 -1 1 0 0
node id: too many TCs (error 33)
2. VF0's TC node number is more than TC enabled by lldptool::
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
add port tm leaf node 0 3 800 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 6 600 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 6 600 0 1 2 2 0 0xffffffff 0 0
parent node id: parent not exist (error 19)
3. VF1's TC node number is more than TC enabled by lldptool::
@@ -1738,18 +1738,18 @@ Subcase 5: Non-contiguous TC setting in queue mapping
-----------------------------------------------------
1. Set non-contiguous TC and queue mapping::
- add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
- add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
- add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
- add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
- add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
- add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
- add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
+ add port tm node shaper profile 0 1 1000000 0 2000000 0 0 0
+ add port tm node shaper profile 0 2 1000000 0 4000000 0 0 0
+ add port tm nonleaf node 0 1000 -1 0 1 0 -1 1 0 0
+ add port tm nonleaf node 0 900 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 800 1000 0 1 1 -1 1 0 0
+ add port tm nonleaf node 0 700 1000 0 1 1 -1 1 0 0
+ add port tm leaf node 0 0 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 1 900 0 1 2 1 0 0xffffffff 0 0
+ add port tm leaf node 0 2 800 0 1 2 2 0 0xffffffff 0 0
add port tm leaf node 0 3 800 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
- add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 4 700 0 1 2 2 0 0xffffffff 0 0
+ add port tm leaf node 0 5 700 0 1 2 2 0 0xffffffff 0 0
port tm hierarchy commit 0 yes
add port tm nonleaf node 1 1000 -1 0 1 0 0 1 0 0
add port tm nonleaf node 1 900 1000 0 1 1 0 1 0 0
@@ -136,7 +136,7 @@ Prerequisites
CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc
-5. Get the pci device id of DUT, for example::
+5. Get the pci device id of NIC ports, for example::
./usertools/dpdk-devbind.py -s
@@ -173,7 +173,7 @@ Prerequisites
CC=gcc meson -Denable_kmods=True -Dlibdir=lib --default-library=static x86_64-native-linuxapp-gcc
ninja -C x86_64-native-linuxapp-gcc
-5. Get the pci device id of DUT, for example::
+5. Get the pci device id of NIC ports, for example::
./usertools/dpdk-devbind.py -s
@@ -210,7 +210,7 @@ Prerequisites
check the VF0 driver is net_ice_dcf.
-10. on tester side, copy the layer python file to /root::
+10. on TG side, copy the layer python file to /root::
cp pfcp.py to /root
@@ -205,7 +205,7 @@ Prerequisites
ninja -C x86_64-native-linuxapp-gcc
-5. Get the pci device id of DUT, for example::
+5. Get the pci device id of NIC ports, for example::
./usertools/dpdk-devbind.py -s
@@ -242,7 +242,7 @@ Prerequisites
check the VF0 driver is net_ice_dcf.
-10. on tester side, copy the layer python file to /root::
+10. on TG side, copy the layer python file to /root::
cp pfcp.py to /root
@@ -1410,7 +1410,7 @@ Test case: MAC_IPV4_PFCP_NODE
check the rule not exists in the list.
-2. DUT create switch filter rules for MAC_IPV4_PFCP_NODE to VF1::
+2. SUT create switch filter rules for MAC_IPV4_PFCP_NODE to VF1::
flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end
@@ -1458,7 +1458,7 @@ Test case: MAC_IPV4_PFCP_SESSION
check the rule not exists in the list.
-2. DUT create switch filter rules for MAC_IPV4_PFCP_SESSION to VF2::
+2. SUT create switch filter rules for MAC_IPV4_PFCP_SESSION to VF2::
flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 / end actions vf id 2 / end
@@ -1506,7 +1506,7 @@ Test case: MAC_IPV6_PFCP_NODE
check the rule not exists in the list.
-2. DUT create switch filter rules for MAC_IPV6_PFCP_NODE to VF3::
+2. SUT create switch filter rules for MAC_IPV6_PFCP_NODE to VF3::
flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 0 / end actions vf id 3 / end
@@ -1554,7 +1554,7 @@ Test case: MAC_IPV6_PFCP_SESSION
check the rule not exists in the list.
-2. DUT create switch filter rules for MAC_IPV6_PFCP_SESSION to VF1::
+2. SUT create switch filter rules for MAC_IPV6_PFCP_SESSION to VF1::
flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 / end actions vf id 1 / end
@@ -2500,7 +2500,7 @@ Subcase 3: add two rules with one rule's input set included in the other
Subcase 4: different input set, same vf id
------------------------------------------
-1. DUT create switch filter rules for MAC_IPV4_PFCP_SESSION and MAC_IPV4_PFCP_NODE to VF1::
+1. SUT create switch filter rules for MAC_IPV4_PFCP_SESSION and MAC_IPV4_PFCP_NODE to VF1::
testpmd> flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end
Flow rule #0 created
@@ -2538,7 +2538,7 @@ Subcase 4: different input set, same vf id
Subcase 5: different input set, different vf id
-----------------------------------------------
-1. DUT create switch filter rules for MAC_IPV4_PFCP_SESSION and MAC_IPV4_PFCP_NODE to VF1::
+1. SUT create switch filter rules for MAC_IPV4_PFCP_SESSION and MAC_IPV4_PFCP_NODE to VF1::
testpmd> flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end
Flow rule #0 created
@@ -3276,7 +3276,7 @@ Subcase 2: DCF DROP IPV4 SRC SPEC MASK PACKAGES
check the rules not exist in the list.
send matched packets, check port can receive the packet.
-
+
Subcase 3: DCF DROP NVGRE PACKAGES
----------------------------------
@@ -3364,7 +3364,7 @@ Subcase 4: DCF DROP PPOES PACKAGES
check the rules not exist in the list.
send matched packets, check port can receive the packet.
-
+
Subcase 5: DCF DROP PFCP PACKAGES
----------------------------------
@@ -37,7 +37,7 @@ CVL Support Flow Priority in PF
Description
===========
In CVL PF rte_flow distribution mode(non-pipeline mode), a flow with priority = 1 will be programmed into switch filter,
-a flow with priority = 0 will be programmed into switch first then fdir.
+a flow with priority = 0 will be programmed into switch first then fdir.
Currently only support priority 0 and 1. 1 means low priority and 0 means high priority.
When looking up rule table, matched pkt will hit the high priority rule firstly,
it will hit the low priority rule only when there is no high priority rule exist.
@@ -67,7 +67,7 @@ General Set Up
# CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static <dpdk build dir>
# ninja -C <dpdk build dir> -j 110
-2. Get the pci device id and interface of DUT and tester.
+2. Get the pci device id and interface of NIC ports.
For example, 0000:18:00.0 and 0000:18:00.1 is pci device id,
ens785f0 and ens785f1 is interface::
@@ -76,11 +76,11 @@ General Set Up
0000:18:00.0 'Device 159b' if=ens785f0 drv=ice unused=vfio-pci
0000:18:00.1 'Device 159b' if=ens785f1 drv=ice unused=vfio-pci
-3. Bind the DUT port to dpdk::
+3. Bind the NIC port to dpdk::
- <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <DUT port pci device id>
+ <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <NIC port pci device id>
-4. Launch the userland ``testpmd`` application on DUT as follows and ::
+4. Launch the userland ``testpmd`` application on SUT as follows and ::
<dpdk build dir>/app/dpdk-testpmd <EAL options> -- -i --rxq=<queue number> --txq=<queue number>
testpmd> set fwd rxonly
@@ -88,7 +88,7 @@ General Set Up
testpmd> rx_vxlan_port add 4789 0
testpmd> start
-..note::
+..note::
For <EAL options>, you can use "-c 0xf -n 1", you can also refer to testpmd doc for other setings.
@@ -301,15 +301,15 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>,ttl=<ttl>)/("X"*480)], iface="<tester interface>")
+ >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>,ttl=<ttl>)/("X"*480)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(dst="<dst mac change inputset>")/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>,ttl=<ttl>)/("X"*480)], iface="<tester interface>")
- >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>",tos=<tos>,ttl=<ttl>)/("X"*480)], iface="<tester interface>")
- >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>",tos=<tos>,ttl=<ttl>)/("X"*480)], iface="<tester interface>")
- >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos change inputset>,ttl=<ttl>)/("X"*480)], iface="<tester interface>")
- >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>,ttl=<ttl change inputset>)/("X"*480)], iface="<tester interface>")
+ >>> sendp([Ether(dst="<dst mac change inputset>")/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>,ttl=<ttl>)/("X"*480)], iface="<TG interface>")
+ >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>",tos=<tos>,ttl=<ttl>)/("X"*480)], iface="<TG interface>")
+ >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>",tos=<tos>,ttl=<ttl>)/("X"*480)], iface="<TG interface>")
+ >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos change inputset>,ttl=<ttl>)/("X"*480)], iface="<TG interface>")
+ >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>,ttl=<ttl change inputset>)/("X"*480)], iface="<TG interface>")
Test Case 2: MAC_IPV4_UDP_PAY
@@ -321,15 +321,15 @@ rules::
matched packets::
- >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>)/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>)/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether()/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>",tos=<tos>)/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>")
- >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>",tos=<tos>)/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>")
- >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos change inputset>)/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>")
- >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>)/UDP(sport=<sport change inputset>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>")
- >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>)/UDP(sport=<sport>,dport=<dport change inputset>)/Raw("x"*80)],iface="<tester interface>")
+ >>> sendp([Ether()/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>",tos=<tos>)/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>")
+ >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>",tos=<tos>)/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>")
+ >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos change inputset>)/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>")
+ >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>)/UDP(sport=<sport change inputset>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>")
+ >>> sendp([Ether()/IP(src="<ipv4 src>",dst="<ipv4 dst>",tos=<tos>)/UDP(sport=<sport>,dport=<dport change inputset>)/Raw("x"*80)],iface="<TG interface>")
Test Case 3: MAC_IPV6_PAY
@@ -341,15 +341,15 @@ rules::
matched packets::
- >>> sendp([Ether()/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/("X"*480)], iface="<tester interface>")
- >>> sendp([Ether()/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/IPv6ExtHdrFragment()/("X"*480)], iface="<tester interface>")
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/("X"*480)], iface="<TG interface>")
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/IPv6ExtHdrFragment()/("X"*480)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether()/IPv6(src="<ipv6 src change inputset>", dst="<ipv6 dst>")/("X"*480)], iface="<tester interface>")
- >>> sendp([Ether()/IPv6(src="<ipv6 src>", dst="<ipv6 dst change inputset>")/("X"*480)], iface="<tester interface>")
- >>> sendp([Ether()/IPv6(src="<ipv6 src change inputset>", dst="<ipv6 dst>")/IPv6ExtHdrFragment()/("X"*480)], iface="<tester interface>")
- >>> sendp([Ether()/IPv6(src="<ipv6 src>", dst="<ipv6 dst change inputset>")/IPv6ExtHdrFragment()/("X"*480)], iface="<tester interface>")
+ >>> sendp([Ether()/IPv6(src="<ipv6 src change inputset>", dst="<ipv6 dst>")/("X"*480)], iface="<TG interface>")
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>", dst="<ipv6 dst change inputset>")/("X"*480)], iface="<TG interface>")
+ >>> sendp([Ether()/IPv6(src="<ipv6 src change inputset>", dst="<ipv6 dst>")/IPv6ExtHdrFragment()/("X"*480)], iface="<TG interface>")
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>", dst="<ipv6 dst change inputset>")/IPv6ExtHdrFragment()/("X"*480)], iface="<TG interface>")
Test Case 4: MAC_IPV6_TCP
@@ -361,14 +361,14 @@ rules::
matched packets::
- >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst>",tc=<tc>)/TCP(sport=<sport>,dport=23)/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst>",tc=<tc>)/TCP(sport=<sport>,dport=23)/Raw("x"*80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>",tc=<tc>)/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst>",tc=<tc change inputset>)/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst>",tc=<tc>)/TCP(sport=<sport change inputset>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst>",tc=<tc>)/TCP(sport=<sport>,dport=<dport change inputset>)/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>",tc=<tc>)/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst>",tc=<tc change inputset>)/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst>",tc=<tc>)/TCP(sport=<sport change inputset>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IPv6(src="<ipv6 src>",dst="<ipv6 dst>",tc=<tc>)/TCP(sport=<sport>,dport=<dport change inputset>)/Raw("x"*80)],iface="<TG interface>",count=1)
Test Case 5: MAC_IPV4_VXLAN_IPV4_FRAG
@@ -380,13 +380,13 @@ rules::
matched packets::
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>",frag=5)/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>",frag=5)/Raw("x"*80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>",frag=5)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>",frag=5)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>",frag=5)/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>",frag=5)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>",frag=5)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>",frag=5)/Raw("x"*80)],iface="<TG interface>",count=1)
Test Case 6: MAC_IPV4_VXLAN_IPV4_PAY
@@ -398,18 +398,18 @@ rules::
matched packets::
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/TCP()/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/TCP()/Raw("x"*80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>")/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>")/TCP()/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>")/TCP()/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/TCP()/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>")/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>")/TCP()/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>")/TCP()/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="<ipv4 src>", dst="<ipv4 dst>")/TCP()/Raw("x"*80)],iface="<TG interface>",count=1)
Test Case 7: MAC_IPV4_NVGRE_MAC_IPV4_UDP_PAY
@@ -421,17 +421,17 @@ rules::
matched packets::
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<tester interface>", count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<TG interface>", count=1)
mismatched packets::
- >>> sendp([Ether()/IP(dst="<ipv4 dst change inputset>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<tester interface>", count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni change inputset>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<tester interface>", count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac change inputset>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<tester interface>", count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src change inputset>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<tester interface>", count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst change inputset>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<tester interface>", count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport change inputset>,dport=<dport>)/Raw("x"*80)], iface="<tester interface>", count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport change inputset>)/Raw("x"*80)], iface="<tester interface>", count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst change inputset>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<TG interface>", count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni change inputset>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<TG interface>", count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac change inputset>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<TG interface>", count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src change inputset>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<TG interface>", count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst change inputset>")/UDP(sport=<sport>,dport=<dport>)/Raw("x"*80)], iface="<TG interface>", count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport change inputset>,dport=<dport>)/Raw("x"*80)], iface="<TG interface>", count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/UDP(sport=<sport>,dport=<dport change inputset>)/Raw("x"*80)], iface="<TG interface>", count=1)
Test Case 8: MAC_IPV4_NVGRE_MAC_IPV4_TCP
@@ -443,17 +443,17 @@ rules::
matched packets::
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether()/IP(dst="<ipv4 dst change inputset>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni change inputset>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac change inputset>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src change inputset>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst change inputset>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport change inputset>,dport=<dport>)/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>2", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport change inputset>)/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst change inputset>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni change inputset>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac change inputset>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src change inputset>", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst change inputset>")/TCP(sport=<sport>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>", dst="<inner ipv4 dst>")/TCP(sport=<sport change inputset>,dport=<dport>)/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether()/IP(dst="<ipv4 dst>")/NVGRE(TNI=<tni>)/Ether(dst="<dst mac>")/IP(src="<inner ipv4 src>2", dst="<inner ipv4 dst>")/TCP(sport=<sport>,dport=<dport change inputset>)/Raw("x"*80)],iface="<TG interface>",count=1)
Test Case 9: ethertype filter_PPPOED
@@ -465,13 +465,13 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>", type=<ethertype>)/Raw("x" *80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>")/PPPoED()/Raw("x" *80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>", type=<ethertype>)/Raw("x" *80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>")/PPPoED()/Raw("x" *80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac>", type=<ethertype change inputset>)/Raw("x" *80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>")/PPPoE()/Raw("x" *80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>", type=<ethertype change inputset>)/Raw("x" *80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>")/PPPoE()/Raw("x" *80)],iface="<TG interface>",count=1)
Test Case 10: MAC_VLAN_PPPOE_IPV4_PAY_session_id_proto_id
@@ -483,14 +483,14 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<proto_id>)/IP()/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<proto_id>)/IP()/Raw("x"*80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<TG interface>",count=1)
Test Case 11: MAC_VLAN_PPPOE_IPV6_PAY_session_id_proto_id
@@ -502,14 +502,14 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<ipv6 proto_id>)/IPv6()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<TG interface>",count=1)
Test Case 12: MAC_PPPOE_IPV4_PAY_IP_address
@@ -521,12 +521,12 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>")/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>")/Raw("x"*80)],iface="<TG interface>",count=1)
Test Case 13: MAC_PPPOE_IPV6_UDP_PAY
@@ -538,13 +538,13 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport>)/Raw("x" * 80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst change inputset>")/UDP(sport=<sport>,dport=<dport>)/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/UDP(sport=<sport change inputset>,dport=<dport>)/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport change inputset>)/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst change inputset>")/UDP(sport=<sport>,dport=<dport>)/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/UDP(sport=<sport change inputset>,dport=<dport>)/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/UDP(sport=<sport>,dport=<dport change inputset>)/Raw("x" * 80)],iface="<TG interface>",count=1)
Test Case 14: MAC_VLAN_PPPOE_IPV4_TCP_PAY_non_src_dst_port
@@ -556,15 +556,15 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/TCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/TCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/TCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>")/TCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>")/TCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/UDP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/TCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src change inputset>", dst="<ipv4 dst>")/TCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst change inputset>")/TCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/UDP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP(src="<ipv4 src>", dst="<ipv4 dst>")/Raw("x" * 80)],iface="<TG interface>",count=1)
Test Case 15: MAC_VLAN_PPPOE_IPV6_PAY_IP_address
@@ -576,12 +576,12 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src change inputset>", dst="<ipv6 dst>")/Raw("x"*80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src>", dst="<ipv6 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv6 proto_id>)/IPv6(src="<ipv6 src change inputset>", dst="<ipv6 dst>")/Raw("x"*80)],iface="<TG interface>",count=1)
Test Case 16: MAC_PPPOE_LCP_PAY
@@ -593,13 +593,13 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<TG interface>",count=1)
Test Case 17: MAC_PPPOE_IPCP_PAY
@@ -611,13 +611,13 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<TG interface>",count=1)
Test Case 18: MAC_VLAN_PPPOE_LCP_PAY
@@ -629,14 +629,14 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<LCP proto_id>)/PPP_LCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<TG interface>",count=1)
Test Case 19: MAC_VLAN_PPPOE_IPCP_PAY
@@ -648,14 +648,14 @@ rules::
matched packets::
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
mismatched packets::
- >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<tester interface>",count=1)
- >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<tester interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac change inputset>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci change inputset>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid change inputset>)/PPP(proto=<IPCP proto_id>)/PPP_IPCP()/Raw("x" * 80)],iface="<TG interface>",count=1)
+ >>> sendp([Ether(dst="<dst mac>",type=0x8100)/Dot1Q(vlan=<tci>,type=0x8864)/PPPoE(sessionid=<seid>)/PPP(proto=<ipv4 proto_id>)/IP()/Raw("x" * 80)],iface="<TG interface>",count=1)
Test Case 20: check flow priority filter
@@ -704,7 +704,7 @@ Subcase 1: same pattern/input set/action different priority
2. send matched pkts and check queue 3 receive this pkt::
- >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst>")/TCP()/("X"*480)], iface="<tester interface>", count=1)
+ >>> sendp([Ether(dst="<dst mac>")/IP(src="<ipv4 src>",dst="<ipv4 dst>")/TCP()/("X"*480)], iface="<TG interface>", count=1)
3. destroy rules::
@@ -734,7 +734,7 @@ Subcase 3: some rules overlap
3. send pkt which match rule 0 and rule 1, check the pkt can be received by queue 3::
- >>> sendp([Ether(type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/UDP(dport=23)/("X"*480)], iface="<tester interface>")
+ >>> sendp([Ether(type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/UDP(dport=23)/("X"*480)], iface="<TG interface>")
4. destroy rule 0, repeat step 3 and check the pkt can be received by queue 2::
@@ -742,7 +742,7 @@ Subcase 3: some rules overlap
5. send pkt which match rule 2 and rule 3, check the pkt can be received by queue 1 or 2::
- >>> sendp([Ether(dst="00:00:00:01:03:13")/Dot1Q(vlan=1)/Dot1Q(vlan=12)/Raw("x"*480)], iface="<tester interface>", count=1)
+ >>> sendp([Ether(dst="00:00:00:01:03:13")/Dot1Q(vlan=1)/Dot1Q(vlan=12)/Raw("x"*480)], iface="<TG interface>", count=1)
6. destroy rule 3, repeat step 5 and check the pkt can be received by queue 4::
@@ -750,7 +750,7 @@ Subcase 3: some rules overlap
7. send pkt which match rule 4 and rule 5, check the pkt will be received by queue 8::
- >>> sendp([Ether(dst="00:00:00:01:03:03")/Dot1Q(vlan=1)/Dot1Q(vlan=2)/Raw("x"*480)], iface="<tester interface>", count=1)
+ >>> sendp([Ether(dst="00:00:00:01:03:03")/Dot1Q(vlan=1)/Dot1Q(vlan=2)/Raw("x"*480)], iface="<TG interface>", count=1)
8. destroy rule 4, repeat step 7 and check the pkts can be received by queue 4::
@@ -71,7 +71,7 @@ General set up
# CC=gcc meson --werror -Denable_kmods=True -Dlibdir=lib --default-library=static <dpdk build dir>
# ninja -C <dpdk build dir> -j 110
-3. Get the pci device id and interface of DUT and tester.
+3. Get the pci device id and interface of NIC ports.
For example, 0000:3b:00.0 and 0000:af:00.0 is pci device id,
ens785f0 and ens260f0 is interface::
@@ -85,11 +85,11 @@ General set up
# echo 1 > /sys/bus/pci/devices/0000:3b:00.0/sriov_numvfs
# ip link set ens785f0 vf 0 mac 00:11:22:33:44:55
-5. Bind the DUT port to dpdk::
+5. Bind the NIC port to dpdk::
- <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <DUT port pci device id>
+ <dpdk dir># ./usertools/dpdk-devbind.py -b vfio-pci <NIC port pci device id>
-6. Launch the userland ``testpmd`` application on DUT as follows and ::
+6. Launch the userland ``testpmd`` application on SUT as follows and ::
<dpdk build dir>/app/dpdk-testpmd <EAL options> -- -i --rxq=<queue number> --txq=<queue number>
testpmd> set fwd rxonly
@@ -145,13 +145,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
Subcase 2: eth_l2_src_only_MAC_IPV4_L2TPV2_CONTROL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -161,13 +161,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
Test case 2: MAC_IPV6_L2TPV2_CONTROL
------------------------------------
@@ -181,13 +181,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
Subcase 2: eth_l2_src_only_MAC_IPV6_L2TPV2_CONTROL
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -197,13 +197,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0xc80,len=12,session_id=<session_id>)], iface="<TG interface>")
Test case 3: MAC_IPV4_L2TPV2
----------------------------
@@ -217,13 +217,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
Subcase 2: eth_l2_src_only_MAC_IPV4_L2TPV2_DATA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -233,13 +233,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
Subcase 3: l2tpv2_session_id_MAC_IPV4_L2TPV2_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -249,13 +249,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
Subcase 4: eth_l2_src_only_MAC_IPV4_L2TPV2_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -265,13 +265,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
Subcase 5: l2tpv2_session_id_MAC_IPV4_L2TPV2_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -281,14 +281,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
-
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
+
Subcase 6: eth_l2_src_only_MAC_IPV4_L2TPV2_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rules::
@@ -297,13 +297,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
Subcase 7: l2tpv2_session_id_MAC_IPV4_L2TPV2_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -313,13 +313,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
Subcase 8: eth_l2_src_only_MAC_IPV4_L2TPV2_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -329,13 +329,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
Subcase 9: l2tpv2_session_id_MAC_IPV4_L2TPV2_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -345,13 +345,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
Subcase 10: eth_l2_src_only_MAC_IPV4_L2TPV2_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -361,15 +361,15 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
-
-Test case 4: MAC_IPV6_L2TPV2
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
+
+Test case 4: MAC_IPV6_L2TPV2
----------------------------
This case is designed to check distribute MAC IPv6 L2TPV2 data packets based on MAC src and L2TP session ID as input set.
@@ -381,13 +381,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
Subcase 2: eth_l2_src_only_MAC_IPV6_L2TPV2_DATA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -397,13 +397,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)], iface="<TG interface>")
Subcase 3: l2tpv2_session_id_MAC_IPV6_L2TPV2_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -413,13 +413,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
Subcase 4: eth_l2_src_only_MAC_IPV6_L2TPV2_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -429,13 +429,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=8,session_id=<session_id>)], iface="<TG interface>")
Subcase 5: l2tpv2_session_id_MAC_IPV6_L2TPV2_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -445,13 +445,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
Subcase 6: eth_l2_src_only_MAC_IPV6_L2TPV2_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -461,13 +461,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)], iface="<TG interface>")
Subcase 7: l2tpv2_session_id_MAC_IPV6_L2TPV2_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -477,13 +477,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
-
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
+
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
Subcase 8: eth_l2_src_only_MAC_IPV6_L2TPV2_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -493,13 +493,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)], iface="<TG interface>")
Subcase 9: l2tpv2_session_id_MAC_IPV6_L2TPV2_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -509,13 +509,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
Subcase 10: eth_l2_src_only_MAC_IPV6_L2TPV2_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -525,15 +525,15 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id change inputset>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id change inputset>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=12,session_id=<session_id>)], iface="<TG interface>")
-Test case 5: MAC_IPV4_PPPoL2TPV2
+Test case 5: MAC_IPV4_PPPoL2TPV2
--------------------------------
This case is designed to check distribute MAC IPv4 PPPoL2TPV2 data packets based on MAC src and L2TP session ID as input set.
@@ -545,13 +545,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 2: eth_l2_src_only_MAC_IPV4_PPPoL2TPV2_DATA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -561,13 +561,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 3: l2tpv2_session_id_MAC_IPV4_PPPoL2TPV2_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -577,13 +577,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 4: eth_l2_src_only_MAC_IPV4_PPPoL2TPV2_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -593,13 +593,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 5: l2tpv2_session_id_MAC_IPV4_PPPoL2TPV2_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -609,13 +609,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 6: eth_l2_src_only_MAC_IPV4_PPPoL2TPV2_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -625,13 +625,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 7: l2tpv2_session_id_MAC_IPV4_PPPoL2TPV2_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -641,13 +641,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 8: eth_l2_src_only_MAC_IPV4_PPPoL2TPV2_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -657,13 +657,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 9: l2tpv2_session_id_MAC_IPV4_PPPoL2TPV2_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -673,13 +673,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 10: eth_l2_src_only_MAC_IPV4_PPPoL2TPV2_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -689,15 +689,15 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
-Test case 6: MAC_IPV6_PPPoL2TPV2
+Test case 6: MAC_IPV6_PPPoL2TPV2
--------------------------------
This case is designed to check distribute MAC IPv6 PPPoL2TPV2 data packets based on MAC src and L2TP session ID as input set.
@@ -709,13 +709,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 2: eth_l2_src_only_MAC_IPV6_PPPoL2TPV2_DATA
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -725,13 +725,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 3: l2tpv2_session_id_MAC_IPV6_PPPoL2TPV2_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -741,13 +741,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 4: eth_l2_src_only_MAC_IPV6_PPPoL2TPV2_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -757,13 +757,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=12,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 5: l2tpv2_session_id_MAC_IPV6_PPPoL2TPV2_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -773,13 +773,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 6: eth_l2_src_only_MAC_IPV6_PPPoL2TPV2_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -789,13 +789,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 7: l2tpv2_session_id_MAC_IPV6_PPPoL2TPV2_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -805,13 +805,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 8: eth_l2_src_only_MAC_IPV6_PPPoL2TPV2_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -821,13 +821,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id change inputset>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,session_id=<session_id>,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 9: l2tpv2_session_id_MAC_IPV6_PPPoL2TPV2_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -837,13 +837,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Subcase 10: eth_l2_src_only_MAC_IPV6_PPPoL2TPV2_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -853,13 +853,13 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id change inputset>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=16,session_id=<session_id>)/HDLC()/Raw(b"\\x00\\x00")], iface="<TG interface>")
Test case 7: MAC_IPV4_PPPoL2TPV2_IPV4_PAY
-----------------------------------------
@@ -873,14 +873,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Subcase 2: ipv4_MAC_IPV4_PPPoL2TPV2_IPV4_PAY_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -890,14 +890,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Subcase 3: ipv4_MAC_IPV4_PPPoL2TPV2_IPV4_PAY_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -907,14 +907,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/iIP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/iIP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Subcase 4: ipv4_MAC_IPV4_PPPoL2TPV2_IPV4_PAY_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -924,14 +924,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Subcase 5: ipv4_MAC_IPV4_PPPoL2TPV2_IPV4_PAY_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -941,14 +941,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Test case 8: MAC_IPV4_PPPoL2TPV2_IPV4_UDP_PAY
---------------------------------------------
@@ -962,14 +962,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(sport=<inner sport>)], iface="<TG interface>")
Subcase 2: ipv4_udp_MAC_IPV4_PPPoL2TPV2_IPV4_UDP_PAY_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -979,14 +979,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Subcase 3: ipv4_udp_MAC_IPV4_PPPoL2TPV2_IPV4_UDP_PAY_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -996,14 +996,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
Subcase 4: ipv4_udp_MAC_IPV4_PPPoL2TPV2_IPV4_UDP_PAY_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1013,14 +1013,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Subcase 5: ipv4_udp_MAC_IPV4_PPPoL2TPV2_IPV4_UDP_PAY_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1030,16 +1030,16 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
-Test case 9: MAC_IPV4_PPPoL2TPV2_IPV4_TCP
+Test case 9: MAC_IPV4_PPPoL2TPV2_IPV4_TCP
-----------------------------------------
This case is designed to check distribute MAC IPv4 PPPoL2TPV2 IPv4 TCP data packets based on IP src+dest address and inner TCP src+dest port as input set.
@@ -1051,14 +1051,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(sport=<inner sport>)], iface="<TG interface>")
Subcase 2: ipv4_tcp_MAC_IPV4_PPPoL2TPV2_IPV4_TCP_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1068,14 +1068,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
Subcase 3: ipv4_tcp_MAC_IPV4_PPPoL2TPV2_IPV4_TCP_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1085,14 +1085,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
Subcase 4: ipv4_tcp_MAC_IPV4_PPPoL2TPV2_IPV4_TCP_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1102,14 +1102,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<TG interface>")
Subcase 5: ipv4_tcp_MAC_IPV4_PPPoL2TPV2_IPV4_TCP_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1119,14 +1119,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
Test case 10: MAC_IPV4_PPPoL2TPV2_IPV6_PAY
------------------------------------------
@@ -1140,14 +1140,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Subcase 2: ipv6_MAC_IPV4_PPPoL2TPV2_IPV6_PAY_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1157,14 +1157,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=1701)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Subcase 3: ipv6_MAC_IPV4_PPPoL2TPV2_IPV6_PAY_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1174,14 +1174,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Subcase 4: ipv6_MAC_IPV4_PPPoL2TPV2_IPV6_PAY_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1191,14 +1191,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Subcase 5: ipv6_MAC_IPV4_PPPoL2TPV2_IPV6_PAY_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1208,14 +1208,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Test case 11: MAC_IPV4_PPPoL2TPV2_IPV6_UDP_PAY
----------------------------------------------
@@ -1229,14 +1229,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
Subcase 2: ipv6_udp_MAC_IPV4_PPPoL2TPV2_IPV6_UDP_PAY_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1246,14 +1246,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Subcase 3: ipv6_udp_MAC_IPV4_PPPoL2TPV2_IPV6_UDP_PAY_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1263,14 +1263,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
Subcase 4: ipv6_udp_MAC_IPV4_PPPoL2TPV2_IPV6_UDP_PAY_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1280,14 +1280,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Subcase 5: ipv6_udp_MAC_IPV4_PPPoL2TPV2_IPV6_UDP_PAY_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1297,14 +1297,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Test case 12: MAC_IPV4_PPPoL2TPV2_IPV6_TCP
------------------------------------------
@@ -1318,14 +1318,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
Subcase 2: ipv6_tcp_MAC_IPV4_PPPoL2TPV2_IPV6_TCP_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1335,14 +1335,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=72)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
Subcase 3: ipv6_tcp_MAC_IPV4_PPPoL2TPV2_IPV6_TCP_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1352,14 +1352,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
Subcase 4: ipv6_tcp_MAC_IPV4_PPPoL2TPV2_IPV6_TCP_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1369,14 +1369,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
Subcase 5: ipv6_tcp_MAC_IPV4_PPPoL2TPV2_IPV6_TCP_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1386,14 +1386,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=76)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/TCP(sport=<inner sport>)], iface="<TG interface>")
Test case 13: MAC_IPV6_PPPoL2TPV2_IPV4_PAY
------------------------------------------
@@ -1407,14 +1407,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Subcase 2: ipv4_MAC_IPV6_PPPoL2TPV2_IPV4_PAY_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1424,14 +1424,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=32)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Subcase 3: ipv4_MAC_IPV6_PPPoL2TPV2_IPV4_PAY_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1441,14 +1441,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Subcase 4: ipv4_MAC_IPV6_PPPoL2TPV2_IPV4_PAY_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1458,14 +1458,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Subcase 5: ipv4_MAC_IPV6_PPPoL2TPV2_IPV4_PAY_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1475,14 +1475,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>",dst="<ipv4 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=36)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>",dst="<ipv4 dst>")], iface="<TG interface>")
Test case 14: MAC_IPV6_PPPoL2TPV2_IPV4_UDP_PAY
----------------------------------------------
@@ -1496,14 +1496,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Subcase 2: ipv4_udp_MAC_IPV6_PPPoL2TPV2_IPV4_UDP_PAY_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1513,14 +1513,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=40)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
Subcase 3: ipv4_udp_MAC_IPV6_PPPoL2TPV2_IPV4_UDP_PAY_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1530,14 +1530,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Subcase 4: ipv4_udp_MAC_IPV6_PPPoL2TPV2_IPV4_UDP_PAY_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1547,14 +1547,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
Subcase 5: ipv4_udp_MAC_IPV6_PPPoL2TPV2_IPV4_UDP_PAY_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1564,14 +1564,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=44)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Test case 15: MAC_IPV6_PPPoL2TPV2_IPV4_TCP
------------------------------------------
@@ -1585,14 +1585,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
Subcase 2: ipv4_tcp_MAC_IPV6_PPPoL2TPV2_IPV4_TCP_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1602,14 +1602,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
Subcase 3: ipv4_tcp_MAC_IPV6_PPPoL2TPV2_IPV4_TCP_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1619,14 +1619,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src change inputset>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x21")/IP(src="<ipv4 src>")/TCP(dport=<inner dport>)], iface="<TG interface>")
Subcase 4: ipv4_tcp_MAC_IPV6_PPPoL2TPV2_IPV4_TCP_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1636,14 +1636,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
Subcase 5: ipv4_tcp_MAC_IPV6_PPPoL2TPV2_IPV4_TCP_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1653,14 +1653,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst change inputset>")/TCP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x21")/IP(dst="<ipv4 dst>")/TCP(dport=<inner dport>)], iface="<TG interface>")
Test case 16: MAC_IPV6_PPPoL2TPV2_IPV6_PAY
------------------------------------------
@@ -1674,14 +1674,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>7")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>7")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Subcase 2: ipv6_MAC_IPV6_PPPoL2TPV2_IPV6_PAY_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1691,14 +1691,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=52)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Subcase 3: ipv6_MAC_IPV6_PPPoL2TPV2_IPV6_PAY_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1708,14 +1708,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Subcase 4: ipv6_MAC_IPV6_PPPoL2TPV2_IPV6_PAY_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1725,15 +1725,15 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
-
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
-
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+
Subcase 5: ipv6_MAC_IPV6_PPPoL2TPV2_IPV6_PAY_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
rules::
@@ -1742,14 +1742,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>",dst="<ipv6 dst>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst change inputset>")], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=56)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>",dst="<ipv6 dst>")], iface="<TG interface>")
Test case 17: MAC_IPV6_PPPoL2TPV2_IPV6_UDP_PAY
----------------------------------------------
@@ -1763,14 +1763,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
Subcase 2: ipv6_udp_MAC_IPV6_PPPoL2TPV2_IPV6_UDP_PAY_DATA_L
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1780,14 +1780,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x400,len=60)/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Subcase 3: ipv6_udp_MAC_IPV6_PPPoL2TPV2_IPV6_UDP_PAY_DATA_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1797,14 +1797,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x080)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(sport=<inner sport>)], iface="<TG interface>")
Subcase 4: ipv6_udp_MAC_IPV6_PPPoL2TPV2_IPV6_UDP_PAY_DATA_O
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1814,14 +1814,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x020,offset=<offset>)/Raw(b"\\x00\\x00\\x00\\x00")/HDLC()/Raw(b"\\x00\\x57")/IPv6(src="<ipv6 src>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Subcase 5: ipv6_udp_MAC_IPV6_PPPoL2TPV2_IPV6_UDP_PAY_DATA_L_S
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1831,14 +1831,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(dport=<inner dport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport change inputset>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/UDP(dport=<inner dport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x480,len=64)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/UDP(dport=<inner dport>)], iface="<TG interface>")
Test case 18: MAC_IPV6_PPPoL2TPV2_IPV6_TCP
------------------------------------------
@@ -1852,14 +1852,14 @@ rules::
matched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<tester interface>")
+ >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
+ >>> sendp([Ether(src="<src mac change inputset>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport>)], iface="<TG interface>")
mismatched packets::
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst>")/TCP(sport=<inner sport change inputset>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IPv6()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6(dst="<ipv6 dst change inputset>")/TCP(sport=<inner sport>)], iface="<tester interface>")
- >>> sendp([Ether(src="<src mac>")/IP()/UDP(dport=<dport>)/L2TP(hdr=0x000)/HDLC()/Raw(b"\\x00\\x57")/IPv6