On Thu, Jan 14, 2016 at 01:27:45PM +0000, Sugesh Chandran wrote: > Adding a new field called dl_type in flow tunnel structure to verify the > validity > of tunnel metadata. This field avoids the need of resetting and validating the > entire ipv4/ipv6 tunnel destination address which caused a serious performance > drop. > > Fixes: 3ae91c019019 ("tunneling: add IPv6 support to netdev_tunnel_config") > Signed-off-by: Sugesh Chandran <sugesh.chand...@intel.com> > --- > lib/flow.c | 7 ++--- > lib/match.c | 12 ++++---- > lib/meta-flow.c | 10 +++++-- > lib/netdev-vport.c | 10 +++---- > lib/odp-util.c | 10 +++---- > lib/packets.c | 7 ++++- > lib/packets.h | 69 > ++++++++++++++++++++++++++++++++------------ > ofproto/ofproto-dpif-ipfix.c | 3 +- > ofproto/ofproto-dpif-rid.c | 3 +- > ofproto/ofproto-dpif-sflow.c | 6 ++-- > ofproto/tunnel.c | 12 ++++---- > 11 files changed, 96 insertions(+), 53 deletions(-) > > diff --git a/lib/flow.c b/lib/flow.c > index 5668d0c..f9a645b 100644 > --- a/lib/flow.c > +++ b/lib/flow.c > @@ -818,15 +818,14 @@ flow_get_metadata(const struct flow *flow, struct match > *flow_metadata) > if (flow->tunnel.ip_src) { > match_set_tun_src(flow_metadata, flow->tunnel.ip_src); > } > - if (flow->tunnel.ip_dst) { > + if (flow->tunnel.dl_type == ETH_TYPE_IP) {
You should use htons(ETH_TYPE_IP) and htons(ETH_TYPE_IPV6) all over the code. Cascardo. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev