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>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/common/sys/mac_client_priv.h
+++ new/usr/src/uts/common/sys/mac_client_priv.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 - * Copyright 2013 Joyent, Inc. All rights reserved.
25 + * Copyright 2018 Joyent, Inc.
26 26 */
27 27
28 28 /*
29 29 * This file contains *private* MAC API definitions. This header file
30 30 * should only be included by kernel components which are part of the
31 31 * GLDv3 stack (dld, dls, aggr, softmac).
32 32 */
33 33
34 34 #ifndef _SYS_MAC_CLIENT_PRIV_H
35 35 #define _SYS_MAC_CLIENT_PRIV_H
36 36
37 37 #include <sys/mac.h>
38 38 #include <sys/mac_flow.h>
39 39
40 40 #ifdef __cplusplus
41 41 extern "C" {
42 42 #endif
43 43
44 44 #ifdef _KERNEL
45 45
46 46 #ifdef DEBUG
47 47 #define MAC_PERIM_HELD(mph) mac_perim_held(mph)
48 48 #else
49 49 #define MAC_PERIM_HELD(mph)
50 50 #endif
51 51
52 52 extern boolean_t mac_rx_bypass_set(mac_client_handle_t, mac_direct_rx_t,
53 53 void *);
54 54 extern void mac_rx_bypass_enable(mac_client_handle_t);
55 55 extern void mac_rx_bypass_disable(mac_client_handle_t);
56 56
57 57 extern const mac_info_t *mac_info(mac_handle_t);
58 58 extern boolean_t mac_info_get(const char *, mac_info_t *);
59 59 extern boolean_t mac_promisc_get(mac_handle_t);
60 60
61 61 extern int mac_start(mac_handle_t);
62 62 extern void mac_stop(mac_handle_t);
63 63
64 64 extern void mac_ioctl(mac_handle_t, queue_t *, mblk_t *);
65 65 extern link_state_t mac_link_get(mac_handle_t);
66 66 extern void mac_resource_set(mac_client_handle_t, mac_resource_add_t, void *);
67 67 extern dev_info_t *mac_devinfo_get(mac_handle_t);
68 68 extern void *mac_driver(mac_handle_t);
69 69 extern boolean_t mac_capab_get(mac_handle_t, mac_capab_t, void *);
70 70 extern boolean_t mac_sap_verify(mac_handle_t, uint32_t, uint32_t *);
71 71 extern mblk_t *mac_header(mac_handle_t, const uint8_t *, uint32_t, mblk_t *,
72 72 size_t);
73 73 extern int mac_header_info(mac_handle_t, mblk_t *, mac_header_info_t *);
74 74 extern int mac_vlan_header_info(mac_handle_t, mblk_t *, mac_header_info_t *);
75 75 extern mblk_t *mac_header_cook(mac_handle_t, mblk_t *);
76 76 extern mblk_t *mac_header_uncook(mac_handle_t, mblk_t *);
77 77
78 78 extern void mac_resource_set_common(mac_client_handle_t,
79 79 mac_resource_add_t, mac_resource_remove_t, mac_resource_quiesce_t,
80 80 mac_resource_restart_t, mac_resource_bind_t, void *);
81 81
82 82 extern void mac_perim_enter_by_mh(mac_handle_t, mac_perim_handle_t *);
83 83 extern int mac_perim_enter_by_macname(const char *, mac_perim_handle_t *);
84 84 extern int mac_perim_enter_by_linkid(datalink_id_t, mac_perim_handle_t *);
85 85 extern void mac_perim_exit(mac_perim_handle_t);
86 86 extern boolean_t mac_perim_held(mac_handle_t);
87 87
88 88 extern uint16_t mac_client_vid(mac_client_handle_t);
89 89 extern int mac_vnic_unicast_set(mac_client_handle_t, const uint8_t *);
90 90 extern boolean_t mac_client_is_vlan_vnic(mac_client_handle_t);
91 91
92 92 extern void mac_client_poll_enable(mac_client_handle_t);
93 93 extern void mac_client_poll_disable(mac_client_handle_t);
94 94
95 95 /*
96 96 * Flow-related APIs for MAC clients.
97 97 */
98 98
99 99 extern void mac_link_init_flows(mac_client_handle_t);
100 100 extern void mac_link_release_flows(mac_client_handle_t);
101 101 extern int mac_link_flow_add(datalink_id_t, char *, flow_desc_t *,
102 102 mac_resource_props_t *);
103 103 extern int mac_link_flow_remove(char *);
104 104 extern int mac_link_flow_modify(char *, mac_resource_props_t *);
105 105 extern boolean_t mac_link_has_flows(mac_client_handle_t);
106 106
107 107 typedef struct {
108 108 char fi_flow_name[MAXFLOWNAMELEN];
109 109 datalink_id_t fi_link_id;
110 110 flow_desc_t fi_flow_desc;
111 111 mac_resource_props_t fi_resource_props;
112 112 } mac_flowinfo_t;
113 113
114 114 extern int mac_link_flow_walk(datalink_id_t,
115 115 int (*)(mac_flowinfo_t *, void *), void *);
116 116 extern int mac_link_flow_info(char *, mac_flowinfo_t *);
117 117
118 118 extern void mac_rx_client_quiesce(mac_client_handle_t);
119 119 extern void mac_rx_client_restart(mac_client_handle_t);
120 120 extern void mac_tx_client_quiesce(mac_client_handle_t);
121 121 extern void mac_tx_client_condemn(mac_client_handle_t);
122 122 extern void mac_tx_client_restart(mac_client_handle_t);
123 123 extern void mac_srs_perm_quiesce(mac_client_handle_t, boolean_t);
124 124 extern int mac_hwrings_get(mac_client_handle_t, mac_group_handle_t *,
125 125 mac_ring_handle_t *, mac_ring_type_t);
126 126 extern uint_t mac_hwring_getinfo(mac_ring_handle_t);
127 127 extern void mac_hwring_setup(mac_ring_handle_t, mac_resource_handle_t,
128 128 mac_ring_handle_t);
129 129 extern void mac_hwring_teardown(mac_ring_handle_t);
130 130 extern int mac_hwring_disable_intr(mac_ring_handle_t);
131 131 extern int mac_hwring_enable_intr(mac_ring_handle_t);
132 132 extern int mac_hwring_start(mac_ring_handle_t);
133 133 extern void mac_hwring_stop(mac_ring_handle_t);
134 134 extern mblk_t *mac_hwring_poll(mac_ring_handle_t, int);
135 135 extern mblk_t *mac_hwring_tx(mac_ring_handle_t, mblk_t *);
136 136 extern int mac_hwring_getstat(mac_ring_handle_t, uint_t, uint64_t *);
↓ open down ↓ |
101 lines elided |
↑ open up ↑ |
137 137 extern mblk_t *mac_hwring_send_priv(mac_client_handle_t,
138 138 mac_ring_handle_t, mblk_t *);
139 139 extern void mac_hwring_set_default(mac_handle_t, mac_ring_handle_t);
140 140
141 141 #define MAC_HWRING_POLL(ring, bytes) \
142 142 (((ring)->mr_info.mri_poll) \
143 143 ((ring)->mr_info.mri_driver, (bytes)))
144 144
145 145 extern int mac_hwgroup_addmac(mac_group_handle_t, const uint8_t *);
146 146 extern int mac_hwgroup_remmac(mac_group_handle_t, const uint8_t *);
147 +extern int mac_hwgroup_addvlan(mac_group_handle_t, uint16_t);
148 +extern int mac_hwgroup_remvlan(mac_group_handle_t, uint16_t);
147 149
150 +extern boolean_t mac_has_hw_vlan(mac_handle_t);
151 +
148 152 extern void mac_set_upper_mac(mac_client_handle_t, mac_handle_t,
149 153 mac_resource_props_t *);
150 154
151 155 extern int mac_mark_exclusive(mac_handle_t);
152 156 extern void mac_unmark_exclusive(mac_handle_t);
153 157
154 158 extern uint_t mac_hwgrp_num(mac_handle_t, int);
155 159 extern void mac_get_hwrxgrp_info(mac_handle_t, int, uint_t *, uint_t *,
156 160 uint_t *, uint_t *, uint_t *, char *);
157 161 extern void mac_get_hwtxgrp_info(mac_handle_t, int, uint_t *, uint_t *,
158 162 uint_t *, uint_t *, uint_t *, char *);
159 163
160 164 extern uint_t mac_txavail_get(mac_handle_t);
161 165 extern uint_t mac_rxavail_get(mac_handle_t);
162 166 extern uint_t mac_txrsvd_get(mac_handle_t);
163 167 extern uint_t mac_rxrsvd_get(mac_handle_t);
164 168 extern uint_t mac_rxhwlnksavail_get(mac_handle_t);
165 169 extern uint_t mac_rxhwlnksrsvd_get(mac_handle_t);
166 170 extern uint_t mac_txhwlnksavail_get(mac_handle_t);
167 171 extern uint_t mac_txhwlnksrsvd_get(mac_handle_t);
168 172
169 173 extern int32_t mac_client_intr_cpu(mac_client_handle_t);
170 174 extern void mac_client_set_intr_cpu(void *, mac_client_handle_t, int32_t);
171 175 extern void *mac_get_devinfo(mac_handle_t);
172 176
173 177 extern boolean_t mac_is_vnic(mac_handle_t);
174 178 extern uint32_t mac_no_notification(mac_handle_t);
175 179
176 180 extern int mac_set_prop(mac_handle_t, mac_prop_id_t, char *, void *, uint_t);
177 181 extern int mac_get_prop(mac_handle_t, mac_prop_id_t, char *, void *, uint_t);
178 182 extern int mac_prop_info(mac_handle_t, mac_prop_id_t, char *, void *,
179 183 uint_t, mac_propval_range_t *, uint_t *);
180 184 extern boolean_t mac_prop_check_size(mac_prop_id_t, uint_t, boolean_t);
181 185
182 186 extern uint64_t mac_pseudo_rx_ring_stat_get(mac_ring_handle_t, uint_t);
183 187 extern uint64_t mac_pseudo_tx_ring_stat_get(mac_ring_handle_t, uint_t);
184 188
185 189 #endif /* _KERNEL */
186 190
187 191 #ifdef __cplusplus
188 192 }
189 193 #endif
190 194
191 195 #endif /* _SYS_MAC_CLIENT_PRIV_H */
↓ open down ↓ |
34 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX