network/virt: new FOU and GUE tests
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 3 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 3 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [LTP] [PATCH 0/3] network/virt: new FOU and GUE tests
Quoted 5 lines · Petr Vorel
Hi Alexey,
Quoted 2 lines
The first patch adds IPv6 flag '-6' to the library, which will be used by the two new tests in this patch series too.
Quoted 8 lines
Quoted 1 line
The rest are adding two similar tests for UDP tunneling.
fou01.shandgue01.share nearly the same, but I also wouldn't complicate things by putting functions intovirt_lib.shto reduce duplicity.Thus whole patchset LGTM, thanks!
Reviewed-by Petr Vorel <[email protected]>
Hi Petr,
Thanks for the review! I think with test args we could reduce duplication without complicating too much... what about these diffs below (gue01.sh removed)?
runtest/net.features +2 -2
@@ -65,8 +65,8 @@ gre_ipv6_01 gre01.sh -6 gre_ipv4_02 gre02.sh gre_ipv6_02 gre02.sh -6 -gue01 gue01.sh -gue01_ipv6 gue01.sh -6 +gue01 fou01.sh -t gue +gue01_ipv6 fou01.sh -t gue -6 fou01 fou01.sh fou01_ipv6 fou01.sh -6
testcases/network/virt/fou01.sh +18 -5
@@ -6,18 +6,26 @@ TST_TESTFUNC=virt_netperf_rand_sizes TST_SETUP=do_setup TST_CLEANUP=do_cleanup TST_NEEDS_TMPDIR=1 +TST_OPTS="t:" +TST_PARSE_ARGS="parse_args" virt_type="fou" . virt_lib.sh -# GRE IP protocol number -PROTO=47 +GRE_IP_PROTO=47 + +parse_args() +{ + case $1 in + t) virt_type="$2" ;; + esac +} do_cleanup() { if [ "$FOU_PORT" ]; then tst_net_run -l $FOU_PORT -r $FOU_PORT_RMT \ - "ip fou del ipproto $PROTO ${TST_IPV6_FLAG} port" + "ip fou del $FOU_PROTO ${TST_IPV6_FLAG} port" fi virt_cleanup_rmt
@@ -27,11 +35,18 @@ do_cleanup() do_setup() { local get_port_cmd="tst_get_unused_port ipv${TST_IPVER} dgram" - local encap_cmd="encap fou encap-sport auto encap-dport" + local encap_cmd="encap $virt_type encap-sport auto encap-dport" local loc_ip=$(tst_ipaddr) local rmt_ip=$(tst_ipaddr rhost) local fou="fou$TST_IPV6" + case $virt_type in + fou) FOU_PROTO="ipproto $GRE_IP_PROTO";; + gue) FOU_PROTO="gue";; + esac + tst_require_drivers $fou tst_net_run -s modprobe $fou
@@ -39,7 +54,7 @@ do_setup() FOU_PORT_RMT=$(tst_rhost_run -c "$get_port_cmd") tst_net_run -s -l $FOU_PORT -r $FOU_PORT_RMT \ - "ip fou add ipproto $PROTO ${TST_IPV6_FLAG} port" + "ip fou add $FOU_PROTO ${TST_IPV6_FLAG} port" virt_setup "local $loc_ip remote $rmt_ip $encap_cmd $FOU_PORT_RMT" \ "local $rmt_ip remote $loc_ip $encap_cmd $FOU_PORT"