1 Star 0 Fork 46

openEuler/openvswitch

forked from src-openEuler/openvswitch
关闭
 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
system-afxdp.at-Add-test-for-infinite-re-addition-of.patch 2.36 KB
一键复制 编辑 原始数据 按行查看 历史
jpzhang187 提交于 2020-09-01 18:09 +08:00 . Add openvswitch-kmod package
From 1b3faafb1ee74ff5bc877bf0ef3097ce4d77f8ef Mon Sep 17 00:00:00 2001
From: Ilya Maximets <i.maximets@ovn.org>
Date: Sat, 7 Dec 2019 15:46:18 +0100
Subject: system-afxdp.at: Add test for infinite re-addition of failed ports.
New file created for AF_XDP specific tests.
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Acked-by: William Tu <u9012063@gmail.com>
---
tests/automake.mk | 3 ++-
tests/system-afxdp-testsuite.at | 1 +
tests/system-afxdp.at | 24 ++++++++++++++++++++++++
3 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 tests/system-afxdp.at
diff --git a/tests/automake.mk b/tests/automake.mk
index d6ab51732..657fd690e 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -165,7 +165,8 @@ SYSTEM_USERSPACE_TESTSUITE_AT = \
SYSTEM_AFXDP_TESTSUITE_AT = \
tests/system-userspace-macros.at \
tests/system-afxdp-testsuite.at \
- tests/system-afxdp-macros.at
+ tests/system-afxdp-macros.at \
+ tests/system-afxdp.at
SYSTEM_TESTSUITE_AT = \
tests/system-common-macros.at \
diff --git a/tests/system-afxdp-testsuite.at b/tests/system-afxdp-testsuite.at
index 9b7a29066..01c1bf50c 100644
--- a/tests/system-afxdp-testsuite.at
+++ b/tests/system-afxdp-testsuite.at
@@ -23,4 +23,5 @@ m4_include([tests/system-common-macros.at])
m4_include([tests/system-userspace-macros.at])
m4_include([tests/system-afxdp-macros.at])
+m4_include([tests/system-afxdp.at])
m4_include([tests/system-traffic.at])
diff --git a/tests/system-afxdp.at b/tests/system-afxdp.at
new file mode 100644
index 000000000..e4451624f
--- /dev/null
+++ b/tests/system-afxdp.at
@@ -0,0 +1,24 @@
+AT_BANNER([AF_XDP])
+
+AT_SETUP([AF_XDP - infinite re-addition of failed ports])
+AT_KEYWORDS([afxdp infinite])
+OVS_TRAFFIC_VSWITCHD_START()
+
+AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
+
+ADD_NAMESPACES(at_ns0, at_ns1)
+ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
+
+AT_CHECK([ovs-vsctl del-port ovs-p0])
+AT_CHECK([ovs-vsctl add-port br0 ovs-p0 -- \
+ set interface ovs-p0 type=afxdp options:n_rxq=42],
+ [0], [], [stderr])
+OVS_WAIT_UNTIL([grep "ovs-p0: could not set configuration" ovs-vswitchd.log])
+sleep 5
+AT_CHECK([grep "ovs-p0: could not set configuration" ovs-vswitchd.log | wc -l],
+ [0], [1
+])
+
+OVS_TRAFFIC_VSWITCHD_STOP(["/ovs-p0: Too big 'n_rxq'/d
+/ovs-p0: could not set configuration/d"])
+AT_CLEANUP
--
2.14.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/open_euler/openvswitch.git
git@gitee.com:open_euler/openvswitch.git
open_euler
openvswitch
openvswitch
master

搜索帮助