-/* Copyright (c) 2013 Nicira, Inc.
+/* Copyright (c) 2013, 2014 Nicira, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#include <errno.h>
#include "byte-order.h"
+#include "connectivity.h"
#include "dynamic-string.h"
#include "hash.h"
#include "hmap.h"
#include "netdev.h"
#include "odp-util.h"
#include "packets.h"
+#include "seq.h"
#include "smap.h"
#include "socket-util.h"
#include "tunnel.h"
struct hmap_node match_node;
const struct ofport_dpif *ofport;
- unsigned int netdev_seq;
+ unsigned int change_seq;
struct netdev *netdev;
struct tnl_match match;
tnl_port = xzalloc(sizeof *tnl_port);
tnl_port->ofport = ofport;
tnl_port->netdev = netdev_ref(netdev);
- tnl_port->netdev_seq = netdev_change_seq(tnl_port->netdev);
+ tnl_port->change_seq = seq_read(connectivity_seq_get());
tnl_port->match.in_key = cfg->in_key;
tnl_port->match.ip_src = cfg->ip_src;
changed = tnl_port_add__(ofport, netdev, odp_port, false);
} else if (tnl_port->netdev != netdev
|| tnl_port->match.odp_port != odp_port
- || tnl_port->netdev_seq != netdev_change_seq(netdev)) {
+ || tnl_port->change_seq != seq_read(connectivity_seq_get())) {
VLOG_DBG("reconfiguring %s", tnl_port_get_name(tnl_port));
tnl_port_del__(ofport);
tnl_port_add__(ofport, netdev, odp_port, true);
{
if (tnl_port_should_receive(flow)) {
memset(&wc->masks.tunnel, 0xff, sizeof wc->masks.tunnel);
+ wc->masks.tunnel.flags = (FLOW_TNL_F_DONT_FRAGMENT |
+ FLOW_TNL_F_CSUM |
+ FLOW_TNL_F_KEY);
memset(&wc->masks.pkt_mark, 0xff, sizeof wc->masks.pkt_mark);
if (!tnl_ecn_ok(base_flow, flow)) {