Skip to content

Conversation

pippolo84
Copy link
Member

@pippolo84 pippolo84 commented Mar 28, 2025

Besides the pod IPs, the ipcache BPF map now stores the pod CIDRs too.
Therefore, cilium-dbg bpf ipcache get <addr> may match such a pod CIDR
entry even if the pod IP is not present in the map.

The match subcommand works similar to the get one, but allows to
lookup a key using an exact match, either an IP or a CIDR. Thus, given an
IP, With match it is possible to differentiate the cases when the
exact IP or a CIDR containing the IP are in the ipcache.

Add `cilium-dbg bpf ipcache match` command to lookup ipcache entries using an exact match

Related: #38483 and #38566
Blocked by: #38483

@pippolo84 pippolo84 added release-note/minor This PR changes functionality that users may find relevant to operating Cilium. area/cli Impacts the command line interface of any command in the repository. dont-merge/blocked Another PR must be merged before this one. labels Mar 28, 2025
@pippolo84
Copy link
Member Author

/test

@pippolo84 pippolo84 removed the dont-merge/blocked Another PR must be merged before this one. label Mar 31, 2025
Besides the pod IPs, the ipcache BPF map now stores the pod CIDRs too.
Therefore, `cilium-dbg bpf ipcache get <addr>` may match such a pod CIDR
entry even if the pod IP is not present in the map.

The `match` subcommand works similar to the `get` one, but allows to
lookup a key using an exact match, either an IP or a CIDR. Thus, given
an IP, With `match` it is possible to differentiate the cases when the
exact IP or a CIDR containing the IP are in the ipcache.

Signed-off-by: Fabio Falzoi <fabio.falzoi@isovalent.com>
@pippolo84 pippolo84 force-pushed the pr/pippolo84/cilium-dbg-bpf-ipcache-match branch from 60adf94 to 99d238a Compare March 31, 2025 13:39
@pippolo84 pippolo84 marked this pull request as ready for review March 31, 2025 13:42
@pippolo84 pippolo84 requested a review from a team as a code owner March 31, 2025 13:42
@pippolo84 pippolo84 requested a review from derailed March 31, 2025 13:42
Copy link
Contributor

@derailed derailed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pippolo84 Nice!

@pippolo84
Copy link
Member Author

/test

@pippolo84
Copy link
Member Author

@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 Apr 1, 2025
@tklauser tklauser added this pull request to the merge queue Apr 1, 2025
Merged via the queue into cilium:main with commit 4a131f2 Apr 1, 2025
71 checks passed
@pippolo84 pippolo84 added the affects/v1.17 This issue affects v1.17 branch label Apr 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects/v1.17 This issue affects v1.17 branch area/cli Impacts the command line interface of any command in the repository. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/minor This PR changes functionality that users may find relevant to operating Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants