xref: /titanic_50/usr/src/uts/common/io/mac/README (revision b56bf881a9655cb27b53cba1468312f7c6dfb0a2)
1#
2# CDDL HEADER START
3#
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 2008 Sun Microsystems, Inc.  All rights reserved.
24# Use is subject to license terms.
25#
26#
27
28This README describes the organization of the files and subdirectories
29that make up the misc/mac module.
30
31Changes to the sources should follow the layout and naming conventions
32adopted herein.
33
34Each functional component of the mac module is implemented in a separate
35source file. The external interfaces are declared in header files delivered
36under <sys>. The internal data structures and definitions are declared
37in header files internal to this directory.
38
39. Client Interface
40    This is the kernel programming interface for accessing L2 services as
41    a consumer.
42	. mac_client.c
43	. sys/mac_client.h:		APIs intended for external MAC consumers
44	. sys/mac_client_priv.h:	APIs for GLDv3 components only (dld,
45					dls, aggr, vnic, etc).
46	. mac_client_impl.h		Internals.
47
48. Provider Interface
49    This is the GLDv3 kernel driver interface. Functions and data structures
50    are used by L2 drivers to provide services to MAC consumers.
51	. mac_provider.c
52	. sys/mac_provider.h
53
54. MAC Type Plugins
55    The GLDv3 L2 supports multiple types of media control. Each type is
56    implemented as a plugin delivered in a separate file under the
57    plugin/ directory.
58    Add a new file to the plugin/ directory for introducing a new MAC type.
59
60. Core Component.
61    - Scheduling Engine:
62	. mac_datapath_setup.c:	Control path for the scheduler.
63	. mac_soft_ring.c,
64	  mac_soft_ring.h:	Fanout Soft Rings.
65	. mac_sched.c:		Data path
66	. mac_bcast.c		Data path and switching for broadcast and
67				multicast packets.
68	. mac_stat.c:		Statistics
69
70    - Classification Engine
71	mac_flow.c:		Flows and software classification:
72
73    - NICs Resources Management
74	. mac.c (this file also has other miscelanea)
75
76. Misc
77	. mac.c
78	. mac_util.c
79	. mac_ndd.c
80
81