[OVN] Router ports gateway_mtu option should not always be set

Bug #1951559 reported by Elvira García Ruiz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Elvira García Ruiz

Bug Description

High level description:
If a neutron router is connected to a provider network 'A' and private geneve networks. If the mtu of private networks (1442 in normal cases) is lesser than that of provider network (1500), then there is no need for neutron ml2ovn to set options:gateway_mtu=1500 even if the config option to enable gateway mtu is set.

Impact:
This is important because the gateway_mtu option makes OVS use the check_pkt_larger() function, which is not necessary in most cases and is currently not hardware-offloadable. This means the traffic from VMs to external networks is currently not offloadable because of it.

Step-by-step reproduction steps:
1. Modify ml2_conf.ini: Add ovn_emit_need_to_frag = True in [ovn]

2. Wire up the networks in a router:

$ openstack network create net1
$ openstack subnet create --subnet-range 192.168.100.0/24 --network net1 subnet1
$ openstack router create r1
$ openstack router add subnet r1 subnet1
$ openstack router set --external-gateway public r1

3. Check MTUs for each network:
By default, net1 will be 1442 and private will be 1500, so mtu_gateway shouldn't be set

4. Check if gateway_mtu was set on the Logical_Router_Port associated to the gateway
$ ovn-nbctl list Logical_Router_port | less
In this case, it shouldn't be set.

Expected results:
gateway_mtu is set in the Gateway LRP options for r1 only if provider MTU < private MTU.

Actual results:
gateway_mtu is always set if ovn_emit_need_to_frag is enabled.

more info at [0]

[0] https://bugzilla.redhat.com/show_bug.cgi?id=2019938

Changed in neutron:
assignee: nobody → Elvira García Ruiz (elviragr)
description: updated
Hongbin Lu (hongbin.lu)
tags: added: ovn
Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/818443
Committed: https://opendev.org/openstack/neutron/commit/0725533a6fa6a42d361e518b027f69da8e1e1ec5
Submitter: "Zuul (22348)"
Branch: master

commit 0725533a6fa6a42d361e518b027f69da8e1e1ec5
Author: Elvira García <email address hidden>
Date: Thu Nov 18 18:08:13 2021 +0100

    [OVN] Fix gateway_mtu option should not always be set

    OVN Driver currently fixes gateway_mtu MTU to the provider MTU value
    without considering if the private networks in the associated router
    have greater MTU values than the provider. This is unnecesary and
    adds extra actions for each packet. This patch fixes that, as now
    gateway_mtu is only set in case the provider MTU is smaller than the
    private MTU.

    The changes in create_router_port and delete_router_port were necessary
    as there could be a use case when the user first sets the gateway
    router and later adds subnets from networks with greater MTU, so this
    parameter needs to be checked after adding a subnet.

    Closes-Bug: #1951559

    Signed-off-by: Elvira García <email address hidden>
    Change-Id: If56f1a3dcdc8c57303d5641df79ea919ba7c170d

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/neutron/+/819578

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/neutron/+/819579

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/neutron/+/819580

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/neutron/+/819581

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/819578
Committed: https://opendev.org/openstack/neutron/commit/c8209eb1ee7dedd5174dcf97fd0a6c0310d95dd0
Submitter: "Zuul (22348)"
Branch: stable/xena

commit c8209eb1ee7dedd5174dcf97fd0a6c0310d95dd0
Author: Elvira García <email address hidden>
Date: Thu Nov 18 18:08:13 2021 +0100

    [OVN] Fix gateway_mtu option should not always be set

    OVN Driver currently fixes gateway_mtu MTU to the provider MTU value
    without considering if the private networks in the associated router
    have greater MTU values than the provider. This is unnecesary and
    adds extra actions for each packet. This patch fixes that, as now
    gateway_mtu is only set in case the provider MTU is smaller than the
    private MTU.

    The changes in create_router_port and delete_router_port were necessary
    as there could be a use case when the user first sets the gateway
    router and later adds subnets from networks with greater MTU, so this
    parameter needs to be checked after adding a subnet.

    Closes-Bug: #1951559

    Signed-off-by: Elvira García <email address hidden>
    Change-Id: If56f1a3dcdc8c57303d5641df79ea919ba7c170d
    (cherry picked from commit 0725533a6fa6a42d361e518b027f69da8e1e1ec5)

