-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[subintf] Fix kernel mtu inheritance from parent #1874
Open
wendani
wants to merge
12
commits into
sonic-net:master
Choose a base branch
from
wendani:sub_intf_mtu_kernel
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
up Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
Signed-off-by: Wenda Ni <wonda.ni@gmail.com>
wendani
changed the title
[subinf] Fix kernel mtu inheritance from parent
[subintf] Fix kernel mtu inheritance from parent
Aug 13, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Why I did it
Sub port interface inherits mtu from parent port. This should hold for both kernel and SAI/ASIC.
At kernel side, decreasing parent port mtu, sub port interface mtu will decrease accordingly. However, this is not true in the reverse direction: Increasing parent port mtu, sub port interface mtu will not increase automatically. Treatment from user software, specifically,
intfmgrd
, is therefore needed to fill the gap for mtu inheritance from parent port.The SAI/ASIC side mtu of sub port interface is not affected by this PR.
What I did
Have IntfMgr subscribe to CONFIG PORT and LAG table to listen to parent port mtu change, and set the corresponding mtu value to sub port interface in kernel.
Because the operation of parent port mtu change is issued from
portmgrd
orteammgrd
, which is a separate process fromintfmgrd
, sub port interface mtu increase may occur before its parent port mtu increase is processed by the corresponding process. In such a case,ip link
command will fail (as sub port interface mtu cannot be larger than that of its parent), and we leveragedoTask
retry logic to ensure that the sub port interface mtu increase will succeed ultimately.How I verified it
vs test
Parent port mtu change: 9100 -> 8888 -> 6666 -> 7777 -> 9100. For every mtu change, check sub port interface mtu at both kernel and SAI/ASIC.
Details if related
Contains #1873, which lays the common foundation.
vs test failure message without the fix in this PR. Failure on line 1229: