Skip to content

Commit 2d7ab0c

Browse files
lguohanprsunny
authored andcommitted
Revert "Align default MTU value as SAI default (#705)" (#710)
This reverts commit 836a58c.
1 parent 836a58c commit 2d7ab0c

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

orchagent/port.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,7 @@ extern "C" {
1111
#include <map>
1212

1313
#define DEFAULT_PORT_VLAN_ID 1
14-
/*
15-
* Default MTU is derived from SAI_PORT_ATTR_MTU (1514)
16-
* Orchagent adds extra 22 bytes for Ethernet header and FCS,
17-
* hence setting to 1492 (1514 - 22)
18-
*/
19-
#define DEFAULT_MTU 1492
14+
#define DEFAULT_MTU 9100
2015

2116
namespace swss {
2217

tests/test_interface.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_InterfaceAddRemoveIpv6Address(self, dvs, testlog):
7474
for fv in fvs:
7575
if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_TYPE":
7676
assert fv[1] == "SAI_ROUTER_INTERFACE_TYPE_PORT"
77-
# the default MTU without any configuration is 9100, set by portmgr
77+
# the default MTU without any configuration is 9100
7878
if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_MTU":
7979
assert fv[1] == "9100"
8080

@@ -146,7 +146,7 @@ def test_InterfaceAddRemoveIpv4Address(self, dvs, testlog):
146146
for fv in fvs:
147147
if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_TYPE":
148148
assert fv[1] == "SAI_ROUTER_INTERFACE_TYPE_PORT"
149-
# the default MTU without any configuration is 9100, set by portmgr
149+
# the default MTU without any configuration is 9100
150150
if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_MTU":
151151
assert fv[1] == "9100"
152152

@@ -296,9 +296,9 @@ def test_InterfaceAddRemoveIpv4Address(self, dvs, testlog):
296296
for fv in fvs:
297297
if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_TYPE":
298298
assert fv[1] == "SAI_ROUTER_INTERFACE_TYPE_PORT"
299-
# the default MTU without any configuration is 1492
299+
# the default MTU without any configuration is 9100
300300
if fv[0] == "SAI_ROUTER_INTERFACE_ATTR_MTU":
301-
assert fv[1] == "1492"
301+
assert fv[1] == "9100"
302302

303303
# check ASIC route database
304304
tbl = swsscommon.Table(self.adb, "ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY")

tests/test_vnet.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -477,15 +477,14 @@ def check_router_interface(self, dvs, name, vlan_oid=0):
477477
expected_attr = {
478478
"SAI_ROUTER_INTERFACE_ATTR_VIRTUAL_ROUTER_ID": self.vr_map[name].get('ing'),
479479
"SAI_ROUTER_INTERFACE_ATTR_SRC_MAC_ADDRESS": switch_mac,
480-
"SAI_ROUTER_INTERFACE_ATTR_MTU": "1492",
480+
"SAI_ROUTER_INTERFACE_ATTR_MTU": "9100",
481481
}
482482

483483
if vlan_oid:
484484
expected_attr.update({'SAI_ROUTER_INTERFACE_ATTR_TYPE': 'SAI_ROUTER_INTERFACE_TYPE_VLAN'})
485485
expected_attr.update({'SAI_ROUTER_INTERFACE_ATTR_VLAN_ID': vlan_oid})
486486
else:
487487
expected_attr.update({'SAI_ROUTER_INTERFACE_ATTR_TYPE': 'SAI_ROUTER_INTERFACE_TYPE_PORT'})
488-
expected_attr.update({'SAI_ROUTER_INTERFACE_ATTR_MTU': '9100'})
489488

490489
new_rif = get_created_entry(asic_db, self.ASIC_RIF_TABLE, self.rifs)
491490
check_object(asic_db, self.ASIC_RIF_TABLE, new_rif, expected_attr)

0 commit comments

Comments
 (0)