On Tue, Feb 24, 2015 at 5:33 AM, Chetan Bali <chetan.b...@aricent.com> wrote: > Hi, > > > > I am configuring gre-port in my ovs bridge, for establishing gre-tunnel > between 2 machines. I am trying to parse the tunnelling key params sent by > OVS while adding flow, when it sets action as OVS_ACTION_ATTR_SET. I am > parsing the tun-key attributes in dpif-linux.c in exact manner as ovs does, > i.e., nla_data(nla_data(action)) where action is in “nlattr” type. Tun-key > params that I am trying to fetch are as per struct “ovs_key_ipv4_tunnel” > i.e., > > struct ovs_key_ipv4_tunnel { > > __be64 tun_id; > > __be32 ipv4_src; > > __be32 ipv4_dst; > > __be16 tun_flags; > > u8 ipv4_tos; > > u8 ipv4_ttl; > > }; > > The problem is that, while parsing I am getting incorrect tun-key params, > whereas I can see by putting prints that openvswitchd.ko is getting correct > tun-key params. > > ovs_key_ipv4_tunnel is a kernel structure. Userspace serializes individual members of tunnel parameters. At flow install OVS kernel module translate this into ovs_key_ipv4_tunnel object. Thats how kernel can access it during tunnel action execution. You can look at OVS_TUNNEL_KEY_* to parse tunnel parameters in dpif-linux.c
> > Please help how I can parse the tun-key params in my own dpif class plugin > and also let me know if I am parsing the tun-key params in correct manner. > > > > Thanks > > Chetan > > "DISCLAIMER: This message is proprietary to Aricent and is intended solely > for the use of the individual to whom it is addressed. It may contain > privileged or confidential information and should not be circulated or used > for any purpose other than for what it is intended. If you have received > this message in error, please notify the originator immediately. If you are > not the intended recipient, you are notified that you are strictly > prohibited from using, copying, altering, or disclosing the contents of this > message. Aricent accepts no responsibility for loss or damage arising from > the use of the information transmitted by this email including damage from > virus." > > _______________________________________________ > discuss mailing list > disc...@openvswitch.org > http://openvswitch.org/mailman/listinfo/discuss > _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev