aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2023-01-05 22:33:54 -0800
committerDavid S. Miller <[email protected]>2023-01-06 12:56:18 +0000
commitd772781964415c63759572b917e21c4f7ec08d9f (patch)
tree966ea332b2ac0d739f69b466d1e3f6e77ec8788b /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parent6b754d7bd007c5f68fbb2d9abd5c00d253b033d0 (diff)
devlink: bump the instance index directly when iterating
xa_find_after() is designed to handle multi-index entries correctly. If a xarray has two entries one which spans indexes 0-3 and one at index 4 xa_find_after(0) will return the entry at index 4. Having to juggle the two callbacks, however, is unnecessary in case of the devlink xarray, as there is 1:1 relationship with indexes. Always use xa_find() and increment the index manually. Signed-off-by: Jakub Kicinski <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions