Re: [PATCH bpf-next v5 3/6] bpf: Add IPv6 Segment Routing helpers

2019-05-30 Thread Tom Herbert
On Sat, May 12, 2018 at 8:26 AM Mathieu Xhonneux wrote: > > The BPF seg6local hook should be powerful enough to enable users to > implement most of the use-cases one could think of. After some thinking, > we figured out that the following actions should be possible on a SRv6 > packet, requiring 3

Re: [PATCH bpf-next v5 3/6] bpf: Add IPv6 Segment Routing helpers

2018-05-16 Thread Mathieu Xhonneux
2018-05-14 23:40 GMT+01:00 Daniel Borkmann : > On 05/12/2018 07:25 PM, Mathieu Xhonneux wrote: > [...] >> +BPF_CALL_4(bpf_lwt_seg6_store_bytes, struct sk_buff *, skb, u32, offset, >> +const void *, from, u32, len) >> +{ >> +#if IS_ENABLED(CONFIG_IPV6_SEG6_BPF) >> + struct seg6_bpf_srh_

Re: [PATCH bpf-next v5 3/6] bpf: Add IPv6 Segment Routing helpers

2018-05-14 Thread Daniel Borkmann
On 05/12/2018 07:25 PM, Mathieu Xhonneux wrote: [...] > +BPF_CALL_4(bpf_lwt_seg6_store_bytes, struct sk_buff *, skb, u32, offset, > +const void *, from, u32, len) > +{ > +#if IS_ENABLED(CONFIG_IPV6_SEG6_BPF) > + struct seg6_bpf_srh_state *srh_state = > + this_cpu_ptr(&seg6_b

[PATCH bpf-next v5 3/6] bpf: Add IPv6 Segment Routing helpers

2018-05-12 Thread Mathieu Xhonneux
The BPF seg6local hook should be powerful enough to enable users to implement most of the use-cases one could think of. After some thinking, we figured out that the following actions should be possible on a SRv6 packet, requiring 3 specific helpers : - bpf_lwt_seg6_store_bytes: Modify non-sensi