Skip to content

Commit

Permalink
[vs] Set mto only on tap device (#592)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcudnik authored Apr 7, 2020
1 parent 0ad13f5 commit f4d9398
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
4 changes: 1 addition & 3 deletions vslib/src/SwitchStateBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
1 change: 0 additions & 1 deletion vslib/src/SwitchStateBaseHostif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit f4d9398

Please sign in to comment.