DouglasGray / xsk-rs

A Rust interface for Linux AF_XDP sockets
MIT License
68 stars 16 forks source link

Try out a new interface for Umem and Frames #8

Closed tdittr closed 2 years ago

tdittr commented 3 years ago

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.

tdittr commented 3 years ago

MmapArea is sharedly owned by:

Umem is sharedly owned by:

a Socket is sharedly owned by:

This should make sure that there are no dangling Frames or *Queues.

DouglasGray commented 2 years ago

Closing this re https://github.com/DouglasGray/xsk-rs/issues/7#issuecomment-1030942194. I appreciate the PR nonetheless!