U.S. patent application number 10/993265 was filed with the patent office on 2006-05-25 for closed loop method and apparatus for throttling the transmit rate of an ethernet media access controller (mac).
This patent application is currently assigned to CISCO TECHNOLOGY, INC. (A California Corporation). Invention is credited to Scott Simon, Bruce Weller.
Application Number | 20060109784 10/993265 |
Document ID | / |
Family ID | 36460833 |
Filed Date | 2006-05-25 |
United States Patent
Application |
20060109784 |
Kind Code |
A1 |
Weller; Bruce ; et
al. |
May 25, 2006 |
Closed loop method and apparatus for throttling the transmit rate
of an Ethernet Media Access Controller (MAC)
Abstract
A system and method for MAC-PHY rate matching combines carrier
sense signal and rate matching techniques to implement close loop
rate matching. An adapter entity responds to each carrier sense
deferral to throttle the MAC until rate matching is achieved.
Inventors: |
Weller; Bruce; (San Jose,
CA) ; Simon; Scott; (Menlo Park, CA) |
Correspondence
Address: |
LAW OFFICE OF CHARLES E. KRUEGER
P.O. BOX 5607
WALNUT CREEK
CA
94596-1607
US
|
Assignee: |
CISCO TECHNOLOGY, INC. (A
California Corporation)
|
Family ID: |
36460833 |
Appl. No.: |
10/993265 |
Filed: |
November 19, 2004 |
Current U.S.
Class: |
370/229 ;
370/468 |
Current CPC
Class: |
H04L 12/4013 20130101;
H04L 12/413 20130101; Y02D 50/10 20180101; Y02D 30/50 20200801 |
Class at
Publication: |
370/229 ;
370/468 |
International
Class: |
H04J 3/14 20060101
H04J003/14; H04J 1/16 20060101 H04J001/16; H04L 1/00 20060101
H04L001/00; H04L 12/26 20060101 H04L012/26; H04L 12/56 20060101
H04L012/56 |
Claims
1. A method for adjusting the rate of data transfer between a
medium access controller (MAC) and physical layer device (PHY),
with the MAC transferring data to the PHY at a MAC transfer rate,
with the PHY including a transmit buffer for holding transmit data
transmitted from the MAC to the PHY and a transmitter for
transmitting transmit data at a PHY data transfer rate, said method
comprising the steps of: detecting an overflow condition of the
transmit buffer on the PHY indicating that data is being
transmitted from the MAC at a faster rate than it is being
transmitted by the PHY; asserting a carrier sense signal at the PHY
when an overflow condition is detected; and detecting an asserted
carrier sense signal at the MAC and increasing an inter-packet gap
to decrease the MAC data transfer rate.
2. The method of claim 1 further comprising: periodically
decreasing the inter-packet gap to increase the MAC data transfer
rate to determine whether the PHY data transfer rate has
increased.
3. The method of claim 1 further comprising: initializing the
inter-packet gap to 9.6 microseconds.
4. A system for adjusting a data transfer rate comprising: a media
access controller (MAC), with the MAC including a traffic shaper
for varying a MAC data transfer rate by adjusting an inter-packet
gap, and an adaptor that responds to assertion of an overflow
signal to control the traffic shaper to increase the inter-packet
gap to reduce the MAC data transfer rate; a physical layer device
(PHY) including a transmit buffer for holding frames to be
transmitted and a controller coupled to the transmit buffer
configured to assert a buffer overflow signal when the transmit
buffer holds a selected amount of frames; a parallel interface
connecting the MAC and the PHY to transmit frames from the MAC to
the PHY; and a signal line, coupling the MAC and the PHY, for
transmitting the buffer overflow signal from the PHY to the
MAC.
5. The system of claim 4 wherein: the adaptor is configured to
periodically decrease the inter-packet gap to increase the MAC data
transfer rate to test whether a PHY data transfer rate has
increased.
6. The system of claim 4 with the adaptor configured to initialize
the inter-packet gap to 9.6 microseconds.
7. The system of claim 4 where the controller asserts a carrier
sense signal as the buffer overflow signal.
8. A system for adjusting the rate of data transfer between a
medium access controller (MAC) and physical layer device (PHY),
with the MAC transferring data to the PHY at a MAC transfer rate,
with the PHY including a transmit buffer for holding transmit data
transmitted from the MAC to the PHY and a transmitter for
transmitting transmit data at a PHY data transfer rate, said method
comprising the steps of: means for detecting an overflow condition
of the transmit buffer on the PHY indicating that data is being
transmitted from the MAC at a faster rate than it is being
transmitted by the PHY; means for asserting a carrier sense signal
at the PHY when an overflow condition is detected; and means for
detecting an asserted carrier sense signal at the MAC and
increasing an inter-packet gap to decrease the MAC data transfer
rate.
9. The system of claim 8 further comprising: means for periodically
decreasing the inter-packet gap to increase the MAC data transfer
rate to determine whether the PHY data transfer rate has
increased.
10. The system of claim 8 further comprising: means for
initializing the inter-packet gap to 9.6 microseconds.
Description
BACKGROUND OF THE INVENTION
[0001] Many networking devices adhere to the IEEE802.3 standard as
their layer 1 and 2 interface. The layer 2 entity is known as the
MAC (Medium Access Controller) and the layer 1 entity is known as
the PHY (PHYsical layer). IEEE802.3 defines an interface between
the MAC and the PHY, known as the MII (Medium Independent
Interface).
[0002] FIG. 1 depicts the layered model of Ethernet that includes a
Media MAC layer and a PHY layer. The MAC layer is responsible for,
among other things, controlling access to the media and the PHY
layer is responsible for transmitting bits of information across
the media. In Ethernet, the interface between the MAC and the PHY
is specified by IEEE 802.3 and has evolved from the 10 pin MII for
10/100 Ethernet, to the 20 pin GMII (Gigabit Media Independent
Interface) for GE (Gigabit Ethernet), to the 36 pin XGMII (10
Gigabit Media Independent Interface) for 10 GE.
[0003] Thus, in a typical implementation, the MII operates at a
speed of 100 or 10 mbps (MegaBits Per Second). The MAC sends
Ethernet frames to the PHY at this rate and the PHY then sends the
frame out on the medium. Typical PHYs operate at the same rate as
the MAC/MII.
[0004] Certain newer implementations couple the MAC/MII with a PHY
that is incapable of operating at the full rate. One example is an
Ethernet-over-DSL (Digital Subscriber Line) PHY that might transmit
at 15 mbps. Since the MAC and MII operate at a fixed rate (either
10 or 100 mbps in this case), a method must be used to throttle the
MAC so that it does not overload the PHY.
[0005] This throttling is also known as "MAC-PHY rate matching".
There are four existing methods for MAC-PHY rate matching.
[0006] The first two methods depend on signals generated to
indicate carrier sensing and collision detection. As is known in
the art, Ethernet utilizes a shared medium protocol know as CSMA/CD
(Carrier Sense Multiple Access with Collision Detection). Each node
connected to the medium may transmit a message as long as no other
message is currently being transmitted on the medium. Thus, each
node listens to the medium prior to transmitting, for example by
monitoring the current flow in a wire, to see if a carrier (signal)
is being transmitted by another node. If a carrier is detected the
PHY asserts a carrier detect signal that causes the MAC to delay
transmission of a frame.
[0007] Additionally, it is possible for collisions to occur because
one node may start to transmit after another node has transmitted
but before the carrier is detected due to the delay of the
propagation of the carrier. A node monitors its own transmission to
detect a collision, for example by detecting a higher current than
due to its own transmission. If a collision is detected then the
PHY asserts a collision detect signal that causes the MAC to abort
the transmission of the frame (collision back off).
[0008] The first MAC-PHY rate matching technique uses "collision
back off". As described above, collision back off is a feature of
Ethernet in which the PHY signals to the MAC if another device on
the network begins to transmit at the same time as the PHY. (The
two transmitters thus "collide".) In this case, the PHY signals to
the MAC that a collision has occurred and the MAC ceases
transmission, waits a random interval and tries to transmit
again.
[0009] When used for rate matching, the PHY signals a collision
when its buffers are full and the MAC tries to transmit another
frame. In this case, the MAC will back off and try again. If the
buffers have room, the PHY will accept the frame. Otherwise it will
again signal collision.
[0010] The second method for rate matching uses an Ethernet feature
called "carrier sense deferral". In an Ethernet network, as
described above, the PHY asserts a carrier sense signal to inform
the MAC when another device on the network is transmitting. This
assertion of the carrier sense signal is called a "deferral". To
prevent collisions, MAC will not transmit while the PHY is
asserting carrier sense.
[0011] The PHY can assert the carrier sense signal when its
transmit buffers are full to prevent the MAC from transmitting any
more frames. Thus, carrier sense deferral may be used for rate
matching. This method is described in IEEE802.3ah "Ethernet in the
First Mile" standard.
[0012] The third method for rate matching uses MAC "Pause frames".
A "Pause frame" is a special Ethernet frame that, when received,
instructs a MAC to stop transmitting. After a certain period, the
MAC then resumes transmission. Pause frames are usually sent from
remote network devices to the MAC.
[0013] In the case of rate matching, the PHY inserts a Pause frame
in the received data stream which in turn instructs the MAC to stop
transmitting. The PHY sends the pause frame when its transmit
buffer is filled to a defined level. The buffer needs to be large
enough to accept any frames that the MAC may transmit while
receiving and processing the Pause frame. Using Pause frames allows
the MAC and PHY to transmit and receive data at the same time, an
improvement over using the collision signal for rate matching.
[0014] The fourth method of rate matching is known as "traffic
shaping". Typically, a MAC with data to transmit will use an IPG
(Inter-Packet Gap) of 0.96 microseconds (for 100 mbps operation)
between each frame. If the MAC has knowledge in advance of a
desired traffic rate (the "target rate"), a traffic shaper on the
MAC can increase the length of the IPG accordingly, thus reducing
the rate at which frames are sent to the PHY equal to the target
traffic rate. The PHY still needs a buffer to store each frame
because the frames traverse the MII at 100 mbps, but in this case
the MAC can wait for the buffer to be nearly empty before sending
the next frame. Traffic shaping is currently employed on many
Ethernet switches as a way to manage congestion on network
links.
[0015] As will be described more fully below, each of these
techniques has drawbacks and a need exists for an improved
technique for MAC-PHY rate matching.
BRIEF SUMMARY OF THE INVENTION
[0016] In one embodiment of the invention, a closed loop traffic
shaping system adjusts the IPG between frames or packets
transmitted by the MAC in accordance with the traffic rate of the
PHY.
[0017] In another embodiment of the invention, the PHY asserts a
carrier sense signal to indicate that data is being received at a
higher rate than it is being transmitted. The MAC responds to the
carrier sense signal to decrease the rate that data is transmitted
to the PHY.
[0018] In another embodiment of the invention, an adaptor entity
adjusts the target rate of a traffic shaper. The adaptor decreases
the target rate incrementally upon each deferral until deferrals
are no longer occurring.
[0019] In another embodiment of the invention, the adaptor entity
periodically, or on command, increases the traffic shaper's target
rate to test whether the traffic rate of PHY has increased. The
adaptor increases the target rate until deferrals begin again and
then decreases the rate until the target rate and the traffic rate
of the PHY are matched.
[0020] Other features and advantages of the invention will be
apparent in view of the following detailed description and appended
drawings.
BRIEF DESCRIPTION OF THE DRAWINGS
[0021] FIG. 1 is a block diagram depicting the layered model of
Ethernet;
[0022] FIG. 2 is a block diagram of an embodiment of the invention;
and
[0023] FIG. 3 is a flow chart depicting steps implemented by an
embodiment of the invention.
DETAILED DESCRIPTION OF THE INVENTION
[0024] Reference will now be made in detail to various embodiments
of the invention. Examples of these embodiments are illustrated in
the accompanying drawings. While the invention will be described in
conjunction with these embodiments, it will be understood that it
is not intended to limit the invention to any embodiment. On the
contrary, it is intended to cover alternatives, modifications, and
equivalents as may be included within the spirit and scope of the
invention as defined by the appended claims. In the following
description, numerous specific details are set forth in order to
provide a thorough understanding of the various embodiments.
However, the present invention may be practiced without some or all
of these specific details. In other instances, well known process
operations have not been described in detail in order not to
unnecessarily obscure the present invention.
[0025] As described above, there are currently four techniques
utilized for MAC-PHY rate matching:
[0026] collision back off
[0027] pause frames
[0028] carrier sense deferral
[0029] traffic shaping.
Each of these techniques has disadvantages which are obviated by
the present invention. Some of these disadvantages will be briefly
described.
[0030] Turning first to collision back off, the first problem is
that the MAC will allow only 16 collisions before dropping the
frame it is trying to send. This limits the rates that may be
adapted and introduces possible packet loss. Second, while the PHY
may be capable of receiving and transmitting frames at the same
time, using collision back off forces the MAC and PHY to either
only transmit or receive one frame at a time. Third, the number of
collisions is usually used as a troubleshooting metric to diagnose
the state of the network and the collision method of rate matching
creates an abnormally high number of collisions which may confuse
network operators or management software.
[0031] Carrier sense deferral is similar to the collision rate
matching method with one major advantage. Using carrier sense
deferral allows the MAC and PHY to transmit and receive at the same
time. As with collisions, the MAC keeps track of "excessive
deferrals", so that an error counter that will be unnaturally
triggered by this method.
[0032] Thus, both collision back off and carrier sense deferral
have made network management more difficult. As described above, to
detect collisions the PHY must monitor its own transmission and
thus cannot transmit and receive at the same time. Thus, the
carrier sense deferral method has the advantage of allowing
simultaneous transmission and reception.
[0033] The Pause frames technique, unfortunately, comes with
several drawbacks. First, it is a network layer violation for a PHY
to generate a pause frame. A network that uses pause frames may be
disrupted by the addition of a PHY that uses them for rate
matching. Second, the MAC's processing time for a pause frame is
somewhat undefined. Because of this, it is harder to build a PHY
that can rely on the MAC to stop transmitting before the PHY
buffers overflow. Lastly, the use of pause frames is an option only
in IEEE802.3 and not all MACs implement this feature.
[0034] Traffic shaping has the advantageous feature of being
completely contained in the MAC. A PHY needs only a frame buffer to
work with this method. Unfortunately, traffic shaping is an open
loop system. The rate that the traffic is shaped to must be
calculated in advance of transmission. This calculation must be
repeated for any payload rate that the PHY might use. If the PHY's
rate drifts below the rate that the MAC expects, buffer overflows
and packet loss will occur. Similarly, if the PHY's rate drifts
above the MAC's, the system will be wasting link bandwidth.
[0035] An embodiment of the present invention will now be described
that eliminates the disadvantages of the existing MAC-PHY rate
matching techniques. A block diagram of this embodiment is depicted
in FIG. 2.
[0036] Referring to FIG. 2, a MAC is connected to a PHY by a media
independent interface (MII) and the PHY is connected to the medium,
e.g., a cable, by a media dependent interface (MDI). The PHY
includes a transmitter (Tx), receiver (Rx), a Tx buffer and a
controller. The controller is coupled to both the Rx and the
buffer. An output of the PHY controller is coupled to a carrier
sense signal line. Thus, the PHY implements carrier sense
deferral.
[0037] The MAC is capable of implementing traffic shaping and
includes a shaper, a transmitter coupled to the MII, and a rate
adaptor. The rate adaptor has an input coupled to the carrier sense
signal line and an output coupled to the shaper. The shaper has an
output coupled to the transmitter
[0038] The operation of the embodiment depicted in FIG. 2 will now
be described with reference to the flow chart of FIG. 3.
[0039] This embodiment starts with a PHY that implements carrier
sense deferral and a MAC that is capable of traffic shaping. At
start up, the MAC operates at full speed (10 or 100 mbps) and the
PHY throttles the MAC by asserting carrier sense. In a typical
prior art "carrier sense deferral" rate matching method, this
process would continue unabated and the MAC would be registering
excessive deferrals.
[0040] Instead, the presently described embodiment contains a
traffic shaper (as described above) and an "adaptor" entity that
watches for carrier sense deferrals and adjusts the traffic
shaper's target rate. This adaptor can be implemented in software
or in hardware, external to or as part of the MAC itself. The
adaptor decreases the target rate incrementally upon each deferral
until deferrals are no longer occurring.
[0041] It is assumed that the PHY transmit rate is less than the
MAC transmit rate, e.g., the PHY transmit rate is 15 mbps and the
MAC transmit rate is 100 mbps. The PHY will buffer data received
from the MAC because the data is being received faster than it is
being transmitted. If the MAC continues to transmit data the buffer
will eventually overflow. At this point the MAC is inserting the
standard Ethernet inter-packet gap (IPG) of 0.96 microseconds.
[0042] The controller on the PHY will detect when the transmit
buffer has reached an overflow condition and assert a carrier sense
signal which is detected by the MAC adaptor entity. The MAC rate
adaptor responds to the assertion of the carrier sense signal
causing the traffic shaper to increase the magnitude of the IPG by
a fixed magnitude to decrease the target rate. The MAC continues to
transmit frame data at 100 mbps but the average rate at which data
arrives at the buffer is decreased because the IPG is increased.
This decrease of the MAC's average data transmit rate also reduces
the rate that data accumulates in the buffer because the PHY
continues to transmit during the IPGs.
[0043] The PHY continues to assert carrier sense signals until the
rate at which data is received at the PHY matches the rate at which
data is transmitted by the PHY. The buffer allows temporary
mismatch of these rates to occur without further carrier sense
deferrals being asserted.
[0044] In another embodiment, the adaptor periodically increases
the shaper's target rate incrementally to "test" the PHY's rate. If
the PHY's payload rate has increased, the adaptor increases the
target rate until deferral begins to occur again, and then
decreases the rate to the point that the rates are again matched.
The frequency of this test may be pre-configured in the adaptor or
may be manually initiated by a management entity.
[0045] If the PHY's rate decreases, deferrals will start to occur
again. The adaptor then continues to decrease the target rate until
deferrals cease.
[0046] The adaptor may be configured with a minimum and maximum
rate that it may set on the shaper.
[0047] The invention has now been described with reference to the
preferred embodiments. Alternatives and substitutions will now be
apparent to persons of skill in the art. Accordingly, it is not
intended to limit the invention except as provided by the appended
claims.
* * * * *