From 38bb57e9b09b4cc1343ed1805c79a53c6a911a16 Mon Sep 17 00:00:00 2001 From: Tim Swanson Date: Fri, 6 Feb 2015 18:49:49 -0500 Subject: [PATCH] Add MTU selection & advertisement settings to Neutron config neutron.conf parameter additions in support of MTU selection and advertisement. Also, under ML2 group, add an additional configuration params to optionally set the path and segment MTU values as well as optionally map physnets to MTU values. DocImpact Change-Id: I1be0074ba05d8f9f70bf0f8f5b26b0eb6587fdac Partially-Implements: blueprint mtu-selection-and-advertisement --- etc/neutron.conf | 7 +++++++ etc/neutron/plugins/ml2/ml2_conf.ini | 23 +++++++++++++++++++++++ neutron/common/config.py | 4 ++++ neutron/plugins/ml2/config.py | 16 ++++++++++++++++ 4 files changed, 50 insertions(+) diff --git a/etc/neutron.conf b/etc/neutron.conf index 56997e9b3..3b208dab2 100644 --- a/etc/neutron.conf +++ b/etc/neutron.conf @@ -146,6 +146,13 @@ lock_path = $state_path/lock # Maximum number of routes per router # max_routes = 30 +# =========== items for MTU selection and advertisement ============= +# Advertise MTU. If True, effort is made to advertise MTU +# settings to VMs via network methods (ie. DHCP and RA MTU options) +# when the network's preferred MTU is known. +# advertise_mtu = False +# ======== end of items for MTU selection and advertisement ========= + # =========== items for agent management extension ============= # Seconds to regard the agent as down; should be at least twice # report_interval, to be sure the agent is down for good diff --git a/etc/neutron/plugins/ml2/ml2_conf.ini b/etc/neutron/plugins/ml2/ml2_conf.ini index 4fb1a4a36..9b8a46192 100644 --- a/etc/neutron/plugins/ml2/ml2_conf.ini +++ b/etc/neutron/plugins/ml2/ml2_conf.ini @@ -26,6 +26,29 @@ # extension_drivers = # Example: extension_drivers = anewextensiondriver +# =========== items for MTU selection and advertisement ============= +# (IntOpt) Path MTU. The maximum permissible size of an unfragmented +# packet travelling from and to addresses where encapsulated Neutron +# traffic is sent. Drivers calculate maximum viable MTU for +# validating tenant requests based on this value (typically, +# path_mtu - max encap header size). If <=0, the path MTU is +# indeterminate and no calculation takes place. +# path_mtu = 0 + +# (IntOpt) Segment MTU. The maximum permissible size of an +# unfragmented packet travelling a L2 network segment. If <=0, +# the segment MTU is indeterminate and no calculation takes place. +# segment_mtu = 0 + +# (ListOpt) Physical network MTUs. List of mappings of physical +# network to MTU value. The format of the mapping is +# :. This mapping allows specifying a +# physical network MTU value that differs from the default +# segment_mtu value. +# physical_network_mtus = +# Example: physical_network_mtus = physnet1:1550, physnet2:1500 +# ======== end of items for MTU selection and advertisement ========= + [ml2_type_flat] # (ListOpt) List of physical_network names with which flat networks # can be created. Use * to allow flat networks with arbitrary diff --git a/neutron/common/config.py b/neutron/common/config.py index 194f8f949..a0572c94e 100644 --- a/neutron/common/config.py +++ b/neutron/common/config.py @@ -121,6 +121,10 @@ core_opts = [ cfg.IntOpt('send_events_interval', default=2, help=_('Number of seconds between sending events to nova if ' 'there are any events to send.')), + cfg.BoolOpt('advertise_mtu', default=False, + help=_('If True, effort is made to advertise MTU settings ' + 'to VMs via network methods (DHCP and RA MTU options) ' + 'when the network\'s preferred MTU is known.')), ] core_cli_opts = [ diff --git a/neutron/plugins/ml2/config.py b/neutron/plugins/ml2/config.py index a5c056588..ddc1547fb 100644 --- a/neutron/plugins/ml2/config.py +++ b/neutron/plugins/ml2/config.py @@ -35,6 +35,22 @@ ml2_opts = [ help=_("An ordered list of extension driver " "entrypoints to be loaded from the " "neutron.ml2.extension_drivers namespace.")), + cfg.IntOpt('path_mtu', default=0, + help=_('The maximum permissible size of an unfragmented ' + 'packet travelling from and to addresses where ' + 'encapsulated Neutron traffic is sent. If <= 0, ' + 'the path MTU is indeterminate.')), + cfg.IntOpt('segment_mtu', default=0, + help=_('The maximum permissible size of an unfragmented ' + 'packet travelling a L2 network segment. If <= 0, the ' + 'segment MTU is indeterminate.')), + cfg.ListOpt('physical_network_mtus', + default=[], + help=_("A list of mappings of physical networks to MTU " + "values. The format of the mapping is " + ":. This mapping allows " + "specifying a physical network MTU value that " + "differs from the default segment_mtu value.")), ] -- 2.45.2