Print this page
11490 SRS ring polling disabled for VLANs
11491 Want DLS bypass for VLAN traffic
11492 add VLVF bypass to ixgbe core
2869 duplicate packets with vnics over aggrs
11489 DLS stat delete and aggr kstat can deadlock
Portions contributed by: Theo Schlossnagle <jesus@omniti.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Dan McDonald <danmcd@joyent.com>
@@ -18,11 +18,11 @@
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2017, Joyent, Inc.
+ * Copyright (c) 2018, Joyent, Inc.
*/
#ifndef _SYS_MAC_IMPL_H
#define _SYS_MAC_IMPL_H
@@ -253,12 +253,12 @@
cv_signal(&(mr)->mr_cv); \
mutex_exit(&(mr)->mr_lock); \
}
/*
- * Per mac client flow information associated with a RX group.
- * The entire structure is SL protected.
+ * Used to attach MAC clients to an Rx group. The members are SL
+ * protected.
*/
typedef struct mac_grp_client {
struct mac_grp_client *mgc_next;
struct mac_client_impl_s *mgc_client;
} mac_grp_client_t;
@@ -268,19 +268,24 @@
#define MAC_GROUP_ONLY_CLIENT(g) \
((((g)->mrg_clients != NULL) && \
((g)->mrg_clients->mgc_next == NULL)) ? \
(g)->mrg_clients->mgc_client : NULL)
+#define MAC_GROUP_HW_VLAN(g) \
+ (((g) != NULL) && \
+ ((g)->mrg_info.mgi_addvlan != NULL) && \
+ ((g)->mrg_info.mgi_remvlan != NULL))
+
/*
* Common ring group data structure for ring control and management.
- * The entire structure is SL protected
+ * The entire structure is SL protected.
*/
struct mac_group_s {
int mrg_index; /* index in the list */
mac_ring_type_t mrg_type; /* ring type */
mac_group_state_t mrg_state; /* state of the group */
- mac_group_t *mrg_next; /* next ring in the chain */
+ mac_group_t *mrg_next; /* next group in the chain */
mac_handle_t mrg_mh; /* reference to MAC */
mac_ring_t *mrg_rings; /* grouped rings */
uint_t mrg_cur_count; /* actual size of group */
mac_grp_client_t *mrg_clients; /* clients list */
@@ -358,21 +363,27 @@
uint8_t mma_addr[MAXMACADDRLEN];
int mma_ref;
} mac_mcast_addrs_t;
typedef enum {
- MAC_ADDRESS_TYPE_UNICAST_CLASSIFIED = 1, /* hardware steering */
+ MAC_ADDRESS_TYPE_UNICAST_CLASSIFIED = 1, /* HW classification */
MAC_ADDRESS_TYPE_UNICAST_PROMISC /* promiscuous mode */
} mac_address_type_t;
+typedef struct mac_vlan_s {
+ struct mac_vlan_s *mv_next;
+ uint16_t mv_vid;
+} mac_vlan_t;
+
typedef struct mac_address_s {
mac_address_type_t ma_type; /* address type */
- int ma_nusers; /* number of users */
- /* of that address */
+ int ma_nusers; /* num users of addr */
struct mac_address_s *ma_next; /* next address */
uint8_t ma_addr[MAXMACADDRLEN]; /* address value */
size_t ma_len; /* address length */
+ mac_vlan_t *ma_vlans; /* VLANs on this addr */
+ boolean_t ma_untagged; /* accept untagged? */
mac_group_t *ma_group; /* asscociated group */
mac_impl_t *ma_mip; /* MAC handle */
} mac_address_t;
extern krwlock_t i_mac_impl_lock;
@@ -485,11 +496,11 @@
*/
mac_led_mode_t mi_led_modes;
mac_capab_led_t mi_led;
/*
- * MAC address list. SL protected.
+ * MAC address and VLAN lists. SL protected.
*/
mac_address_t *mi_addresses;
/*
* This MAC's table of sub-flows
@@ -757,10 +768,12 @@
/*
* Grouping functions are used internally by MAC layer.
*/
extern int mac_group_addmac(mac_group_t *, const uint8_t *);
extern int mac_group_remmac(mac_group_t *, const uint8_t *);
+extern int mac_group_addvlan(mac_group_t *, uint16_t);
+extern int mac_group_remvlan(mac_group_t *, uint16_t);
extern int mac_rx_group_add_flow(mac_client_impl_t *, flow_entry_t *,
mac_group_t *);
extern mblk_t *mac_hwring_tx(mac_ring_handle_t, mblk_t *);
extern mblk_t *mac_bridge_tx(mac_impl_t *, mac_ring_handle_t, mblk_t *);
extern mac_group_t *mac_reserve_rx_group(mac_client_impl_t *, uint8_t *,
@@ -777,10 +790,11 @@
/*
* MAC address functions are used internally by MAC layer.
*/
extern mac_address_t *mac_find_macaddr(mac_impl_t *, uint8_t *);
+extern mac_address_t *mac_find_macaddr_vlan(mac_impl_t *, uint8_t *, uint16_t);
extern boolean_t mac_check_macaddr_shared(mac_address_t *);
extern int mac_update_macaddr(mac_address_t *, uint8_t *);
extern void mac_freshen_macaddr(mac_address_t *, uint8_t *);
extern void mac_retrieve_macaddr(mac_address_t *, uint8_t *);
extern void mac_init_macaddr(mac_impl_t *);
@@ -861,12 +875,13 @@
extern int mac_start_group(mac_group_t *);
extern void mac_stop_group(mac_group_t *);
extern int mac_start_ring(mac_ring_t *);
extern void mac_stop_ring(mac_ring_t *);
-extern int mac_add_macaddr(mac_impl_t *, mac_group_t *, uint8_t *, boolean_t);
-extern int mac_remove_macaddr(mac_address_t *);
+extern int mac_add_macaddr_vlan(mac_impl_t *, mac_group_t *, uint8_t *,
+ uint16_t, boolean_t);
+extern int mac_remove_macaddr_vlan(mac_address_t *, uint16_t);
extern void mac_set_group_state(mac_group_t *, mac_group_state_t);
extern void mac_group_add_client(mac_group_t *, mac_client_impl_t *);
extern void mac_group_remove_client(mac_group_t *, mac_client_impl_t *);