mirror of
https://github.com/xdp-project/bpf-examples.git
synced 2024-05-06 15:54:53 +00:00
preserve-dscp: Adjust for newer libbpf API
‘bpf_map__next’ is deprecated: libbpf v0.7+: use bpf_object__next_map() instead Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
This commit is contained in:
1
Makefile
1
Makefile
@@ -17,6 +17,7 @@ SUBDIRS := encap-forward
|
||||
SUBDIRS += ktrace-CO-RE
|
||||
SUBDIRS += lsm-nobpf
|
||||
SUBDIRS += nat64-bpf
|
||||
SUBDIRS += preserve-dscp
|
||||
SUBDIRS += traffic-pacing-edt
|
||||
|
||||
.PHONY: check_submodule help clobber distclean clean $(SUBDIRS)
|
||||
|
@@ -84,7 +84,7 @@ int main(int argc, char *argv[])
|
||||
return err;
|
||||
}
|
||||
|
||||
while ((map = bpf_map__next(map, obj))) {
|
||||
while ((map = bpf_object__next_map(obj, map))) {
|
||||
if (strstr(bpf_map__name(map), ".rodata")) {
|
||||
int ip_only = (iftype == ARPHRD_NONE);
|
||||
bpf_map__set_initial_value(map, &ip_only, sizeof(ip_only));
|
||||
|
Reference in New Issue
Block a user