• Home
  • Raw
  • Download

Lines Matching refs:sim

631         fail(dev["ifname"] != sim["ifname"],
632 "Ifname incorrect %s vs %s" % (dev["ifname"], sim["ifname"]))
671 def test_spurios_extack(sim, obj, skip_hw, needle): argument
672 res = sim.cls_bpf_add_filter(obj, prio=1, handle=1, skip_hw=skip_hw,
675 res = sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1,
678 res = sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf",
682 def test_multi_prog(simdev, sim, obj, modename, modeid): argument
685 sim.set_xdp(obj, "offload")
686 xdp = sim.ip_link_show(xdp=True)["xdp"]
687 offloaded = sim.dfs_read("bpf_offloaded_id")
692 sim.set_xdp(obj, modename)
693 two_xdps = sim.ip_link_show(xdp=True)["xdp"]
699 offloaded2 = sim.dfs_read("bpf_offloaded_id")
704 ret, _, err = sim.set_xdp(obj, "offload", fail=False, include_stderr=True)
711 ret, _, err = sim.unset_xdp(othermode, force=True,
716 sim.unset_xdp("offload")
717 xdp = sim.ip_link_show(xdp=True)["xdp"]
718 offloaded = sim.dfs_read("bpf_offloaded_id")
730 sim.set_xdp(obj, "offload")
731 two_xdps = sim.ip_link_show(xdp=True)["xdp"]
741 sim, = simdev.nsims
742 sim.set_ethtool_tc_offloads(True)
743 return [simdev, sim]
801 sim, = simdev.nsims variable
802 sim.set_xdp(obj, "generic")
807 sim, = simdev.nsims variable
808 sim.tc_add_ingress()
811 ret, _ = sim.cls_bpf_add_filter(obj, skip_hw=True, fail=False)
815 ret, _ = sim.cls_bpf_add_filter(obj, fail=False)
819 sim.tc_flush_filters()
822 ret, _, err = sim.cls_bpf_add_filter(obj, skip_sw=True,
826 sim.wait_for_flush()
828 sim.set_ethtool_tc_offloads(True)
829 sim.dfs["bpf_tc_non_bound_accept"] = "Y"
832 ret, _ = sim.cls_bpf_add_filter(obj, fail=False)
835 ingress = sim.tc_show_ingress(expected=1)
839 sim.tc_flush_filters()
842 ret, _ = sim.cls_bpf_add_filter(bytecode, fail=False)
845 ingress = sim.tc_show_ingress(expected=1)
849 sim.tc_flush_filters()
850 sim.dfs["bpf_tc_non_bound_accept"] = "N"
853 ret, _, err = sim.cls_bpf_add_filter(bytecode, skip_sw=True,
858 sim.wait_for_flush()
861 ret, _, err = sim.cls_bpf_add_filter(obj, chain=1, prio=1, handle=1,
866 sim.tc_flush_filters()
869 sim.cls_bpf_add_filter(obj, prio=1, handle=1)
870 sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1)
871 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
873 sim.cls_bpf_add_filter(obj, prio=1, handle=1, skip_sw=True)
874 sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1, skip_sw=True)
875 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
877 sim.cls_bpf_add_filter(obj, prio=1, handle=1, skip_hw=True)
878 sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1, skip_hw=True)
879 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
884 ret, _ = sim.cls_bpf_add_filter(obj, op="replace", prio=1, handle=1,
890 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
893 test_spurios_extack(sim, obj, False, "netdevsim")
894 test_spurios_extack(sim, obj, True, "netdevsim")
896 sim.set_ethtool_tc_offloads(False)
898 test_spurios_extack(sim, obj, False, "TC offload is disabled")
899 test_spurios_extack(sim, obj, True, "TC offload is disabled")
901 sim.set_ethtool_tc_offloads(True)
903 sim.tc_flush_filters()
906 ret, _, err = sim.cls_bpf_add_filter(obj, verbose=True, skip_sw=True,
914 ingress = sim.tc_show_ingress(expected=1)
931 ret, _ = sim.set_ethtool_tc_offloads(False, fail=False)
933 sim.set_ethtool_tc_offloads(True)
936 sim.tc_flush_filters()
937 sim.tc_show_ingress(expected=0)
940 ret, _ = sim.set_ethtool_tc_offloads(False, fail=False)
944 sim.set_ethtool_tc_offloads(True)
947 sim.cls_bpf_add_filter(obj, skip_sw=True)
952 sim, = simdev.nsims variable
953 sim.set_ethtool_tc_offloads(True)
956 sim.set_xdp(obj, "offload")
961 sim, = simdev.nsims variable
962 sim.set_ethtool_tc_offloads(True)
965 sim.set_xdp(obj, "drv")
966 ipl = sim.ip_link_show(xdp=True)
972 ret, _ = sim.set_xdp(obj, "drv", fail=False)
974 sim.wait_for_flush(total=1)
977 ret, _ = sim.set_xdp(obj, "drv", force=True, fail=False)
980 ipl = sim.ip_link_show(xdp=True)
988 ret, _, err = sim.set_xdp(obj, "generic", force=True,
994 ret, _, err = sim.set_xdp(obj, "", force=True,
1000 ret, _, err = sim.unset_xdp("", force=True,
1006 ret, _ = sim.set_mtu(9000, fail=False)
1009 sim.unset_xdp("drv")
1011 sim.set_mtu(9000)
1012 ret, _, err = sim.set_xdp(obj, "drv", fail=False, include_stderr=True)
1015 sim.set_mtu(1500)
1017 sim.wait_for_flush()
1021 ret, _, err = sim.set_xdp(nooffload, "offload",
1029 dev=sim['ifname'])
1031 ret, _, err = sim.set_xdp(offload, "drv", fail=False, include_stderr=True)
1035 sim.wait_for_flush()
1038 _, _, err = sim.set_xdp(obj, "offload", verbose=True, include_stderr=True)
1039 ipl = sim.ip_link_show(xdp=True)
1057 sim.unset_xdp("offload")
1058 sim.unset_xdp("offload")
1059 sim.unset_xdp("drv")
1060 sim.unset_xdp("drv")
1061 sim.unset_xdp("")
1062 sim.unset_xdp("")
1071 ret, _, err = sim.set_xdp(pinned, "offload",
1076 ret, _, err = sim.set_xdp(pinned, "offload",
1083 simdev, sim = test_multi_prog(simdev, sim, obj, "", 1) variable
1084 simdev, sim = test_multi_prog(simdev, sim, obj, "drv", 1) variable
1085 simdev, sim = test_multi_prog(simdev, sim, obj, "generic", 2) variable
1088 sim.tc_add_ingress()
1089 sim.set_xdp(obj, "offload")
1090 ret, _, err = sim.cls_bpf_add_filter(obj, skip_sw=True,
1094 sim.unset_xdp("offload")
1095 sim.wait_for_flush()
1097 sim.cls_bpf_add_filter(obj, skip_sw=True)
1098 ret, _, err = sim.set_xdp(obj, "offload", fail=False, include_stderr=True)
1104 sim.tc_flush_filters(bound=1, total=1)
1105 sim.cls_bpf_add_filter(pinned, da=True, skip_sw=True)
1106 sim.tc_flush_filters(bound=1, total=1)
1109 sim.set_xdp(obj, "offload")
1112 sim.set_xdp(pinned, "offload", force=True)
1113 sim.unset_xdp("offload")
1114 sim.set_xdp(pinned, "offload", force=True)
1115 sim.unset_xdp("offload")
1118 ret, _ = sim.cls_bpf_add_filter(pinned, da=True, skip_sw=True, fail=False)
1122 sim.cls_bpf_add_filter(obj, da=True, skip_sw=True)
1123 ret, _, err = sim.cls_bpf_add_filter(obj, da=True, skip_sw=True,
1128 sim.tc_flush_filters(bound=2, total=2)
1132 sim.dfs["dev/bpf_bind_verifier_delay"] = delay_msec
1135 (sim['ifname'], obj)
1156 sim, = simdev.nsims variable
1159 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1166 sim.set_ns(ns)
1173 sim.set_ns("")
1188 sim, = simdev.nsims variable
1191 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1267 sim.unset_xdp("offload")
1272 sim, = simdev.nsims variable
1273 sim.set_xdp(map_obj, "offload", JSON=False) # map fixup msg breaks JSON
1279 sim, = simdev.nsims variable
1280 sim.dfs["bpf_map_accept"] = "N"
1281 ret, _ = sim.set_xdp(map_obj, "offload", JSON=False, fail=False)