Home
last modified time | relevance | path

Searched refs:instructions (Results 1 – 4 of 4) sorted by relevance

/kernel/tests/net/test/
Dbpf_test.py302 instructions = [
305 instructions += INS_SK_FILTER_ACCEPT
306 self.prog_fd = BpfProgLoad(BPF_PROG_TYPE_SOCKET_FILTER, instructions)
320 instructions = [
325 instructions += (INS_BPF_PARAM_STORE + BpfFuncCountPacketInit(self.map_fd)
328 self.prog_fd = BpfProgLoad(BPF_PROG_TYPE_SOCKET_FILTER, instructions)
357 instructions = [
362 self.prog_fd = BpfProgLoad(BPF_PROG_TYPE_SCHED_CLS, instructions,
367 instructions = [BpfFuncCall(BPF_FUNC_ktime_get_ns)] + INS_BPF_EXIT_BLOCK
368 self.prog_fd = BpfProgLoad(BPF_PROG_TYPE_SCHED_CLS, instructions)
[all …]
Dsock_diag.py174 def PackBytecode(instructions): argument
217 for op, yes, no, arg in instructions:
247 assert len(args) == len(instructions) == len(positions) - 2
252 for i, (op, yes, no, arg) in enumerate(instructions):
265 instructions = []
293 instructions.append((op, arg))
296 return instructions
Dsock_diag_test.py151 def PackAndCheckBytecode(self, instructions): argument
152 bytecode = self.sock_diag.PackBytecode(instructions)
154 self.assertEqual(len(instructions), len(decoded))
263 instructions = [
275 bytecode = self.PackAndCheckBytecode(instructions)
300 instructions = [
306 bytecode = self.PackAndCheckBytecode(instructions)
1044 instructions = [(sock_diag.INET_DIAG_BC_MARK_COND, 1, 2, (mark, mask))]
1045 bytecode = self.sock_diag.PackBytecode(instructions)
Dbpf.py259 def BpfProgLoad(prog_type, instructions, prog_license=b"GPL"): argument
260 bpf_prog = "".join(instructions)