summaryrefslogtreecommitdiffstats
path: root/test/vpp_pg_interface.py
diff options
context:
space:
mode:
authorNeale Ranns <neale@graphiant.com>2021-06-03 14:43:21 +0000
committerOle Tr�an <otroan@employees.org>2021-06-14 13:12:34 +0000
commit6197cb730e1571ca69859489c0ae7ea90a5c5fd4 (patch)
tree769f178533896318ed98c0014987169d24db94db /test/vpp_pg_interface.py
parent52c33d60bc63626d400067e38ab0af312fdb8594 (diff)
pg: A Tunnel mode variant of a pg interface
Type: feature this allows VPP to simulate linux tun devices. Signed-off-by: Neale Ranns <neale@graphiant.com> Change-Id: I3adf38b49a254804370f78edd5d275d192fd00a6
Diffstat (limited to 'test/vpp_pg_interface.py')
-rwxr-xr-xtest/vpp_pg_interface.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/vpp_pg_interface.py b/test/vpp_pg_interface.py
index 3bcde9319a8..567b81de7c0 100755
--- a/test/vpp_pg_interface.py
+++ b/test/vpp_pg_interface.py
@@ -9,6 +9,7 @@ import scapy.compat
from scapy.utils import wrpcap, rdpcap, PcapReader
from scapy.plist import PacketList
from vpp_interface import VppInterface
+from vpp_papi import VppEnum
from scapy.layers.l2 import Ether, ARP
from scapy.layers.inet6 import IPv6, ICMPv6ND_NS, ICMPv6ND_NA,\
@@ -111,11 +112,11 @@ class VppPGInterface(VppInterface):
self._out_history_counter += 1
return v
- def __init__(self, test, pg_index, gso, gso_size):
+ def __init__(self, test, pg_index, gso, gso_size, mode):
""" Create VPP packet-generator interface """
super().__init__(test)
- r = test.vapi.pg_create_interface(pg_index, gso, gso_size)
+ r = test.vapi.pg_create_interface_v2(pg_index, gso, gso_size, mode)
self.set_sw_if_index(r.sw_if_index)
self._in_history_counter = 0