Skip to content

Commit

Permalink
[orchagent] Set default MTU for the underlay loopback interface (soni…
Browse files Browse the repository at this point in the history
…c-net#1299)

Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
  • Loading branch information
Volodymyr Samotiy authored and abdosi committed Jun 3, 2020
1 parent 14075ae commit ed01191
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions orchagent/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit ed01191

Please sign in to comment.