Skip to content

datapath/tables: use netip types where possible #39363

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

Merged
merged 4 commits into from
May 9, 2025

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented May 6, 2025

See commits for details.

For #24246

@tklauser tklauser requested review from a team as code owners May 6, 2025 11:56
@tklauser tklauser added the release-note/misc This PR makes changes that have no direct user impact. label May 6, 2025
@tklauser tklauser requested review from rgo3 and YutaroHayakawa May 6, 2025 11:56
@tklauser
Copy link
Member Author

tklauser commented May 6, 2025

/test

@tklauser tklauser enabled auto-merge May 6, 2025 11:56
@tklauser tklauser force-pushed the pr/tklauser/datapath-tables-netip branch from 76058b8 to 68e693f Compare May 6, 2025 12:05
@tklauser
Copy link
Member Author

tklauser commented May 6, 2025

/test

tklauser added 4 commits May 6, 2025 14:26
Check whether the address is a link-local unicase address on the
netip.Addr directly instead of converting it to a net.IP just for the
check.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
This avoids having to convert each address in (*Device).Addrs to net.IP
for comparison. Instead, the passed node IP needs to be converted to
netip.Addr once (at least until node/types is converted to netip types
as well).

Signed-off-by: Tobias Klauser <tobias@cilium.io>
This is unused and netip.Addr types should be preferred.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
Avoid having to convert to net.IP or string during tests. Consistently
use netip.Addr instead.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser force-pushed the pr/tklauser/datapath-tables-netip branch from 68e693f to 1273770 Compare May 6, 2025 12:27
@tklauser
Copy link
Member Author

tklauser commented May 6, 2025

/test

@tklauser tklauser added this pull request to the merge queue May 8, 2025
@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 8, 2025
Merged via the queue into main with commit 1921dc4 May 9, 2025
281 of 283 checks passed
@tklauser tklauser deleted the pr/tklauser/datapath-tables-netip branch May 9, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants