Add udev ID_NET_NAME_* property restoration for VPP interfaces#868
Merged
Add udev ID_NET_NAME_* property restoration for VPP interfaces#868
Conversation
sknat
reviewed
Jan 29, 2026
sknat
reviewed
Jan 29, 2026
Collaborator
sknat
left a comment
There was a problem hiding this comment.
Great ! Many thanks.
Just two minor comments on the golang agent implementation
06109fe to
046b57e
Compare
sknat
reviewed
Jan 30, 2026
Capture ID_NET_NAME_* properties before VPP driver unbind and restore them
via udev rules after VPP creates host-facing tap/tun interface. This is
needed for IAID generation by DHCPv6 client in systemd-networkd to be
consistent across VPP lifecycle on the node.
Key changes:
- Repurpose BEFORE_IF_READ hook to capture udev properties before driver unbind
- Move SetInterfaceNames() before HookBeforeIfRead so interface names are available
- Store ID_NET_NAME_* values and MAC address while interface still has original driver
- Create udev rules for the interface to restore ID_NET_NAME_* values after VPP runs
- Cleanup udev rules on VPP shutdown
- BEFORE_IF_READ → capture, VPP_RUNNING → create, VPP_DONE_OK/ERRORED → cleanup
- Add EnableUdevNetNameRules config knob in CalicoVppDebugConfigType (default: true)
- Allows disabling udev net name rules generation (if needed). When disabled, skips
captureHostUdevProps(), createUdevNetNameRules() and removeUdevNetNameRules()
- Support both native Go hooks (multi-interface) and shell fallback (single-interface)
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
046b57e to
b218753
Compare
sknat
approved these changes
Feb 4, 2026
Collaborator
sknat
left a comment
There was a problem hiding this comment.
thank for the changes,
lgtm
This file contains hidden or 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
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.
Capture
ID_NET_NAME_*properties before VPP driver unbind and restore them viaudev rulesafter VPP creates host-facing tap/tun interface. This is needed for IAID generation by DHCPv6 client insystemd-networkdto be consistent across VPP lifecycle on the node.Key changes:
BEFORE_IF_READhook to capture udev properties before driver unbindSetInterfaceNames()beforeHookBeforeIfReadso interface names are availableudev rulesfor the interface to restoreID_NET_NAME_*values after VPP runs.udev ruleson VPP shutdown.BEFORE_IF_READ→ capture,VPP_RUNNING→ create,VPP_DONE_OK/ERRORED→ cleanup.enableUdevNetNameRulesconfig knob inCalicoVppDebugConfigType(default: true)captureHostUdevProps(),createUdevNetNameRules()andremoveUdevNetNameRules()