Skip to content

feat: dynamic length event#654

Draft
Molter73 wants to merge 1 commit into
mainfrom
mauro/feat/dynamic-event
Draft

feat: dynamic length event#654
Molter73 wants to merge 1 commit into
mainfrom
mauro/feat/dynamic-event

Conversation

@Molter73
Copy link
Copy Markdown
Contributor

Description

Change from a fixed type for events from BPF to a variable length one. This is done by using a helper map in which we can write all the information for a given event, then submit it to the ringbuffer with the bpf_ringbuf_output helper.

On the userspace, we get a RingBufItem which can be treated as a slice of bytes we can split to retrieve fields one by one.

This change needs to be properly tested for performance, we should use a lot less space for each event in the ringbuffer but serializing and deserializing each event might require more CPU.

Supersedes #179

Checklist

  • Patch has a change log entry OR does not need one.
  • Investigated and inspected CI test results
  • Updated documentation accordingly

Automated testing

  • Added unit tests
  • Added integration tests
  • Added regression tests

If any of these don't apply, please comment below.

Testing Performed

TBD

Change from a fixed type for events from BPF to a variable length one.
This is done by using a helper map in which we can write all the
information for a given event, then submit it to the ringbuffer with the
bpf_ringbuf_output helper.

On the userspace, we get a RingBufItem which can be treated as a slice
of bytes we can split to retrieve fields one by one.

This change needs to be properly tested for performance, we should use a
lot less space for each event in the ringbuffer but serializing and
deserializing each event might require more CPU.

TODO: Document the format for the serialized event in the ringbuffer.
TODO: Add tests for the event::parser module.
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

Successfully merging this pull request may close these issues.

1 participant