Skip to content

Commit f4d9398

Browse files
authored
[vs] Set mto only on tap device (#592)
1 parent 0ad13f5 commit f4d9398

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

vslib/src/SwitchStateBase.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,7 @@ sai_status_t SwitchStateBase::setPort(
403403
{
404404
SWSS_LOG_INFO("setting new MTU: %d on %s", mtu, name.c_str());
405405

406-
std::string vname = vs_get_veth_name(name, portId);
407-
408-
if (vs_set_dev_mtu(name.c_str(), mtu) < 0 || vs_set_dev_mtu(vname.c_str(), mtu) < 0)
406+
if (vs_set_dev_mtu(name.c_str(), mtu) < 0)
409407
{
410408
SWSS_LOG_ERROR("failed to set MTU on portId %s",
411409
sai_serialize_object_id(portId).c_str());

vslib/src/SwitchStateBaseHostif.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,6 @@ sai_status_t SwitchStateBase::vs_create_hostif_tap_interface(
657657
}
658658

659659
vs_set_dev_mtu(name.c_str(), mtu);
660-
vs_set_dev_mtu(vname.c_str(), mtu);
661660

662661
if (!hostif_create_tap_veth_forwarding(name, tapfd, obj_id))
663662
{

0 commit comments

Comments
 (0)