[portmgrd]: Add portmgrd to monitor port MTU configurations#545
[portmgrd]: Add portmgrd to monitor port MTU configurations#545stcheng merged 1 commit intosonic-net:masterfrom
Conversation
jipanyang
left a comment
There was a problem hiding this comment.
The existing mtu set processing in portsyncd.cpp should be updated to avoid conflict. https://github.com/Azure/sonic-swss/blob/762e7da80142358af0d348dea1143f38aa60a992/portsyncd/portsyncd.cpp#L303
|
@jipanyang thanks for pointing this out. I have removed this part of the code. In the next stage, all the configuration part of the code will be moved to portmgrd and then we could finally remove the dependency of libnl. |
|
If mtu gets changed on an existing router interface, should the new mtu take effect? For now, SAI_ROUTER_INTERFACE_ATTR_MTU seems to get set only with sai_router_intfs_api->create_router_interface(). For system init, any mechanism to ensure that the mtu is set before IntfsOrch::addRouterIntfs()? In case mtu change won't be applied on an existing route interface. |
|
@jipanyang Yes. I'll update this pull request to handle this case. |
jipanyang
left a comment
There was a problem hiding this comment.
Since PR #574 (comment) has been opened to address the router intf mtu issue, the changes here look good me. #574 (comment) should be merged before this one.
In order to get rid of /etc/network/interfaces file and move all the configurations to the configuration database, MTU configurations are required to be put into the database and monitored by a specific daemon. This daemon portmgrd is to achieve this goal. Currently, this daemon will only listen to the port MTU configurations if existed in the database and then call the 'ip link' command to configure the kernel netdevs. It will also capture the admin status set in the configuration database and call the 'ip link' command to configure the kernel netdevs. The default MTUs, however, are set as the default value in the orchagent port.h file. The MTU value in the netlink message is anyway ignored. In the next stage, the change of the MTU will be supported so that the kernel host interface MTU will be reflected to the SAI port/router interface MTU. Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
|
update this pull request to support admin status configuration as well. |
* Move api mutex to global class and add sairedis namespace * Move apiInitialized flag to Globals namespace * Fix spelling
…t#545) In order to get rid of /etc/network/interfaces file and move all the configurations to the configuration database, MTU configurations are required to be put into the database and monitored by a specific daemon. This daemon portmgrd is to achieve this goal. Currently, this daemon will only listen to the port MTU configurations if existed in the database and then call the 'ip link' command to configure the kernel netdevs. It will also capture the admin status set in the configuration database and call the 'ip link' command to configure the kernel netdevs. The default MTUs, however, are set as the default value in the orchagent port.h file. The MTU value in the netlink message is anyway ignored. In the next stage, the change of the MTU will be supported so that the kernel host interface MTU will be reflected to the SAI port/router interface MTU. Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
This PR adds additional Status Codes necessary for the updated API coming in the follow on PR.
In order to get rid of /etc/network/interfaces file and move
all the configurations to the configuration database, MTU configurations
are required to be put into the database and monitored by a specific
daemon. This daemon is right now to achieve this goal.
Currently, this daemon will only listen to the port MTU configurations
if existed in the database and then call the 'ip link' command to
configure the kernel netdevs. Then, portsyncd will catch the messages
via libnl and send the message to orchagent.
Signed-off-by: Shu0T1an ChenG shuche@microsoft.com