Skip to content
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

[PoC] Restore vpp interfaces #542

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

glazychev-art
Copy link
Contributor

@glazychev-art glazychev-art commented Mar 30, 2022

Issue: #512
Tag format: {forwarder-name}_c_{connID}

We try to dump interfaces here to restore them in forwarder.

  • We can customize the chain element by adding or not the dump option
  • Each element of interest contains dump function which, by tag, determines whether this is "our" interface or not.
  • After the dump, a timer is started that will remove the interface if it is "forgotten" (no request with this connectionID)

Elements with a dump implementation here:
-tap
-af_packet
-memif
-vxlan
-L3xc

Additional info

veth pair (af_packet):
We set aliases for kernel veth-pair - https://github.com/networkservicemesh/sdk-vpp/blob/main/pkg/networkservice/mechanisms/kernel/kernelvethpair/common.go#L73.
As I understand, alias format must be the same as tag format. So, probably it's better to add a new chain element, that will add aliases for linux interfaces.
And the veth-pair dump must be through netlink (see kernelvethpair/common.go in this PR)

Open question

Perhaps the order of deletion is important to us. With this approach, we cannot guarantee this.
Probably we should omit deletion after the timeout and use only restore?
Deletion will be if the client calls Close

Signed-off-by: Artem Glazychev [email protected]

Signed-off-by: Artem Glazychev <[email protected]>
Signed-off-by: Artem Glazychev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant