aboutsummaryrefslogtreecommitdiffstats
path: root/test/vpp_pg_interface.py
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2019-07-23 11:54:48 +0200
committerNeale Ranns <nranns@cisco.com>2019-07-28 14:20:06 +0000
commit22e9cfd760be613f33a4135e9247729b64619cc6 (patch)
tree81c6c66f0729202b71fa9b7748b405f4489f3f5a /test/vpp_pg_interface.py
parentbe83704c5b1482dfd2ba38423662a9da5a8d8f81 (diff)
pg: add GSO support
Type: feature Change-Id: I72676495a85fbecc946aa266a75234cce70c3a5e Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Diffstat (limited to 'test/vpp_pg_interface.py')
-rwxr-xr-xtest/vpp_pg_interface.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/test/vpp_pg_interface.py b/test/vpp_pg_interface.py
index bd4ddaff58a..e6dae66feec 100755
--- a/test/vpp_pg_interface.py
+++ b/test/vpp_pg_interface.py
@@ -46,6 +46,18 @@ class VppPGInterface(VppInterface):
return self._pg_index
@property
+ def gso_enabled(self):
+ """gso enabled on packet-generator interface"""
+ if self._gso_enabled == 0:
+ return "gso-disabled"
+ return "gso-enabled"
+
+ @property
+ def gso_size(self):
+ """gso size on packet-generator interface"""
+ return self._gso_size
+
+ @property
def out_path(self):
"""pcap file path - captured packets"""
return self._out_path
@@ -86,17 +98,19 @@ class VppPGInterface(VppInterface):
self._out_history_counter += 1
return v
- def __init__(self, test, pg_index):
+ def __init__(self, test, pg_index, gso, gso_size):
""" Create VPP packet-generator interface """
super(VppPGInterface, self).__init__(test)
- r = test.vapi.pg_create_interface(pg_index)
+ r = test.vapi.pg_create_interface(pg_index, gso, gso_size)
self.set_sw_if_index(r.sw_if_index)
self._in_history_counter = 0
self._out_history_counter = 0
self._out_assert_counter = 0
self._pg_index = pg_index
+ self._gso_enabled = gso
+ self._gso_size = gso_size
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