Closed tdittr closed 2 years ago
MmapArea
is sharedly owned by:
Frame
sUmem
that created the areaUmem
is sharedly owned by:
Socket
s that were created with ita Socket
is sharedly owned by:
TxQueue
RxQueue
This should make sure that there are no dangling Frame
s or *Queue
s.
Closing this re https://github.com/DouglasGray/xsk-rs/issues/7#issuecomment-1030942194. I appreciate the PR nonetheless!
This should make it easier to handle Frames living in Umem similar to a Box<[u8]>. Frames now own the MmapArea in which they live via a shared Arc.
This is not yet finished as all the tests and dev1_to_dev2 examples still need to be converted to the new interface. But it should give an a idea of how a new interface could look like.