This variable can be used to accommodate for underlying infrastructure
that does not provide full 1500-sized traffic, or maybe instead gives
access to Jumbo frames.
Change-Id: I38a80bac18673a30842a7b997d0669fed5aff976
Related-Bug: #1603268
... | ... |
@@ -637,6 +637,15 @@ function create_disk { |
637 | 637 |
fi |
638 | 638 |
} |
639 | 639 |
|
640 |
+ |
|
641 |
+# set_mtu - Set MTU on a device |
|
642 |
+function set_mtu { |
|
643 |
+ local dev=$1 |
|
644 |
+ local mtu=$2 |
|
645 |
+ sudo ip link set mtu $mtu dev $dev |
|
646 |
+} |
|
647 |
+ |
|
648 |
+ |
|
640 | 649 |
# Restore xtrace |
641 | 650 |
$_XTRACE_FUNCTIONS |
642 | 651 |
|
... | ... |
@@ -50,6 +50,7 @@ function neutron_plugin_configure_dhcp_agent { |
50 | 50 |
function neutron_plugin_configure_l3_agent { |
51 | 51 |
local conf_file=$1 |
52 | 52 |
sudo brctl addbr $PUBLIC_BRIDGE |
53 |
+ set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU |
|
53 | 54 |
iniset $conf_file DEFAULT external_network_bridge |
54 | 55 |
iniset $conf_file DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport |
55 | 56 |
} |
... | ... |
@@ -104,7 +104,7 @@ function neutron_plugin_configure_plugin_agent { |
104 | 104 |
sudo ovs-vsctl -- --may-exist add-port "br-$VLAN_INTERFACE" $VLAN_INTERFACE |
105 | 105 |
|
106 | 106 |
# Create external bridge and add port |
107 |
- _neutron_ovs_base_add_bridge $PUBLIC_BRIDGE |
|
107 |
+ _neutron_ovs_base_add_public_bridge |
|
108 | 108 |
sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE |
109 | 109 |
|
110 | 110 |
# Set bridge mappings to "physnet1:br-$GUEST_INTERFACE_DEFAULT" |
... | ... |
@@ -105,11 +105,16 @@ function _neutron_ovs_base_configure_l3_agent { |
105 | 105 |
sudo ip link set $Q_PUBLIC_VETH_EX up |
106 | 106 |
sudo ip addr flush dev $Q_PUBLIC_VETH_EX |
107 | 107 |
else |
108 |
- _neutron_ovs_base_add_bridge $PUBLIC_BRIDGE |
|
108 |
+ _neutron_ovs_base_add_public_bridge |
|
109 | 109 |
sudo ovs-vsctl br-set-external-id $PUBLIC_BRIDGE bridge-id $PUBLIC_BRIDGE |
110 | 110 |
fi |
111 | 111 |
} |
112 | 112 |
|
113 |
+function _neutron_ovs_base_add_public_bridge { |
|
114 |
+ _neutron_ovs_base_add_bridge $PUBLIC_BRIDGE |
|
115 |
+ set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU |
|
116 |
+} |
|
117 |
+ |
|
113 | 118 |
function _neutron_ovs_base_configure_nova_vif_driver { |
114 | 119 |
: |
115 | 120 |
} |
... | ... |
@@ -15,6 +15,7 @@ IPV6_PROVIDER_FIXED_RANGE=${IPV6_PROVIDER_FIXED_RANGE:-} |
15 | 15 |
IPV6_PROVIDER_NETWORK_GATEWAY=${IPV6_PROVIDER_NETWORK_GATEWAY:-} |
16 | 16 |
|
17 | 17 |
PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex} |
18 |
+PUBLIC_BRIDGE_MTU=${PUBLIC_BRIDGE_MTU:-1500} |
|
18 | 19 |
|
19 | 20 |
# If Q_USE_PUBLIC_VETH=True, create and use a veth pair instead of |
20 | 21 |
# PUBLIC_BRIDGE. This is intended to be used with |