• Home
  • Raw
  • Download

Lines Matching refs:sim

639         fail(dev["ifname"] != sim["ifname"],
640 "Ifname incorrect %s vs %s" % (dev["ifname"], sim["ifname"]))
679 def test_spurios_extack(sim, obj, skip_hw, needle): argument
680 res = sim.cls_bpf_add_filter(obj, prio=1, handle=1, skip_hw=skip_hw,
683 res = sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1,
686 res = sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf",
690 def test_multi_prog(simdev, sim, obj, modename, modeid): argument
693 sim.set_xdp(obj, "offload")
694 xdp = sim.ip_link_show(xdp=True)["xdp"]
695 offloaded = sim.dfs_read("bpf_offloaded_id")
700 sim.set_xdp(obj, modename)
701 two_xdps = sim.ip_link_show(xdp=True)["xdp"]
707 offloaded2 = sim.dfs_read("bpf_offloaded_id")
712 ret, _, err = sim.set_xdp(obj, "offload", fail=False, include_stderr=True)
719 ret, _, err = sim.unset_xdp(othermode, force=True,
724 sim.unset_xdp("offload")
725 xdp = sim.ip_link_show(xdp=True)["xdp"]
726 offloaded = sim.dfs_read("bpf_offloaded_id")
738 sim.set_xdp(obj, "offload")
739 two_xdps = sim.ip_link_show(xdp=True)["xdp"]
749 sim, = simdev.nsims
750 sim.set_ethtool_tc_offloads(True)
751 return [simdev, sim]
809 sim, = simdev.nsims variable
810 sim.set_xdp(obj, "generic")
815 sim, = simdev.nsims variable
816 sim.tc_add_ingress()
819 ret, _ = sim.cls_bpf_add_filter(obj, skip_hw=True, fail=False)
823 ret, _ = sim.cls_bpf_add_filter(obj, fail=False)
827 sim.tc_flush_filters()
830 ret, _, err = sim.cls_bpf_add_filter(obj, skip_sw=True,
834 sim.wait_for_flush()
836 sim.set_ethtool_tc_offloads(True)
837 sim.dfs["bpf_tc_non_bound_accept"] = "Y"
840 ret, _ = sim.cls_bpf_add_filter(obj, fail=False)
843 ingress = sim.tc_show_ingress(expected=1)
847 sim.tc_flush_filters()
850 ret, _ = sim.cls_bpf_add_filter(bytecode, fail=False)
853 ingress = sim.tc_show_ingress(expected=1)
857 sim.tc_flush_filters()
858 sim.dfs["bpf_tc_non_bound_accept"] = "N"
861 ret, _, err = sim.cls_bpf_add_filter(bytecode, skip_sw=True,
866 sim.wait_for_flush()
869 ret, _, err = sim.cls_bpf_add_filter(obj, chain=1, prio=1, handle=1,
874 sim.tc_flush_filters()
877 sim.cls_bpf_add_filter(obj, prio=1, handle=1)
878 sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1)
879 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
881 sim.cls_bpf_add_filter(obj, prio=1, handle=1, skip_sw=True)
882 sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1, skip_sw=True)
883 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
885 sim.cls_bpf_add_filter(obj, prio=1, handle=1, skip_hw=True)
886 sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1, skip_hw=True)
887 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
892 ret, _ = sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1,
898 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
901 test_spurios_extack(sim, obj, False, "netdevsim")
902 test_spurios_extack(sim, obj, True, "netdevsim")
904 sim.set_ethtool_tc_offloads(False)
906 test_spurios_extack(sim, obj, False, "TC offload is disabled")
907 test_spurios_extack(sim, obj, True, "TC offload is disabled")
909 sim.set_ethtool_tc_offloads(True)
911 sim.tc_flush_filters()
914 ret, _, err = sim.cls_bpf_add_filter(obj, verbose=True, skip_sw=True,
922 ingress = sim.tc_show_ingress(expected=1)
939 ret, _ = sim.set_ethtool_tc_offloads(False, fail=False)
943 sim.tc_flush_filters()
944 sim.tc_show_ingress(expected=0)
947 ret, _ = sim.set_ethtool_tc_offloads(False, fail=False)
951 sim.set_ethtool_tc_offloads(True)
954 sim.cls_bpf_add_filter(obj, skip_sw=True)
959 sim, = simdev.nsims variable
960 sim.set_ethtool_tc_offloads(True)
963 sim.set_xdp(obj, "offload")
968 sim, = simdev.nsims variable
969 sim.set_ethtool_tc_offloads(True)
972 sim.set_xdp(obj, "drv")
973 ipl = sim.ip_link_show(xdp=True)
979 ret, _ = sim.set_xdp(obj, "drv", fail=False)
981 sim.wait_for_flush(total=1)
984 ret, _ = sim.set_xdp(obj, "drv", force=True, fail=False)
987 ipl = sim.ip_link_show(xdp=True)
995 ret, _, err = sim.set_xdp(obj, "generic", force=True,
1001 ret, _, err = sim.set_xdp(obj, "", force=True,
1007 ret, _, err = sim.unset_xdp("", force=True,
1013 ret, _ = sim.set_mtu(9000, fail=False)
1016 sim.unset_xdp("drv")
1018 sim.set_mtu(9000)
1019 ret, _, err = sim.set_xdp(obj, "drv", fail=False, include_stderr=True)
1022 sim.set_mtu(1500)
1024 sim.wait_for_flush()
1028 ret, _, err = sim.set_xdp(nooffload, "offload",
1036 dev=sim['ifname'])
1038 ret, _, err = sim.set_xdp(offload, "drv", fail=False, include_stderr=True)
1042 sim.wait_for_flush()
1045 _, _, err = sim.set_xdp(obj, "offload", verbose=True, include_stderr=True)
1046 ipl = sim.ip_link_show(xdp=True)
1064 sim.unset_xdp("offload")
1065 sim.unset_xdp("offload")
1066 sim.unset_xdp("drv")
1067 sim.unset_xdp("drv")
1068 sim.unset_xdp("")
1069 sim.unset_xdp("")
1078 ret, _, err = sim.set_xdp(pinned, "offload",
1083 ret, _, err = sim.set_xdp(pinned, "offload",
1090 simdev, sim = test_multi_prog(simdev, sim, obj, "", 1) variable
1091 simdev, sim = test_multi_prog(simdev, sim, obj, "drv", 1) variable
1092 simdev, sim = test_multi_prog(simdev, sim, obj, "generic", 2) variable
1095 sim.tc_add_ingress()
1096 sim.set_xdp(obj, "offload")
1097 ret, _, err = sim.cls_bpf_add_filter(obj, skip_sw=True,
1101 sim.unset_xdp("offload")
1102 sim.wait_for_flush()
1104 sim.cls_bpf_add_filter(obj, skip_sw=True)
1105 ret, _, err = sim.set_xdp(obj, "offload", fail=False, include_stderr=True)
1111 sim.tc_flush_filters(bound=1, total=1)
1112 sim.cls_bpf_add_filter(pinned, da=True, skip_sw=True)
1113 sim.tc_flush_filters(bound=1, total=1)
1116 sim.set_xdp(obj, "offload")
1119 sim.set_xdp(pinned, "offload", force=True)
1120 sim.unset_xdp("offload")
1121 sim.set_xdp(pinned, "offload", force=True)
1122 sim.unset_xdp("offload")
1125 ret, _ = sim.cls_bpf_add_filter(pinned, da=True, skip_sw=True, fail=False)
1129 sim.cls_bpf_add_filter(obj, da=True, skip_sw=True)
1130 ret, _, err = sim.cls_bpf_add_filter(obj, da=True, skip_sw=True,
1135 sim.tc_flush_filters(bound=2, total=2)
1139 sim.dfs["dev/bpf_bind_verifier_delay"] = delay_msec
1142 (sim['ifname'], obj)
1163 sim, = simdev.nsims variable
1166 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1173 sim.set_ns(ns)
1180 sim.set_ns("")
1195 sim, = simdev.nsims variable
1198 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1274 sim.unset_xdp("offload")
1279 sim, = simdev.nsims variable
1280 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1286 sim, = simdev.nsims variable
1287 sim.dfs["bpf_map_accept"] = "N"
1288 ret, _ = sim.set_xdp(map_obj, "offload", JSON=False, fail=False)