Skip to content

Issue with tcpconnect.c Example: Error Creating Ring Buffer Map #109

Open
@shayjr122

Description

Hello,

I am attempting to use the tcpconnect.c example from the repository and I'm encountering an issue with the creation of the counter_events_ring ring buffer map. The specific error message I'm encountering is as follows:

Error: map counter_events_ring: map create: invalid argument
2023/08/11 14:47:03 exiting: map counter_events_ring: map create: invalid argument

I have reviewed my code and the map definition, and I believe I have followed the instructions correctly. Here is the relevant map definition from my code:

struct {
	__uint(max_entries, 1 << 24);
	__uint(type, BPF_MAP_TYPE_RINGBUF);
	__type(value, struct dimensions_t);
} counter_events_ring SEC(".maps");

Could you please provide some guidance on what might be causing this "invalid argument" error during map creation? Are there any specific considerations I should be aware of when using ring buffer map?

Thank you for your assistance.

Shay Reuven

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