From e09dbc2fe0f29b775745ae8cfb86c5674afe594b Mon Sep 17 00:00:00 2001 From: Volodymyr Samotiy Date: Thu, 28 May 2020 20:35:36 +0300 Subject: [PATCH] [orchagent] Set default MTU for the underlay loopback interface (#1299) Signed-off-by: Volodymyr Samotiy --- orchagent/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/orchagent/main.cpp b/orchagent/main.cpp index ce87a3802c11..d373c1120ad4 100644 --- a/orchagent/main.cpp +++ b/orchagent/main.cpp @@ -36,6 +36,8 @@ extern sai_router_interface_api_t *sai_router_intfs_api; #define UNREFERENCED_PARAMETER(P) (P) +#define UNDERLAY_RIF_DEFAULT_MTU 9100 + /* Global variables */ sai_object_id_t gVirtualRouterId; sai_object_id_t gUnderlayIfId; @@ -306,6 +308,10 @@ int main(int argc, char **argv) underlay_intf_attr.value.s32 = SAI_ROUTER_INTERFACE_TYPE_LOOPBACK; underlay_intf_attrs.push_back(underlay_intf_attr); + underlay_intf_attr.id = SAI_ROUTER_INTERFACE_ATTR_MTU; + underlay_intf_attr.value.u32 = UNDERLAY_RIF_DEFAULT_MTU; + underlay_intf_attrs.push_back(underlay_intf_attr); + status = sai_router_intfs_api->create_router_interface(&gUnderlayIfId, gSwitchId, (uint32_t)underlay_intf_attrs.size(), underlay_intf_attrs.data()); if (status != SAI_STATUS_SUCCESS) {