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.h
+++ new/usr/src/uts/common/sys/mac_client.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. All rights reserved.
26 26 */
27 27
28 28 /*
29 29 * This file captures the MAC client API definitions. It can be
30 30 * included from any MAC clients.
31 31 */
32 32
33 33 #ifndef _SYS_MAC_CLIENT_H
34 34 #define _SYS_MAC_CLIENT_H
35 35
36 36 #include <sys/mac.h>
37 37 #include <sys/mac_flow.h>
38 38
39 39 #ifdef __cplusplus
40 40 extern "C" {
41 41 #endif
42 42
43 43 #ifdef _KERNEL
44 44
45 45 /*
46 46 * MAC client interface.
47 47 */
48 48
49 49 typedef struct __mac_client_handle *mac_client_handle_t;
50 50 typedef struct __mac_unicast_handle *mac_unicast_handle_t;
51 51 typedef struct __mac_promisc_handle *mac_promisc_handle_t;
52 52 typedef struct __mac_perim_handle *mac_perim_handle_t;
53 53 typedef uintptr_t mac_tx_cookie_t;
54 54
55 55 typedef void (*mac_tx_notify_t)(void *, mac_tx_cookie_t);
56 56
57 57 typedef enum {
58 58 MAC_DIAG_NONE,
59 59 MAC_DIAG_MACADDR_NIC,
60 60 MAC_DIAG_MACADDR_INUSE,
61 61 MAC_DIAG_MACADDR_INVALID,
62 62 MAC_DIAG_MACADDRLEN_INVALID,
63 63 MAC_DIAG_MACFACTORYSLOTINVALID,
64 64 MAC_DIAG_MACFACTORYSLOTUSED,
65 65 MAC_DIAG_MACFACTORYSLOTALLUSED,
66 66 MAC_DIAG_MACFACTORYNOTSUP,
67 67 MAC_DIAG_MACPREFIX_INVALID,
68 68 MAC_DIAG_MACPREFIXLEN_INVALID,
69 69 MAC_DIAG_MACNO_HWRINGS
70 70 } mac_diag_t;
71 71
72 72 /*
73 73 * These are used when MAC clients what to specify tx and rx rings
74 74 * properties. MAC_RXRINGS_NONE/MAC_TXRINGS_NONE mean that we should
75 75 * not reserve any rings while MAC_RXRINGS_DONTCARE/MAC_TXRINGS_DONTCARE
76 76 * mean that the system can decide if it wants to reserve rings or
77 77 * not.
78 78 */
79 79 #define MAC_RXRINGS_NONE 0
80 80 #define MAC_TXRINGS_NONE MAC_RXRINGS_NONE
↓ open down ↓ |
45 lines elided |
↑ open up ↑ |
81 81 #define MAC_RXRINGS_DONTCARE -1
82 82 #define MAC_TXRINGS_DONTCARE MAC_RXRINGS_DONTCARE
83 83
84 84 typedef enum {
85 85 MAC_CLIENT_PROMISC_ALL,
86 86 MAC_CLIENT_PROMISC_FILTERED,
87 87 MAC_CLIENT_PROMISC_MULTI
88 88 } mac_client_promisc_type_t;
89 89
90 90 /* flags passed to mac_unicast_add() */
91 +
91 92 #define MAC_UNICAST_NODUPCHECK 0x0001
92 93 #define MAC_UNICAST_PRIMARY 0x0002
93 94 #define MAC_UNICAST_HW 0x0004
94 95 #define MAC_UNICAST_VNIC_PRIMARY 0x0008
95 96 #define MAC_UNICAST_TAG_DISABLE 0x0010
96 97 #define MAC_UNICAST_STRIP_DISABLE 0x0020
97 98 #define MAC_UNICAST_DISABLE_TX_VID_CHECK 0x0040
98 99
99 100 /* flags passed to mac_client_open */
100 101 #define MAC_OPEN_FLAGS_IS_VNIC 0x0001
101 102 #define MAC_OPEN_FLAGS_EXCLUSIVE 0x0002
102 103 #define MAC_OPEN_FLAGS_IS_AGGR_PORT 0x0004
103 104 #define MAC_OPEN_FLAGS_SHARES_DESIRED 0x0008
104 105 #define MAC_OPEN_FLAGS_USE_DATALINK_NAME 0x0010
105 106 #define MAC_OPEN_FLAGS_MULTI_PRIMARY 0x0020
106 107 #define MAC_OPEN_FLAGS_NO_UNICAST_ADDR 0x0040
107 108
108 109 /* flags passed to mac_client_close */
109 110 #define MAC_CLOSE_FLAGS_IS_VNIC 0x0001
110 111 #define MAC_CLOSE_FLAGS_EXCLUSIVE 0x0002
111 112 #define MAC_CLOSE_FLAGS_IS_AGGR_PORT 0x0004
112 113
113 114 /* flags passed to mac_promisc_add() */
114 115 #define MAC_PROMISC_FLAGS_NO_TX_LOOP 0x0001
115 116 #define MAC_PROMISC_FLAGS_NO_PHYS 0x0002
116 117 #define MAC_PROMISC_FLAGS_VLAN_TAG_STRIP 0x0004
117 118 #define MAC_PROMISC_FLAGS_NO_COPY 0x0008
118 119
119 120 /* flags passed to mac_tx() */
120 121 #define MAC_DROP_ON_NO_DESC 0x01 /* freemsg() if no tx descs */
121 122 #define MAC_TX_NO_ENQUEUE 0x02 /* don't enqueue mblks if not xmit'ed */
122 123 #define MAC_TX_NO_HOLD 0x04 /* don't bump the active Tx count */
123 124
124 125 extern int mac_client_open(mac_handle_t, mac_client_handle_t *, char *,
125 126 uint16_t);
126 127 extern void mac_client_close(mac_client_handle_t, uint16_t);
127 128
128 129 extern int mac_unicast_add(mac_client_handle_t, uint8_t *, uint16_t,
129 130 mac_unicast_handle_t *, uint16_t, mac_diag_t *);
130 131 extern int mac_unicast_add_set_rx(mac_client_handle_t, uint8_t *, uint16_t,
131 132 mac_unicast_handle_t *, uint16_t, mac_diag_t *, mac_rx_t, void *);
132 133 extern int mac_unicast_remove(mac_client_handle_t, mac_unicast_handle_t);
133 134
134 135 extern int mac_multicast_add(mac_client_handle_t, const uint8_t *);
135 136 extern void mac_multicast_remove(mac_client_handle_t, const uint8_t *);
136 137
137 138 extern void mac_rx_set(mac_client_handle_t, mac_rx_t, void *);
138 139 extern void mac_rx_clear(mac_client_handle_t);
139 140 extern void mac_secondary_dup(mac_client_handle_t, mac_client_handle_t);
140 141 extern void mac_secondary_cleanup(mac_client_handle_t);
141 142 extern mac_tx_cookie_t mac_tx(mac_client_handle_t, mblk_t *,
142 143 uintptr_t, uint16_t, mblk_t **);
143 144 extern boolean_t mac_tx_is_flow_blocked(mac_client_handle_t, mac_tx_cookie_t);
144 145 extern uint64_t mac_client_stat_get(mac_client_handle_t, uint_t);
145 146
146 147 extern int mac_promisc_add(mac_client_handle_t, mac_client_promisc_type_t,
147 148 mac_rx_t, void *, mac_promisc_handle_t *, uint16_t);
148 149 extern void mac_promisc_remove(mac_promisc_handle_t);
149 150
150 151 extern mac_notify_handle_t mac_notify_add(mac_handle_t, mac_notify_t, void *);
151 152 extern int mac_notify_remove(mac_notify_handle_t, boolean_t);
152 153 extern void mac_notify_remove_wait(mac_handle_t);
153 154 extern int mac_rename_primary(mac_handle_t, const char *);
154 155 extern char *mac_client_name(mac_client_handle_t);
155 156
156 157 extern int mac_open(const char *, mac_handle_t *);
157 158 extern void mac_close(mac_handle_t);
158 159 extern uint64_t mac_stat_get(mac_handle_t, uint_t);
159 160
160 161 extern int mac_unicast_primary_set(mac_handle_t, const uint8_t *);
161 162 extern void mac_unicast_primary_get(mac_handle_t, uint8_t *);
162 163 extern void mac_unicast_primary_info(mac_handle_t, char *, boolean_t *);
163 164
164 165 extern void mac_unicast_secondary_get(mac_client_handle_t, uint8_t *);
165 166
166 167 extern boolean_t mac_dst_get(mac_handle_t, uint8_t *);
167 168
168 169 extern int mac_addr_random(mac_client_handle_t, uint_t, uint8_t *,
169 170 mac_diag_t *);
170 171
171 172 extern int mac_addr_factory_reserve(mac_client_handle_t, int *);
172 173 extern void mac_addr_factory_release(mac_client_handle_t, uint_t);
173 174 extern void mac_addr_factory_value(mac_handle_t, int, uchar_t *, uint_t *,
174 175 char *, boolean_t *);
175 176 extern uint_t mac_addr_factory_num(mac_handle_t);
176 177
177 178 extern mac_tx_notify_handle_t mac_client_tx_notify(mac_client_handle_t,
178 179 mac_tx_notify_t, void *);
179 180
180 181 extern int mac_client_set_resources(mac_client_handle_t,
181 182 mac_resource_props_t *);
182 183 extern void mac_client_get_resources(mac_client_handle_t,
183 184 mac_resource_props_t *);
184 185 extern void mac_client_get_eff_resources(mac_client_handle_t,
185 186 mac_resource_props_t *);
186 187
187 188 /* bridging-related interfaces */
188 189 extern int mac_set_pvid(mac_handle_t, uint16_t);
189 190 extern uint16_t mac_get_pvid(mac_handle_t);
190 191 extern uint32_t mac_get_llimit(mac_handle_t);
191 192 extern uint32_t mac_get_ldecay(mac_handle_t);
192 193
193 194 extern int mac_share_capable(mac_handle_t);
194 195 extern int mac_share_bind(mac_client_handle_t, uint64_t, uint64_t *);
195 196 extern void mac_share_unbind(mac_client_handle_t);
196 197
197 198 extern int mac_set_mtu(mac_handle_t, uint_t, uint_t *);
198 199
199 200 extern void mac_client_set_rings(mac_client_handle_t, int, int);
200 201
201 202 #endif /* _KERNEL */
202 203
203 204 #ifdef __cplusplus
204 205 }
205 206 #endif
206 207
207 208 #endif /* _SYS_MAC_CLIENT_H */
↓ open down ↓ |
107 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX