lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 4 Jun 2015 00:07:57 +0200
From:	Thomas Graf <tgraf@...g.ch>
To:	Jiri Benc <jbenc@...hat.com>
Cc:	netdev@...r.kernel.org, pshelar@...ira.com, jesse@...ira.com,
	davem@...emloft.net, daniel@...earbox.net, dev@...nvswitch.org,
	tom@...bertland.com, edumazet@...gle.com, jiri@...nulli.us,
	hannes@...essinduktion.org, marcelo.leitner@...il.com,
	stephen@...workplumber.org, jpettit@...ira.com, kaber@...sh.net
Subject: Re: [net-next RFC 08/14] openvswitch: Allocate & attach
 ip_tunnel_info for tunnel set action

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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