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

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

@cericwu1

Description

@cericwu1

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions