MAC_INTR(9S)             Data Structures for Drivers            MAC_INTR(9S)
NAME
     mac_intr, 
mac_intr_t - MAC interrupt information
SYNOPSIS
     #include <sys/mac_provider.h>INTERFACE STABILITY
     Uncommitted - This interface is still evolving.  API and ABI stability
     is not guaranteed.
DESCRIPTION
     The 
mac_intr_t structure is used by the MAC framework as part of the
     MAC_CAPAB_RINGS capability.  For more background on the MAC framework,
     please see 
mac(9E) and for more information on the MAC_CAPAB_RINGS
     capability, 
mac_capab_rings(9E).
     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 underlying MSI-X, MSI, INTx, or other interrupt type, the     
mac_intr_t still represents and is scoped to a single ring itself.
TYPES
     Tye following types define the function pointers in use in the     
mac_intr_t structure.
           typedef int (*mac_intr_enable_t)(mac_intr_handle_t);
           typedef int (*mac_intr_disable_t)(mac_intr_handle_t);
STRUCTURE MEMBERS
           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.
SEE ALSO
     mac(9E), 
mac_capab_rings(9E), 
mi_disable(9E), 
mi_enable(9E),     
ddi_intr_alloc(9F), 
mac_ring_info(9S)illumos                         July 17, 2023                        illumos