Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shayjr122 opened this issue Aug 11, 2023 · 1 comment
Open

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

shayjr122 opened this issue Aug 11, 2023 · 1 comment

Comments

@shayjr122
Copy link

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

@krisztianfekete
Copy link
Contributor

Hi, thanks for the report!
Is it possible that you are using release v0.0.14 and the latest examples from the main branch? If yes, this might be because #103 was merged recently, and we haven't released a new CLI yet.

I think if you build the project, or use the previous version of the examples (before the PR above) you should succeed.

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

No branches or pull requests

2 participants