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

Unified packet capture interface, take 2 #166

Open
wants to merge 440 commits into
base: master
Choose a base branch
from
Open

Conversation

jaycedowell
Copy link
Collaborator

@jaycedowell jaycedowell commented Mar 22, 2022

This PR provides a unified packet capture interface that makes it easier to add new packet formats to Bifrost and to read packet formats from the network (unicast or multicast) or from disk. This also includes a generalization of the packet writer interface. This PR changes the Bifrost API in a couple of ways:

bifrost.udp_capture.UDPCapture is now bifrost.packet_capture.UDPCapture
there is a new PacketCaptureCallback class that wraps the callbacks
bifrost.udp_transmit is now bifrost.packet_writer

This should also address the segfault I was running into in #137.

jaycedowell and others added 30 commits June 29, 2021 12:53
Parroting JD:

The pragma pack compiler directive affects all structures following
the pragma. So, an innocent struct in a header file which wants
to be packed can mess up other code in fun ways, depending on orders of
header includes.
For some reason, IB Verbs configuration seems to be easily broken by
this kind of thing.

Use struct __attribute__((packed)) {...} instead
I'm not smart enough to make the python bindings get generated when
the header entries are wrapped in #if's
Blindly copied from the now-deprecated implementation in ib_verbs.cpp
TODO: Is there a more sensible (less-transposey)
data ordering. [Probably]
This is actually quite annoying. The call to blank a source
doesn't know about the details of the packet structure, and one can't
necessarily blank the right parts of the receive buffer when only given
nsrc, src, nchan, chan, since these values have been abused. E.g.
the output buffer is in Time x Chan x Antpol order, but the Chan
dimension can be a multiple of nchan, and nsrc != the number of Antpols in the system.

Hack the information out of the packet stream and then write a clurgy blanking
function.

Barely tested.
This reverts commit b107bfc.

Don't do this for now to make things faster
dentalfloss1 and others added 30 commits March 6, 2024 14:02
Packet formats from the LWA352 OVRO bifrost branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants