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

Backwards compatibility and packet drop counters #647

Open
wants to merge 1 commit into
base: hwp_encoder_packet_count
Choose a base branch
from

Conversation

jlashner
Copy link
Collaborator

@jlashner jlashner commented Mar 21, 2024

This PR is built on top of @ykyohei's branch to add packet drop book-keeping to the HWP encoder agent. The purpose of this is to add encoder packet versioning to remove tight coupling requirements between socs and sobonelib. Additionally, some changes were made to the way dropped packets were counted in order to get it to work on my test setup.

These changes correspond to this commit in the sobonelib branch: simonsobs/sobonelib@aeb7e85

Description

This PR does makes the following changes:

  • change parse_counter_info so that it takes a packet version, so it can still parse older versions of encoder packets
  • Change the object in the counter_queue from an unnamed tuple of values to the EncoderPacket dataclass. This allows us to be more flexible in what data is parsed from the incoming packet, and makes it so code does not rely on hardcoded tuple indexes.
  • Adds version info, and sample count to encoder data packets. Removes hardcoded counter lengths and packet sizes.
  • In addition to publishing raw counters, this tracks the number of dropped edges, encoder packets, and encoder buffer resets (from the beaglebone PRU) so we can more easily track in grafana when there are data drops, and where they are occurring. This is required because computing diffs to find dropped samples in grafana can be finicky

Motivation and Context

This was required for getting packet drop testing working on my local beaglebone setup. Backwards compatibility stuff is so that we don't accidentally break other HWP systems on socs update.

How Has This Been Tested?

This has been tested on my local beaglebone with a fixed "HWP frequency"

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

Successfully merging this pull request may close these issues.

2 participants