diff --git a/vslib/src/SwitchStateBase.cpp b/vslib/src/SwitchStateBase.cpp index 8ac4c6486a86..28e9c2e950d7 100644 --- a/vslib/src/SwitchStateBase.cpp +++ b/vslib/src/SwitchStateBase.cpp @@ -403,9 +403,7 @@ sai_status_t SwitchStateBase::setPort( { SWSS_LOG_INFO("setting new MTU: %d on %s", mtu, name.c_str()); - std::string vname = vs_get_veth_name(name, portId); - - if (vs_set_dev_mtu(name.c_str(), mtu) < 0 || vs_set_dev_mtu(vname.c_str(), mtu) < 0) + if (vs_set_dev_mtu(name.c_str(), mtu) < 0) { SWSS_LOG_ERROR("failed to set MTU on portId %s", sai_serialize_object_id(portId).c_str()); diff --git a/vslib/src/SwitchStateBaseHostif.cpp b/vslib/src/SwitchStateBaseHostif.cpp index 7ce39bf353d0..02070a10d3e7 100644 --- a/vslib/src/SwitchStateBaseHostif.cpp +++ b/vslib/src/SwitchStateBaseHostif.cpp @@ -657,7 +657,6 @@ sai_status_t SwitchStateBase::vs_create_hostif_tap_interface( } vs_set_dev_mtu(name.c_str(), mtu); - vs_set_dev_mtu(vname.c_str(), mtu); if (!hostif_create_tap_veth_forwarding(name, tapfd, obj_id)) {