Lines Matching refs:program_len
44 u32 program_len, const u8 *packet, u32 packet_len,
47 #define APF_TRACE_HOOK(pc, regs, program, program_len, packet, packet_len, memory, memory_len) \ argument
83 u32 program_len; // Length of the program member
149 u32 instructions_remaining = ctx->program_len; in do_apf_run()
153 if (ctx->program_len + 20 > ctx->ram_len) return EXCEPTION; in do_apf_run()
171 APF_TRACE_HOOK(ctx->pc, ctx->R, ctx->program, ctx->program_len, in do_apf_run()
173 if (ctx->pc == ctx->program_len + 1) return DROP; in do_apf_run()
174 if (ctx->pc == ctx->program_len) return PASS; in do_apf_run()
175 if (ctx->pc > ctx->program_len) return EXCEPTION; in do_apf_run()
440 ctx->program + ctx->program_len, in do_apf_run()
449 while (ctx->pc + 1 < ctx->program_len && in do_apf_run()
478 if (ctx->pc + cnt * len > ctx->program_len) return EXCEPTION; in do_apf_run()
550 static int apf_runner(void* ctx, u32* const program, const u32 program_len, in apf_runner() argument
561 if ((program_len | ram_len) >> 31) return EXCEPTION; in apf_runner()
570 apf_ctx.program_len = program_len; in apf_runner()
575 apf_ctx.mem.named.program_size = program_len; in apf_runner()
587 if (buf_size >= sizeof(apf_ctx) && apf_ctx.program_len + buf_size <= apf_ctx.ram_len) { in apf_runner()
588 u8* buf = apf_ctx.program + apf_ctx.program_len; in apf_runner()
601 int apf_run(void* ctx, u32* const program, const u32 program_len, in apf_run() argument
608 return apf_runner(ctx, program, program_len, ram_len, packet, packet_len, filter_age_16384ths); in apf_run()