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

bpf: skip non existing key in generic_map_lookup_batch #4949

Open
wants to merge 1 commit into
base: bpf_base
Choose a base branch
from

Conversation

kernel-patches-daemon-bpf-rc[bot]
Copy link

Pull request for series with
subject: bpf: skip non existing key in generic_map_lookup_batch
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=930911

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: fc610c8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=930911
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: fc610c8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=930911
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: fc610c8
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=930911
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 517e8a7
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=930911
version: 1

The generic_map_lookup_batch currently returns EINTR if it fails with
ENOENT and retries several times on bpf_map_copy_value. The next batch
would start from the same location, presuming it's a transient issue.
This is incorrect if a map can actually have "holes", i.e.
"get_next_key" can return a key that does not point to a valid value. At
least the array of maps type may contain such holes legitly. Right now
these holes show up, generic batch lookup cannot proceed any more. It
will always fail with EINTR errors.

Rather, do not retry in generic_map_lookup_batch. If it finds a non
existing element, skip to the next key.

Fixes: cb4d03a ("bpf: Add generic support for lookup batch op")
Closes: https://lore.kernel.org/bpf/[email protected]/
Signed-off-by: Yan Zhai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants