The present invention relates broadly to computer networks. Specifically, the present invention relates to configuring a bus connecting multiple computers in a network. More specifically, the present invention relates to quarantining a connection between nodes in a network if the connection is found to create a loop or the number of nodes in the network exceeds an allowable number.
Directing attention to
The tree identification process is executed in a distributed manner among the nodes to configure network 4 in a tree structure among nodes 2. The tree identification process executed on each node establishes a hierarchy among nodes 2 such that each connection between two nodes 2 defines one node as the parent of the other node and the other node as the child of the first node. A node may thus be parent to zero or more children, and each node has at most one parent. On each node 2, a flag on each port in PHY 6 indicates the peer node as either a parent or a child. A root node 2-1 eventually is determined to be a node that has only children and no parent. By establishing a hierarchy among nodes 2, the communication protocols of the IEEE1394a standard are able to function properly. The root node 2-1 has particular responsibilities, such as acting as cycle master and issuing cycle start packets. This function is essential to isochronous operation, which, in turn, is essential to the use of the IEEE1394a standard in consumer digital audio-visual applications among others. When a node has identified all connections to its PHY 6 as being connections to children with the exception of one connection, it is assumed that the remaining, unidentified connection points to a potential parent node.
A problem occurs when a user incorrectly installs a node in network 4. For the tree identification process (and therefore network 4) to function properly there needs to be one less connection cable between nodes than the number of nodes present in network 4. However, as most devices that are compatible as nodes within network 4 are sold with an accompanying cable, quite often the user simply connects the new node using the cable as an addition to bus 8. This violates the requirement of bus 8 having one less connection cable than the number of nodes in network 4.
The present invention method apparatus and computer program product for adding a node to a network in a manner that does not exceed the maximum number of nodes allowed on the network. In one aspect, the present invention determines whether adding a new node to an existing network of nodes would violate the maximum number of nodes allowed in the network. If the addition of the new node exceeds the maximum number allowed, the connecting port is quarantined. Quarantining a port on a node prevents an illegitimate connection while allowing the possibility of connecting the node in a proper manner that preserves acceptable operation of the network. In the alternative, if adding the node does not exceed the maximum node count, the connection is confirmed.
In an alternative embodiment, the present invention can be combined with loop testing to provide an additional test for making new connections to a network. In this embodiment, a first check is made to see if the new connection creates a network with nodes that exceed the maximum number allowed. If the addition of the new node does not exceed the maximum number of allowed nodes, a loop testing algorithm is performed to see if the new connection between the new node and the network creates a loop within the network. If either the node count exceeds the maximum allowed number, or the connection creates a loop, the connecting port is quarantined. If the node to be added does not exceed the maximum allowed number of nodes and the connection does not create a loop, the new connection is confirmed.
In another aspect of the invention, a method of configuring a network having a plurality of nodes connected by a bus is disclosed. In one embodiment, the method comprises: determining an existing number of member nodes on the network; determining whether the existing number of member nodes plus a candidate node is less than a maximum number of nodes allowed in the network; and quarantining a connection between the network and the candidate node if adding the candidate node to the network results in a number of nodes that exceeds the maximum number of nodes on the network.
In a further aspect of the invention, a computer readable medium is disclosed. In one embodiment, the medium comprise instructions, which, when executed by a processor, configure a network having a plurality of nodes connected by a bus, by: determining an existing number of member nodes on the network; determining whether the existing number of member nodes plus a candidate node is less than a maximum number of nodes allowed in the network, wherein the maximum number of nodes allowed in the network is determined at least in part by the number of links in the network; and quarantining a connection between the network and the candidate node if adding the candidate node to the network results in a number of nodes that exceeds the maximum number of nodes on the network.
In another aspect of the invention, a system of nodes connected by a bus is disclosed. In one embodiment, the system comprise functionality for: determining an existing number of member nodes on a network; determining whether the existing number of member nodes plus a candidate node is less than a maximum number of nodes allowed in the network, wherein the maximum number of nodes allowed in the network is determined at least in part by the number of links in a combined network comprising the network and the candidate node; and quarantining a connection between the network and the candidate node if adding the candidate node to the network results in a number of nodes that exceeds the maximum number of nodes on the network.
In still another aspect of the invention, a method is disclosed. In one embodiment, the method comprises: determining an existing number of member nodes on a network; comparing the existing number of member nodes plus a candidate node to the number of links that would exist in the network if the candidate node is added to the network; and quarantining at least one connection between the network and the candidate node if the existing number of member nodes plus a candidate node is less than or equal to the number of links that would exist in the network if the candidate node is added to the network.
In another embodiment, the method comprises: determining whether adding a candidate node to a network creates one or more loops in the network; and quarantining one or more connections between the network and the candidate node if it is determined that adding the candidate node to the network creates one or more loops.
In still another aspect of the invention, a method for use in a data network is disclosed. In one embodiment, the method comprises: determining a number of existing nodes associated with the network; evaluating the number of existing nodes plus a candidate node, and a number of links that would exist in the network if the candidate node is added to the network; and quarantining at least one connection between the network and the candidate node if the existing number of nodes plus a candidate node is less than or equal to the number of links.
In another aspect, network apparatus is disclosed. In one embodiment, the apparatus comprises: a first module adapted to determine whether adding a candidate node to a network creates one or more loops in the network; and a second module adapted to quarantine one or more connections between the network and the candidate node if it is determined that adding the candidate node to the network creates one or more loops.
Those of ordinary skill in the art will realize that the following description of the present invention is illustrative only. Other embodiments of the invention will readily suggest themselves to such skilled persons having the benefit of this disclosure.
This invention relates to data communications. More particularly, the present invention relates to a method and apparatus for loop breaking on a serial bus. The invention further relates to machine readable media on which are stored (1) the layout parameters of the present invention and/or (2) program instructions for using the present invention in performing operations on a computer. Such media includes by way of example magnetic tape, magnetic disks, optically readable media such as CD ROMs and semiconductor memory such as PCMCIA cards. The medium may also take the form of a portable item such as a small disk, diskette or cassette. The medium may also take the form of a larger or immobile item such as a hard disk drive or a computer RAM.
Although the bus architecture described herein is described with reference to components for a single computer, the bus architecture has a broader scope. The bus architecture could include audio and video components, home appliances, positioning and robotic systems, and test and measurement systems, for example. The present invention may be applied to any arbitrarily assembled collection of nodes linked together as a network of devices. In addition, it is necessary to distinguish a node from a physical computer component. Each component to reside on a bus will have with it at least one node physical layer controller. A given component may be associated with multiple nodes. However, there will usually be a one-to-one correspondence between devices or components and nodes on a bus.
According to the IEEE1394-1995 standard, reconfiguration of a serial bus is required when either 1) a new node is joined to the serial bus, or 2) an identified node of the serial bus is removed from the serial bus. Reconfiguration is required to better ensure that all nodes of the serial bus are notified of the newly connected or disconnected node and that each node has a unique bus address. Typically, the node of the serial bus that detects a new connection or disconnection forces the three phase configuration to be performed by asserting a bus reset signal.
Referring now to
The local host 14 may be any device one wishes to attach to the bus, such as a disk drive, CPU, keyboard, television, stereo, household appliance, or any other component which needs to communicate with other components in the system. The node 10, by means of its logic, will implement the arbitration protocol including the bus initialization, tree identification and self-identification described above and the loop detecting functions described in detail below.
The node 10 communicates with other nodes through communications links. A link is a connection between two ports. Typically, a cable segment is used for a link. However, a link may be implemented as any physical communication channel, including wireless RF or infrared. A port is the interface between a node and a link. A port has the ability to transmit and receive data. A port can also determine whether it is connected to another port through a link. In
An individual node may have more than one port, and each node is able to transmit and receive data on any one of its ports. A node is also able to receive and transmit signaling messages through all of its ports. In the discussion that follows, devices and local hosts will, for the most part, be omitted and all references to bus topology will refer to nodes and node connections through various ports.
Turning now to
Those of ordinary skill in the art will recognize that node C 36 could have been designated the root node in the above example. Whether node A 32 or node C 36 is established as the root node depends upon the timing of the YAMP and YAMC signals. Node A 32 was designated the root node for illustrative purposes.
Turning now to
According to the present invention, all ports of a node are allowed to remain connected to their neighbors, even in the presence of one or more loops. The present invention minimizes the number of isolated links, thus avoiding breaking a bus into two or more isolated buses. A loop is broken by internally isolating selected ports from the whole of the node. In effect, each port of a loop functions as a leaf node. Thus, each port participates fully in bus reset, tree-ID and self-ID.
Turning now to
Turning now to
Turning now to
Turning now to
Turning now to
Turning now to
“Select Next Untested Port” State
At reference numeral 170, the next untested port is selected. According to a preferred embodiment, ports associated with higher speed connections are chosen before lower speed connections. Those of ordinary skill in the art will recognize that selecting ports in this way increases the likelihood of “removing” the lowest speed cable in the event a loop is detected. While the cable or other physical connection itself is not removed, the loop created by a cable is broken by isolating the particular port involved in the loop.
“Arbitrate for Loop Test” State
At reference numeral 172, the PHY initiates arbitration for one or both of the buses required to perform loop testing. According to one embodiment of the present invention, if both the main and peer buses are multi-node buses, arbitration is initiated simultaneously on both buses and the loop testing is initiated on the first bus to be granted. If one bus is a single node bus and the other is a multi-node bus, arbitration is performed on the multi-node bus first. If both buses are single node buses, arbitration begins on both and loop testing is initiated on the first bus granted. This process of performing arbitration on multiple buses simultaneously reduces the probability of requiring a long bus reset when joining ports to a PHY.
Send Loop Test Packet State
At reference numeral 174, the PHY transmits a loop test packet including a unique identifier. The transmitted identifier is denoted “TxLTP.” While transmitting the LTP, the PHY listens for any packet received on the main bus or the peer bus within a period of time. The received identifier is denoted “RxLTP.”
According to an embodiment of the present invention, the identifier includes the PHY ID and port ID of the transmitting port, the PHY ID and port ID of the receiving port, the speed of the untested port and a Globally Unique Identifier (GUID). According to another embodiment of the present invention, the identifier includes the PHY ID and port ID of the transmitting port, the PHY ID and port ID of the receiving port, the speed of the untested port and a random number.
The discussion of particular unique identifiers is not intended to be limiting in any way. Those of ordinary skill in the art will recognize there are many other ways of forming unique identifiers. These other ways of forming unique identifiers may include, for example, other combinations of the PHY ID and port ID of the transmitting port, the PHY ID and port ID of the receiving port, the speed of the untested port, a Globally Unique Identifier (GUID) and a random number.
The identifier is used to determine if a particular LTP was sent by the local PHY or by another PHY in the network. Additionally, the identifier prevents two or more PHYs from simultaneously joining ports, thus creating a loop. A loop is avoided by using a predetermined criteria and the unique identifiers from multiple PHYs to establish a “winning” PHY and “losing” PHY(s). Since more than two PHYs could be performing loop testing simultaneously, there could be more than one “losing” PHY. The winning PHY joins the port to the main bus, while the losing PHY(s) surrender the buses. The PHY waits at least a subaction gap (as defined by the IEEE1394A standard) after sending a LTP. If the PHY has either not seen a RxLTP or has received one with a lower ID, a loop does not exist and the port can be safely joined to the main bus.
Join State
At reference numeral 176, the port under test is joined to the main bus. According to a preferred embodiment of the present invention, the port is joined by first waiting a period of time for the PHY to win arbitration of both the main bus and the peer bus. If arbitration of both buses is won within the period of time, a relatively short bus reset is issued. If arbitration of both buses is not won within the period of time, a relatively long bus reset is issued. After the port has been joined, the next untested port is selected and tested for loops.
Surrender State
The surrender state is indicated by reference numeral 178. To prevent both PHYs from joining simultaneously, the PHY with the lower ID surrenders and waits until the receiving bus returns to idle, which may occur after a bus reset used by the winning PHY to join a port. Once the port surrenders the buses, the next untested port is selected and tested for loops.
Issue Random Challenge State
At reference numeral 180, the PHY has received the same identifier as the one transmitted. Consequently, a loop may exist. Alternatively, another PHY may have chosen the same ID. At reference numeral 180, the LTP is modified to include a random number to reduce the risk of a false loop detection in the case where two PHYs use the same initial identifier. The modified packet is sent and the same criteria used in the “Send Loop Test Packet” state 174 is used to determine whether to surrender bus control, or to join the port to the main bus.
According to another embodiment of the present invention, the original LTP is modified to include a random challenge, thus requiring only one loop test per port. This embodiment is illustrated in
Quarantined State
At reference numeral 182, if the PHY received the same identifier as the one it transmitted, a loop exists and the port is quarantined. Once the port is quarantined, the next untested port is selected and tested for loops. This process continues until all ports of the PHY have been tested.
The criteria used to determine what action to take based upon a comparison of a TxLTP and a RxLTP is not intended to be limiting in any way. Those of ordinary skill in the art will recognize that other criteria may be used. For example, a port might be joined if a first criteria is met with respect to the TxLTP and the RxLTP. A port might surrender the buses if a second criteria is met with respect to the TxLTP and the RxLTP. Also, the decision to issue a random challenge or to quarantine the bus may be based on a third criteria with respect to the TxLTP and the RxLTP. This third criteria may include determining whether the packets are equivalent, meaning the same or similar.
To aid in an understanding of the present invention, flow diagram representations of the state diagram in
Turning now to
If the RxLTP is equal to the TxLTP, a random challenge is issued at reference numeral 204. At reference numerals 206 and 208, the RxLTP and the TxLTP are compared as was done at reference numerals 196 and 200. If the unique identifier in the RxLTP is less than the unique identifier in the TxLTP or if the RxLTP was not received within a period of time, the port is joined to the main bus at reference numeral 210 and testing of the next port is initiated at reference numeral 190. If the unique identifier in the RxLTP is greater than the unique identifier in the TxLTP, the PHY surrenders control of the buses at reference numeral, 212 and testing of the next port is initiated at reference numeral 190. If the RxLTP is equal to the TxLTP, the port is quarantined at reference numeral 214 and testing of the next port is initiated at reference numeral 190.
Referring now to
Referring now to
Referring now to
At reference numeral 240, a loop test packet is sent on the peer bus. At reference numeral 242, the P14Y listens for packets received by any port connected to the main bus. The packets are compared as discussed with respect to
Referring now to
Referring now to
As discussed above with reference to
Quarantining Connections Based on Node Count
The number of existing nodes is incremented by one to reflect the number of nodes if the proposed connection is confirmed. If the number of existing nodes+1 is less than the maximum allowable number of nodes, the connection is confirmed at step 304. By confirming the connection, the new device and its connection is added to the network. If the number of existing nodes+1 is not less than the maximum allowable number of nodes, then confirming the connection would result in a configuration of more than the maximum allowable number of nodes. In this case, at reference numeral 306, the connection between the device to be added and an existing node to which the connection is made is quarantined, and the network is preserved. Quarantining a connection based on node count can be performed as illustrated in
Directing attention to
According to a presently preferred embodiment, the present invention may be implemented in software or firmware, as well as in programmable gate array devices, Application Specific Integrated Circuits (ASICs), and other hardware.
Thus, a novel method and apparatus for loop detection on a serial bus has been described. While embodiments and applications of this invention have been shown and described, it would be apparent to those skilled in the art having the benefit of this disclosure that many more modifications than mentioned above are possible without departing from the inventive concepts herein. The invention, therefore, is not to be restricted except in the spirit of the appended claims.
Number | Name | Date | Kind |
---|---|---|---|
4156798 | Doelz | May 1979 | A |
4194113 | Fulks et al. | Mar 1980 | A |
5014262 | Harshavardhar | May 1991 | A |
5253248 | Dravida et al. | Oct 1993 | A |
5274631 | Bhardwaj | Dec 1993 | A |
5343461 | Barton et al. | Aug 1994 | A |
5394556 | Oprescu | Feb 1995 | A |
5452330 | Goldstein | Sep 1995 | A |
5490253 | Laha et al. | Feb 1996 | A |
5495481 | Duckwall | Feb 1996 | A |
5539390 | Nagano et al. | Jul 1996 | A |
5541670 | Hanai | Jul 1996 | A |
5568641 | Nelson et al. | Oct 1996 | A |
5583922 | Davis et al. | Dec 1996 | A |
5621659 | Matsumoto et al. | Apr 1997 | A |
5630173 | Oprescu | May 1997 | A |
5640595 | Baugher et al. | Jun 1997 | A |
5684715 | Palmer | Nov 1997 | A |
5701476 | Fenger | Dec 1997 | A |
5701492 | Wadsworth et al. | Dec 1997 | A |
5712834 | Nagano et al. | Jan 1998 | A |
5719862 | Lee et al. | Feb 1998 | A |
5784648 | Duckwall | Jul 1998 | A |
5802048 | Duckwall | Sep 1998 | A |
5802057 | Duckwall et al. | Sep 1998 | A |
5805073 | Nagano et al. | Sep 1998 | A |
5809331 | Staats et al. | Sep 1998 | A |
5832298 | Sanchez et al. | Nov 1998 | A |
5832497 | Taylor | Nov 1998 | A |
5835761 | Ishii et al. | Nov 1998 | A |
5867730 | Leyda | Feb 1999 | A |
5875301 | Duckwall et al. | Feb 1999 | A |
5938764 | Klein | Aug 1999 | A |
5963731 | Sagawa et al. | Oct 1999 | A |
5968152 | Staats | Oct 1999 | A |
5970052 | Lo et al. | Oct 1999 | A |
5987605 | Hill et al. | Nov 1999 | A |
6032202 | Lea et al. | Feb 2000 | A |
6038625 | Ogino et al. | Mar 2000 | A |
6070171 | Snyder et al. | May 2000 | A |
6070187 | Subramaniam et al. | May 2000 | A |
6073206 | Piwonka et al. | Jun 2000 | A |
6122248 | Murakoshi et al. | Sep 2000 | A |
6131129 | Ludtke et al. | Oct 2000 | A |
6131134 | Huang et al. | Oct 2000 | A |
6133938 | James | Oct 2000 | A |
6138196 | Takayama et al. | Oct 2000 | A |
6141702 | Ludtke et al. | Oct 2000 | A |
6141767 | Hu et al. | Oct 2000 | A |
6157972 | Newman et al. | Dec 2000 | A |
6160796 | Zou | Dec 2000 | A |
6167532 | Wisecup | Dec 2000 | A |
6173327 | De Borst et al. | Jan 2001 | B1 |
6182022 | Mayle et al. | Jan 2001 | B1 |
6182109 | Sharma et al. | Jan 2001 | B1 |
6192189 | Fujinami et al. | Feb 2001 | B1 |
6202210 | Ludtke | Mar 2001 | B1 |
6233615 | Van Loo | May 2001 | B1 |
6233624 | Hyder et al. | May 2001 | B1 |
6247083 | Hake et al. | Jun 2001 | B1 |
6253114 | Takihara | Jun 2001 | B1 |
6253255 | Hyder et al. | Jun 2001 | B1 |
6260063 | Ludtke et al. | Jul 2001 | B1 |
6266334 | Duckwall | Jul 2001 | B1 |
6266344 | Fujimori et al. | Jul 2001 | B1 |
6266701 | Sridhar et al. | Jul 2001 | B1 |
6282597 | Kawamura | Aug 2001 | B1 |
6295479 | Shima et al. | Sep 2001 | B1 |
6308222 | Krueger et al. | Oct 2001 | B1 |
6311228 | Ray | Oct 2001 | B1 |
6330249 | Matsuno et al. | Dec 2001 | B1 |
6345315 | Mishra | Feb 2002 | B1 |
6353868 | Takayama et al. | Mar 2002 | B1 |
6363085 | Samuels | Mar 2002 | B1 |
6374316 | James et al. | Apr 2002 | B1 |
6385679 | Duckwall et al. | May 2002 | B1 |
6553013 | Jones et al. | Apr 2003 | B1 |
6587904 | Hauck et al. | Jul 2003 | B1 |
6628607 | Hauck et al. | Sep 2003 | B1 |
6657954 | Bird et al. | Dec 2003 | B1 |
6707792 | Volftsun et al. | Mar 2004 | B1 |
6757247 | Zheng et al. | Jun 2004 | B1 |
6765873 | Fichou et al. | Jul 2004 | B1 |
6810452 | James et al. | Oct 2004 | B1 |
6977887 | Hauck et al. | Dec 2005 | B1 |
7054972 | Parry et al. | May 2006 | B2 |
7124438 | Judge et al. | Oct 2006 | B2 |
20020039349 | Malaney et al. | Apr 2002 | A1 |
20020061012 | Thi et al. | May 2002 | A1 |
20030023875 | Hursey et al. | Jan 2003 | A1 |
20030048805 | Yoshihara et al. | Mar 2003 | A1 |
20030084323 | Gales | May 2003 | A1 |
20040064556 | Zhang et al. | Apr 2004 | A1 |
20050031110 | Haimovich et al. | Feb 2005 | A1 |
20060015563 | Judge et al. | Jan 2006 | A1 |
20060053490 | Herz et al. | Mar 2006 | A1 |
20060070129 | Sobel et al. | Mar 2006 | A1 |
20070094741 | Lynn et al. | Apr 2007 | A1 |