summaryrefslogtreecommitdiffstats
path: root/test/vpp_pg_interface.py
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2020-08-11 15:00:44 +0200
committerBenoƮt Ganne <bganne@cisco.com>2020-08-14 09:38:58 +0000
commitf382b06febf2b26c37fd384824a1915e16517a2b (patch)
tree0d53d28cbc1b089b45d3add515bea6a298512665 /test/vpp_pg_interface.py
parentc3ed1c99134d063dff03c4babe0ebbf5cc0e8ab2 (diff)
gso: packet coalesce library
Type: feature Change-Id: Ia19d3611e596d9ec47509889b34e8fe793a0ccc3 Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'test/vpp_pg_interface.py')
-rwxr-xr-xtest/vpp_pg_interface.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/vpp_pg_interface.py b/test/vpp_pg_interface.py
index 32c0eaef401..4858aa7aef7 100755
--- a/test/vpp_pg_interface.py
+++ b/test/vpp_pg_interface.py
@@ -58,6 +58,13 @@ class VppPGInterface(VppInterface):
return self._gso_size
@property
+ def coalesce_is_enabled(self):
+ """coalesce enabled on packet-generator interface"""
+ if self._coalesce_enabled == 0:
+ return "coalesce-disabled"
+ return "coalesce-enabled"
+
+ @property
def out_path(self):
"""pcap file path - captured packets"""
return self._out_path
@@ -113,6 +120,7 @@ class VppPGInterface(VppInterface):
self._pg_index = pg_index
self._gso_enabled = gso
self._gso_size = gso_size
+ self._coalesce_enabled = 0
self._out_file = "pg%u_out.pcap" % self.pg_index
self._out_path = self.test.tempdir + "/" + self._out_file
self._in_file = "pg%u_in.pcap" % self.pg_index
@@ -160,6 +168,18 @@ class VppPGInterface(VppInterface):
def disable_capture(self):
self.test.vapi.cli("%s disable" % self.capture_cli)
+ def coalesce_enable(self):
+ """ Enable packet coalesce on this packet-generator interface"""
+ self._coalesce_enabled = 1
+ self.test.vapi.pg_interface_enable_disable_coalesce(self.sw_if_index,
+ 1)
+
+ def coalesce_disable(self):
+ """ Disable packet coalesce on this packet-generator interface"""
+ self._coalesce_enabled = 0
+ self.test.vapi.pg_interface_enable_disable_coalesce(self.sw_if_index,
+ 0)
+
def add_stream(self, pkts, nb_replays=None, worker=None):
"""
Add a stream of packets to this packet-generator