On 06/03/15 at 05:29pm, Jiri Benc wrote: > On Mon, 1 Jun 2015 16:27:32 +0200, Thomas Graf wrote: > > --- a/net/openvswitch/flow.h > > +++ b/net/openvswitch/flow.h > > @@ -45,6 +45,11 @@ struct sk_buff; > > #define TUN_METADATA_OPTS(flow_key, opt_len) \ > > ((void *)((flow_key)->tun_opts + TUN_METADATA_OFFSET(opt_len))) > > > > +struct ovs_tunnel_info > > +{ > > + struct ip_tunnel_info *info; > > +}; > > Why do you keep this structure? It doesn't seem it's useful.
It's the structure which defines the payload of the OVS set tunnel action. Those actions are configured as Netlink attributes only visible to the kernel. Since we allocate the ip_tunnel_info to attach it to the packets passing by, we only need to keep a pointer as the config to the set action. We could also do (struct ip_tunnel_info *) nla_data(...) and store the pointer without defining a struct. I found this more readable. Happy to change if you like it better without a struct around it. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html