1 / 18

BPF meets UVM

BPF meets UVM. Michael Stolarchuk LISA 2001 Dec 6, 2001. Executive Summary. BPF can be improved UVM can help. Current BPF Model. Device Drivers. MBUF. BPF. BPF buffers. User Process. Device Drivers. Device Drivers. BPF Copies. copies. Device Drivers. MBUF. BPF. BPF buffers.

rliberty
Download Presentation

BPF meets UVM

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BPF meets UVM Michael Stolarchuk LISA 2001 Dec 6, 2001 BPF meets UVM

  2. Executive Summary • BPF can be improved • UVM can help BPF meets UVM

  3. Current BPF Model Device Drivers MBUF BPF BPF buffers User Process Device Drivers Device Drivers BPF meets UVM

  4. BPF Copies copies Device Drivers MBUF BPF BPF buffers User Process Device Drivers Device Drivers BPF meets UVM

  5. BPF Copies • Mbufs into BPF buffer • User process copies by issuing read BPF meets UVM

  6. 1 Copy Model • Mbuf to BPF buffer copy • BPF buffer mapped into user address space • Mapped region READ-ONLY • Allow REASONABLE sized buffers BPF meets UVM

  7. 1 Copy Breaks Semantics • Packet Data Region Can’t be written • Checksum generation • Encryption • Read no longer returns packets • Returns state of active buffers BPF meets UVM

  8. Multiple Buffers • New BPF allows multiple buffers • Of process configured sizes BPF meets UVM

  9. State Changes • Each buffer has an associated state • Null, Empty, Data, Data-Time-Out, Hold • Read returns when state transitions occur • Not all transitions awaken read • Ioctl’s control some of the read-wakeups • Ioctl’s manage user process release of buffers BPF meets UVM

  10. Example Bpf filling hold data mt hold 1 2 3 4 User process owns BPF meets UVM

  11. More work to set up • Describes number of buffers, size of buffers • Requests memory mapping • Allows bpf to be backwards compatable • Requests features supported • Sets features desired BPF meets UVM

  12. But WAIT… • Improve semantics • time-out • FIONREAD • packet loss • Select/Poll/Kqueue BPF meets UVM

  13. Time Out • Starts when data appears in a Buffer • Provides • Non-blocking to co-exist with timeout • Simple threading implementations work BPF meets UVM

  14. FIONREAD • Returns when data is available to read • Allows user process to check for data • Old version returns chars in buffer, but NOT whether a read would block BPF meets UVM

  15. Packet Loss • Inline description of packet loss • No longer need to `poll’ to see if data is lost • Locates missing data in the data stream • Allows damaged sessions to be marked BPF meets UVM

  16. Poll/Select/Kqueue • Implements Timeout BPF meets UVM

  17. Bpf “Messages” • Compatable format improvement • Allows abstract information to be encoded • Device checksums • Packet loss • Capture counts • Filter counts BPF meets UVM

  18. Next Improvements • Process `owned’ buffers • 0-Copy BPF BPF meets UVM

More Related