Lines Matching defs:bpf
415 def set_xdp(self, bpf, mode, force=False, JSON=True, verbose=False,
418 bpf += " verbose"
419 return ip("link set dev %s xdp%s %s" % (self.dev["ifname"], mode, bpf),
498 def cls_bpf_add_filter(self, bpf, op="add", prio=None, handle=None,
502 cls = "bpf " + bpf
624 res = sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf",
724 samples = ["sample_ret0.bpf.o", "sample_map_ret0.bpf.o"]
745 obj = bpf_obj("sample_ret0.bpf.o")
820 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
824 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
828 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
839 sim.cls_filter_op(op="delete", prio=1, handle=1, cls="bpf")
965 bpftool_prog_load("sample_ret0.bpf.o", "/sys/fs/bpf/nooffload")
966 nooffload = bpf_pinned("/sys/fs/bpf/nooffload")
971 rm("/sys/fs/bpf/nooffload")
974 bpftool_prog_load("sample_ret0.bpf.o", "/sys/fs/bpf/offload",
976 offload = bpf_pinned("/sys/fs/bpf/offload")
980 rm("/sys/fs/bpf/offload")
985 ret, _, err = bpftool_prog_load("sample_ret0.bpf.o", "/sys/fs/bpf/offload",
1023 pin_file, pinned = pin_prog("/sys/fs/bpf/tmp")
1057 pin_file, pinned = pin_prog("/sys/fs/bpf/tmp")
1064 pin_file, pinned = pin_prog("/sys/fs/bpf/tmp2", idx=1)
1088 cmd_line = "tc filter add dev %s ingress bpf %s da skip_sw" % \
1111 map_obj = bpf_obj("sample_map_ret0.bpf.o")
1130 prog_file, _ = pin_prog("/sys/fs/bpf/tmp_prog")
1131 map_file, _ = pin_map("/sys/fs/bpf/tmp_map", idx=1, expected=2)
1249 bpftool_prog_load("sample_map_ret0.bpf.o", "/sys/fs/bpf/nsimA",
1251 progA = bpf_pinned("/sys/fs/bpf/nsimA")
1252 bpftool_prog_load("sample_map_ret0.bpf.o", "/sys/fs/bpf/nsimB",
1254 progB = bpf_pinned("/sys/fs/bpf/nsimB")
1286 ret, _ = bpftool_prog_load("sample_map_ret0.bpf.o", "/sys/fs/bpf/nsimB_",
1291 rm("/sys/fs/bpf/nsimB_")
1293 ret, _, err = bpftool_prog_load("sample_map_ret0.bpf.o", "/sys/fs/bpf/nsimA_",
1301 ret, _, err = bpftool_prog_load("sample_map_ret0.bpf.o", "/sys/fs/bpf/nsimB_",