|MAC_INTR(9S)||Data Structures for Drivers||MAC_INTR(9S)|
MAC_CAPAB_RINGScapability. For more background on the MAC framework, please see mac(9E) and for more information on the
The mac_intr_t structure is used to describe an interrupt and additional capabilities around it. The structure is usually used as part of another mac(9E) related structure such as the mri_intr member of the mac_ring_info(9S) structure. The MAC framework uses the functions described here to enable and disable interrupt generation for a specific ring, which is used as part of switching between polling and interrupt-driven receiving.
While the structure does embed a ddi_intr_handle_t that corresponds to the ring's unerlying MSI-X, MSI, INTx, or other interrupt type, the mac_intr_t still represents and is scoped to a single ring itself.
typedef int (*mac_intr_enable_t)(mac_intr_handle_t); typedef int (*mac_intr_disable_t)(mac_intr_handle_t);
mac_intr_handle_t mi_handle; mac_intr_enable_t mi_enable; mac_intr_disable_t mi_disable; ddi_intr_handle_t mi_ddi_handle;
The mi_handle member should be set to a driver-specific value that will be passed back to the driver in the various callback functions that are setin the structure and described below.
The mi_enable member is a required entry point for receive rings and optional for transmit rings. It should be set to a function which enables interrupts for the ring. For more information, see mi_enable(9E).
The mi_disable member is a required entry point for receive rings and an optional entry point for transmit rings. It should be set to a function which disables interrupts for the ring. For more information, see mi_disable(9E).
The mi_ddi_handle member should be set to the interrupt handle that corresponds to the ring. the interrupt handle will have come from ddi_intr_alloc(9F). This member should only be set if the interrupt is a MSI or MSI-X interrupt.
|July 2, 2022||OmniOS|