Add config option for ovn_emit_need_to_frag

Add a charm config option to enable/disable ovn_emit_need_to_frag.
By default, the value is set to "True" as ovn_emit_need_to_frag
is enabled by default.

Closes-Bug: #1947391
Change-Id: I58fe365ce862430e172ebedf80ebaef9807c910c
This commit is contained in:
Yoshi Kadokawa 2024-09-26 17:41:52 +09:00
parent 63e6e23b24
commit 9eb6a64b9c
3 changed files with 15 additions and 2 deletions

View File

@ -121,3 +121,15 @@ options:
- ntp_server:,wpad:1.2.3.5 - Unset ntp_server and set wpad - ntp_server:,wpad:1.2.3.5 - Unset ntp_server and set wpad
See the ovn-nb(5) man page for available options. See the ovn-nb(5) man page for available options.
enable-emit-need-to-frag:
type: boolean
default: True
description: >
When enabled, the length of packets traversing router gateway ports
will be checked, and if necessary ICMPv4 type 3 (Destination
Unreachable) code 4 (Fragmentation Needed and Don't Fragment was Set)
or ICMPv6 type 2 (Packet Too Big) code 0 (no route to destination)
packets will be generated.
Note that a performance penalty may incur on older kernel versions (<= 5.2)
or if hardware acceleration does not support the ``check_pkt_len`` action.

View File

@ -133,7 +133,7 @@ def configure_neutron():
# version of 5.2 or greater. Enabled by default # version of 5.2 or greater. Enabled by default
# because charm supports focal or newer which has a # because charm supports focal or newer which has a
# minimum kernel version of 5.4. # minimum kernel version of 5.4.
('ovn_emit_need_to_frag', True), ('ovn_emit_need_to_frag', options.enable_emit_need_to_frag),
# NOTE(fnordahl): will be used on chassis with DPDK enabled # NOTE(fnordahl): will be used on chassis with DPDK enabled
# #
# Neutron will make per chassis decisions based on chassis # Neutron will make per chassis decisions based on chassis

View File

@ -145,6 +145,7 @@ class TestOvnHandlers(test_utils.PatchHelper):
options.ovn_l3_scheduler = self.pmock('aSched') options.ovn_l3_scheduler = self.pmock('aSched')
options.ovn_metadata_enabled = self.pmock('aMetaData') options.ovn_metadata_enabled = self.pmock('aMetaData')
options.enable_distributed_floating_ip = self.pmock('dont') options.enable_distributed_floating_ip = self.pmock('dont')
options.enable_emit_need_to_frag = self.pmock(False)
options.dns_servers = self.pmock('dns1 dns2') options.dns_servers = self.pmock('dns1 dns2')
options.geneve_vni_ranges = self.pmock('vnia:vniA vnib:vniB') options.geneve_vni_ranges = self.pmock('vnia:vniA vnib:vniB')
options.dhcp_default_lease_time = self.pmock(42) options.dhcp_default_lease_time = self.pmock(42)
@ -186,7 +187,7 @@ class TestOvnHandlers(test_utils.PatchHelper):
('dhcp_default_lease_time', 42), ('dhcp_default_lease_time', 42),
('ovn_dhcp4_global_options', 'a:A4,b:B4'), ('ovn_dhcp4_global_options', 'a:A4,b:B4'),
('ovn_dhcp6_global_options', 'a:A6,b:B6'), ('ovn_dhcp6_global_options', 'a:A6,b:B6'),
('ovn_emit_need_to_frag', True), ('ovn_emit_need_to_frag', False),
('vhost_sock_dir', '/run/libvirt-vhost-user') ('vhost_sock_dir', '/run/libvirt-vhost-user')
], ],
'ml2_type_geneve': [ 'ml2_type_geneve': [