Skip to content

Commit ed01191

Browse files
Volodymyr Samotiyabdosi
authored andcommitted
[orchagent] Set default MTU for the underlay loopback interface (sonic-net#1299)
Signed-off-by: Volodymyr Samotiy <[email protected]>
1 parent 14075ae commit ed01191

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

orchagent/main.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ extern sai_router_interface_api_t *sai_router_intfs_api;
3636

3737
#define UNREFERENCED_PARAMETER(P) (P)
3838

39+
#define UNDERLAY_RIF_DEFAULT_MTU 9100
40+
3941
/* Global variables */
4042
sai_object_id_t gVirtualRouterId;
4143
sai_object_id_t gUnderlayIfId;
@@ -306,6 +308,10 @@ int main(int argc, char **argv)
306308
underlay_intf_attr.value.s32 = SAI_ROUTER_INTERFACE_TYPE_LOOPBACK;
307309
underlay_intf_attrs.push_back(underlay_intf_attr);
308310

311+
underlay_intf_attr.id = SAI_ROUTER_INTERFACE_ATTR_MTU;
312+
underlay_intf_attr.value.u32 = UNDERLAY_RIF_DEFAULT_MTU;
313+
underlay_intf_attrs.push_back(underlay_intf_attr);
314+
309315
status = sai_router_intfs_api->create_router_interface(&gUnderlayIfId, gSwitchId, (uint32_t)underlay_intf_attrs.size(), underlay_intf_attrs.data());
310316
if (status != SAI_STATUS_SUCCESS)
311317
{

0 commit comments

Comments
 (0)