Re: [ovs-dev] [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

2015-09-30 Thread Jiri Benc
On Wed, 30 Sep 2015 13:25:12 -0700, Jesse Gross wrote: > On Wed, Sep 30, 2015 at 1:13 PM, Pravin Shelar wrote: > > On Wed, Sep 30, 2015 at 12:09 AM, Jiri Benc wrote: > >> On Tue, 29 Sep 2015 13:41:34 -0700, Pravin Shelar wrote: > >>> We can add rather add TUNNEL_IPV6 flag to distinguish IPv4 and

Re: [ovs-dev] [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

2015-09-30 Thread Jesse Gross
On Wed, Sep 30, 2015 at 1:13 PM, Pravin Shelar wrote: > On Wed, Sep 30, 2015 at 12:09 AM, Jiri Benc wrote: >> On Tue, 29 Sep 2015 13:41:34 -0700, Pravin Shelar wrote: >>> We can add rather add TUNNEL_IPV6 flag to distinguish IPv4 and IPv6 >>> tunnel keys. This can be stored in ip_tunnel_key.tun_f

Re: [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

2015-09-30 Thread Pravin Shelar
On Wed, Sep 30, 2015 at 12:09 AM, Jiri Benc wrote: > On Tue, 29 Sep 2015 13:41:34 -0700, Pravin Shelar wrote: >> We can add rather add TUNNEL_IPV6 flag to distinguish IPv4 and IPv6 >> tunnel keys. This can be stored in ip_tunnel_key.tun_flags. > > Not really. This was my original approach, too, bu

Re: [ovs-dev] [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

2015-09-30 Thread Jiri Benc
On Tue, 29 Sep 2015 19:08:44 -0700, Jesse Gross wrote: > On Tue, Sep 29, 2015 at 10:52 AM, Jiri Benc wrote: > > diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c > > index 5c030a4d7338..03ba070c3256 100644 > > --- a/net/openvswitch/flow_netlink.c > > +++ b/net/openvswitc

Re: [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

2015-09-30 Thread Jiri Benc
On Tue, 29 Sep 2015 13:41:34 -0700, Pravin Shelar wrote: > We can add rather add TUNNEL_IPV6 flag to distinguish IPv4 and IPv6 > tunnel keys. This can be stored in ip_tunnel_key.tun_flags. Not really. This was my original approach, too, but openvswitch is not the only user of struct ip_tunnel_key,

Re: [ovs-dev] [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

2015-09-29 Thread Jesse Gross
On Tue, Sep 29, 2015 at 10:52 AM, Jiri Benc wrote: > diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c > index 5c030a4d7338..03ba070c3256 100644 > --- a/net/openvswitch/flow_netlink.c > +++ b/net/openvswitch/flow_netlink.c > @@ -643,6 +643,7 @@ static int ipv4_tun_from_n

Re: [PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

2015-09-29 Thread Pravin Shelar
On Tue, Sep 29, 2015 at 10:52 AM, Jiri Benc wrote: > Store tunnel protocol (AF_INET or AF_INET6) in sw_flow_key. This field now > also acts as an indicator whether the flow contains tunnel data (this was > previously indicated by tun_key.u.ipv4.dst being set but with IPv6 addresses > in an union w

[PATCH net-next 1/2] openvswitch: add tunnel protocol to sw_flow_key

2015-09-29 Thread Jiri Benc
Store tunnel protocol (AF_INET or AF_INET6) in sw_flow_key. This field now also acts as an indicator whether the flow contains tunnel data (this was previously indicated by tun_key.u.ipv4.dst being set but with IPv6 addresses in an union with IPv4 ones this won't work anymore). The new field was a