[PATCH 0/3] Add a new PvP Recipe using vhost-net virtio devices
by Adrian Moreno
In order to make it easier to add more PvP tests, refactor common PvP
funtionality into a base class from which all PvP Recipes (including
current OvSDpdkPvPRecipe) can inherit.
Adrian Moreno (3):
lnst.Recipes.ENRT: add BasePvPRecipe
lnst.Recipes.ENRT: refactor OvSDpdkRecipe
lnst.Recipes.ENRT: add VhostNetPvPRecipe
lnst/Recipes/ENRT/BasePvPRecipe.py | 283 +++++++++++++++++++++++++
lnst/Recipes/ENRT/OvS_DPDK_PvP.py | 228 +++++---------------
lnst/Recipes/ENRT/VhostNetPvPRecipe.py | 283 +++++++++++++++++++++++++
3 files changed, 616 insertions(+), 178 deletions(-)
create mode 100644 lnst/Recipes/ENRT/BasePvPRecipe.py
create mode 100644 lnst/Recipes/ENRT/VhostNetPvPRecipe.py
--
2.21.0
4 years
[PATCH] lnst.Controller.Machine: add device method result after the method call
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
Adding the result before calling the method leads to printing a "live
log" line that says that the action is a "PASS", but the method wasn't
called yet.
Changing the result to False after the method call is therefore only
visible in the Result Summary logs, which can lead to confusing
PASS/FAIL situations when a tester sees the PASS in live logs, but FAIL
in summary for the same action.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Controller/Machine.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lnst/Controller/Machine.py b/lnst/Controller/Machine.py
index 6c6f8d1..e95e58b 100644
--- a/lnst/Controller/Machine.py
+++ b/lnst/Controller/Machine.py
@@ -148,7 +148,6 @@ class Machine(object):
args=args,
kwargs=kwargs,
)
- self._add_recipe_result(config_res)
try:
res = self.rpc_call("dev_method", index, method_name, args, kwargs,
@@ -156,6 +155,8 @@ class Machine(object):
except:
config_res.success = False
raise
+ finally:
+ self._add_recipe_result(config_res)
return res
def remote_device_setattr(self, index, attr_name, value, netns):
--
2.23.0
4 years
653937产 品 市 场 如 何 进 行 管 理
by ������
����������������...
---Original---
From: amyuepao(a)tongxinzhidun.com
Date: 2019-10-29 09:07:31
To: lnst-developers(a)lists.fedorahosted.org
�� �� �� ��
4 years, 1 month
[PATCH 0/4] add ovs bond, fix linux bond
by jurbanov@redhat.com
From: Jozef Urbanovsky <jurbanov(a)redhat.com>
Hi,
This patchset adds OvS Bonding recipe, as well as, fixes issues
with Linux Bond recipe. OvSDoubleBondRecipe is similiar
to DoubleBondRecipe setup, however, it does use OvS bridge, where
bond is created and connected to.
Patchset itself also contains minor fixes to BondDevice with regards
to LACP xmit_hash_policy setting and BaseEnrtRecipe, where it
sets somewhat reasonable default value of perf_msg_sizes.
Jozef
Jozef Urbanovsky (4):
lnst.Recipes.ENRT: add OvSDoubleBondRecipe
lnst.Devices.BondDevice: fix xmit_hash_policy setter
lnst.Recipes.ENRT.BaseEnrtRecipe: use reasonable default msg_size
value
lnst.Recipes.ENRT.DoubleBondRecipe: add support for all bonding modes
lnst/Devices/BondDevice.py | 7 +-
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 2 +-
lnst/Recipes/ENRT/DoubleBondRecipe.py | 18 ++++-
lnst/Recipes/ENRT/OvsDoubleBondRecipe.py | 99 ++++++++++++++++++++++++
4 files changed, 121 insertions(+), 5 deletions(-)
create mode 100644 lnst/Recipes/ENRT/OvsDoubleBondRecipe.py
--
2.21.0
4 years, 1 month
[PATCH] lnst.Tests.TestPMD: flush the stdin pipe after writing
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
When not flushed, the pipe is buffered and the testpmd process doesn't
actually start forwarding packets as expected.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Tests/TestPMD.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lnst/Tests/TestPMD.py b/lnst/Tests/TestPMD.py
index 59c69aa..a92a42a 100644
--- a/lnst/Tests/TestPMD.py
+++ b/lnst/Tests/TestPMD.py
@@ -39,11 +39,14 @@ def run(self):
close_fds=True)
process.stdin.write(str.encode("start tx_first\n"))
+ process.stdin.flush()
self.wait_for_interrupt()
process.stdin.write(str.encode("stop\n"))
+ process.stdin.flush()
process.stdin.write(str.encode("quit\n"))
+ process.stdin.flush()
out, err = process.communicate()
self._res_data = {"stdout": out, "stderr": err}
--
2.23.0
4 years, 1 month
[PATCH 1/5] lnst.Devices.SoftDevice: destroy to use _ipr_wrapper
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
The _ipr_wrapper method implemented in the base Device class can safely
be used for the destroy operation of a SoftDevice. The methods are very
similar so this is just refactoring to reduce code duplication.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Devices/SoftDevice.py | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/lnst/Devices/SoftDevice.py b/lnst/Devices/SoftDevice.py
index 7a92c24..3373f1d 100644
--- a/lnst/Devices/SoftDevice.py
+++ b/lnst/Devices/SoftDevice.py
@@ -69,14 +69,5 @@ class SoftDevice(Device):
self.name, str(e)))
def destroy(self):
- with pyroute2.IPRoute() as ipr:
- try:
- logging.debug("Performing Netlink operation del for device {} {}".
- format(self.ifindex, self.name))
- ipr.link("del", index=self.ifindex)
- self._if_manager.rescan_devices()
- except Exception as e:
- log_exc_traceback()
- raise DeviceConfigError("Deleting link {} failed: {}".format(
- self.name, str(e)))
+ self._ipr_wrapper("link", "del", index=self.ifindex)
return True
--
2.23.0
4 years, 1 month
邮箱数据采集软件
by 邮箱数据采集软件
缺邮箱?缺客户?缺人脉?
帮你搜索全国各行各业的邮箱数据,
软件全自动化,批量输入关键词搜索
免费测试,下载安装即用
百度云盘下载链接: https://pan.baidu.com/s/1exGR_wwjnmYPOfGnFH23tA
提取码: gqju
详情加我QQ:2124008496
4 years, 1 month
(AD)面向量产的产品设计DFX(DFA-DFM-DFC)
by ���u��
---Original---
From: ggxaofang(a)evergreenhandbag.com
Date: 2019-10-10 15:22:59
To: lnst-developers(a)lists.fedorahosted.org
�� �� �� �� �� �� ��...
ÐÏࡱá
4 years, 2 months
[PATCH 1/4] lnst.Devices.Device: add DeviceFeatureNotSupported for adaptive coalescing
by olichtne@redhat.com
From: Ondrej Lichtner <olichtne(a)redhat.com>
For now throwing an exception when trying to read/write coalescing
settings to a device that doesn't support them is still the best option.
However, there's a need to easily distinguish and ignore this error in
operations that try to access all properties of a Device class instance,
e.g. enable_readonly_cache. In such cases the tester probably doesn't
care that coalescing isn't supported and has no option to skip it for
the cache generation operation leading to the recipe failing with an
exception.
Handling device capabilities dynamically is a larger feature that might
be hard to implement for now so instead a special
DeviceFeatureNotSupported exception class is added that can be safely
ignored when performing these "bulk"/"iterative" operations.
Signed-off-by: Ondrej Lichtner <olichtne(a)redhat.com>
---
lnst/Common/DeviceError.py | 3 +++
lnst/Devices/Device.py | 11 +++++++----
lnst/Devices/RemoteDevice.py | 8 +++++++-
3 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/lnst/Common/DeviceError.py b/lnst/Common/DeviceError.py
index c89541e..dc17205 100644
--- a/lnst/Common/DeviceError.py
+++ b/lnst/Common/DeviceError.py
@@ -32,3 +32,6 @@ class DeviceReadOnly(DeviceError):
class DeviceConfigValueError(DeviceConfigError):
pass
+
+class DeviceFeatureNotSupported(DeviceError):
+ pass
diff --git a/lnst/Devices/Device.py b/lnst/Devices/Device.py
index 3984776..e69a297 100644
--- a/lnst/Devices/Device.py
+++ b/lnst/Devices/Device.py
@@ -23,6 +23,7 @@
from lnst.Common.ExecCmd import exec_cmd
from lnst.Common.DeviceError import DeviceError, DeviceDeleted, DeviceDisabled
from lnst.Common.DeviceError import DeviceConfigError, DeviceConfigValueError
+from lnst.Common.DeviceError import DeviceFeatureNotSupported
from lnst.Common.IpAddress import ipaddress
from lnst.Common.HWAddress import hwaddress
@@ -624,8 +625,9 @@ def _read_adaptive_coalescing(self):
try:
res = re.search(regex, res).groups()
except AttributeError:
- raise DeviceError("No values for coalescence of %s." %
- self.name)
+ raise DeviceFeatureNotSupported(
+ "No values for coalescence of %s." % self.name
+ )
return list(res)
def _write_adaptive_coalescing(self, rx_val, tx_val):
@@ -635,8 +637,9 @@ def _write_adaptive_coalescing(self, rx_val, tx_val):
exec_cmd("ethtool -C %s adaptive-rx %s adaptive-tx %s" %
(self.name, rx_val, tx_val))
except:
- raise DeviceConfigError("Not allowed to modify coalescence "
- "settings for %s." % self.name)
+ raise DeviceFeatureNotSupported(
+ "Not allowed to modify coalescence settings for %s." % self.name
+ )
def restore_coalescing(self):
rx_val = self._cleanup_data["adaptive_rx_coalescing"]
diff --git a/lnst/Devices/RemoteDevice.py b/lnst/Devices/RemoteDevice.py
index 17bc52b..55912ea 100644
--- a/lnst/Devices/RemoteDevice.py
+++ b/lnst/Devices/RemoteDevice.py
@@ -11,9 +11,11 @@
olichtne(a)redhat.com (Ondrej Lichtner)
"""
+import logging
from copy import deepcopy
from lnst.Devices.Device import Device
from lnst.Common.DeviceError import DeviceDeleted, DeviceReadOnly
+from lnst.Common.DeviceError import DeviceFeatureNotSupported
def remotedev_decorator(cls):
def func(*args, **kwargs):
@@ -150,7 +152,11 @@ def __iter__(self):
attr = getattr(self._dev_cls, x)
if not callable(attr):
- yield (x, getattr(self, x))
+ try:
+ yield (x, getattr(self, x))
+ except DeviceFeatureNotSupported as e:
+ logging.debug(str(e))
+ continue
def _match_update_data(self, data):
return False
--
2.23.0
4 years, 2 months