Skip to content

Commit

Permalink
[tunneldecaporch] Set default MTU for the overlay loopback interface (s…
Browse files Browse the repository at this point in the history
…onic-net#1756)

Signed-off-by: Volodymyr Samotiy <[email protected]>
  • Loading branch information
volodymyrsamotiy authored May 27, 2021
1 parent 1bc94d1 commit dad1287
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions orchagent/tunneldecaporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit dad1287

Please sign in to comment.