-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
zebra: Add link_nsid to zebra interface #12959
Conversation
Continuous Integration Result: SUCCESSFULContinuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10053/ This is a comment from an automated CI system. |
After spending a few minutes with this patch, I am having a hard time understanding what the point of this is and what it is really accomplishing. Can you expand on the commit comment to help me understand? |
Create VRF and interfaces: ip netns add vrf1 ip link add veth1 index 100 type veth ip link add link veth1 veth1.200 type vlan id 200 ip link set veth1.200 netns vrf1 ip -n vrf1 link add veth2 index 100 type veth After reloading zebra, "show interface veth1.200" shows wrong parent interface: test# show interface veth1.200 Interface veth1.200 is down ... Parent interface: veth2 This is because veth1.200 and veth1 are in different netns, and veth2 happens to have the same ifindex as veth1, in the same netns of veth1.200. When looking for parent, link-ifindex 100 should be looked up within link-netns, rather than that of the child interface. Add link_nsid to zebra interface, so that the <link_nsid, link_ifindex> pair can uniquely identify the link interface. Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
eccbe41
to
af19624
Compare
@donaldsharp updated. Please see the commit. |
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-10087/ This is a comment from an automated CI system. |
@Mergifyio backport stable/8.4 stable/8.5 |
✅ Backports have been created
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks logic to me.
I would just to be sure that we really want to offer this new API: if_lookup_by_index_per_nsid().
today, there is one single call.
I would not want to generalize this API.
zebra: Add link_nsid to zebra interface (backport #12959)
Add link_nsid to zebra interface, so that the <link_nsid, link_ifindex> pair can uniquely identify the link interface. And VLAN interface is not necessary in the same netns of its parent.