On Thu, Feb 2, 2017 at 10:19 PM, Alexei Starovoitov
wrote:
> On Thu, Feb 02, 2017 at 09:31:06PM -0800, William Tu wrote:
>>
>> Yes, this is auto-generated. We want to use P4 2016 as front end to
>> generate ebpf for XDP.
>
> P4 2016 front-end ? is it public? Is there a 2017 version? ;)
> just curi
On 02/03/2017 06:31 AM, William Tu wrote:
[...]
Yes, this is auto-generated. We want to use P4 2016 as front end to
generate ebpf for XDP.
[...]
R2 is no longer pkt_end, it's R2 == R0 == 0
269: (bf) r2 = r0
270: (77) r2 >>= 3
271: (bf) r4 = r1
272: (0f) r4 += r2
So at line 272, it's pkt_ptr =
On Thu, Feb 02, 2017 at 09:31:06PM -0800, William Tu wrote:
>
> Yes, this is auto-generated. We want to use P4 2016 as front end to
> generate ebpf for XDP.
P4 2016 front-end ? is it public? Is there a 2017 version? ;)
just curious.
> >
> > The line 272 is r4 += r2
> > where R4=imm4 and R2=pkt_e
On Thu, Feb 2, 2017 at 7:46 PM, Alexei Starovoitov
wrote:
> On Thu, Feb 02, 2017 at 07:26:44PM -0800, William Tu wrote:
>> Thanks. below is my program. The verifier fails at line 272, when
>> writing to ICMP header.
>> -
>> ; ebpf_packetEnd = ((void*)(long)skb->data_end);
>> 206: r2
On Thu, Feb 02, 2017 at 07:26:44PM -0800, William Tu wrote:
> Thanks. below is my program. The verifier fails at line 272, when
> writing to ICMP header.
> -
> ; ebpf_packetEnd = ((void*)(long)skb->data_end);
> 206: r2 = *(u32 *)(r6 + 4)
> ; ebpf_packetStart = ((void*)(long)skb->data
Thanks. below is my program. The verifier fails at line 272, when
writing to ICMP header.
-
; ebpf_packetEnd = ((void*)(long)skb->data_end);
206: r2 = *(u32 *)(r6 + 4)
; ebpf_packetStart = ((void*)(long)skb->data);
207: r1 = *(u32 *)(r6 + 0)
...
r10 is "struct hd" at local
On 02/02/2017 08:59 PM, William Tu wrote:
When adding a zero value to the packet pointer, the verifer
reports the following error:
R0=imm0,min_value=0,max_value=0 R1=pkt(id=0,off=0,r=4) R2=pkt_end R3=fp-12
R4=imm4,min_value=4,max_value=4 R5=pkt(id=0,off=4,r=4) R6=ctx
R7=imm0,min_value=0,max_va
When adding a zero value to the packet pointer, the verifer
reports the following error:
R0=imm0,min_value=0,max_value=0 R1=pkt(id=0,off=0,r=4) R2=pkt_end R3=fp-12
R4=imm4,min_value=4,max_value=4 R5=pkt(id=0,off=4,r=4) R6=ctx
R7=imm0,min_value=0,max_value=0 R8=inv,min_value=0,max_value=0 R9=inv