MR_GGET(9E)                  Driver Entry Points                 MR_GGET(9E)
NAME
     mr_gget - fill MAC group information
SYNOPSIS
     #include <sys/mac_provider.h>     void     prefix_fill_group_info(
void *driver, 
mac_ring_type_t rtype,         
const int group_index, 
mac_group_info_t *infop,         
mac_group_handle_t gh);
INTERFACE LEVEL
     Uncommitted - This interface is still evolving.  API and ABI stability
     is not guaranteed.
PARAMETERS
     driver        A pointer to the driver's private data that was passed in
                   via the 
m_pdata member of the 
mac_register(9S) structure
                   to the 
mac_register(9F) function.     
rtype         A value indicating the type of ring that makes up the
                   groups.  Valid values include:
                   MAC_RING_TYPE_RX
                                 The group is intended for use with receive
                                 rings.
                   MAC_RING_TYPE_TX
                                 The group is intended for use with transmit
                                 rings.     
group_index   An integer value that uniquely identifying the group.
                   Groups are numbered starting from zero.     
infop         A pointer to an instance of a 
mac_group_info(9S)                   structure.     
gh            An opaque pointer to a group handle that can be used to
                   identify this group.
DESCRIPTION
     The 
mr_gget() entry point provides a means for the device driver to
     fill in information about a group.  The driver returns information
     about the group to the MAC framework via the 
infop argument.  For the
     list of fields and an explanation of how to fill them in, please see     
mac_group_info(9S).
     The 
rtype argument describes whether this is a group of receive rings
     or a group of transmit rings.  This is identified by the value in 
rtype     which will be MAC_RING_TYPE_RX for a receive group and MAC_RING_TYPE_TX
     for a transmit group.  It is recommended that a driver doule check that
     the 
rtype matches what it expects if it uses separate entry points for
     receive and transmit groups.  The group information that is filled in
     varies between transmit and receive groups.  If separate entry points
     were not specified in the 
mac_capab_rings(9E) structure, then the
     driver must ensure that it checks this value and acts appropriately.
     The 
group_index argument is used to uniquely identify a group.  Groups
     are numbered starting at zero and end at one less then the number of
     groups specified in 
mr_gnum member of the 
mac_capbab_rings_t structure
     which is described in 
mac_capab_rings(9E).  Group IDs can be
     represented as the mathematical range [0, mr_gnum).
     After filling in the group information in 
infop, the driver should make
     sure to store the group handle 
gh for future use, mapping it to the
     index 
group_index.
CONTEXT
     The 
mr_gget() entry point will be called in response to a driver
     calling the 
mac_register(9F) function and the driver has acknowledged
     that it supports the MAC_CAPAB_RINGS capability.
SEE ALSO
     mac(9E), 
mac_capab_rings(9E), 
mac_register(9F), 
mac_group_info(9S),     
mac_register(9S)illumos                         July 2, 2022                         illumos