tags: added: in-stable-xena
tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/819579
Committed: https://opendev.org/openstack/neutron/commit/ee0aeb1f6302656b8037cfe906f0bea07ae639e5
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit ee0aeb1f6302656b8037cfe906f0bea07ae639e5
Author: Elvira García <email address hidden>
Date: Thu Nov 18 18:08:13 2021 +0100

    [OVN] Fix gateway_mtu option should not always be set

    OVN Driver currently fixes gateway_mtu MTU to the provider MTU value
    without considering if the private networks in the associated router
    have greater MTU values than the provider. This is unnecesary and
    adds extra actions for each packet. This patch fixes that, as now
    gateway_mtu is only set in case the provider MTU is smaller than the
    private MTU.

    The changes in create_router_port and delete_router_port were necessary
    as there could be a use case when the user first sets the gateway
    router and later adds subnets from networks with greater MTU, so this
    parameter needs to be checked after adding a subnet.

    Closes-Bug: #1951559

    Signed-off-by: Elvira García <email address hidden>
    Change-Id: If56f1a3dcdc8c57303d5641df79ea919ba7c170d
    (cherry picked from commit 0725533a6fa6a42d361e518b027f69da8e1e1ec5)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/819580
Committed: https://opendev.org/openstack/neutron/commit/c95292c075841fa46415bd700ee403a94d939842
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit c95292c075841fa46415bd700ee403a94d939842
Author: Elvira García <email address hidden>
Date: Thu Nov 18 18:08:13 2021 +0100

    [OVN] Fix gateway_mtu option should not always be set

    OVN Driver currently fixes gateway_mtu MTU to the provider MTU value
    without considering if the private networks in the associated router
    have greater MTU values than the provider. This is unnecesary and
    adds extra actions for each packet. This patch fixes that, as now
    gateway_mtu is only set in case the provider MTU is smaller than the
    private MTU.

    The changes in create_router_port and delete_router_port were necessary
    as there could be a use case when the user first sets the gateway
    router and later adds subnets from networks with greater MTU, so this
    parameter needs to be checked after adding a subnet.

    Closes-Bug: #1951559

    Signed-off-by: Elvira García <email address hidden>
    Change-Id: If56f1a3dcdc8c57303d5641df79ea919ba7c170d
    (cherry picked from commit 0725533a6fa6a42d361e518b027f69da8e1e1ec5)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/819581
Committed: https://opendev.org/openstack/neutron/commit/41703c0a56e87d54d87b1e470fbc694abd570807
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit 41703c0a56e87d54d87b1e470fbc694abd570807
Author: Elvira García <email address hidden>
Date: Thu Nov 18 18:08:13 2021 +0100

    [OVN] Fix gateway_mtu option should not always be set

    OVN Driver currently fixes gateway_mtu MTU to the provider MTU value
    without considering if the private networks in the associated router
    have greater MTU values than the provider. This is unnecesary and
    adds extra actions for each packet. This patch fixes that, as now
    gateway_mtu is only set in case the provider MTU is smaller than the
    private MTU.

    The changes in create_router_port and delete_router_port were necessary
    as there could be a use case when the user first sets the gateway
    router and later adds subnets from networks with greater MTU, so this
    parameter needs to be checked after adding a subnet.

    Closes-Bug: #1951559

    Signed-off-by: Elvira García <email address hidden>
    Change-Id: If56f1a3dcdc8c57303d5641df79ea919ba7c170d
    (cherry picked from commit 0725533a6fa6a42d361e518b027f69da8e1e1ec5)

tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 19.1.0

This issue was fixed in the openstack/neutron 19.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 17.3.0

This issue was fixed in the openstack/neutron 17.3.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 18.2.0

This issue was fixed in the openstack/neutron 18.2.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 20.0.0.0rc1

This issue was fixed in the openstack/neutron 20.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/networking-ovn train-eol

This issue was fixed in the openstack/networking-ovn train-eol release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron ussuri-eol

This issue was fixed in the openstack/neutron ussuri-eol release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.