From dad128777e90df61ca312f694ce142e400a78b40 Mon Sep 17 00:00:00 2001 From: Volodymyr Samotiy Date: Thu, 27 May 2021 23:28:29 +0300 Subject: [PATCH] [tunneldecaporch] Set default MTU for the overlay loopback interface (#1756) Signed-off-by: Volodymyr Samotiy --- orchagent/tunneldecaporch.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/orchagent/tunneldecaporch.cpp b/orchagent/tunneldecaporch.cpp index bde3651881d6..6ef2c96f7451 100644 --- a/orchagent/tunneldecaporch.cpp +++ b/orchagent/tunneldecaporch.cpp @@ -6,6 +6,8 @@ #include "logger.h" #include "swssnet.h" +#define OVERLAY_RIF_DEFAULT_MTU 9100 + extern sai_tunnel_api_t* sai_tunnel_api; extern sai_router_interface_api_t* sai_router_intfs_api; extern sai_next_hop_api_t* sai_next_hop_api; @@ -228,6 +230,10 @@ bool TunnelDecapOrch::addDecapTunnel(string key, string type, IpAddresses dst_ip overlay_intf_attr.value.s32 = SAI_ROUTER_INTERFACE_TYPE_LOOPBACK; overlay_intf_attrs.push_back(overlay_intf_attr); + overlay_intf_attr.id = SAI_ROUTER_INTERFACE_ATTR_MTU; + overlay_intf_attr.value.u32 = OVERLAY_RIF_DEFAULT_MTU; + overlay_intf_attrs.push_back(overlay_intf_attr); + status = sai_router_intfs_api->create_router_interface(&overlayIfId, gSwitchId, (uint32_t)overlay_intf_attrs.size(), overlay_intf_attrs.data()); if (status != SAI_STATUS_SUCCESS) {