Skip to content

Commit b25b44c

Browse files
Daniel Zahkakuba-moo
authored andcommitted
selftests: drv-net: tso: fix non-tunneled tso6 test case name
The non-tunneled tso6 test case was showing up as: ok 8 tso.ipv4 This is because of the way test_builder() uses the inner_ipver arg in test naming, and how test_info is iterated over in main(). Given that some tunnels not supported yet, e.g. ipip or sit, only support ipv4 or ipv6 as the inner network protocol, I think the best fix here is to call test_builder() in separate branches for tunneled and non-tunneled tests, and to make supported inner l3 types an explicit attribute of tunnel test cases. # Detected qstat for LSO wire-packets TAP version 13 1..14 ok 1 tso.ipv4 # Testing with mangleid enabled ok 2 tso.vxlan4_ipv4 ok 3 tso.vxlan4_ipv6 # Testing with mangleid enabled ok 4 tso.vxlan_csum4_ipv4 ok 5 tso.vxlan_csum4_ipv6 # Testing with mangleid enabled ok 6 tso.gre4_ipv4 ok 7 tso.gre4_ipv6 ok 8 tso.ipv6 # Testing with mangleid enabled ok 9 tso.vxlan6_ipv4 ok 10 tso.vxlan6_ipv6 # Testing with mangleid enabled ok 11 tso.vxlan_csum6_ipv4 ok 12 tso.vxlan_csum6_ipv6 # Testing with mangleid enabled ok 13 tso.gre6_ipv4 ok 14 tso.gre6_ipv6 # Totals: pass:14 fail:0 xfail:0 xpass:0 skip:0 error:0 Fixes: 0d0f417 ("selftests: drv-net: add a simple TSO test") Signed-off-by: Daniel Zahka <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 2cfbcc5 commit b25b44c

File tree

1 file changed

+14
-12
lines changed
  • tools/testing/selftests/drivers/net/hw

1 file changed

+14
-12
lines changed

tools/testing/selftests/drivers/net/hw/tso.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ def main() -> None:
227227
query_nic_features(cfg)
228228

229229
test_info = (
230-
# name, v4/v6 ethtool_feature tun:(type, args)
231-
("", "4", "tx-tcp-segmentation", None),
232-
("", "6", "tx-tcp6-segmentation", None),
233-
("vxlan", "4", "tx-udp_tnl-segmentation", ("vxlan", "id 100 dstport 4789 noudpcsum")),
234-
("vxlan", "6", "tx-udp_tnl-segmentation", ("vxlan", "id 100 dstport 4789 udp6zerocsumtx udp6zerocsumrx")),
235-
("vxlan_csum", "", "tx-udp_tnl-csum-segmentation", ("vxlan", "id 100 dstport 4789 udpcsum")),
236-
("gre", "4", "tx-gre-segmentation", ("gre", "")),
237-
("gre", "6", "tx-gre-segmentation", ("ip6gre", "")),
230+
# name, v4/v6 ethtool_feature tun:(type, args, inner ip versions)
231+
("", "4", "tx-tcp-segmentation", None),
232+
("", "6", "tx-tcp6-segmentation", None),
233+
("vxlan", "4", "tx-udp_tnl-segmentation", ("vxlan", "id 100 dstport 4789 noudpcsum", ("4", "6"))),
234+
("vxlan", "6", "tx-udp_tnl-segmentation", ("vxlan", "id 100 dstport 4789 udp6zerocsumtx udp6zerocsumrx", ("4", "6"))),
235+
("vxlan_csum", "", "tx-udp_tnl-csum-segmentation", ("vxlan", "id 100 dstport 4789 udpcsum", ("4", "6"))),
236+
("gre", "4", "tx-gre-segmentation", ("gre", "", ("4", "6"))),
237+
("gre", "6", "tx-gre-segmentation", ("ip6gre","", ("4", "6"))),
238238
)
239239

240240
cases = []
@@ -244,11 +244,13 @@ def main() -> None:
244244
if info[1] and outer_ipver != info[1]:
245245
continue
246246

247-
cases.append(test_builder(info[0], cfg, outer_ipver, info[2],
248-
tun=info[3], inner_ipver="4"))
249247
if info[3]:
250-
cases.append(test_builder(info[0], cfg, outer_ipver, info[2],
251-
tun=info[3], inner_ipver="6"))
248+
cases += [
249+
test_builder(info[0], cfg, outer_ipver, info[2], info[3], inner_ipver)
250+
for inner_ipver in info[3][2]
251+
]
252+
else:
253+
cases.append(test_builder(info[0], cfg, outer_ipver, info[2], None, outer_ipver))
252254

253255
ksft_run(cases=cases, args=(cfg, ))
254256
ksft_exit()

0 commit comments

Comments
 (0)