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.
Conflicts:
lib/neutron_plugins/linuxbridge_agent
lib/neutron_plugins/openvswitch_agent
lib/neutron_plugins/services/l3
Change-Id: I38a80bac18673a30842a7b997d0669fed5aff976
Related-Bug: #1603268
(cherry picked from commit 7b5c7dce53ab9e9778d1d72fcbbed565bfce65bd)
| ... | ... |
@@ -668,6 +668,15 @@ function create_disk {
|
| 668 | 668 |
fi |
| 669 | 669 |
} |
| 670 | 670 |
|
| 671 |
+ |
|
| 672 |
+# set_mtu - Set MTU on a device |
|
| 673 |
+function set_mtu {
|
|
| 674 |
+ local dev=$1 |
|
| 675 |
+ local mtu=$2 |
|
| 676 |
+ sudo ip link set mtu $mtu dev $dev |
|
| 677 |
+} |
|
| 678 |
+ |
|
| 679 |
+ |
|
| 671 | 680 |
# Restore xtrace |
| 672 | 681 |
$_XTRACE_FUNCTIONS |
| 673 | 682 |
|
| ... | ... |
@@ -183,6 +183,7 @@ IPV6_PROVIDER_NETWORK_GATEWAY=${IPV6_PROVIDER_NETWORK_GATEWAY:-}
|
| 183 | 183 |
# Define the public bridge that will transmit traffic from VMs to the |
| 184 | 184 |
# physical network - used by both the OVS and Linux Bridge drivers. |
| 185 | 185 |
PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
|
| 186 |
+PUBLIC_BRIDGE_MTU=${PUBLIC_BRIDGE_MTU:-1500}
|
|
| 186 | 187 |
|
| 187 | 188 |
# Use flat providernet for public network |
| 188 | 189 |
# |
| ... | ... |
@@ -48,6 +48,7 @@ function neutron_plugin_configure_dhcp_agent {
|
| 48 | 48 |
|
| 49 | 49 |
function neutron_plugin_configure_l3_agent {
|
| 50 | 50 |
sudo brctl addbr $PUBLIC_BRIDGE |
| 51 |
+ set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU |
|
| 51 | 52 |
iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge |
| 52 | 53 |
iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport |
| 53 | 54 |
} |
| ... | ... |
@@ -102,7 +102,7 @@ function neutron_plugin_configure_plugin_agent {
|
| 102 | 102 |
sudo ovs-vsctl -- --may-exist add-port "br-$GUEST_INTERFACE_DEFAULT" $GUEST_INTERFACE_DEFAULT |
| 103 | 103 |
|
| 104 | 104 |
# Create external bridge and add port |
| 105 |
- _neutron_ovs_base_add_bridge $PUBLIC_BRIDGE |
|
| 105 |
+ _neutron_ovs_base_add_public_bridge |
|
| 106 | 106 |
sudo ovs-vsctl -- --may-exist add-port $PUBLIC_BRIDGE $PUBLIC_INTERFACE_DEFAULT |
| 107 | 107 |
|
| 108 | 108 |
# 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 |
} |