Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-07-03 Thread Thomas Graf
On 06/18/15 at 09:49pm, Roopa Prabhu wrote: > +static inline struct lwtunnel_state *lwtunnel_skb_lwstate(struct sk_buff > *skb) > +{ > + struct rtable *rt = (struct rtable *)skb_dst(skb); > + > + return rt->rt_lwtstate; > +} Noticed while rebasing onto your patches. This needs an ifdef CO

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-21 Thread roopa
On 6/21/15, 1:40 PM, Thomas Graf wrote: On 06/20/15 at 07:27am, roopa wrote: On 6/19/15, 11:39 AM, Robert Shearman wrote: Sorry for not being clear, but I meant that there would have to be lwtunnel_skb_lwstate functions for ipv4 and ipv6 to match the output functions. So in the vxlan use case

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-21 Thread roopa
On 6/21/15, 1:32 PM, Thomas Graf wrote: On 06/18/15 at 09:49pm, Roopa Prabhu wrote: +#include +#include + +#define LWTUNNEL_HASH_BITS 7 +#define LWTUNNEL_HASH_SIZE (1 << LWTUNNEL_HASH_BITS) + +struct lwtunnel_hdr { + int len; + __u8data[0]; +}; The name

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-21 Thread roopa
On 6/20/15, 9:38 AM, Nikolay Aleksandrov wrote: <<>> diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c new file mode 100644 index 000..29c7802 --- /dev/null +++ b/net/core/lwtunnel.c @@ -0,0 +1,162 @@ +/* + * lwtunnelInfrastructure for light weight tunnels like mpls + * + * + *

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-21 Thread Thomas Graf
On 06/20/15 at 07:27am, roopa wrote: > On 6/19/15, 11:39 AM, Robert Shearman wrote: > >On 19/06/15 19:34, roopa wrote: > >>On 6/19/15, 10:25 AM, Robert Shearman wrote: > >>>n 19/06/15 16:14, roopa wrote: > >>> > >>In the netdevice case, this output function is not called atall. It > >>should just f

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-21 Thread Thomas Graf
On 06/18/15 at 09:49pm, Roopa Prabhu wrote: > +#include > +#include > + > +#define LWTUNNEL_HASH_BITS 7 > +#define LWTUNNEL_HASH_SIZE (1 << LWTUNNEL_HASH_BITS) > + > +struct lwtunnel_hdr { > + int len; > + __u8data[0]; > +}; The name header is a bit misleading

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-20 Thread Nikolay Aleksandrov
<<>> > diff --git a/net/core/lwtunnel.c b/net/core/lwtunnel.c > new file mode 100644 > index 000..29c7802 > --- /dev/null > +++ b/net/core/lwtunnel.c > @@ -0,0 +1,162 @@ > +/* > + * lwtunnel Infrastructure for light weight tunnels like mpls > + * > + * > + * This program is free sof

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-20 Thread roopa
On 6/19/15, 11:39 AM, Robert Shearman wrote: On 19/06/15 19:34, roopa wrote: On 6/19/15, 10:25 AM, Robert Shearman wrote: n 19/06/15 16:14, roopa wrote: In the netdevice case, this output function is not called atall. It should just follow the existing netdevice the route is pointing to. So

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-19 Thread Robert Shearman
On 19/06/15 19:34, roopa wrote: On 6/19/15, 10:25 AM, Robert Shearman wrote: n 19/06/15 16:14, roopa wrote: Today lwtunnel_skb_lwstate is called from lwtunnel_output which is only called from ipv4 code. And my ipv6 variant code was supposed to have a 6 suffix. something like lwtunnel_output6. O

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-19 Thread roopa
On 6/19/15, 10:25 AM, Robert Shearman wrote: n 19/06/15 16:14, roopa wrote: Today lwtunnel_skb_lwstate is called from lwtunnel_output which is only called from ipv4 code. And my ipv6 variant code was supposed to have a 6 suffix. something like lwtunnel_output6. Or to be more explicit i will prob

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-19 Thread Robert Shearman
n 19/06/15 16:14, roopa wrote: On 6/19/15, 7:43 AM, Robert Shearman wrote: + +static inline struct lwtunnel_state *lwtunnel_skb_lwstate(struct sk_buff *skb) +{ +struct rtable *rt = (struct rtable *)skb_dst(skb); + +return rt->rt_lwtstate; +} It doesn't look like this patch will build

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-19 Thread roopa
On 6/19/15, 7:43 AM, Robert Shearman wrote: diff --git a/include/linux/lwtunnel.h b/include/linux/lwtunnel.h new file mode 100644 +/* lw tunnel state flags */ +#define LWTUNNEL_STATE_OUTPUT_REDIRECT 0x1 + +#define lwtunnel_output_redirect(lwtstate) (lwtstate && \ +(lwtstate->flags

Re: [PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-19 Thread Robert Shearman
On 19/06/15 05:49, Roopa Prabhu wrote: From: Roopa Prabhu provides ops to parse, build and output encaped packets for drivers that want to attach tunnel encap information to routes. Signed-off-by: Roopa Prabhu --- include/linux/lwtunnel.h |6 ++ include/net/lwtunnel.h| 8

[PATCH net-next RFC v2 1/3] lwt: infrastructure to support light weight tunnels

2015-06-18 Thread Roopa Prabhu
From: Roopa Prabhu provides ops to parse, build and output encaped packets for drivers that want to attach tunnel encap information to routes. Signed-off-by: Roopa Prabhu --- include/linux/lwtunnel.h |6 ++ include/net/lwtunnel.h| 84 + include/uapi/linux