Lines Matching +full:hw +full:- +full:settle +full:- +full:time
7 # June 1991 as shown in the file COPYING in the top-level directory of this
29 import time
50 log_level -= sub
113 stdout = stdout.decode("utf-8")
114 stderr = stderr.decode("utf-8")
119 if stderr[-1] == "\n":
120 stderr = stderr[:-1]
129 if len(stderr) > 0 and stderr[-1] == "\n":
130 stderr = stderr[:-1]
139 cmd("rm -f %s" % (f))
169 return tool("bpftool", args, {"json":"-p"}, JSON=JSON, ns=ns,
199 time.sleep(0.05)
200 …raise Exception("Time out waiting for program counts to stabilize want %d, have %d" % (expected, n…
207 time.sleep(0.05)
208 …raise Exception("Time out waiting for map counts to stabilize want %d, have %d" % (expected, nmaps…
227 args = "-force " + args
228 return tool("ip", args, {"json":"-j"}, JSON=JSON, ns=ns,
232 return tool("tc", args, {"json":"-p"}, JSON=JSON, ns=ns,
346 log("WRITE %s: %r" % (fullpath, val), -e.errno)
367 ret, out = cmd("udevadm settle", fail=False)
369 raise Exception("udevadm settle failed")
389 timeout_start = time.time()
398 if time.time() < timeout_start + timeout:
465 time.sleep(0.05)
466 …raise Exception("Time out waiting for program counts to stabilize want %d/%d, have %d bound, %d lo…
518 args = "-s filter show dev %s ingress" % (self['ifname'])
581 args = "hw-tc-offload %s" % ("on" if enable else "off")
582 return ethtool(self, "-K", args, fail=fail)
591 cmd("rm -f %s" % (f))
617 fail(err["error"].find("No such device") == -1,
624 fail(err["error"].find("No such device") == -1,
692 start_test("Test multi-attachment XDP - %s + offload..." %
712 start_test("Test multi-attachment XDP - replace...")
714 fail(ret == 0, "Replaced one of programs without -force")
717 start_test("Test multi-attachment XDP - remove without mode...")
736 start_test("Test multi-attachment XDP - reattach...")
744 start_test("Test multi-attachment XDP - device remove...")
754 parser.add_argument("--log", help="output verbose log to given file")
758 logfile.write("# -*-Org-*-")
781 if out.find("/sys/kernel/debug type debugfs") == -1:
782 cmd("mount -t debugfs none /sys/kernel/debug")
794 if err.find("Error: Failed to find qdisc with specified handle.") == -1:
820 start_test("Test TC non-offloaded...")
824 start_test("Test TC non-offloaded isn't getting bound...")
870 start_test("Test non-0 chain offload...")
940 start_test("Test TC offload is device-bound...")
990 fail(ret == 0, "Replaced XDP program without -force")
995 fail(ret != 0, "Could not replace XDP program with -force")
1002 "Device parameters reported for non-offloaded program")
1009 "Native and generic XDP can't be active at the same time.",
1025 start_test("Test non-offload XDP attaching to HW...")
1030 fail(ret == 0, "attached non-offloaded XDP program to HW")
1031 check_extack_nsim(err, "xdpoffload of non-bound program.", args)
1040 check_extack(err, "Using device-bound program without HW_MODE flag is not supported.", args)
1094 check_extack_nsim(err, "xdpoffload of non-bound program.", args)
1140 fail(ret == 0, "Managed to offload two TC filters at the same time")
1148 start = time.time()
1156 end = time.time()
1158 time_diff = end - start
1159 log("Time", "start:\t%s\nend:\t%s\ndiff:\t%s" % (start, end, time_diff))
1231 fail(ret == 0, "updated non-existing key")
1232 fail(err["error"].find("No such file or directory") == -1,
1242 fail(err["error"].find("File exists") == -1,
1266 fail(err["error"].find("No such file or directory") == -1,
1278 fail(err["error"].find("No such file or directory") == -1,
1302 start_test("Test multi-dev ASIC program reuse...")
1321 start_test("Test multi-dev ASIC cross-dev replace...")
1323 fail(ret == 0, "cross-ASIC program allowed")
1326 fail(ret == 0, "cross-ASIC program allowed")
1328 start_test("Test multi-dev ASIC cross-dev install...")
1334 fail(ret == 0, "cross-ASIC program allowed")
1339 fail(ret == 0, "cross-ASIC program allowed")
1342 start_test("Test multi-dev ASIC cross-dev map reuse...")
1360 "error message missing for cross-ASIC map")
1368 "error message missing for cross-ASIC map")
1370 start_test("Test multi-dev ASIC cross-dev destruction...")
1381 start_test("Test multi-dev ASIC cross-dev destruction - move...")
1394 start_test("Test multi-dev ASIC cross-dev destruction - orphaned...")