xref: /onnv-gate/usr/src/uts/common/io/mac/README (revision 8275:7c223a798022)
1*8275SEric Cheng#
2*8275SEric Cheng# CDDL HEADER START
3*8275SEric Cheng#
4*8275SEric Cheng# The contents of this file are subject to the terms of the
5*8275SEric Cheng# Common Development and Distribution License (the "License").
6*8275SEric Cheng# You may not use this file except in compliance with the License.
7*8275SEric Cheng#
8*8275SEric Cheng# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*8275SEric Cheng# or http://www.opensolaris.org/os/licensing.
10*8275SEric Cheng# See the License for the specific language governing permissions
11*8275SEric Cheng# and limitations under the License.
12*8275SEric Cheng#
13*8275SEric Cheng# When distributing Covered Code, include this CDDL HEADER in each
14*8275SEric Cheng# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*8275SEric Cheng# If applicable, add the following below this CDDL HEADER, with the
16*8275SEric Cheng# fields enclosed by brackets "[]" replaced with your own identifying
17*8275SEric Cheng# information: Portions Copyright [yyyy] [name of copyright owner]
18*8275SEric Cheng#
19*8275SEric Cheng# CDDL HEADER END
20*8275SEric Cheng#
21*8275SEric Cheng
22*8275SEric Cheng#
23*8275SEric Cheng# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24*8275SEric Cheng# Use is subject to license terms.
25*8275SEric Cheng#
26*8275SEric Cheng#
27*8275SEric Cheng
28*8275SEric ChengThis README describes the organization of the files and subdirectories
29*8275SEric Chengthat make up the misc/mac module.
30*8275SEric Cheng
31*8275SEric ChengChanges to the sources should follow the layout and naming conventions
32*8275SEric Chengadopted herein.
33*8275SEric Cheng
34*8275SEric ChengEach functional component of the mac module is implemented in a separate
35*8275SEric Chengsource file. The external interfaces are declared in header files delivered
36*8275SEric Chengunder <sys>. The internal data structures and definitions are declared
37*8275SEric Chengin header files internal to this directory.
38*8275SEric Cheng
39*8275SEric Cheng. Client Interface
40*8275SEric Cheng    This is the kernel programming interface for accessing L2 services as
41*8275SEric Cheng    a consumer.
42*8275SEric Cheng	. mac_client.c
43*8275SEric Cheng	. sys/mac_client.h:		APIs intended for external MAC consumers
44*8275SEric Cheng	. sys/mac_client_priv.h:	APIs for GLDv3 components only (dld,
45*8275SEric Cheng					dls, aggr, vnic, etc).
46*8275SEric Cheng	. mac_client_impl.h		Internals.
47*8275SEric Cheng
48*8275SEric Cheng. Provider Interface
49*8275SEric Cheng    This is the GLDv3 kernel driver interface. Functions and data structures
50*8275SEric Cheng    are used by L2 drivers to provide services to MAC consumers.
51*8275SEric Cheng	. mac_provider.c
52*8275SEric Cheng	. sys/mac_provider.h
53*8275SEric Cheng
54*8275SEric Cheng. MAC Type Plugins
55*8275SEric Cheng    The GLDv3 L2 supports multiple types of media control. Each type is
56*8275SEric Cheng    implemented as a plugin delivered in a separate file under the
57*8275SEric Cheng    plugin/ directory.
58*8275SEric Cheng    Add a new file to the plugin/ directory for introducing a new MAC type.
59*8275SEric Cheng
60*8275SEric Cheng. Core Component.
61*8275SEric Cheng    - Scheduling Engine:
62*8275SEric Cheng	. mac_datapath_setup.c:	Control path for the scheduler.
63*8275SEric Cheng	. mac_soft_ring.c,
64*8275SEric Cheng	  mac_soft_ring.h:	Fanout Soft Rings.
65*8275SEric Cheng	. mac_sched.c:		Data path
66*8275SEric Cheng	. mac_bcast.c		Data path and switching for broadcast and
67*8275SEric Cheng				multicast packets.
68*8275SEric Cheng	. mac_stat.c:		Statistics
69*8275SEric Cheng
70*8275SEric Cheng    - Classification Engine
71*8275SEric Cheng	mac_flow.c:		Flows and software classification:
72*8275SEric Cheng
73*8275SEric Cheng    - NICs Resources Management
74*8275SEric Cheng	. mac.c (this file also has other miscelanea)
75*8275SEric Cheng
76*8275SEric Cheng. Misc
77*8275SEric Cheng	. mac.c
78*8275SEric Cheng	. mac_util.c
79*8275SEric Cheng	. mac_ndd.c
80*8275SEric Cheng
81