4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2017 OmniTI Computer Consulting, Inc. All rights reserved.
25 */
26
27 #include <sys/types.h>
28 #include <sys/conf.h>
29 #include <sys/id_space.h>
30 #include <sys/esunddi.h>
31 #include <sys/stat.h>
32 #include <sys/mkdev.h>
33 #include <sys/stream.h>
34 #include <sys/strsubr.h>
35 #include <sys/dlpi.h>
36 #include <sys/modhash.h>
37 #include <sys/mac.h>
38 #include <sys/mac_provider.h>
39 #include <sys/mac_impl.h>
40 #include <sys/mac_client_impl.h>
41 #include <sys/mac_client_priv.h>
42 #include <sys/mac_soft_ring.h>
43 #include <sys/mac_stat.h>
44 #include <sys/dld.h>
45 #include <sys/modctl.h>
46 #include <sys/fs/dv_node.h>
47 #include <sys/thread.h>
48 #include <sys/proc.h>
49 #include <sys/callb.h>
50 #include <sys/cpuvar.h>
51 #include <sys/atomic.h>
52 #include <sys/sdt.h>
53 #include <sys/mac_flow.h>
54 #include <sys/ddi_intr_impl.h>
55 #include <sys/disp.h>
56 #include <sys/sdt.h>
57 #include <sys/pattr.h>
58 #include <sys/strsun.h>
59
60 /*
61 * MAC Provider Interface.
62 *
63 * Interface for GLDv3 compatible NIC drivers.
64 */
65
66 static void i_mac_notify_thread(void *);
67
68 typedef void (*mac_notify_default_cb_fn_t)(mac_impl_t *);
69
70 static const mac_notify_default_cb_fn_t mac_notify_cb_list[MAC_NNOTE] = {
71 mac_fanout_recompute, /* MAC_NOTE_LINK */
72 NULL, /* MAC_NOTE_UNICST */
73 NULL, /* MAC_NOTE_TX */
74 NULL, /* MAC_NOTE_DEVPROMISC */
75 NULL, /* MAC_NOTE_FASTPATH_FLUSH */
76 NULL, /* MAC_NOTE_SDU_SIZE */
77 NULL, /* MAC_NOTE_MARGIN */
78 NULL, /* MAC_NOTE_CAPAB_CHG */
|
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
24 * Copyright 2018 Joyent, Inc.
25 * Copyright 2017 OmniTI Computer Consulting, Inc. All rights reserved.
26 */
27
28 #include <sys/types.h>
29 #include <sys/conf.h>
30 #include <sys/id_space.h>
31 #include <sys/esunddi.h>
32 #include <sys/stat.h>
33 #include <sys/mkdev.h>
34 #include <sys/stream.h>
35 #include <sys/strsubr.h>
36 #include <sys/dlpi.h>
37 #include <sys/modhash.h>
38 #include <sys/mac.h>
39 #include <sys/mac_provider.h>
40 #include <sys/mac_impl.h>
41 #include <sys/mac_client_impl.h>
42 #include <sys/mac_client_priv.h>
43 #include <sys/mac_soft_ring.h>
44 #include <sys/mac_stat.h>
45 #include <sys/dld.h>
46 #include <sys/modctl.h>
47 #include <sys/fs/dv_node.h>
48 #include <sys/thread.h>
49 #include <sys/proc.h>
50 #include <sys/callb.h>
51 #include <sys/cpuvar.h>
52 #include <sys/atomic.h>
53 #include <sys/sdt.h>
54 #include <sys/mac_flow.h>
55 #include <sys/ddi_intr_impl.h>
56 #include <sys/disp.h>
57 #include <sys/sdt.h>
58 #include <sys/pattr.h>
59 #include <sys/strsun.h>
60 #include <sys/vlan.h>
61
62 /*
63 * MAC Provider Interface.
64 *
65 * Interface for GLDv3 compatible NIC drivers.
66 */
67
68 static void i_mac_notify_thread(void *);
69
70 typedef void (*mac_notify_default_cb_fn_t)(mac_impl_t *);
71
72 static const mac_notify_default_cb_fn_t mac_notify_cb_list[MAC_NNOTE] = {
73 mac_fanout_recompute, /* MAC_NOTE_LINK */
74 NULL, /* MAC_NOTE_UNICST */
75 NULL, /* MAC_NOTE_TX */
76 NULL, /* MAC_NOTE_DEVPROMISC */
77 NULL, /* MAC_NOTE_FASTPATH_FLUSH */
78 NULL, /* MAC_NOTE_SDU_SIZE */
79 NULL, /* MAC_NOTE_MARGIN */
80 NULL, /* MAC_NOTE_CAPAB_CHG */
|