Lines Matching full:offload
519 args = "hw-tc-offload %s" % ("on" if enable else "off")
628 start_test("Test multi-attachment XDP - %s + offload..." %
630 sim.set_xdp(obj, "offload")
641 "Offload program not reported after other activated")
646 "Offload ID changed after loading other program")
649 ret, _, err = sim.set_xdp(obj, "offload", fail=False, include_stderr=True)
659 sim.unset_xdp("offload")
667 "Offload program not reported after other activated")
670 fail(offloaded != "0", "Offload ID reported with only other program left")
673 sim.set_xdp(obj, "offload")
677 "Other program not reported after offload activated")
773 check_extack(err, "TC offload is disabled on net device.", args)
779 start_test("Test TC offload by default...")
789 start_test("Test TC cBPF bytcode tries offload by default...")
800 start_test("Test TC cBPF unbound bytecode doesn't offload...")
803 fail(ret == 0, "TC bytecode loaded for offload")
808 start_test("Test non-0 chain offload...")
813 check_extack(err, "Driver supports only offload of chain 0.", args)
846 test_spurios_extack(sim, obj, False, "TC offload is disabled")
847 test_spurios_extack(sim, obj, True, "TC offload is disabled")
866 start_test("Test TC offload basics...")
878 start_test("Test TC offload is device-bound...")
911 sim.set_xdp(obj, "offload")
963 start_test("Test non-offload XDP attaching to HW...")
966 ret, _, err = sim.set_xdp(nooffload, "offload",
972 start_test("Test offload XDP attaching to drv...")
973 bpftool_prog_load("sample_ret0.bpf.o", "/sys/fs/bpf/offload",
975 offload = bpf_pinned("/sys/fs/bpf/offload") variable
976 ret, _, err = sim.set_xdp(offload, "drv", fail=False, include_stderr=True)
979 rm("/sys/fs/bpf/offload")
984 ret, _, err = bpftool_prog_load("sample_ret0.bpf.o", "/sys/fs/bpf/offload",
991 start_test("Test XDP offload...")
992 _, _, err = sim.set_xdp(obj, "offload", verbose=True, include_stderr=True)
999 start_test("Test XDP offload is device bound...")
1010 sim.unset_xdp("offload")
1011 sim.unset_xdp("offload")
1021 sim2.set_xdp(obj, "offload")
1024 ret, _, err = sim.set_xdp(pinned, "offload",
1029 ret, _, err = sim.set_xdp(pinned, "offload",
1042 sim.set_xdp(obj, "offload")
1046 check_extack_nsim(err, "driver and netdev offload states mismatch.", args)
1047 sim.unset_xdp("offload")
1051 ret, _, err = sim.set_xdp(obj, "offload", fail=False, include_stderr=True)
1062 sim.set_xdp(obj, "offload")
1065 sim.set_xdp(pinned, "offload", force=True)
1066 sim.unset_xdp("offload")
1067 sim.set_xdp(pinned, "offload", force=True)
1068 sim.unset_xdp("offload")
1070 start_test("Test offload of wrong type fails...")
1074 start_test("Test asking for TC offload of two filters...")
1078 fail(ret == 0, "Managed to offload two TC filters at the same time")
1079 check_extack_nsim(err, "driver and netdev offload states mismatch.", args)
1112 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1144 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1220 sim.unset_xdp("offload")
1226 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1234 ret, _ = sim.set_xdp(map_obj, "offload", JSON=False, fail=False)
1236 "netdevsim didn't refuse to create a map with offload disabled")
1255 simA.set_xdp(progA, "offload", JSON=False)
1257 d.set_xdp(progB, "offload", JSON=False)
1260 ret, _ = simA.set_xdp(progB, "offload", force=True, JSON=False, fail=False)
1263 ret, _ = d.set_xdp(progA, "offload", force=True, JSON=False, fail=False)
1268 d.unset_xdp("offload")
1270 ret, _, err = simA.set_xdp(progB, "offload", force=True, JSON=False,
1275 ret, _, err = d.set_xdp(progA, "offload", force=True, JSON=False,
1297 fail(err.count("offload device mismatch between prog and map") == 0,
1305 fail(err.count("offload device mismatch between prog and map") == 0,