From 2d7ab0c24d0e4ea2b55e7cd8b3aaa8f0a83641f4 Mon Sep 17 00:00:00 2001 From: lguohan Date: Tue, 27 Nov 2018 16:33:34 -0800 Subject: [PATCH] Revert "Align default MTU value as SAI default (#705)" (#710) This reverts commit 836a58c65d0c16ac46343f17616b3b5938065264. --- orchagent/port.h | 7 +------ tests/test_interface.py | 8 ++++---- tests/test_vnet.py | 3 +-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/orchagent/port.h b/orchagent/port.h index d3cf76bcf230..0b46457986e1 100644 --- a/orchagent/port.h +++ b/orchagent/port.h @@ -11,12 +11,7 @@ extern "C" { #include #define DEFAULT_PORT_VLAN_ID 1 -/* - * Default MTU is derived from SAI_PORT_ATTR_MTU (1514) - * Orchagent adds extra 22 bytes for Ethernet header and FCS, - * hence setting to 1492 (1514 - 22) - */ -#define DEFAULT_MTU 1492 +#define DEFAULT_MTU 9100 namespace swss { diff --git a/tests/test_interface.py b/tests/test_interface.py index e0bb48a37168..d377560303f1 100644 --- a/tests/test_interface.py +++ b/tests/test_interface.py @@ -74,7 +74,7 @@ def test_InterfaceAddRemoveIpv6Address(self, dvs, testlog): for fv in fvs: if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_TYPE": assert fv[1] == "SAI_ROUTER_INTERFACE_TYPE_PORT" - # the default MTU without any configuration is 9100, set by portmgr + # the default MTU without any configuration is 9100 if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_MTU": assert fv[1] == "9100" @@ -146,7 +146,7 @@ def test_InterfaceAddRemoveIpv4Address(self, dvs, testlog): for fv in fvs: if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_TYPE": assert fv[1] == "SAI_ROUTER_INTERFACE_TYPE_PORT" - # the default MTU without any configuration is 9100, set by portmgr + # the default MTU without any configuration is 9100 if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_MTU": assert fv[1] == "9100" @@ -296,9 +296,9 @@ def test_InterfaceAddRemoveIpv4Address(self, dvs, testlog): for fv in fvs: if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_TYPE": assert fv[1] == "SAI_ROUTER_INTERFACE_TYPE_PORT" - # the default MTU without any configuration is 1492 + # the default MTU without any configuration is 9100 if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_MTU": - assert fv[1] == "1492" + assert fv[1] == "9100" # check ASIC route database tbl = swsscommon.Table(self.adb, "ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY") diff --git a/tests/test_vnet.py b/tests/test_vnet.py index 20cf23acc6f4..1a37a3700d2c 100644 --- a/tests/test_vnet.py +++ b/tests/test_vnet.py @@ -477,7 +477,7 @@ def check_router_interface(self, dvs, name, vlan_oid=0): expected_attr = { "SAI_ROUTER_INTERFACE_ATTR_VIRTUAL_ROUTER_ID": self.vr_map[name].get('ing'), "SAI_ROUTER_INTERFACE_ATTR_SRC_MAC_ADDRESS": switch_mac, - "SAI_ROUTER_INTERFACE_ATTR_MTU": "1492", + "SAI_ROUTER_INTERFACE_ATTR_MTU": "9100", } if vlan_oid: @@ -485,7 +485,6 @@ def check_router_interface(self, dvs, name, vlan_oid=0): expected_attr.update({'SAI_ROUTER_INTERFACE_ATTR_VLAN_ID': vlan_oid}) else: expected_attr.update({'SAI_ROUTER_INTERFACE_ATTR_TYPE': 'SAI_ROUTER_INTERFACE_TYPE_PORT'}) - expected_attr.update({'SAI_ROUTER_INTERFACE_ATTR_MTU': '9100'}) new_rif = get_created_entry(asic_db, self.ASIC_RIF_TABLE, self.rifs) check_object(asic_db, self.ASIC_RIF_TABLE, new_rif, expected_attr)