Overview - 0xffffffRabbit/NextBsd GitHub Wiki
IFLIB Overview
IFLIB simplifies the process of writing and debugging device drivers by creating common library functions and a tested framework for packet transmission, memory management, and interrupts. Developers no longer need to write a device driver entirely from scratch. They can utilize a common code base framework and customize only those sections that are unique to a particular driver. The major features of the iflib framework are:
- Process individual packets by providing queues for transmission, completion, and command completion (if required).
- Handles memory management by allocating, loading, and destroying bus dma.
- Manages mbufs transparently for all drivers
- Manages interrupts, by handling their allocation and assignment.
- Handles locking entirely for most drivers
The IFLIB framework consists of device dependent and device independent configuration functions. The device dependent functions are those functions written by the developer that are registered with iflib by the driver. These functions communicate the unique characteristics of a particular driver to the iflib framework. Device independent functions are routines called from within the iflib framework. Some iflib functions may be used directly by developers in lieu of writing their own routines.