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

[FEATURE] Add user friendly API for register events. #348

Open
yunwei37 opened this issue Sep 13, 2024 · 4 comments
Open

[FEATURE] Add user friendly API for register events. #348

yunwei37 opened this issue Sep 13, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@yunwei37
Copy link
Member

Is your feature request related to a problem? Please describe.

There should be a clearly API to allow user register events and init runtime.

Describe the solution you'd like

for example:

// Init runtime
int bpftime_init_runtime(runtime_config* config);
// Register events
int bpftime_register_attach_events(int event_id, event_config* config);
// Handle events
int handle_events(int event_id, struct ecent_ctx* ctx);

We need to discuss how to do that.

Describe alternatives you've considered

Provide usage examples

Additional context

@yunwei37 yunwei37 added the enhancement New feature or request label Sep 13, 2024
@yunwei37 yunwei37 changed the title [FEATURE] Add user friendly API for register events and init runtime. [FEATURE] Add user friendly API for register events. Sep 13, 2024
@Officeyutong
Copy link
Contributor

What does event here mean? Attach type?

@yunwei37
Copy link
Member Author

for example, nginx incoming request is an event, uprobe is an event, syscall tracepoints is an event, dpdk incoming request can be an event

Events can be connected to bpf_prog using bpf_link.

@yunwei37
Copy link
Member Author

Does that make sense?

@Officeyutong
Copy link
Contributor

Officeyutong commented Sep 15, 2024

for example, nginx incoming request is an event, uprobe is an event, syscall tracepoints is an event, dpdk incoming request can be an event

Events can be connected to bpf_prog using bpf_link.

These were called attach type previously, but we need a full set of callbacks to define an attach type, such ad instantiation at

if (std::holds_alternative<bpf_prog_handler>(handler)) {

We can have a discussion when you have some time

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

No branches or pull requests

2 participants