Skip to content

Commit dad1287

Browse files
[tunneldecaporch] Set default MTU for the overlay loopback interface (sonic-net#1756)
Signed-off-by: Volodymyr Samotiy <[email protected]>
1 parent 1bc94d1 commit dad1287

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

orchagent/tunneldecaporch.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#include "logger.h"
77
#include "swssnet.h"
88

9+
#define OVERLAY_RIF_DEFAULT_MTU 9100
10+
911
extern sai_tunnel_api_t* sai_tunnel_api;
1012
extern sai_router_interface_api_t* sai_router_intfs_api;
1113
extern sai_next_hop_api_t* sai_next_hop_api;
@@ -228,6 +230,10 @@ bool TunnelDecapOrch::addDecapTunnel(string key, string type, IpAddresses dst_ip
228230
overlay_intf_attr.value.s32 = SAI_ROUTER_INTERFACE_TYPE_LOOPBACK;
229231
overlay_intf_attrs.push_back(overlay_intf_attr);
230232

233+
overlay_intf_attr.id = SAI_ROUTER_INTERFACE_ATTR_MTU;
234+
overlay_intf_attr.value.u32 = OVERLAY_RIF_DEFAULT_MTU;
235+
overlay_intf_attrs.push_back(overlay_intf_attr);
236+
231237
status = sai_router_intfs_api->create_router_interface(&overlayIfId, gSwitchId, (uint32_t)overlay_intf_attrs.size(), overlay_intf_attrs.data());
232238
if (status != SAI_STATUS_SUCCESS)
233239
{

0 commit comments

Comments
 (0)