On Mon, Jan 12, 2015 at 4:26 AM, Thomas Graf <tg...@suug.ch> wrote: > diff --git a/net/openvswitch/flow_netlink.c b/net/openvswitch/flow_netlink.c > index 8980d32..457ccf3 100644 > --- a/net/openvswitch/flow_netlink.c > +++ b/net/openvswitch/flow_netlink.c > +static const struct ovs_len_tbl ovs_tunnel_key_lens[OVS_TUNNEL_KEY_ATTR_MAX > + 1] = { > + [OVS_TUNNEL_KEY_ATTR_ID] = { .len = sizeof(u64) }, > + [OVS_TUNNEL_KEY_ATTR_IPV4_SRC] = { .len = sizeof(u32) }, > + [OVS_TUNNEL_KEY_ATTR_IPV4_DST] = { .len = sizeof(u32) }, > + [OVS_TUNNEL_KEY_ATTR_TOS] = { .len = 1 }, > + [OVS_TUNNEL_KEY_ATTR_TTL] = { .len = 1 }, > + [OVS_TUNNEL_KEY_ATTR_DONT_FRAGMENT] = { .len = 0 }, > + [OVS_TUNNEL_KEY_ATTR_CSUM] = { .len = 0 }, > + [OVS_TUNNEL_KEY_ATTR_TP_SRC] = { .len = sizeof(u16) }, > + [OVS_TUNNEL_KEY_ATTR_TP_DST] = { .len = sizeof(u16) }, > + [OVS_TUNNEL_KEY_ATTR_OAM] = { .len = 0 }, > + [OVS_TUNNEL_KEY_ATTR_GENEVE_OPTS] = { .len = OVS_ATTR_NESTED }, > +};
Geneve isn't really nested - maybe we should break it out into a separate name? OVS_ATTR_VARIABLE? We shouldn't really try to traverse it as netlink attributes anyways. > +static const struct ovs_len_tbl ovs_key_lens[OVS_KEY_ATTR_MAX + 1] = { > + [OVS_KEY_ATTR_ENCAP] = { .len = OVS_ATTR_NESTED }, This is not new but I think that encap isn't really handled correctly. In theory, there could be multiple levels of nesting here (either another encap or some other element) but there's no 'next' link. However, I don't believe the situation arises today. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev