Method and system for transmitting data using flow control

Abstract: A method and system for transmitting data between at least one receiver operatively connected to at least one transmitter, and more particularly for permissible transmission via at least one high speed link having a plurality of virtual channels, includes the receiver (12) sending a virtual channel credit packet (22) for a particular virtual channel (16) to the transmitter (10) , the credit packet (22) being indicative that the receiver (10) is available to receive data and having a unique virtual channel number assigned to said particular virtual channel thereto. The transmitter (10) responds to the virtual channel credit packet, which includes transmitting data to the receiver if data is available. The receiver (12) receives the data transmitted from the transmitter (10).

Description: The present invention relates to a method and a system for transmitting data between at least one receiver operatively connected to at least one transmitter, for example for permissible transmission via at least one high-speed link having a plurality of virtual channels. Virtual channels are generally used for maximum efficiency usage of a single bi-directional serial link between a receiver and a transmitter. The communication is usually based on asynchronous concurrent processes at the packet level. More specifically, Communicating Sequential Processes ("CSP") is used for synchronised communication between the receiver and transmitter, meaning each communicating process waits until data transfer is complete before continuing. One known method for maintaining the CSP while ensuring that no data is lost or overwritten suggests the use of acknowledgement packets. The receiver must acknowledge each packet before another can be sent, and all the packets of a message must also be acknowledged before the sending process continues. In this case, when the data packet is received by a process, an acknowledgement packet is sent back to the transmitter. The acknowledgement packet allows the transmitter to send another packet after a packet has been received or even partially received. The problem with using acknowledgement packets is that the transmitter does not necessarily know if the receiver is ready to receive a packet in the first place. When the transmitter sends a packet to the receiver that does not have any available buffer, the packet is either lost or the link is flow controlled at the physical layer. If the packet is lost, the transmitter will never receive the acknowledgement packet. As a result, it must rely on some timer to know when to try again, causing delay and waste of bandwidth. On the other hand, if the data is flow controlled at the physical layer, data transmission is indefinitely postponed until the receiver is able to accept the data. Again, this causes both delay and waste of bandwidth by blocking other virtual channels. "Client-Server Performance on Flow-Controlled ATM Networks: A Web Database of Simulation Results" by Kung H.T. et al discloses a credit-based flow control. This document discloses a method of transmitting data between at least one receiver operatively connected to at least one transmitter via at least one high-speed link having a plurality of virtual channels. The method includes the receiver sending a virtual channel credit packet for a particular virtual circuit to the transmitter. The transmitter, after having received the credit packet is eligible to send some number of data cells to the receiver and decrements its current balance for the virtual circuit by one. The present invention seeks to provide improved data transmission. According to an aspect of the present invention, there is provided a method of transmitting data between at least one receiver operatively connected to at least one transmitter as specified in claim 1. According to another aspect of the present invention, there is provided a system for transmitting data packets between at least one receiver operatively connected to at least one transmitter as specified in claim 11. The preferred embodiment provides a method and system for transmitting data using a virtual channel credit packet over a high-speed link with a plurality of virtual channels, preferably without the use of acknowledgement packets. Advantageously, the system allows the transmitter to send a data packet to a receiver only after the receiver has resources to receive the packet. Transmission is preferably via at least one high-speed link with a plurality of virtual channels using more efficient bandwidth. Data may be transmitted using a virtual channel credit packet having a unique assigned virtual channel number for each virtual channel. In the preferred embodiment, there is provided a method and a system for transmitting data between one or more receivers operatively connected to one or more transmitters, and more particularly for permissible transmission via at least one high-speed link having a plurality of virtual channels. By having the receiver send a credit packet with a unique virtual channel number that is specifically assigned to each virtual channel only when it has a buffer available, the system is able to bypass the need for an acknowledgement packet, resulting in reliable transmissions and efficient use of bandwidth. Advantageously, the receiver first sends a virtual channel credit packet for a particular virtual channel to the transmitter only if the receiver is available to receive data. A unique virtual channel number is assigned for that particular virtual channel, and is included in the virtual channel packet. Then, the transmitter responds to the virtual channel credit packet accordingly, which includes transmitting data to the receiver if it is actually available. The receiver then receives the data packet transmitted from the transmitter. The sending of a credit packet guarantees that the receiver is ready and has the available resources to receive transmission data from the transmitter. An embodiment of the present invention is described below, by way of example only, with reference to the accompanying drawings, in which: Figure 1 is a schematic diagram of an exemplary connection between a peripheral and an input/output (I/O) card in which the system may be implemented; Figure 2 is an ensemble illustrating the format and control characters for the data packet and the credit packet for one virtual channel; Figure 3 is a sequence illustrating the flow of the credit packet and the data packet for one virtual channel; Figure 4 is a flowchart illustrating the subroutine executed by the receiver; and, Figure 5 is a flowchart illustrating the subroutine executed by the transmitter. Broadly stated, the preferred embodiment is directed to a method and a system for transmitting data between at least one receiver operatively connected to at least one transmitter over a high-speed link with a plurality of virtual channels. Each virtual channel is assigned with a unique virtual channel number. When the receiver is ready for transmission for a particular virtual channel, it sends a virtual channel credit packet bearing the assigned virtual channel number. The transmitter then responds to the virtual channel credit packet. After the transmission for this particular virtual channel is finished, the process is repeated for the next virtual channel until all the virtual channels are running. Turning now to Figure 1, a schematic diagram of an exemplary connection between a peripheral device or peripheral and an I/O card is shown and illustrates one way in which the receiver is connected to the transmitter for the implementation of the present invention. However, it should be understood that other connections are possible and are within the scope of this disclosure. In this example, a peripheral 10 is connected to an I/O card 12 through a bi-directional serial link 14 with a plurality of virtual channels 16. In this case, the peripheral 10 is the transmitter, and the I/O card 12 is the receiver. Although any number of virtual channels 16 can be used, 256 virtual channels are preferred for this implementation. The virtual channels can start from the number zero, and end with any desired number N as long as it is finite. The only limitation is the hardware. However, the number of virtual channels is important in that it determines the number of credit packets that will be used in the present invention, as will be described. Furthermore, the present method loops to repeat the process until all the virtual channels are running. The preferred ensemble of a virtual channel data packet indicated generally at 20 and a credit packet indicated generally at 22 for one virtual channel is shown in detail in Figures 2 and 3. Each virtual channel is assigned a unique Virtual Channel Number (VCN) 24. As shown in Figure 2, the packets include some of the control characters 26 defined by the Institute of Electrical and Electrics Engineers Standards (IEEE Std) 1355-1995 for Heterogeneous Interconnect. In addition, the VCN 24 is used for both the data packet and the credit packet formats for each virtual channel. Because there is a number assigned for each virtual channel, the transmitter 10 and receiver 12 are able to keep track of the transmission within the plurality of virtual channels 16. When the receiver 12 sends a virtual channel credit packet 22 for a particular virtual channel, the transmitter 10 knows to which virtual channel the credit packet is designated. In other words, the transmitter 10 is now granted permission to send a data packet 20, if available, to the receiver 12 through the virtual channel designated by the credit packet 22. In Figure 3, the sequence of the flow of the credit packet 22 and the data packet 20 for a single virtual channel is illustrated, with the direction of the arrows beneath the packet information depicting the direction of packet flow between transmitter and receiver. Each data packet 20 from a transmitter can be transmitted only when a credit packet 22 is issued by the receiver 12. Figure 3 shows the basic flow for multiple transmissions that may take place for each virtual channel. A flowchart illustrating the subroutine of the receiver 12 can be seen in Figure 4. In order for the receiver 12 to initially start the process (block 28) for a plurality of virtual channels 16, there must be an operable communication link established (block 30) between the transmitter 10 and the receiver. Once that is done, the receiver 12 spawns a receiver process for a particular virtual channel number N (block 32). The receiver 12 first checks if there is any available buffer for VCN "N" (block 34). If the receiver 12 does not have any buffer available for transmission (block 36), it waits for a predetermined time and rechecks for available buffer until it finds some buffer (block 34). Once available buffer is found (block 36), then the receiver 12 sends a virtual channel credit packet 22 for VCN "N" to the transmitter (block 38). As noted earlier, the virtual channel credit packet 22 includes the VCN "N" to identify to the transmitter 10 that a transmission is permitted for VCN "N". The receiver 12 next checks to see if it has received a data packet 20 from the transmitter 10 (block 40). If a data packet 20 has not been received, it waits for a predetermined time and rechecks for a data packet 20 (block 40). On the other hand, if the receiver did receive the data packet 20 from the transmitter 10 (block 41), then it loops back to continue checking for available buffer for VCN "N" for the next data packet (block 34). At the same time, the receiver repeats the receiver process for the next VCN, specifically VCN "N+1" (block 42). The receiver process is repeated until all the VCNs are running (block 42), which brings the receiver process to an end (block 44). Note that since the receiver 12 actually checks for available buffer before issuing a credit packet 22, an acknowledgement packet is not needed in the present invention. After the transmission of the data packet 20, the transmitter 10 is not allowed to send any more data packets until it receives another credit packet 22 bearing its designated VCN. The flowchart for the subroutine of the transmitter 10 is illustrated in Figure 5. It is similar to the subroutine of the receiver in that the transmitter 10 does not start the transmitter process (block 46) until there is an operable communication link to the receiver 12 (block 48). When there is an established link, a transmitter process for a particular VCN is spawned (block 50), for example VCN "N". The transmitter 10 similarly verifies whether it has available buffer for transmission of packets for VCN "N" (block 52). If buffer is not available (block 54), it waits for a predetermined time and rechecks the buffer until there is available buffer for transmission (block 52). In contrast, if there is available buffer (block 54), the transmitter 10 next looks for the virtual channel credit packet 22 with its assigned VCN "N" from the receiver 12 (block 56). If a credit packet 22 can not be found, the transmitter waits for a predetermined time and rechecks for the credit packet 22 for that particular virtual channel with VCN "N" (block 56). If there is a credit packet 22, it checks to determine if it has any data packets 20 for transmission (block 58). The transmitter again waits for a predetermined time and keeps checking for data packets 20 if there is no data packet for transmission (block 58). However, if there is a data packet 20, with the VCN "N" as described earlier, it will accordingly be transmitted to the receiver 12 (block 60). After the transmission of the data packet 20 for VCN "N", the transmitter 10 loops back to continue checking for an available buffer for VCN "N" (block 52). However, it also repeat the transmitter process for the next VCN or VCN "N + 1"" until all the VCNs are running (block 62). When all the VCNs are running, the transmitter process will exit the subroutine (block 64). Thus, the preferred embodiment can provide improved transmission of data between at least one receiver operatively connected to at least one transmitter via at least one high-speed link with a plurality of virtual channels. The method and system allow the transmitter 10 to send data packets 20 to the receiver 12 only when the receiver is ready and has the available resources to accept the data packets. In addition, by using a data packet 20 and a credit packet 22 with a unique VCN 24 that is specifically assigned to each virtual channel, the present invention is able to avoid the need for an acknowledgement packet, resulting in a more efficient use of bandwidth.

Claims: A method of transmitting data one data packet at a time between at least one receiver (12) operatively connected to at least one transmitter (10) via at least one high-speed link having a plurality of virtual channels (16), the method comprising the steps of: a - for a particular virtual channel (16) the receiver (12) checking for available buffer at the receiver (12) to buffer incoming packets from the transmitter (10) from said plurality of virtual channels (16), b - the receiver (12) sending a single virtual channel credit packet (22) for the particular virtual channel (16) to the transmitter (10), said credit packet (22) being indicative that said receiver (12) is available to receive a single data packet (20) and having a unique virtual channel number assigned to said particular virtual channel (16) thereto; c - the transmitter (10) responding to said virtual channel credit packet (22) including transmitting a single data packet (20) on said assigned particular virtual channel (16) to the receiver (12) if a data packet (20) is available, after the transmission of a data packet (20), the transmitter (10) is not allowed to send any more data packets (20) on said assigned particular virtual channel (16) until it receives another virtual channel credit packet (22) for said assigned particular virtual channel (16) from the receiver (12) ; d - the receiver (12) waiting to receive a data packet (20) on said particlar virtual channel (16) transmitted from the transmitter (10); and, e - upon first receiving a data packet (20) in step d, the receiver (12) repeating steps a - d for the particular virtual channel (16) and repeating steps a - e for the next virtual channel number until all virtual channels (16) are running. A method according to claim 1, wherein said virtual channel credit packet (22) is sent when the receiver (12) has the available resources to receive transmission data from the transmitter (10) for said particular virtual channel (16) and is ready to do so. A method according to claim 1 or 2, wherein said data includes said unique virtual channel number assigned to said particular virtual channel (16). A method according to any preceding claim, wherein the step of the receiver (12) checking for available buffer includes the steps of: the receiver (12) waiting for a predetermined time if no buffer is available; and the receiver (12) sending said virtual channel credit packet (22) for said specific virtual channel (16) once buffer is available. A method according to any preceding claim, wherein said step of the transmitter (10) responding to said virtual channel credit packet (22) comprises the steps of: the transmitter (10) checking for available buffer at the transmitter side for said specific virtual channel (16); the transmitter (10) waiting for a predetermined time if no buffer is available, and the transmitter (10) looking for said virtual channel credit packet (22) from the receiver (12) if a buffer is available. A method according to claim 5, wherein said step of the transmitter (10) looking for said virtual channel credit packet (22) comprises the steps of: the transmitter (10) waiting for a predetermined time if said virtual channel credit packet (22) is not found; and the transmitter (10) checking for available data for transmission if said virtual channel credit packet (22) is found. A method according to claim 6, wherein said step of the transmitter (10) checking for available data further comprising the steps of: the transmitter (10) waiting for a predetermined time if no data is available; and the transmitter (10) sending said data if data is available. A method according to claim 4, 5, 6 or 7, wherein said step of the receiver (12) or transmitter (10) waiting for a predetermined time comprises the step of: the receiver (12) or the transmitter (10) repeatedly checking for available buffer until a buffer is available or the transmitter (10) repeatedly checking for available data until data is available for transmission or the transmitter (10) looking for said virtual channel credit packet (22) until said virtual channel credit packet (22) is found. A method according to claim 7, wherein said step of the transmitter (10) sending said data comprises the step of the transmitter (10) repeating the method according to claim 1 for the next virtual channel credit number. A method according to claim 1, wherein said step of the receiver (12) accepting said data comprises the steps of: the receiver (12) checking if said data has been received from the transmitter (10); the receiver (12) waiting for a predetermined time if said data has not been received; and the receiver (12) repeating the method according to claim 1 for the next virtual channel number if said data has been received. A system for transmitting data packets (20) one data packet at a time between at least one receiver (12) operatively connected to at least one transmitter (10) via at least one high-speed link having a plurality of virtual channels (16), said system comprising means for performing all of the steps of any preceding claims.

Inventors: ANAST FRED JOEL, BERKEMA ALAN CHRIS, JONES SCOTT ARTHUR, LE THANG VINH, ANAST, FRED JOEL, BERKEMA, ALAN CHRIS, JONES, SCOTT ARTHUR, LE, THANG VINH
Applicants: HEWLETT PACKARD CO, HEWLETT-PACKARD COMPANY
Application year: 2001
Main classification: H04L12
IPC codes: H04L12, H04Q11