aboutsummaryrefslogtreecommitdiffstats
path: root/resources/libraries/python/InterfaceUtil.py
diff options
context:
space:
mode:
authorVratko Polak <vrpolak@cisco.com>2021-02-17 20:04:36 +0100
committerVratko Polak <vrpolak@cisco.com>2021-02-19 12:12:50 +0000
commit6dc62d10b1e6a6b5eee09f6d42e750de273a464b (patch)
tree5e3133008746d4462fa64f858a66ab00c2c8aa04 /resources/libraries/python/InterfaceUtil.py
parentf09a4dffb4b0643a71f3f85960657a02a419ff3b (diff)
API: Use newer messages
The mesages are the newest present in last common ancestor of master and rls2101 (so not yet ipsec_sad_entry_add_del_v3). Added a TODO for the RDMA create improvement, to be implemented in a separate change. Change-Id: I94bcd2f1bc109fb995c4dd6df44f8928865634f5 Signed-off-by: Vratko Polak <vrpolak@cisco.com>
Diffstat (limited to 'resources/libraries/python/InterfaceUtil.py')
-rw-r--r--resources/libraries/python/InterfaceUtil.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/resources/libraries/python/InterfaceUtil.py b/resources/libraries/python/InterfaceUtil.py
index 10778ed49a..04fdff7cac 100644
--- a/resources/libraries/python/InterfaceUtil.py
+++ b/resources/libraries/python/InterfaceUtil.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2020 Cisco and/or its affiliates.
+# Copyright (c) 2021 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
@@ -1029,9 +1029,11 @@ class InterfaceUtil:
:raises RuntimeError: If it is not possible to create loopback on the
node.
"""
- cmd = u"create_loopback"
+ cmd = u"create_loopback_instance"
args = dict(
- mac_address=L2Util.mac_to_bin(mac) if mac else 0
+ mac_address=L2Util.mac_to_bin(mac) if mac else 0,
+ is_specified=False,
+ user_instance=0,
)
err_msg = f"Failed to create loopback interface on host {node[u'host']}"
with PapiSocketExecutor(node) as papi_exec:
@@ -1207,7 +1209,7 @@ class InterfaceUtil:
node, u"set logging class rdma level debug"
)
- cmd = u"rdma_create"
+ cmd = u"rdma_create_v2"
pci_addr = Topology.get_interface_pci_addr(node, if_key)
args = dict(
name=InterfaceUtil.pci_to_eth(node, pci_addr),
@@ -1216,6 +1218,9 @@ class InterfaceUtil:
rxq_size=rxq_size,
txq_size=txq_size,
mode=getattr(RdmaMode, f"RDMA_API_MODE_{mode.upper()}").value,
+ # TODO: Set True for non-jumbo packets.
+ no_multi_seg=False,
+ max_pktlen=0,
)
err_msg = f"Failed to create RDMA interface on host {node[u'host']}"
with PapiSocketExecutor(node) as papi_exec: