Skip to content
This repository has been archived by the owner on Aug 26, 2024. It is now read-only.

map xdp_stats_map: pin by name: missing MapOptions.PinPath #29

Open
cericwu1 opened this issue Feb 17, 2023 · 0 comments
Open

map xdp_stats_map: pin by name: missing MapOptions.PinPath #29

cericwu1 opened this issue Feb 17, 2023 · 0 comments

Comments

@cericwu1
Copy link

cericwu1 commented Feb 17, 2023

I define a map with its pinning field set to LIBBPF_PIN_BY_NAME as shown below:

struct {
        __uint(type, BPF_MAP_TYPE_PERCPU_ARRAY);
        __uint(max_entries, XDP_ACTION_MAX);
        __type(key, int);
        __type(value, struct datarec);
        __uint(pinning, LIBBPF_PIN_BY_NAME);
} xdp_stats_map SEC(".maps");

The code compiles and bpf2go generates the .o files successfully. However, when I load it and run it with the user program it gives error message error: failed to create xdp program: field XskSockProg: program xsk_sock_prog: map xdp_stats_map: pin by name: missing MapOptions.PinPath.

How can I provide the PinPath to load the code?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant