Repository navigation
[terway] Fix eRDMA link matching without mutating the ENI MAC - #1081
Merged
l1b0k merged 1 commit intoNov 20, 2026
Merged
Conversation
Copy the caller-owned hardware address before toggling the GUID bit so candidate matching is independent of list position and repeated calls. Add mocked coverage for candidate order, unchanged input and error paths. Refs AliyunContainerService#1080
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1081 +/- ##
==========================================
+ Coverage 81.90% 81.94% +0.04%
==========================================
Files 126 126
Lines 17068 17068
==========================================
+ Hits 13979 13987 +8
+ Misses 2076 2070 -6
+ Partials 1013 1011 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
l1b0k
approved these changes
Nov 20, 2026
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.
GetERdmaFromLink aliases the caller's HardwareAddr and toggles its first byte for every RDMA candidate. A valid match in the second (or another even) position is missed, and successful odd-position matches mutate the input, making repeated calls unreliable.
Copy the MAC before applying the GUID bit conversion. Add nine mocked regression cases for matching positions 1–4, repeated calls on the same link, MAC preservation on success and failure, empty/no-match lists, invalid GUIDs after a mismatch, and RDMA enumeration errors.
Addresses the matcher failure reported in #1080. Local-IPAM allocation eligibility and ERDMA RPC policy remain separate issues.
Validation
Linux / Go 1.26.2:
go test -gcflags=all=-l -race ./plugin/driver/utils -run '^TestGetERdmaFromLink_Matching$' -count=10passes.privilegedbuild tag.go test -gcflags=all=-l -race ./plugin/driver/utils -count=1passes without the privileged build tag.make vetpasses;make lintreports 0 issues.git diff --checkpasses.make test-quickwas attempted but does not pass in this environment: Unix socket/netlink operations returnoperation not permitted, and envtest control-plane startup fails.