MAC_FILTER(9E) | Driver Entry Points | MAC_FILTER(9E) |
mac_filter
, mgi_addmac
,
mgi_remmac
, mgi_addvlan
,
mgi_remvlan
—
#include <sys/mac_provider.h>
int
prefix_ring_add_mac
(mac_group_driver_t
driver, const uint8_t *mac);
int
prefix_ring_rem_mac
(mac_group_driver_t
driver, const uint8_t *mac);
int
prefix_ring_add_vlan
(mac_group_driver_t
driver, uint16_t vlan);
int
prefix_ring_rem_vlan
(mac_group_driver_t
driver, uint16_t vlan);
ETHERADDRL
.mac_filter
() family of entry points are used to add
and remove various classes of filters from a device. For more information on
the filters, see the Filters section of
mac_capab_rings(9S) and the
discussion around setting these members in
mac_group_info(9S).
The driver argument indicates which group the request to add or remove a filter is being requested on.
The filter addition operations,
mgi_addmac
(), mgi_addvlan
(),
and mgi_addmvf
(), all instruct the system to add a
filter to the specified group. The filter should not target any specific
ring in the group. If multiple rings are present, then the driver should
ensure that the hardware balances incoming traffic amongst all of the rings
through a consistent hashing mechanism such as receive side scaling.
The mgi_addmac
() entry point instructs the
driver to add the MAC address specified in mac to the
filter list for the group. The MAC address should always be a unicast MAC
address; however, the driver is encouraged to verify that before adding
it.
The mgi_remmac
() should remove the MAC
address specified in mac from the filter list for the
group.
The mgi_addvlan
() entry point instructs
the driver to add the VLAN specified in vlan to the
filter list for the group. The mgi_remvlan
() entry
point instructs the driver to remove the VLAN specified in
vlan from the filter list for the group.
EEXIST
EINVAL
EIO
ENOENT
ENOTSUP
ENOSPC
July 2, 2022 | OmniOS |