Lines Matching refs:R

215 /* Unconditionally pass (if R=0) or drop (if R=1) packet and optionally increment counter.
243 #define JBSMATCH_OPCODE 20 /* Compare byte sequence [R=0 not] equal, e.g. "jbsne R0,2,label,0x1122" */
244 /* NOTE: Only APFv6+ implements R=1 'jbseq' version and multi match */
254 * Immediate length field specifies size of write. R must be 0. imm_len != 0.
262 * R=0 means copy from packet.
263 * R=1 means copy from APF program/data region.
286 * R=0: register R0 specifies the length
287 * R=1: length provided in u16 imm2
294 * R=1 iff udp style L4 checksum
313 * R=0 means copy from packet.
314 * R=1 means copy from APF program/data region.
323 * R=0/1 meaning 'does not match'/'matches'
337 * R=0/1 meaning 'does not match'/'matches'
348 * R bit - specifies the register (R0/R1) to test
632 u32 R[2]; /* Register values. */
717 APF_TRACE_HOOK(ctx->pc, ctx->R, ctx->program, ctx->program_len,
728 #define REG (ctx->R[reg_num])
729 #define OTHER_REG (ctx->R[reg_num ^ 1])
746 #define ARITH_REG (ctx->R[reg_num & ctx->v6])
747 arith_imm = (ctx->v6) ? (len_field ? imm : OTHER_REG) : (reg_num ? ctx->R[1] : imm);
748 arith_signed_imm = (ctx->v6) ? (len_field ? signed_imm : (s32)OTHER_REG) : (reg_num ? (s32)ctx->R[1] : signed_imm);
768 if (opcode >= LDBX_OPCODE) offs += ctx->R[1];
816 cmp_imm = ctx->R[1];
821 case JEQ_OPCODE: if ( ctx->R[0] == cmp_imm ) ctx->pc += imm; break;
822 case JNE_OPCODE: if ( ctx->R[0] != cmp_imm ) ctx->pc += imm; break;
823 case JGT_OPCODE: if ( ctx->R[0] > cmp_imm ) ctx->pc += imm; break;
824 case JLT_OPCODE: if ( ctx->R[0] < cmp_imm ) ctx->pc += imm; break;
825 case JSET_OPCODE: if ( ctx->R[0] & cmp_imm ) ctx->pc += imm; break;
826 case JNSET_OPCODE: if (!(ctx->R[0] & cmp_imm)) ctx->pc += imm; break;
836 const u32 last_packet_offs = ctx->R[0] + len - 1;
845 ASSERT_IN_PACKET_BOUNDS(ctx->R[0]);
847 ASSERT_RETURN(last_packet_offs >= ctx->R[0]);
850 matched |= !memcmp(ctx->program + ctx->pc, ctx->packet + ctx->R[0], len);
858 /* APFv4: R[0] op= Rbit ? R[1] : imm; (and it thus doesn't make sense to have R=1 && len_field>0) */
859 /* APFv6+: REG op= len_field ? imm : OTHER_REG; (note: this is *DIFFERENT* with R=1 len_field==0) */
950 pktcopy_src_offset = ctx->R[0];
954 u32 copy_len = ctx->R[1];
984 u32 udp_payload_offset = ctx->R[0];