diff options
author | Daniele Di Proietto <diproiettod@vmware.com> | 2016-09-01 15:49:51 -0700 |
---|---|---|
committer | Daniele Di Proietto <diproiettod@vmware.com> | 2016-09-02 16:01:11 -0700 |
commit | 7478b5a2b73be87d3b42e0c2ed7b09b1efeff0fe (patch) | |
tree | a2e284f76e0ab4415c8ab88a931ee4ae508fe508 /ofproto | |
parent | c65a31e2622402bcb1b0b8df0ab928b83a0ed4a0 (diff) | |
download | openvswitch-7478b5a2b73be87d3b42e0c2ed7b09b1efeff0fe.tar.gz |
Revert "ofproto: Always set MTU for new internal ports."
This reverts commit 47bf118665a3d0f3c153d1fe80e9af02ac9a4e9c.
While the commit tries to make it more consistent, it breaks some system
tests. The assumptions made on the tests are probably made by many
users, so it's better to revert it.
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/ofproto.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 9d62b72bb..da7372de0 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -281,8 +281,6 @@ static void meter_insert_rule(struct rule *); /* unixctl. */ static void ofproto_unixctl_init(void); -static int find_min_mtu(struct ofproto *p); - /* All registered ofproto classes, in probe order. */ static const struct ofproto_class **ofproto_classes; static size_t n_ofproto_classes; @@ -516,7 +514,7 @@ ofproto_create(const char *datapath_name, const char *datapath_type, hmap_init(&ofproto->learned_cookies); ovs_list_init(&ofproto->expirable); ofproto->connmgr = connmgr_create(ofproto, datapath_name, datapath_name); - ofproto->min_mtu = find_min_mtu(ofproto); + ofproto->min_mtu = INT_MAX; cmap_init(&ofproto->groups); ovs_mutex_unlock(&ofproto_mutex); ofproto->ogf.types = 0xf; @@ -2752,8 +2750,10 @@ update_mtu(struct ofproto *p, struct ofport *port) return; } if (ofport_is_internal(p, port)) { - if (!netdev_set_mtu(port->netdev, p->min_mtu)) { - dev_mtu = p->min_mtu; + if (dev_mtu > p->min_mtu) { + if (!netdev_set_mtu(port->netdev, p->min_mtu)) { + dev_mtu = p->min_mtu; + } } port->mtu = dev_mtu; return; |