aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/VhostUser.py
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2020-01-02 13:25:01 +0000
committerPeter Mikus <pmikus@cisco.com>2020-01-07 15:25:06 +0000
commitae652334356c12b167399a340ad55abd1ef7bbce (patch)
treeca63fa2d81f76417e4f5dae734e88bc4dcc8078c /resources/libraries/python/VhostUser.py
parent3a001f6be69e9bc3a5c1cfe3386f9d62fd680af1 (diff)
Vhost: Add GSO option
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: Iba9af71c293645b480203af72fcf940cbe9ccb3a
Diffstat (limited to 'resources/libraries/python/VhostUser.py')
-rw-r--r--resources/libraries/python/VhostUser.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/resources/libraries/python/VhostUser.py b/resources/libraries/python/VhostUser.py
index 2a03835d45..cc9685d74d 100644
--- a/resources/libraries/python/VhostUser.py
+++ b/resources/libraries/python/VhostUser.py
@@ -24,13 +24,18 @@ class VhostUser:
"""Vhost-user interfaces L1 library."""
@staticmethod
- def vpp_create_vhost_user_interface(node, socket):
+ def vpp_create_vhost_user_interface(
+ node, socket, is_server=False, enable_gso=False):
"""Create Vhost-user interface on VPP node.
:param node: Node to create Vhost-user interface on.
:param socket: Vhost-user interface socket path.
+ :param is_server: Server side of connection. Default: False
+ :param enable_gso: Generic segmentation offloading. Default: False
:type node: dict
:type socket: str
+ :type is_server: bool
+ :type enable_gso: bool
:returns: SW interface index.
:rtype: int
"""
@@ -38,7 +43,9 @@ class VhostUser:
err_msg = f"Failed to create Vhost-user interface " \
f"on host {node[u'host']}"
args = dict(
- sock_filename=str(socket)
+ is_server=bool(is_server),
+ sock_filename=str(socket),
+ enable_gso=bool(enable_gso)
)
with PapiSocketExecutor(node) as papi_exec: