diff --git a/basic03-map-counter/README.org b/basic03-map-counter/README.org index e409f42e..bcd85cdb 100644 --- a/basic03-map-counter/README.org +++ b/basic03-map-counter/README.org @@ -208,7 +208,7 @@ the switch-case statement in function =map_collect()=: void map_get_value_percpu_array(int fd, __u32 key, struct datarec *value) { /* For percpu maps, user space gets a value per possible CPU */ - unsigned int nr_cpus = bpf_num_possible_cpus(); + unsigned int nr_cpus = libbpf_num_possible_cpus(); struct datarec values[nr_cpus]; __u64 sum_bytes = 0; __u64 sum_pkts = 0; diff --git a/basic03-map-counter/xdp_load_and_stats.c b/basic03-map-counter/xdp_load_and_stats.c index bc7ab181..2f3a2901 100644 --- a/basic03-map-counter/xdp_load_and_stats.c +++ b/basic03-map-counter/xdp_load_and_stats.c @@ -153,7 +153,7 @@ void map_get_value_array(int fd, __u32 key, struct datarec *value) void map_get_value_percpu_array(int fd, __u32 key, struct datarec *value) { /* For percpu maps, userspace gets a value per possible CPU */ - // unsigned int nr_cpus = bpf_num_possible_cpus(); + // unsigned int nr_cpus = libbpf_num_possible_cpus(); // struct datarec values[nr_cpus]; fprintf(stderr, "ERR: %s() not impl. see assignment#3", __func__);