WO2015096548A1 - Priority-based flow control (pfc) method, transmitting device and receiving device - Google Patents

Priority-based flow control (pfc) method, transmitting device and receiving device Download PDF

Info

Publication number
WO2015096548A1
WO2015096548A1 PCT/CN2014/089645 CN2014089645W WO2015096548A1 WO 2015096548 A1 WO2015096548 A1 WO 2015096548A1 CN 2014089645 W CN2014089645 W CN 2014089645W WO 2015096548 A1 WO2015096548 A1 WO 2015096548A1
Authority
WO
WIPO (PCT)
Prior art keywords
receiving device
priority
receiving
virtual channel
sending
Prior art date
Application number
PCT/CN2014/089645
Other languages
French (fr)
Chinese (zh)
Inventor
吴明杰
彭本华
方洪灿
吴沛
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015096548A1 publication Critical patent/WO2015096548A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a priority-based flow control PFC method, a transmitting device, and a receiving device.
  • the receiving buffer of different devices is different, and the data transmitting device needs to be full according to the receiving buffer of the data receiving device.
  • the status is flow controlled.
  • the back pressure of a data receiving end device will cause the communication between other data receiving end devices and the data transmitting end device to be interrupted at the same time.
  • PFC Priority-Based Flow Control
  • PFC technology allows up to 8 virtual channels to be created on an Ethernet link and assigns an IEEE 802.1P priority to each virtual channel, allowing any one of the virtual channels to be paused and restarted without affecting other virtual channels. flow. PFC technology allows network administrators to use some of these priorities (usually up to 8) for upper packet protocols that are sensitive to packet loss, while others are used for regular Ethernet services.
  • the existing PFC technology is based on flow control between different service types, and the virtual channel has a corresponding relationship with the service type, and only controls data transmission and reception according to different service types.
  • This type of flow control technology uses a virtual channel corresponding to the type of service. Therefore, when a certain service channel of a data receiving device is back pressured, the virtual channel of this service type will be blocked, and eventually another data receiving device cannot process this type of service normally.
  • the technical problem to be solved by the present invention is that in a traffic control scenario in which multiple I/Os are shared by multiple servers, how to implement data in the receiving buffer space of a certain receiving device will be full back pressure, Affects the data transmission of other receiving devices and transmitting devices.
  • the present invention provides a priority-based flow control PFC method, which is applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, the at least two The server includes at least one transmitting device and at least one receiving device, and the PFC method includes:
  • the sending device searches for a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device according to the identifier of the receiving device, where the first correspondence includes the Determining a priority of the receiving device, a relationship between the identifier of the receiving device, and the first virtual channel, where the first virtual channel is the receiving device receiving data from the sending device on an Ethernet link Channels in which the identifiers of different receiving devices are different, and the identifiers of the receiving devices have a one-to-one correspondence with the first virtual channel;
  • the sending device sends a packet to the receiving device by using the first virtual channel that is found, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device.
  • the sending device searches for a corresponding first virtual channel and a first corresponding relationship that is preset in the sending device according to the identifier of the receiving device.
  • the priority of the receiving device, the first correspondence includes the priority of the receiving device, the identifier of the receiving device, and the corresponding relationship between the first virtual channel, including:
  • the sending device searches for the priority of the corresponding first virtual channel and the receiving device in the first correspondence relationship preset in the sending device, according to the identifier and the service type of the receiving device,
  • the first correspondence relationship includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
  • the sending device is preset in the sending device according to the identifier of the receiving device before searching for the priority of the corresponding first virtual channel and the receiving device in the first correspondence, the method includes:
  • the first correspondence is preset in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channel; or ,
  • the first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
  • the sending device The first virtual channel that is found is sent to the receiving device, and includes:
  • the sending device generates a virtual local area network (VLAN) VLAN frame, wherein a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, where the VLAN frame is
  • the payload includes data sent by the sending device to the receiving device;
  • VLAN virtual local area network
  • the sending device sends a report to the receiving device by using the first virtual channel that is found by the sending device After the article, including:
  • the transmitting device receives the pause OFF frame from the receiving device, suspending communication with the receiving device according to the pause time in the OFF frame;
  • the OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  • the method includes:
  • the ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
  • the present invention provides a priority-based flow control PFC method, applicable to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, the at least two servers including at least one sending a device and at least one receiving device, the PFC method comprising:
  • the receiving device receives a packet from the sending device by using a first virtual channel, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first a virtual channel is connected to the receiving device from the sending device on an Ethernet link a priority of the receiving device, where the priority of the receiving device is a priority that is found by the sending device in a preset first correspondence, the first correspondence includes a priority of the receiving device, and the receiving Corresponding relationship between the identifier of the device and the first virtual channel, where the identifiers of the different receiving devices are different, and the identifier of the receiving device has a one-to-one correspondence with the first virtual channel.
  • the method before the receiving device receives the packet from the sending device by using the first virtual channel, the method includes:
  • the second correspondence includes a service type, a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channels.
  • the second corresponding relationship further includes a priority of the receiving device.
  • the receiving device a virtual channel, receiving a message from the sending device, including:
  • the receiving device receives a virtual local area network (VLAN) VLAN frame from the sending device by using the first virtual channel, where a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device
  • the payload of the VLAN frame includes data sent by the sending device to the receiving device.
  • VLAN virtual local area network
  • the receiving device by using the first virtual channel, receives a packet from the sending device After that, include:
  • the OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  • the method includes:
  • the ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
  • the present invention provides a sending device, which is applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, including:
  • a locating module configured to search for a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device according to the identifier of the receiving device, where the first corresponding relationship includes the receiving device a priority of the priority, the identifier of the receiving device, and a correspondence between the first virtual channel, where the first virtual channel is a channel for the receiving device to receive data from the sending device on an Ethernet link,
  • the identifiers of the different receiving devices are different, and the identifiers of the receiving devices have a one-to-one correspondence with the first virtual channel.
  • a sending module configured to connect to the searching module, to send a packet to the receiving device by using the first virtual channel that is found, where the packet includes a priority of the receiving device and the The data transmitted by the transmitting device to the receiving device.
  • the searching module is further configured to: preset, in the sending device, according to an identifier and a service type of the receiving device Searching, in the first correspondence, the priority of the corresponding first virtual channel and the receiving device, where the first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and Corresponding relationship between the first virtual channels.
  • the method further includes:
  • the establishing module is further configured to establish, on the Ethernet link, an identifier of the receiving device and the first virtual channel corresponding to the service type;
  • a configuration module configured to be connected to the establishing module, configured to preset the first correspondence in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a location Corresponding relationship between the first virtual channels;
  • the configuration module is further configured to pre-set the first correspondence in the sending device, where the first correspondence includes the service type, a priority of the receiving device, and an identifier of the receiving device. Correspondence relationship with the first virtual channel.
  • the sending module includes:
  • a generating unit configured to generate a virtual local area network (VLAN) VLAN frame, wherein a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, where a payload of the VLAN frame includes the sending Data sent by the device to the receiving device;
  • VLAN virtual local area network
  • the import unit is connected to the generating unit, and configured to send the VLAN frame to the receiving device by using the first virtual channel that is found.
  • the method further includes:
  • a processing module connected to the sending module, is configured to suspend communication with the receiving device according to a pause time in the OFF frame if a paused OFF frame is received from the receiving device;
  • the OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  • the processing module is further configured to: if the pause time in the OFF frame is reached or from the Receiving, by the receiving device, a communication ON frame, resuming communication with the receiving device;
  • the ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
  • the present invention provides a receiving device, which is applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, including:
  • a receiving module configured to receive, by using a first virtual channel, a packet from a sending device, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first virtual
  • the channel is a channel for the receiving device to receive data from the sending device on the Ethernet link, and the priority of the receiving device is a priority that the sending device finds in the preset first correspondence relationship.
  • the first correspondence includes the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels, where different receiving devices have different identifiers, and the identifiers of the receiving devices are
  • the first virtual channel has a one-to-one correspondence.
  • the method further includes:
  • the establishing module is further configured to establish, on the Ethernet link, an identifier of the sending device and a second virtual channel corresponding to the service type;
  • a configuration module configured to be connected to the establishing module, configured to pre-set a second correspondence in the receiving device, where the second correspondence includes a priority of the sending device, and the sending device Correspondence between the identifier and the second virtual channel;
  • the configuration module is further configured to pre-set a second correspondence in the receiving device in the receiving device, where the second correspondence includes a service type, a priority of the sending device, and the sending device Correspondence between the identifier and the second virtual channel.
  • the second corresponding relationship further includes a priority of the receiving device.
  • the receiving module is further configured to pass the first virtual channel
  • the sending device receives the virtual local area network (VLAN) VLAN frame, wherein the priority field of the VLAN frame is written by the sending device to the priority of the received receiving device, and the payload of the VLAN frame includes the sending device The data sent by the receiving device.
  • VLAN virtual local area network
  • the method further includes:
  • a sending module configured to be connected to the receiving module, configured to send, by using the second virtual channel, a pause OFF frame to the sending device, where a priority field of the OFF frame is written by the receiving device into the VLAN frame.
  • the OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  • the sending module is further configured to send, by using the second virtual channel, the sending device Connecting an ON frame, the priority field of the ON frame being written by the receiving device, the priority acquired from the VLAN frame or the priority of the receiving device found in the second correspondence,
  • the ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
  • the receiving devices by configuring a correspondence between the priority, the first virtual channel, and the receiving device identifier in the sending device, different receiving devices can receive data from the sending device by using different first virtual channels, and the receiving device appears.
  • the back pressure or communication it is only necessary to stop the receiving device from receiving data from the transmitting device through its corresponding first virtual channel without affecting data transmission of other receiving devices and the transmitting device.
  • FIG. 1 is a flowchart showing a priority-based flow control PFC method according to Embodiment 1 of the present invention
  • FIG. 2 is a flowchart showing a priority-based flow control PFC method according to Embodiment 2 of the present invention
  • FIG. 3 is a flowchart showing a priority-based flow control PFC method according to Embodiment 3 of the present invention.
  • FIG. 4 is a flowchart showing a priority-based flow control PFC method according to Embodiment 4 of the present invention.
  • FIG. 5a is a structural block diagram of a transmitting device according to Embodiment 5 of the present invention.
  • Figure 5b is a block diagram showing the structure of a transmitting device according to Embodiment 5 of the present invention.
  • FIG. 6 is a block diagram showing the structure of a transmitting apparatus according to Embodiment 6 of the present invention.
  • Figure 7a is a block diagram showing the structure of a receiving device according to Embodiment 7 of the present invention.
  • Figure 7b is a block diagram showing the structure of a receiving device according to Embodiment 7 of the present invention.
  • FIG. 8 is a block diagram showing the structure of a receiving apparatus according to Embodiment 8 of the present invention.
  • FIG. 9 is a block diagram showing the structure of a priority-based flow control PFC device according to Embodiment 9 of the present invention.
  • FIG. 1 is a flow chart showing a priority-based flow control PFC method according to a first embodiment of the present invention. As shown in FIG. 1 , it may be applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, where the at least two servers may include at least one sending device and at least one receiving device, and at least two virtual devices.
  • the channel may include a channel for data transmission between different transmitting devices and different receiving devices.
  • the PFC method can mainly include:
  • Step S100 The sending device is in the sending device according to the identifier of the receiving device. Finding a priority of the corresponding first virtual channel and the receiving device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and the first Corresponding relationship between a virtual channel, the first virtual channel is a channel for the receiving device to receive data from the sending device on an Ethernet link; wherein different receiving devices have different identifiers, and the receiving device The identifier has a one-to-one correspondence with the first virtual channel.
  • each receiving device may be configured by the network administrator to configure a unique identifier, and the sending device may uniquely determine the receiving device by using the identifier.
  • different sending devices and different receiving devices can receive the configuration of their priorities by the network administrator, and the priority of each transmitting device or each receiving device is unique among all transmitting devices or receiving devices. For example, in a traffic control scenario where at least two servers share at least two virtual channels in an Ethernet network, including two sending devices (such as HOST_0, HOST_1), their priorities can be set to 0, 1 by the network administrator respectively. 2 receiving devices (such as IO_0, IO_1), their priority can also be set to 0, 1 by the network administrator.
  • the sending device can receive the configuration of the network administrator, that is, set the one-to-one correspondence between the receiving device and the first virtual channel in the sending device, and different channels can respectively be used to transmit data to different receiving devices, and the number of channels.
  • the data can be established on the sending device side, respectively, for sending to IO_0 and IO_1, respectively.
  • the sending device may search for the priority of the corresponding first virtual channel and the receiving device in the first correspondence configured by the network administrator, and the sending device sends data to the receiving device, for example, IO_0.
  • the priority is 0, corresponding to the first virtual channel 0, HOST_0 can send data to IO_0 through the first virtual channel 0.
  • Step S120 The sending device sends a packet to the receiving device by using the first virtual channel that is found, where the packet includes the priority of the receiving device and the sending device. Data sent to the receiving device.
  • the sending device can communicate with the receiving device by using the first virtual channel corresponding to the receiving device, that is, the sending device can send the packet to the receiving device by using the first virtual channel.
  • the priority of the receiving device found in step S100 may be written in the priority field of the packet, and the data sent by the sending device to the receiving device may be included in the payload of the packet.
  • the receiving device may return a response to the sending device according to the data empty state of the receiving buffer space. If the data received by the receiving device is full and the data cannot be continuously received, the receiving device may perform backpressure according to the flow control technology, that is, the sending device does not continue to use the first virtual channel corresponding to the identifier of the receiving device.
  • the receiving device sends data.
  • the identifiers of the receiving devices are in a one-to-one correspondence with the first virtual channel. Therefore, the back pressure of the receiving device does not affect the sending device and other receiving devices in the Ethernet through other receiving devices.
  • the first virtual channel corresponding to the identifier is communicated.
  • the data of the IO_0 receiving buffer space is full, and the voltage can be reversed to HOST_0.
  • HOST_0 can suspend communication with IO_0 through the first virtual channel 0, but HOST_0 can still be IO_1 communicates through the first virtual channel 1.
  • the PFC method may further include:
  • Step S1001 Establish a first virtual channel corresponding to the identifier of the receiving device on the Ethernet link.
  • Step S1002 A first correspondence is preset in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channels.
  • the first virtual channel (such as the first virtual channel 0 and the first virtual channel) Channel 1), combining the priorities of the two receiving devices, the network administrator can set the priority of the receiving device, the identifier of the receiving device, and the first correspondence between the first virtual channels, for example, the priority of IO_0 is 0. , corresponding to the first virtual channel 0.
  • the first correspondence may be used to subsequently determine the priority of a certain receiving device and the first virtual channel that sends data to the receiving device.
  • step S120 may further include:
  • Step S140 The sending device generates a virtual local area network (VLAN) VLAN frame, where the priority field of the VLAN frame is written by the sending device to the priority of the received receiving device, and the payload of the VLAN frame includes the Decoding data sent by the sending device to the receiving device;
  • VLAN virtual local area network
  • Step S160 The sending device sends the VLAN frame to the receiving device by using the first virtual channel that is found.
  • the sending device may first find the priority of the receiving device by searching for the first correspondence, and write the priority of the receiving device in the corresponding priority field of the VLAN frame of the virtual local area network.
  • the level may include data sent by the sending device to the receiving device in the payload of the VLAN frame. For example, when HOST_0 needs to send data to IO_0, HOST_0 can find the priority of IO_0 by 0 by looking up the first correspondence, corresponding to the first virtual channel 0, HOST_0 can write 0 in the priority field of the VLAN frame, and will need The transmitted data is written to the payload of the VLAN frame and the VLAN frame is sent to IO_0 through the first virtual channel 0.
  • the PFC method may further include:
  • Step S170 If the transmitting device receives the pause OFF frame from the receiving device, suspend communication with the receiving device according to the pause time in the OFF frame; wherein the OFF frame is received by the receiving device The device is generated in a state where the received buffer space occupied by the received data is higher than the upper threshold.
  • the receiving device may return a corresponding response to the sending device according to the data empty state in the receiving buffer space. If the space occupied by the data in the receiving buffer space of the receiving device is higher than the upper threshold, the receiving device may Sending an OFF frame to the sending device, instructing the sending device to suspend communication with the receiving device according to the pause time in the OFF frame, and when the pause time is reached, the transmitting device can automatically resume communication with the receiving device.
  • the pause time may be determined by the content in the pause time field in the OFF frame.
  • the sending device may stop scheduling the first virtual channel corresponding to the receiving device to suspend communication with the receiving device.
  • IO_0 can send an OFF frame to HOST_0.
  • HOST_0 stops the first virtual channel corresponding to IO_0 according to the pause time in the OFF frame. Dispatch, suspend communication with IO_0.
  • the upper threshold is a maximum amount of data that can be stored in the receiving buffer space of the receiving device. Since the sending of the OFF frame from the receiving device to the sending device receiving the OFF and responding, it takes a certain time, and there may be some time during this time. The data being sent needs to be received by the receiving device, and cannot be discarded because the data is full. Therefore, the amount of data that the receiving device can receive can be greater than the upper threshold, that is, the storage space needs to have a certain margin. If it is higher than the upper threshold, the data will be full and the receiving device will back pressure.
  • the method may further include:
  • Step S180 if the pause time in the OFF frame is reached or the transmitting device receives the connected ON frame from the receiving device, resume communication with the receiving device; wherein the ON frame is received by the receiving device
  • the device is generated in a state where the received buffer space occupied by the received data is lower than the lower threshold.
  • the sending device can automatically resume communication with the receiving device; on the other hand, after the backing device receives the back pressure, the space occupied by the data may be reduced, and when the pause time is not reached, If the receiving buffer space occupied by the data is lower than the lower threshold, the receiving device may send an ON frame to the sending device to instruct the sending device to resume communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is lower than the lower threshold, IO_0 can send an ON frame to HOST_0. After receiving the ON frame, HOST_0 can restart the scheduling of the first virtual channel 0 corresponding to IO_0, and resume with IO_0. Communication. Lower threshold The minimum amount of data stored in the receiving buffer space of the receiving device is lower than the lower threshold, indicating that the receiving buffer space of the receiving device is about to have no data, and the transmitting device can continue to send data to it.
  • the sending device may also serve as a receiving end, and receive data from other devices through corresponding channels according to the corresponding relationship between the channel and the device preset by the network administrator.
  • the priority-based flow control PFC method of the embodiment by establishing a first correspondence relationship in the sending device, different receiving devices can communicate with the sending device by using different first virtual channels, and a receiving device data is full.
  • the back pressure or the communication is abnormal, it is only necessary to stop the communication of the receiving device through the corresponding first virtual channel and the transmitting device, and the data transmission of the other receiving device and the transmitting device is not affected.
  • FIG. 2 is a flow chart showing a priority-based flow control PFC method according to Embodiment 2 of the present invention.
  • the steps in FIG. 2 having the same reference numerals as in FIG. 1 have the same functions, and a detailed description of these steps will be omitted for the sake of brevity.
  • the PFC method includes:
  • Step S200 The sending device searches for the priority of the corresponding first virtual channel and the receiving device in the first correspondence relationship preset in the sending device according to the identifier and the service type of the receiving device.
  • the first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
  • the service type of the receiving device that is, the setting service type, the priority of the receiving device, the identifier of the receiving device, and the first virtual channel may also be included.
  • the service type of the receiving device that is, the setting service type, the priority of the receiving device, the identifier of the receiving device, and the first virtual channel may also be included.
  • the service type of the receiving device that is, the setting service type, the priority of the receiving device, the identifier of the receiving device, and the first virtual channel may also be included.
  • Correspondence refer to the first embodiment of the present invention.
  • the administrator establishes four first virtual channels (such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3) on the sending device side, and the first virtual channel 0 and the first virtual channel 1 They are used to send data of service type 0 and service type 1 to IO_0, respectively, and the first virtual channel 2 and the first virtual channel 3 are respectively used to send data of service type 0 and service type 1 to IO_1.
  • first virtual channels such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3
  • the service type 0 of the IO_0 has a priority of 0, corresponding to the first virtual channel 0, and the service type 1 of the IO_0 has a priority of 1, corresponding to the first virtual channel 1, and the service type 0 of the IO_1 has a priority of 2, corresponding to The service type 1 of the first virtual channel 2, IO_1 has a priority of 3, corresponding to the first virtual channel 3.
  • the PFC method may further include:
  • Step S2001 Establish an identifier of the receiving device and a first virtual channel corresponding to the service type on the Ethernet link.
  • a first correspondence is preset in the sending device, where the first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and the first virtual channel. Correspondence relationship.
  • the identifiers are set to IO_0 and IO_1 by the network administrator respectively, and each receiving device has two service types (such as service type 0 and service type 1).
  • the first virtual channel (such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3) may be established on the sending device side, and the priority of each service type of the two receiving devices is combined.
  • the network administrator can configure the service type, the priority, the identifier of the receiving device, and the corresponding relationship of the first virtual channel.
  • the service type 0 of IO_0 has a priority of 0, and corresponds to the service of the first virtual channel 0, IO_0.
  • Type 1 has a priority of 1
  • the service type 0 of the IO_1 has a priority of 2
  • the service type 1 of the IO_1 has a priority of 3, corresponding to the first virtual channel 3.
  • the first correspondence may be used to subsequently determine the priority of a certain receiving device and the first virtual channel that the sending device sends data to the receiving device.
  • the receiving device may return a corresponding response to the sending device according to the data empty state of the receiving buffer space of a certain service type of the service. Specifically, if the receiving buffer space occupied by the data of the certain service type received by the receiving device is higher than the upper threshold, the receiving device may send an OFF frame to the sending device, to indicate that the sending device pauses with the receiving device during the pause time.
  • the communication of the service type is performed, but does not affect the communication between the sending device and the receiving device for other service types.
  • the receiving device may send an ON frame to the sending device to indicate that the sending device recovers and receives the receiving buffer.
  • the device performs communication for this type of service.
  • the receiving buffer space occupied by the data of the service type 0 received by IO_0 is higher than the upper threshold, IO_0 may send an OFF frame to HOST_0, and after receiving the OFF frame, HOST_0 suspends the service type 0 with the first virtual channel 0 by IO_0.
  • IO_0 can send an ON frame to HOST_0, and after receiving the ON frame, HOST_0 resumes service with IO_0 through the first virtual channel 0.
  • Type 0 communication For the upper threshold and the lower threshold, refer to the related description of the priority-based flow control PFC method in the first embodiment of the present invention.
  • the receiving device by establishing a first correspondence relationship in the sending device, different receiving devices can use different first virtual channels to communicate with different sending services of the sending device, and a certain receiving When the data of a certain service type of the device is full or the communication is abnormal, the receiving device only needs to stop the receiving device from performing communication with the sending device through the first virtual channel corresponding to the service type, without affecting the receiving device. Perform data transmission with other types of services on the sending device, and it will not affect other receiving devices and sending devices. Data transfer.
  • FIG. 3 is a flow chart showing a priority-based flow control PFC method according to Embodiment 3 of the present invention.
  • the PFC method may be applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, where the at least two servers include at least one sending device and at least one receiving device, at least two The virtual channel may include a channel for data transmission between different transmitting devices and different receiving devices.
  • the PFC method can mainly include:
  • Step S300 The receiving device receives a packet from the sending device by using a first virtual channel, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device.
  • the first virtual channel is a channel for the receiving device to receive data from the sending device on an Ethernet link, and the priority of the receiving device is found by the sending device in a preset first correspondence relationship.
  • Priority the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channels.
  • each sending device or receiving device in the process of communicating between the Ethernet sending device and the receiving device, can be configured with a corresponding priority by the network administrator, and the priority of each sending device or receiving device is at all.
  • the only one of the sending device or the receiving device For example, in a traffic control scenario where at least two servers share at least two virtual channels in an Ethernet network, including two sending devices (such as HOST_0, HOST_1), their priorities can be set to 0, 1 by the network administrator respectively. 2 receiving devices (such as IO_0, IO_1), their priority can also be set to 0, 1 by the network administrator.
  • the sending device can receive the configuration of the network administrator, that is, set the one-to-one correspondence between the receiving device and the first virtual channel in the sending device, and different channels can respectively be used to transmit data to different receiving devices, and the number of channels.
  • the receiving device can pass its corresponding first virtual
  • the pseudo channel receives the message sent by the sending device, for example, IO_0 can receive the message sent by HOST_0 through the first virtual channel 0.
  • the PFC method may further include:
  • Step S3001 Establish a second virtual channel corresponding to the identifier of the sending device on the Ethernet link.
  • Step S3002 A second correspondence is preset in the receiving device, where the second correspondence includes a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channel.
  • the second virtual channel (such as the second virtual channel 0 and the second virtual channel 1) combines the priorities of the two sending devices, and the network administrator can set the priority of the sending device, the identifier of the sending device, and the second virtual channel.
  • the second correspondence between the two for example, HOST_0 has a priority of 0, corresponding to the second virtual channel 0, for transmitting data addressed to HOST_0.
  • the second correspondence may be used to subsequently determine the priority of a certain sending device and the second virtual channel that sends data.
  • the priority of the receiving device may also be included in the second correspondence in the receiving device.
  • the identifiers are IO_0 and IO_1, respectively, and their priorities may be set to 0, 1, respectively, by the network administrator.
  • the priority of IO_0 is 0, the priority of HOST_0 is 0, and IO_0 receives the data sent by HOST_0 through the first virtual channel 0, and sends data to HOST_0 through the second virtual channel 0.
  • step S300 may further include:
  • Step S320 The receiving device receives a virtual local area network (VLAN) VLAN frame from the sending device by using the first virtual channel, where a priority field of the VLAN frame is used by the sending device Write the priority of the discovered receiving device, where the payload of the VLAN frame includes data sent by the sending device to the receiving device.
  • VLAN virtual local area network
  • the receiving device may receive the VLAN frame from the sending device by using the first virtual channel corresponding to the receiving device according to the first correspondence. For example, when IO_0 communicates with HOST_0, HOST_0 can find that the priority of IO_0 is 0 according to the first correspondence, corresponding to the first virtual channel 0, IO_0 can receive the VLAN frame through the first virtual channel 0, and HOST_0 can be in the VLAN frame. The priority field is written to 0, and the data sent to IO_0 is written to the payload of the VLAN frame.
  • the PFC method may further include:
  • Step S340 The receiving device sends a pause OFF frame to the sending device by using the second virtual channel, where a priority field of the OFF frame is written by the receiving device from a priority obtained by using the VLAN frame. Or the priority of the receiving device found in the second correspondence,
  • the OFF frame is generated by the receiving device in a state in which a receiving buffer space occupied by the received data is higher than an upper threshold.
  • the receiving device may return a corresponding response to the sending device according to the data empty state of the receiving buffer space. If the receiving buffer space occupied by the data received by the receiving device is higher than the upper threshold, the receiving device may obtain the priority of the receiving device from the received VLAN frame, or obtain the priority of the receiving device from the second correspondence. And writing the priority of the receiving device in the priority field of the OFF frame, and sending an OFF frame to the sending device by using the second virtual channel, to instruct the sending device to pause the receiving device according to the pause time in the OFF frame. Communication, when the timeout period is reached, the sending device can automatically resume communication with the receiving device. The pause time may be determined by the content in the pause time field in the OFF frame.
  • the sending device may stop scheduling the first virtual channel corresponding to the receiving device to suspend communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0 through the second virtual channel 0, and HOST_0 receives After the OFF frame, communication with IO_0 is suspended according to the pause time in the OFF frame.
  • the upper threshold is a maximum amount of data that can be stored in the receiving buffer space of the receiving device. Since the sending of the OFF frame from the receiving device to the sending device receiving the OFF and responding, it takes a certain time, and there may be some time during this time.
  • the data being sent needs to be received by the receiving device and cannot be discarded because the data is full. Therefore, the amount of data that the receiving device can store can be greater than the upper threshold, that is, the storage space needs to have a certain margin. If it is higher than the upper threshold, the data will be full and the receiving device will back pressure.
  • the method may further include:
  • Step S360 The receiving device sends, by using the second virtual channel, a connected ON frame to the sending device, where a priority field of the ON frame is used by the receiving device to write a priority obtained from the VLAN frame. Or the priority of the receiving device found in the second correspondence,
  • the ON frame is generated by the receiving device in a state that the receiving buffer space occupied by the received data is lower than a lower threshold.
  • the receiving buffer space occupied by the received data may be reduced. Before the timeout period is reached, if the receiving buffer space occupied by the received data is lower than the lower threshold, the receiving device may The sending device sends an ON frame, which is used to instruct the sending device to resume communication with the receiving device. For example, the space occupied by the data of IO_0 is lower than the lower threshold, IO_0 can send the ON frame through the second virtual channel 0, and the communication with IO_0 is resumed after the HOST_0 receives the ON frame.
  • the lower threshold is the minimum amount of data stored in the receiving buffer space of the receiving device. If the threshold is lower than the lower threshold, the storage space of the receiving device is about to have no data, and the sending device can continue to send data to the receiving device.
  • the receiving device may also serve as a sending end, according to the correspondence between the identifier of the second virtual channel and the sending device and the priority in the second correspondence, to the second virtual channel by using the second virtual channel.
  • the corresponding sending device sends data.
  • the sending device can serve as a receiving end, and receive data from the receiving device through the corresponding second virtual channel.
  • FIG. 4 is a flow chart showing a priority-based flow control PFC method according to Embodiment 4 of the present invention.
  • the same steps in FIG. 4 as those in FIG. 3 have the same functions, and a detailed description of these steps will be omitted for the sake of brevity.
  • the PFC method includes:
  • Step S4001 Establish an identifier of the sending device and a second virtual channel corresponding to the service type on the Ethernet link.
  • Step S4002 a second correspondence is preset in the receiving device, where the second correspondence includes the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel. Correspondence relationship.
  • the service type of the sending device that is, the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel may also be included.
  • the identifiers are respectively set by the network administrator as HOST_0 and HOST_1, and each transmitting device can receive and receive.
  • the device performs communication between two service types (such as service type 0 and service type 1).
  • the network administrator can create four second virtual channels on the receiving device (such as the second virtual channel 0 and the second).
  • the virtual channel 1, the second virtual channel 2, and the second virtual channel 3) combine the priorities of the two sending devices, and the network administrator can configure the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel.
  • the second correspondence of the service type 0 of HOST_0 is 0, corresponding to the second virtual channel 0, the service type 1 priority of HOST_0 is 1, corresponding to the second virtual channel 1, and the service type 0 priority of HOST_1 is 2, corresponding to the second virtual channel 2, the service type 1 of HOST_1 has a priority of 3, corresponding to the second virtual channel 3.
  • the second correspondence may be used to subsequently determine the priority of a certain sending device and the second virtual channel that the receiving device sends data to the sending device.
  • the priority of the receiving device may also be included.
  • the priority-based flow control PFC method in Embodiment 3 of the present invention refers to the related description of the priority-based flow control PFC method in Embodiment 3 of the present invention.
  • the receiving device may return a corresponding response to the sending device according to the data empty state of the receiving buffer space of a certain service type of the service. Specifically, if the receiving buffer space occupied by the data of the certain service type received by the receiving device is higher than the upper threshold, the receiving device may send an OFF frame to the sending device by using the second virtual channel, to indicate that the sending device is in the pause period.
  • the communication of the service type is suspended within the receiving device, but does not affect the communication between the transmitting device and the receiving device for other service types.
  • the receiving device may send an ON frame to the sending device by using the second virtual channel to indicate the sending, when the receiving buffer space occupied by the data of the service type received by the receiving device is lower than the lower threshold.
  • the device resumes communication with the receiving device for the type of service. For example, the receiving buffer space occupied by the data of the service type 0 received by IO_0 is higher than the upper threshold, and IO_0 can send the OFF frame to HOST_0 through the second virtual channel 0, and after receiving the OFF frame, HOST_0 suspends the service type with IO_0.
  • IO_0 can send an ON frame to HOST_0 through the second virtual channel 0, and HOST_0 resumes the service with IO_0 after receiving the ON frame.
  • Type 0 communication The upper threshold and the lower threshold may be referred to in the first embodiment of the present invention based on the priority. A description of the flow control PFC method of the class.
  • the receiving device by establishing a first correspondence relationship in the sending device, different receiving devices can use different first virtual channels to communicate with different sending services of the sending device, and a certain receiving When the data of a certain service type of the device is full or the communication is abnormal, the receiving device only needs to stop the receiving device from performing communication with the sending device through the first virtual channel corresponding to the service type, without affecting the receiving device. Data transmission with other types of services by the transmitting device does not affect the data transmission of other receiving devices and transmitting devices.
  • FIG. 5a is a block diagram showing the structure of a transmitting apparatus according to Embodiment 5 of the present invention.
  • the sending device 500 can be applied to a traffic control scenario in which at least two servers in the Ethernet share at least two virtual channels, which may include:
  • the searching module 510 is configured to search for a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device according to the identifier of the receiving device, where the first correspondence includes the receiving a priority of the device, an identifier of the receiving device, and a correspondence between the first virtual channel, where the first virtual channel is a channel that the receiving device receives data from the sending device on an Ethernet link. .
  • each receiving device may be configured by the network administrator to configure a unique identifier, and the sending device may uniquely determine the receiving device by using the identifier.
  • different sending devices and different receiving devices can receive the configuration of their priorities by the network administrator, and the priority of each transmitting device or each receiving device is unique among all transmitting devices or receiving devices. For example, in a traffic control scenario where at least two servers share at least two virtual channels in an Ethernet network, including two sending devices (such as HOST_0, HOST_1), their priorities can be set to 0, 1 by the network administrator respectively. 2 receiving devices (such as IO_0, IO_1), their priority can also be set to 0, 1 by the network administrator.
  • the sending device can receive the configuration of the network administrator, that is, set a one-to-one correspondence between the receiving device and the first virtual channel in the sending device, and different channels can be used to transmit data to different receiving devices, respectively, and the number of channels and The number of receiving devices is the same. For example, if there are two receiving devices (such as IO_0 and IO_1), two first virtual channels (such as the first virtual channel 0 and the first virtual channel 1) can be established on the sending device through the configuration of the network administrator. Send data to IO_0 and IO_1.
  • the searching module 510 may search for the priority of the corresponding first virtual channel and the receiving device in the first corresponding relationship in the sending device 500, where the sending device 500 sends data to the receiving device, for example, HOST_0.
  • the searching module 510 may find that the priority of IO_0 is 0 in the first correspondence of HOST_0, corresponding to the first virtual channel 0, and the subsequent HOST_0 may send data to the IO_0 through the first virtual channel 0.
  • the sending module 520 is connected to the searching module 510, and configured to send a packet to the receiving device by using the first virtual channel that is found, where the packet includes the priority of the receiving device and the The data transmitted by the transmitting device to the receiving device.
  • the sending device 500 can communicate with the receiving device by using the first virtual channel corresponding to the receiving device, that is, the sending module 520 of the sending device 500 can pass the first virtual channel. Sending a message to the receiving device, and the priority of the receiving device that is found by the searching module 510 can be written in the priority field of the packet, and the sending device 500 can be included in the payload of the packet (Payload). Receive data sent by the device.
  • the receiving device may return a response to the sending device 500 according to the data empty state of the receiving buffer space. If the data received by the receiving device is full and the data cannot be continuously received, the receiving device may perform backpressure according to the flow control technology, that is, the sending device 500 does not continue to receive the first virtual channel corresponding to the receiving device. The device sends data. In this way, the back pressure of the receiving device does not affect the other receiving devices in the Ethernet and the transmitting device 500 to communicate through the first virtual channel corresponding to the other receiving devices, for example, IO_0 The data in the buffer space will be full, and it can be back pressured to HOST_0. After receiving the back pressure, HOST_0 can suspend communication with IO_0 through the first virtual channel 0, but HOST_0 can still communicate with IO_1 through the first virtual channel 1.
  • Figure 5b is a block diagram showing the structure of a transmitting apparatus according to Embodiment 5 of the present invention.
  • the sending device 500 may further include:
  • the establishing module 530 is configured to establish, on the Ethernet link, a first virtual channel corresponding to the identifier of the receiving device;
  • the configuration module 540 is connected to the establishing module 530, and configured to preset the first correspondence in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a location
  • the correspondence between the first virtual channels is described.
  • the establishing module 530 can establish two first virtual channels (such as A virtual channel 0 and a first virtual channel 1), combined with the priority of the two receiving devices, the configuration module 540 can set the priority of the receiving device, the identifier of the receiving device, and the first correspondence of the first virtual channel, for example, IO_0
  • the priority is 0, corresponding to the first virtual channel 0.
  • the first correspondence may be used to subsequently determine the priority of a certain receiving device and the first virtual channel that sends data to the receiving device.
  • the sending module 520 may further include:
  • a generating unit 521 configured to generate a virtual local area network (VLAN) VLAN frame, where a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, where a payload of the VLAN frame includes the Transmitting data sent by the device to the receiving device;
  • VLAN virtual local area network
  • the importing unit 522 is connected to the generating unit 521, and configured to send the VLAN frame to the receiving device by using the first virtual channel that is found.
  • the sending device 500 when the sending device 500 sends a packet to the receiving device, the sending device may first search for the first correspondence through the searching module 510, find the priority of the receiving device, and generate the packet.
  • the unit 521 writes the priority of the receiving device in the corresponding priority field of the virtual local area network VLAN frame, and may include the data sent by the sending device to the receiving device in the payload of the VLAN frame.
  • HOST_0 when HOST_0 needs to send data to IO_0, HOST_0 can search for the first correspondence through the lookup module 510, and find that the priority of IO_0 is 0, corresponding to the first virtual channel 0, and HOST_0 can pass the priority of the VLAN frame by the generating unit 521.
  • the field is written with 0, the data to be sent is written to the payload of the VLAN frame, and the VLAN frame is sent to IO_0 through the first virtual channel 0.
  • the sending device 500 may further include:
  • the processing module 550 is connected to the sending module 520, and configured to suspend communication with the receiving device according to a pause time in the OFF frame if the sending device receives a pause OFF frame from the receiving device;
  • the OFF frame is generated by the receiving device in a state in which a receiving buffer space occupied by the received data is higher than an upper threshold.
  • the receiving device may return a corresponding response to the sending device 500 according to the data empty state in the receiving buffer space. If the space occupied by the data in the receiving buffer space of the receiving device is higher than the upper threshold, the receiving device may send an OFF frame to the sending device 500, which is used to indicate that the processing module 550 of the transmitting device 500 is based on the pause time in the OFF frame.
  • the communication with the receiving device is suspended, and when the pause time is reached, the transmitting device 500 can automatically resume communication with the receiving device.
  • the pause time may be determined by the content in the pause time field in the OFF frame.
  • the sending device may stop scheduling the first virtual channel corresponding to the receiving device to suspend communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0. After receiving the OFF frame, HOST_0 stops the first virtual channel corresponding to IO_0 according to the pause time in the OFF frame. Dispatch, suspend communication with IO_0.
  • the upper threshold is a maximum amount of data that can be stored in the receiving buffer space of the receiving device. Since the receiving device sends an OFF frame to the transmitting device to receive an OFF and responds, It takes a certain amount of time.
  • the amount of data that the receiving device can receive can be greater than the upper threshold, that is, the storage space needs to be left. There is a certain amount of margin. If it is higher than the upper threshold, the data will be full and the receiving device will back pressure.
  • the processing module 550 is further configured to: resume communication with the receiving device if a pause time in the OFF frame is reached or a connected ON frame is received from the receiving device;
  • the ON frame is generated by the receiving device in a state that the receiving buffer space occupied by the received data is lower than a lower threshold.
  • the sending device 500 can automatically resume communication with the receiving device through the processing module 550; on the other hand, after the back-up device receives the data, the space occupied by the data may be reduced, in the absence of When the timeout period is reached, if the receiving buffer space occupied by the data is lower than the lower threshold, the receiving device may send an ON frame to the sending device 500 to instruct the sending device 500 to resume communication with the receiving device through the processing module 550. For example, if the received buffer space occupied by the data received by IO_0 is lower than the lower threshold, IO_0 can send an ON frame to HOST_0.
  • HOST_0 can restart the scheduling of the first virtual channel 0 corresponding to IO_0, and resume with IO_0.
  • the lower threshold is the minimum amount of data stored in the receiving buffer space of the receiving device. If the lower threshold is lower, the receiving buffer space of the receiving device is about to have no data, and the sending device 500 can continue to send data to the receiving device.
  • the sending device 500 can also serve as a receiving end, and receive data from other devices through corresponding channels according to the corresponding relationship between the channel and the device preset by the network administrator.
  • the first corresponding relationship is set in the sending device by using the configuration module, so that different receiving devices can communicate with the sending device by using different first virtual channels, and a receiving device data is full of back pressure or communication.
  • a receiving device data is full of back pressure or communication.
  • FIG. 6 is a block diagram showing the structure of a transmitting apparatus according to Embodiment 6 of the present invention.
  • the components in Fig. 6 having the same reference numerals as those in Figs. 5a and 5b have the same functions, and a detailed description of these components will be omitted for the sake of brevity.
  • the searching module 610 of the transmitting device 600 can have the function of the searching module 510 in the fifth embodiment of the present invention.
  • it can be configured as:
  • the service type 0 of IO_0 has a priority of 0, corresponding to the first virtual channel 0, and HOST_0 transmits the data of the service type 0 to the IO_0 through the first virtual channel 0.
  • the service type of the receiving device that is, the setting of the service type, the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels may also be included.
  • the service type of the receiving device that is, the setting of the service type, the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels.
  • the Ethernet includes two receiving devices (such as IO_0, IO_1), IO_0 and IO_1 respectively include two service types (such as services).
  • Type 0, service type 1 the priority of setting IO_0 service type 0 can be set to 0, the priority of IO_0 service type 1 is set to 1, the priority of IO_1 service type 0 is set to 2, and the priority of IO_1 service type 1
  • the priority is set to 3; four first virtual channels (such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3) may be established on the sending device end, and the first virtual channel 0
  • the first virtual channel 1 is used to send data of service type 0 and service type 1 to IO_0, the first virtual channel 2, the first virtual
  • the quasi-channel 3 is used to send data of service type 0 and service type 1 to IO_1, respectively.
  • the service type 0 of the IO_0 has a priority of 0, corresponding to the first virtual channel 0, and the service type 1 of the IO_0 has a priority of 1, corresponding to the first virtual channel 1, and the service type 0 of the IO_1 has a priority of 2, corresponding to The service type 1 of the first virtual channel 2, IO_1 has a priority of 3, corresponding to the first virtual channel 3.
  • the establishing module 630 of the sending device 600 may be configured to: establish a function on the Ethernet link, in addition to the function of the establishing module 530 in the fifth embodiment of the present invention. Determining, by the identifier of the receiving device, a first virtual channel corresponding to the service type;
  • the configuration module 640 of the sending device 600 may be configured to: in addition to the function of the configuration module 540 in the fifth embodiment of the present invention, the first corresponding relationship is preset in the sending device, the first The correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
  • the identifiers are respectively set by the network administrator as IO_0 and IO_1, and each receiving device has two service types (such as service type 0 and service type 1).
  • the establishing module 630 can establish four first virtual channels (such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3) on the sending device end, and combine the services of the two receiving devices.
  • the priority of the type, the configuration module 640 can configure the service type, the priority, the identifier of the receiving device, and the corresponding relationship of the first virtual channel. For example, the service type 0 of IO_0 has a priority of 0, corresponding to the first virtual channel 0, IO_0.
  • the service type 1 has a priority of 1, corresponding to the first virtual channel 1, and the service type 0 of the IO_1 has a priority of 2, corresponding to the first virtual channel 2, and the service type 1 of the IO_1 has a priority of 3, corresponding to the first virtual Channel 3.
  • the first correspondence may be used to subsequently determine the priority of a certain receiving device and the first virtual channel that sends data to the receiving device.
  • the receiving device may return a corresponding response to the sending device 600 according to the data empty state of the receiving buffer space of a certain service type of the service. Specifically, if The receiving buffer space occupied by the data of a certain service type received by the receiving device is higher than the upper threshold, and the receiving device may send an OFF frame to the sending device 600 to indicate that the processing module 550 of the sending device 600 pauses during the pause time. The receiving device performs communication of the service type, but does not affect the communication device and other communication types of the receiving device. Further, the receiving device may send an ON frame to the sending device 600 to indicate the processing of the sending device 600 when the receiving buffer space occupied by the data of the service type received by the receiving device is lower than the lower threshold.
  • Module 550 resumes communication with the receiving device for the type of service.
  • the receiving buffer space occupied by the data of the service type 0 received by IO_0 is higher than the upper threshold, IO_0 may send an OFF frame to HOST_0, and after receiving the OFF frame, HOST_0 suspends the service type 0 with the first virtual channel 0 by IO_0.
  • the upper threshold and the lower threshold refer to the related description of the priority-based flow control PFC method in the first embodiment of the present invention.
  • the first mapping relationship is configured in the sending device by the configuration module, so that different receiving devices use different first virtual channels to communicate with different sending services of the sending device, and a certain receiving device
  • the receiving device only needs to stop the receiving device from performing communication with the sending device through the first virtual channel corresponding to the service type, and does not affect the receiving device and the sending device.
  • Data transmission of other service types does not affect the data transmission of other receiving devices and transmitting devices.
  • Fig. 7a is a block diagram showing the structure of a receiving apparatus according to a seventh embodiment of the present invention.
  • the receiving device 700 can be applied to a traffic control scenario in which at least two servers in the Ethernet share at least two virtual channels, which may include:
  • the receiving module 710 is configured to receive, by using the first virtual channel, a packet from a sending device, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first
  • the virtual channel is a channel for the receiving device to receive data from the sending device on the Ethernet link, and the priority of the receiving device is a priority that the sending device finds in the preset first correspondence.
  • the first correspondence includes the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels.
  • the identifiers of the receiving devices are different. There is a one-to-one correspondence with the first virtual channel.
  • each sending device or receiving device in the process of communicating between the Ethernet sending device and the receiving device, can be configured with a corresponding priority by the network administrator, and the priority of each sending device or receiving device is at all.
  • the only one of the sending device or the receiving device For example, in a traffic control scenario where at least two servers share at least two virtual channels in an Ethernet network, including two sending devices (such as HOST_0, HOST_1), their priorities can be set to 0, 1 by the network administrator respectively. 2 receiving devices (such as IO_0, IO_1), their priority can also be set to 0, 1 by the network administrator.
  • the sending device can receive the configuration of the network administrator, that is, set the one-to-one correspondence between the receiving device and the first virtual channel in the sending device, and different channels can respectively be used to transmit data to different receiving devices, and the number of channels.
  • the receiving module 710 of the receiving device 700 can receive the message sent by the sending device through its corresponding first virtual channel, for example, IO_0 can receive the message sent by HOST_0 through the first virtual channel 0.
  • Figure 7b is a block diagram showing the structure of a receiving device according to Embodiment 7 of the present invention. As shown in FIG. 7b, the receiving device 700 may further include:
  • An establishing module 720 configured to establish, on the Ethernet link, an identifier corresponding to the sending device Second virtual channel
  • the configuration module 730 is connected to the establishing module 720, and configured to preset a second correspondence in the receiving device in the receiving device, where the second correspondence includes a priority of the sending device, and the Corresponding relationship between the identifier of the sending device and the second virtual channel.
  • the establishing module 720 can establish two second virtualities on the receiving device end.
  • the channel (such as the second virtual channel 0 and the second virtual channel 1), in combination with the priorities of the two sending devices, the configuration module 730 can set the priority of the sending device, the identifier of the sending device, and the second between the second virtual channel.
  • HOST_0 has a priority of 0, corresponding to the second virtual channel 0, for transmitting data addressed to HOST_0.
  • the second correspondence may be used to subsequently determine the priority of a certain sending device and the second virtual channel that sends data.
  • the priority of the receiving device 700 may also be included.
  • the identifiers are IO_0 and IO_1, respectively, and their priorities can be set to 0, 1, respectively, by the network administrator, then in the second In the correspondence, the priority of IO_0 is 0, the priority of HOST_0 is 0, and IO_0 receives the data sent by HOST_0 through the first virtual channel 0, and sends data to HOST_0 through the second virtual channel 0.
  • the receiving module 710 is further configured to: receive, by the receiving device, a virtual local area network (VLAN) VLAN frame from the sending device by using the first virtual channel, where a priority of the VLAN frame The field is written by the sending device to the priority of the found receiving device, and the payload of the VLAN frame includes data sent by the sending device to the receiving device.
  • VLAN virtual local area network
  • the receiving module 710 of the receiving device 700 may receive the VLAN frame from the sending device by using the first virtual channel corresponding to the receiving device 700 according to the first correspondence.
  • HOST_0 When HOST_0 is communicating, HOST_0 can find that the priority of IO_0 is 0 according to the first correspondence, corresponding to the first virtual channel 0, IO_0 can receive the VLAN frame through the first virtual channel 0, and HOST_0 can be in the priority field of the VLAN frame.
  • Write 0 to write the data sent to the receiving device to the payload of the VLAN frame.
  • the receiving device 700 may further include:
  • the sending module 740 is connected to the receiving module 710, and is configured to send, by the receiving device, a pause OFF frame to the sending device by using the second virtual channel, where a priority field of the OFF frame is written by the receiving device a priority obtained in the VLAN frame or a priority of the receiving device found in the second correspondence,
  • the OFF frame is generated by the receiving device in a state in which a receiving buffer space occupied by the received data is higher than an upper threshold.
  • the sending module 740 of the receiving device 700 may return a corresponding response to the sending device according to the data empty state of the receiving buffer space. If the receiving buffer space occupied by the data received by the receiving device 700 is higher than the upper threshold, the receiving device 700 may obtain the priority of the receiving device from the received VLAN frame, or obtain the receiving device 700 from the second corresponding relationship. Priority, and writing the priority of the receiving device in the priority field of the OFF frame, the sending module 740 sends an OFF frame to the sending device through the second virtual channel, to indicate that the sending device is based on the pause time in the OFF frame. The communication with the receiving device is suspended, and when the pause time is reached, the transmitting device can automatically resume communication with the receiving device.
  • the pause time may be determined by the content in the pause time field in the OFF frame.
  • the sending device may stop scheduling the first virtual channel corresponding to the receiving device to suspend communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0 through the second virtual channel 0. After receiving the OFF frame, HOST_0 pauses with IO_0 according to the pause time in the OFF frame. communication.
  • the upper threshold is a maximum amount of data that can be stored in the receiving buffer space of the receiving device, and is sent from the receiving device to the transmitting device to the OFF.
  • the receiving device 700 And responding, it takes a certain time, during which time some data that is being sent needs to be received by the receiving device 700, and cannot be discarded because the data is full, so the amount of data that the receiving device 700 can store can be greater than the upper threshold. That is, the storage space needs to have a certain margin. If it is higher than the upper threshold, the data will be full and the receiving device 700 will back pressure.
  • the sending module 740 can also be configured to:
  • the ON frame is generated by the receiving device in a state that the receiving buffer space occupied by the received data is lower than a lower threshold.
  • the receiving device 700 may reduce the receiving buffer space occupied by the received data. Before the timeout period is reached, if the received buffer space occupied by the received data is lower than the lower threshold, the receiving device 700 The sending module 740 can send an ON frame to the sending device to instruct the sending device to resume communication with the receiving device. For example, the space occupied by the data of IO_0 is lower than the lower threshold, IO_0 can send the ON frame through the second virtual channel 0, and the communication with IO_0 is resumed after the HOST_0 receives the ON frame.
  • the lower threshold is the minimum amount of data stored in the receiving buffer space of the receiving device. If the threshold is lower than the lower threshold, the storage space of the receiving device 700 is about to have no data, and the sending device can continue to send data to the receiving device.
  • the receiving device 700 can also serve as a sending end, and according to the correspondence between the identifier of the second virtual channel and the sending device and the priority in the second correspondence, the sending module 740 can use the second virtual channel to The transmitting device corresponding to the second virtual channel sends data.
  • the sending device may serve as a receiving end, and receive data from the receiving device 700 through the corresponding second virtual channel.
  • the receiving device of this embodiment sets a second correspondence relationship in the receiving device by using the configuration module.
  • Different receiving devices can use different first virtual channels to communicate with the sending device.
  • the receiving device When a receiving device data is full and there is a back pressure or communication abnormality, the receiving device only needs to stop the receiving device through its corresponding first virtual channel and sending device. Communication does not affect the data transmission of other receiving devices and transmitting devices.
  • FIG. 8 is a block diagram showing the structure of a receiving apparatus according to Embodiment 8 of the present invention.
  • the components in Fig. 8 having the same reference numerals as those in Figs. 7a and 7b have the same functions, and a detailed description of these components will be omitted for the sake of brevity.
  • the establishing module 820 of the receiving device 800 can have the function of establishing the module 720 in the seventh embodiment of the present invention.
  • it can be configured as:
  • the configuration module 830 of the receiving device 800 can be configured to: in addition to the function of the configuration module 730 in the seventh embodiment of the present invention,
  • the second correspondence includes a service type, a priority of the sending device, an identifier of the sending device, and the second virtual channel Correspondence between them.
  • the service type of the receiving device that is, the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel may also be included.
  • the identifiers are respectively set by the network administrator as HOST_0 and HOST_1, and each transmitting device can receive and receive.
  • the device performs communication between two service types (such as service type 0 and service type 1), and the establishing module 820 can establish four second virtual channels (such as the second virtual channel 0 and the second virtual channel) on the receiving device end.
  • the configuration module 830 can configure the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel, in combination with the priority of the two sending devices.
  • the second correspondence for example, the service type 0 of the HOST_0 has a priority of 0, corresponding to the second virtual channel 0, the service type 1 of the HOST_0 has a priority of 1, corresponding to the second virtual channel 1, and the service type 0 of the HOST_1 has a priority of 2 Corresponding to the second virtual channel 2, the service type 1 of HOST_1 has a priority of 3, corresponding to the second virtual channel 3.
  • the second correspondence may be used to subsequently determine the priority of a certain sending device and the second virtual channel that sends data to the sending device.
  • the priority of the receiving device 800 may also be included.
  • the priority-based flow control PFC method in Embodiment 3 of the present invention refers to the related description of the priority-based flow control PFC method in Embodiment 3 of the present invention.
  • the sending module 740 of the receiving device 800 may return a corresponding response to the sending device according to the data empty state of the receiving buffer space of a certain service type of the service. Specifically, if the receiving buffer space occupied by the data of the certain service type received by the receiving device 800 is higher than the upper threshold, the sending module 740 of the receiving device 800 may send an OFF frame to the sending device by using the second virtual channel, to indicate The sending device pauses communication with the receiving device for the service type during the pause period, but does not affect the communication device and other communication type communication with the receiving device.
  • the sending module 740 of the receiving device 800 may send the ON to the sending device through the second virtual channel.
  • the receive buffer space occupied by the data of service type 0 received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0 through the second virtual channel 0, and HOST_0 receives the OFF frame, pauses and IO_0 passes the virtual channel 0.
  • the service type 0 communication is performed; the receiving buffer space occupied by the data of the service type 0 received at IO_0 is lower than the lower threshold, and IO_0 can send the ON frame to the HOST_0 through the second virtual channel 0, and the HOST_0 recovers after receiving the ON frame.
  • Communication with service type 0 with IO_0 on For the threshold value and the lower threshold, refer to the description of the priority-based flow control PFC method in the first embodiment of the present invention.
  • the second mapping relationship is set in the receiving device by the configuration module, so that different receiving devices use different first virtual channels to communicate with different sending services of the sending device, and a certain receiving device
  • the receiving device only needs to stop the receiving device from performing communication with the sending device through the first virtual channel corresponding to the service type, and does not affect the receiving device and the sending device. Data transmission of other service types does not affect the data transmission of other receiving devices and transmitting devices.
  • FIG. 9 is a block diagram showing the structure of a priority-based flow control PFC device according to Embodiment 9 of the present invention.
  • the PFC device 900 may be a host server having a computing capability, a personal computer PC, or a portable computer or terminal that can be carried.
  • the specific embodiments of the present invention do not limit the specific implementation of the computing node.
  • the PFC device 900 includes a processor 910, a communications interface 920, a memory 930, and a bus 940.
  • the processor 910, the communication interface 920, and the memory 930 complete communication with each other through the bus 940.
  • Communication interface 920 is for communicating with network devices, including, for example, a virtual machine management center, shared storage, and the like.
  • the processor 910 is configured to execute a program.
  • the processor 910 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
  • ASIC Application Specific Integrated Circuit
  • the memory 930 is used to store files.
  • the memory 930 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • Memory 930 can also be a memory array.
  • the memory 930 may also be partitioned, and the block may Combine into virtual volumes according to certain rules.
  • the above program may be program code including computer operating instructions.
  • the at least two servers include at least one transmitting device and at least one receiving device, and the program is specifically operable to enable the transmitting device to:
  • the identifier of the receiving device Determining, according to the identifier of the receiving device, a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device, where the first correspondence includes the receiving device a priority, a correspondence between the identifier of the receiving device, and the first virtual channel, where the first virtual channel is a channel that the receiving device receives data from the sending device on an Ethernet link;
  • the identifiers of the different receiving devices are different, and the identifiers of the receiving devices have a one-to-one correspondence with the first virtual channel.
  • the first virtual channel and the priority of the receiving device are searched for in the first corresponding relationship preset in the sending device according to the identifier of the receiving device, where
  • the correspondence between the priority of the receiving device, the identifier of the receiving device, and the first virtual channel includes:
  • the sending device searches for the priority of the corresponding first virtual channel and the receiving device in the first correspondence relationship preset in the sending device, according to the identifier and the service type of the receiving device,
  • the first correspondence relationship includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
  • the program is searched for the priority of the corresponding first virtual channel and the receiving device in the first corresponding relationship preset in the sending device according to the identifier of the receiving device It can also be used to enable the sending device to:
  • the first correspondence is preset in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channel; or
  • the first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
  • sending, by the first virtual channel that is found, a message to the receiving device including:
  • the sending device generates a virtual local area network (VLAN) VLAN frame, wherein a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, and a payload of the VLAN frame includes the sending device Data sent to the receiving device;
  • VLAN virtual local area network
  • the program is further configured to enable the sending device to:
  • the transmitting device receives the pause OFF frame from the receiving device, suspending communication with the receiving device according to the pause time in the OFF frame;
  • the OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  • the program is further configured to enable the sending device to:
  • the ON frame is a receiving buffer occupied by the receiving device in the received data.
  • the at least two servers include at least one sending device and at least one receiving device, and the program specifically Can be used to enable the receiving device to:
  • the first virtual channel Receiving, by the first virtual channel, a packet from the sending device, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first virtual channel is a channel for receiving data from the sending device on the Ethernet link, where the priority of the receiving device is a priority that is found by the sending device in a preset first correspondence, the first The correspondence includes the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels, where different identifiers of the receiving devices are different, and the identifier of the receiving device is different from the first There is a one-to-one correspondence between a virtual channel.
  • the program before receiving a message from the sending device through the first virtual channel, the program is further configured to enable the receiving device to:
  • the second correspondence includes a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channel; or
  • the second correspondence includes a service type, a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channels.
  • the priority of the receiving device is further included in the second correspondence.
  • receiving, by the first virtual channel, a message from the sending device including:
  • VLAN virtual local area network
  • the program is further configured to enable the receiving device to:
  • the OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  • the program is further configured to enable the receiving device to:
  • the ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
  • the function is implemented in the form of computer software and sold or used as a stand-alone product, it is considered to some extent that all or part of the technical solution of the present invention (for example, a part contributing to the prior art) is It is embodied in the form of computer software products.
  • the computer software product is typically stored in a computer readable non-volatile storage medium, including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform all of the methods of various embodiments of the present invention. Or part of the steps.
  • the foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

Abstract

The present invention relates to a priority-based flow control (PFC) method, transmitting device and receiving device, the method comprising: according to the identifier of the receiving device, a transmitting device searches a first correspondence preset in the transmitting device for a first corresponding virtual channel and the priority of the receiving device; the transmitting device transmits a packet to the receiving device via the searched first virtual channel, the packet comprising the priority of the receiving device and data sent from the transmitting device to the receiving device. By configuring in the transmitting device the correspondence between the priority, the first virtual channel and the receiving device, an embodiment of the present invention can enable different receiving devices to receive data from the transmitting device using different first virtual channels. When back pressure or a communication failure occurs on the receiving device, the receiving device only needs to stop receiving data from the receiving device via the first virtual channel corresponding to the receiving device, without affecting data transmission between other receiving devices and the transmitting device.

Description

基于优先级的流控PFC方法及发送设备、接收设备Priority-based flow control PFC method and transmitting device and receiving device
本申请要求于2013年12月27日提交中国专利局、申请号为201310742800.6、发明名称为“基于优先级的流控PFC方法及发送设备、接收设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to Chinese Patent Application No. 201310742800.6, entitled "Priority-based Flow Control PFC Method and Transmission Equipment, Receiving Equipment", filed on December 27, 2013, the entire contents of which are hereby incorporated by reference. This is incorporated herein by reference.
技术领域Technical field
本发明涉及通信技术领域,尤其涉及一种基于优先级的流控PFC方法及发送设备、接收设备。The present invention relates to the field of communications technologies, and in particular, to a priority-based flow control PFC method, a transmitting device, and a receiving device.
背景技术Background technique
在多个服务器共享多个输入/输出(Input/Output,I/O)的流量控制场景中,不同设备的接收缓存空满状态不同,数据发送端设备需要根据数据接收端设备的接收缓存空满状态进行流控。在传统以太网系统结构中,一个数据接收端设备的反压将引起其他数据接收端设备与数据发送端设备的通讯同时中断。为了使其他数据接收端设备不受影响,需要对无损以太网中基于优先级的流控(Priority-Based Flow Control,PFC)功能的应用进行改进。In a traffic control scenario where multiple servers share multiple input/output (I/O), the receiving buffer of different devices is different, and the data transmitting device needs to be full according to the receiving buffer of the data receiving device. The status is flow controlled. In the traditional Ethernet system structure, the back pressure of a data receiving end device will cause the communication between other data receiving end devices and the data transmitting end device to be interrupted at the same time. In order to make other data receiving devices unaffected, the application of Priority-Based Flow Control (PFC) in lossless Ethernet needs to be improved.
传统的流控机制中,当某条以太网链路出现拥塞时流控设备会阻止该链路上的所有流量。而PFC技术允许在一条以太网链路上创建最多8个虚拟通道,并为每条虚拟通道指定一个IEEE802.1P优先级,允许单独暂停和重启其中任意一条虚拟通道,同时不影响其它虚拟通道的流量。PFC技术使得网络管理员可以将其中一些优先级(通常最多8个)用于对丢包敏感的上层协议,而另一些优先级用于常规的以太网服务。 In a traditional flow control mechanism, when an Ethernet link is congested, the flow control device blocks all traffic on the link. PFC technology allows up to 8 virtual channels to be created on an Ethernet link and assigns an IEEE 802.1P priority to each virtual channel, allowing any one of the virtual channels to be paused and restarted without affecting other virtual channels. flow. PFC technology allows network administrators to use some of these priorities (usually up to 8) for upper packet protocols that are sensitive to packet loss, while others are used for regular Ethernet services.
然而,现有PFC技术是基于不同业务类型间的流控,虚拟通道与业务类型存在对应关系,仅根据不同业务类型控制数据的收发。这种流控技术采用虚拟通道对应业务类型的方法。因此当某个数据接收端设备的某个业务通道反压时,将使此业务类型虚拟通道阻塞,而最终导致另一个数据接收端设备也无法正常处理此类型的业务。However, the existing PFC technology is based on flow control between different service types, and the virtual channel has a corresponding relationship with the service type, and only controls data transmission and reception according to different service types. This type of flow control technology uses a virtual channel corresponding to the type of service. Therefore, when a certain service channel of a data receiving device is back pressured, the virtual channel of this service type will be blocked, and eventually another data receiving device cannot process this type of service normally.
发明内容Summary of the invention
技术问题technical problem
有鉴于此,本发明要解决的技术问题是,在多个服务器共享多个I/O的流量控制场景中,如何实现某一接收设备的接收缓存空间中的数据将满进行反压时,不影响其他接收设备与发送设备的数据传输。In view of the above, the technical problem to be solved by the present invention is that in a traffic control scenario in which multiple I/Os are shared by multiple servers, how to implement data in the receiving buffer space of a certain receiving device will be full back pressure, Affects the data transmission of other receiving devices and transmitting devices.
解决方案solution
为了解决上述技术问题,在第一方面,本发明提供了一种基于优先级的流控PFC方法,应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,所述至少两个服务器包括至少一个发送设备和至少一个接收设备,所述PFC方法包括:In order to solve the above technical problem, in a first aspect, the present invention provides a priority-based flow control PFC method, which is applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, the at least two The server includes at least one transmitting device and at least one receiving device, and the PFC method includes:
所述发送设备根据所述接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系;The sending device searches for a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device according to the identifier of the receiving device, where the first correspondence includes the Determining a priority of the receiving device, a relationship between the identifier of the receiving device, and the first virtual channel, where the first virtual channel is the receiving device receiving data from the sending device on an Ethernet link Channels in which the identifiers of different receiving devices are different, and the identifiers of the receiving devices have a one-to-one correspondence with the first virtual channel;
所述发送设备通过查找到的第一虚拟通道,向所述接收设备发送报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据。 The sending device sends a packet to the receiving device by using the first virtual channel that is found, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device.
结合第一方面,在第一方面的一种可能的实现方式中,所述发送设备根据接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,包括:With reference to the first aspect, in a possible implementation manner of the first aspect, the sending device searches for a corresponding first virtual channel and a first corresponding relationship that is preset in the sending device according to the identifier of the receiving device The priority of the receiving device, the first correspondence includes the priority of the receiving device, the identifier of the receiving device, and the corresponding relationship between the first virtual channel, including:
所述发送设备根据所述接收设备的标识和业务类型,在所述发送设备中预先设置的所述第一对应关系中查找所述对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The sending device searches for the priority of the corresponding first virtual channel and the receiving device in the first correspondence relationship preset in the sending device, according to the identifier and the service type of the receiving device, The first correspondence relationship includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
结合第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述发送设备根据接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级之前,包括:With reference to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the sending device is preset in the sending device according to the identifier of the receiving device Before searching for the priority of the corresponding first virtual channel and the receiving device in the first correspondence, the method includes:
在所述以太网链路上建立所述接收设备的标识对应的第一虚拟通道,或,所述接收设备的标识和所述业务类型对应的所述第一虚拟通道;Establishing, by the Ethernet link, a first virtual channel corresponding to the identifier of the receiving device, or an identifier of the receiving device and the first virtual channel corresponding to the service type;
在所述发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系;或,The first correspondence is preset in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channel; or ,
所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
结合第一方面和第一方面的第一种及第二种可能的实现方式中的任一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述发送设备通过所述查找到的第一虚拟通道,向所述接收设备发送报文,包括:With reference to the first aspect and any one of the first and second possible implementation manners of the first aspect, in a third possible implementation manner of the first aspect, the sending device The first virtual channel that is found is sent to the receiving device, and includes:
所述发送设备生成虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的 有效载荷包括所述发送设备向所述接收设备发送的数据;The sending device generates a virtual local area network (VLAN) VLAN frame, wherein a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, where the VLAN frame is The payload includes data sent by the sending device to the receiving device;
所述发送设备通过所述查找到的第一虚拟通道将所述VLAN帧发送至所述接收设备。Sending, by the sending device, the VLAN frame to the receiving device by using the first virtual channel that is found.
结合第一方面的第三种可能的实现方式,在第一方面的第四种可能的实现方式中,在所述发送设备通过所述查找到的第一虚拟通道,向所述接收设备发送报文之后,包括:In conjunction with the third possible implementation of the first aspect, in a fourth possible implementation manner of the first aspect, the sending device sends a report to the receiving device by using the first virtual channel that is found by the sending device After the article, including:
如果所述发送设备从所述接收设备接收到暂停OFF帧,则根据所述OFF帧中的暂停时间,暂停与所述接收设备的通讯;If the transmitting device receives the pause OFF frame from the receiving device, suspending communication with the receiving device according to the pause time in the OFF frame;
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
结合第一方面的第四种可能的实现方式,在第一方面的第五种可能的实现方式中,所述暂停与所述接收设备的通讯之后,包括:With the fourth possible implementation of the first aspect, in a fifth possible implementation manner of the first aspect, after the suspending communication with the receiving device, the method includes:
如果到达所述OFF帧中的暂停时间或所述发送设备从所述接收设备接收到连通ON帧,则恢复与所述接收设备的通讯;Recovering communication with the receiving device if a pause time in the OFF frame is reached or the transmitting device receives a connected ON frame from the receiving device;
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
在第二方面,本发明提供了一种基于优先级的流控PFC方法,应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,所述至少两个服务器包括至少一个发送设备和至少一个接收设备,所述PFC方法包括:In a second aspect, the present invention provides a priority-based flow control PFC method, applicable to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, the at least two servers including at least one sending a device and at least one receiving device, the PFC method comprising:
所述接收设备通过第一虚拟通道,从所述发送设备接收报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接 收数据的通道,所述接收设备的优先级为所述发送设备在预先设置的第一对应关系中查找到的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系。The receiving device receives a packet from the sending device by using a first virtual channel, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first a virtual channel is connected to the receiving device from the sending device on an Ethernet link a priority of the receiving device, where the priority of the receiving device is a priority that is found by the sending device in a preset first correspondence, the first correspondence includes a priority of the receiving device, and the receiving Corresponding relationship between the identifier of the device and the first virtual channel, where the identifiers of the different receiving devices are different, and the identifier of the receiving device has a one-to-one correspondence with the first virtual channel.
结合第二方面,在第二方面的第一种可能的实现方式中,在所述接收设备通过第一虚拟通道,从所述发送设备接收报文之前,包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, before the receiving device receives the packet from the sending device by using the first virtual channel, the method includes:
在所述以太网链路上建立所述发送设备的标识对应的第二虚拟通道,或,所述发送设备的标识和所述业务类型对应的第二虚拟通道;Establishing, by the Ethernet link, a second virtual channel corresponding to the identifier of the sending device, or an identifier of the sending device and a second virtual channel corresponding to the service type;
在所述接收设备中预先设置第二对应关系,所述第二对应关系包括所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系;或,Determining, in the receiving device, a second correspondence, where the second correspondence includes a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channel; or
所述第二对应关系包括业务类型、所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系。The second correspondence includes a service type, a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channels.
结合第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述第二对应关系中还包括所述接收设备的优先级。In conjunction with the first possible implementation of the second aspect, in a second possible implementation manner of the second aspect, the second corresponding relationship further includes a priority of the receiving device.
结合第二方面和第二方面的第一种及第二种可能的实现方式中任一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述接收设备通过第一虚拟通道,从所述发送设备接收报文,包括:With reference to the second aspect and any one of the possible implementation manners of the first and second possible implementation manners of the second aspect, in a third possible implementation manner of the second aspect, the receiving device a virtual channel, receiving a message from the sending device, including:
所述接收设备通过所述第一虚拟通道,从所述发送设备接收虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据。The receiving device receives a virtual local area network (VLAN) VLAN frame from the sending device by using the first virtual channel, where a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device The payload of the VLAN frame includes data sent by the sending device to the receiving device.
结合第二方面的第三种可能的实现方式,在第二方面的第四种可能的实现方式中,所述接收设备通过第一虚拟通道,从所述发送设备接收报文 之后,包括:With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the receiving device, by using the first virtual channel, receives a packet from the sending device After that, include:
所述接收设备通过所述第二虚拟通道,向所述发送设备发送暂停OFF帧,所述OFF帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Sending, by the receiving device, a pause OFF frame to the sending device by using the second virtual channel, where a priority field of the OFF frame is written by the receiving device from a priority obtained in the VLAN frame or in a location Determining the priority of the receiving device in the second correspondence,
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
结合第二方面的第四种可能的实现方式,在第二方面的第五种可能的实现方式中,向所述发送设备发送暂停OFF帧之后,包括:With the fourth possible implementation of the second aspect, in a fifth possible implementation manner of the second aspect, after the sending the pause OFF frame to the sending device, the method includes:
所述接收设备通过所述第二虚拟通道,向所述发送设备发送连通ON帧,所述ON帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Transmitting, by the receiving device, a connected ON frame to the sending device by using the second virtual channel, where a priority field of the ON frame is written by the receiving device to a priority obtained from the VLAN frame or Determining the priority of the receiving device in the second correspondence,
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
在第三方面,本发明提供了一种发送设备,应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,包括:In a third aspect, the present invention provides a sending device, which is applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, including:
查找模块,用于根据接收设备的标识,在发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系;a locating module, configured to search for a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device according to the identifier of the receiving device, where the first corresponding relationship includes the receiving device a priority of the priority, the identifier of the receiving device, and a correspondence between the first virtual channel, where the first virtual channel is a channel for the receiving device to receive data from the sending device on an Ethernet link, The identifiers of the different receiving devices are different, and the identifiers of the receiving devices have a one-to-one correspondence with the first virtual channel.
发送模块,与所述查找模块连接,用于通过查找到的第一虚拟通道,向所述接收设备发送报文,所述报文中包括所述接收设备的优先级和所述 发送设备向所述接收设备发送的数据。a sending module, configured to connect to the searching module, to send a packet to the receiving device by using the first virtual channel that is found, where the packet includes a priority of the receiving device and the The data transmitted by the transmitting device to the receiving device.
结合第三方面,在第三方面的第一种可能的实现方式中,所述查找模块还被配置为,根据所述接收设备的标识和业务类型,在所述发送设备中预先设置的所述第一对应关系中查找所述对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。With reference to the third aspect, in a first possible implementation manner of the third aspect, the searching module is further configured to: preset, in the sending device, according to an identifier and a service type of the receiving device Searching, in the first correspondence, the priority of the corresponding first virtual channel and the receiving device, where the first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and Corresponding relationship between the first virtual channels.
结合第三方面或第三方面的第一种可能的实现方式,在第三方面的第二种可能的实现方式中,还包括:With reference to the third aspect or the first possible implementation manner of the third aspect, in a second possible implementation manner of the third aspect, the method further includes:
建立模块,用于在所述以太网链路上建立所述接收设备的标识对应的所述第一虚拟通道;Establishing a module, configured to establish, on the Ethernet link, the first virtual channel corresponding to the identifier of the receiving device;
所述建立模块还被配置为,在所述以太网链路上建立所述接收设备的标识和所述业务类型对应的所述第一虚拟通道;The establishing module is further configured to establish, on the Ethernet link, an identifier of the receiving device and the first virtual channel corresponding to the service type;
配置模块,与所述建立模块连接,用于在所述发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系;a configuration module, configured to be connected to the establishing module, configured to preset the first correspondence in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a location Corresponding relationship between the first virtual channels;
所述配置模块还被配置为,在所述发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The configuration module is further configured to pre-set the first correspondence in the sending device, where the first correspondence includes the service type, a priority of the receiving device, and an identifier of the receiving device. Correspondence relationship with the first virtual channel.
结合第三方面和第三方面的第一种及第二种可能的实现方式中,在第三方面的第三种可能的实现方式中,所述发送模块包括:With the third aspect and the first and second possible implementation manners of the third aspect, in a third possible implementation manner of the third aspect, the sending module includes:
生成单元,用于生成虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据;a generating unit, configured to generate a virtual local area network (VLAN) VLAN frame, wherein a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, where a payload of the VLAN frame includes the sending Data sent by the device to the receiving device;
导入单元,与所述生成单元连接,用于通过所述查找到的第一虚拟通道将所述VLAN帧发送至所述接收设备。 The import unit is connected to the generating unit, and configured to send the VLAN frame to the receiving device by using the first virtual channel that is found.
结合第三方面的第三种可能的实现方式,在第三方面的第四种可能的实现方式中,还包括:In conjunction with the third possible implementation of the third aspect, in a fourth possible implementation manner of the third aspect, the method further includes:
处理模块,与所述发送模块连接,用于如果从所述接收设备接收到暂停OFF帧,则根据所述OFF帧中的暂停时间,暂停与所述接收设备的通讯;a processing module, connected to the sending module, is configured to suspend communication with the receiving device according to a pause time in the OFF frame if a paused OFF frame is received from the receiving device;
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
结合第三方面的第四种可能的实现方式,在第三方面的第五种可能的实现方式中,所述处理模块还被配置为,如果到达所述OFF帧中的暂停时间或从所述接收设备接收到连通ON帧,则恢复与所述接收设备的通讯;In conjunction with the fourth possible implementation of the third aspect, in a fifth possible implementation manner of the third aspect, the processing module is further configured to: if the pause time in the OFF frame is reached or from the Receiving, by the receiving device, a communication ON frame, resuming communication with the receiving device;
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
在第四方面,本发明提供了一种接收设备,应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,包括:In a fourth aspect, the present invention provides a receiving device, which is applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, including:
接收模块,用于通过第一虚拟通道,从发送设备接收报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,所述接收设备的优先级为所述发送设备在预先设置的第一对应关系中查找到的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系。a receiving module, configured to receive, by using a first virtual channel, a packet from a sending device, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first virtual The channel is a channel for the receiving device to receive data from the sending device on the Ethernet link, and the priority of the receiving device is a priority that the sending device finds in the preset first correspondence relationship. The first correspondence includes the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels, where different receiving devices have different identifiers, and the identifiers of the receiving devices are The first virtual channel has a one-to-one correspondence.
结合第四方面,在第四方面的第一种可能的实现方式中,还包括:With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the method further includes:
建立模块,用于在所述以太网链路上建立所述发送设备的标识对应的 第二虚拟通道;Establishing a module, configured to establish, on the Ethernet link, an identifier of the sending device Second virtual channel;
所述建立模块还被配置为,在所述以太网链路上建立所述发送设备的标识和所述业务类型对应的第二虚拟通道;The establishing module is further configured to establish, on the Ethernet link, an identifier of the sending device and a second virtual channel corresponding to the service type;
配置模块,与所述建立模块连接,用于在所述接收设备中预先设置所述接收设备中的第二对应关系,所述第二对应关系包括所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系;a configuration module, configured to be connected to the establishing module, configured to pre-set a second correspondence in the receiving device, where the second correspondence includes a priority of the sending device, and the sending device Correspondence between the identifier and the second virtual channel;
所述配置模块还被配置为,在所述接收设备中预先设置所述接收设备中的第二对应关系,所述第二对应关系包括业务类型、所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系。The configuration module is further configured to pre-set a second correspondence in the receiving device in the receiving device, where the second correspondence includes a service type, a priority of the sending device, and the sending device Correspondence between the identifier and the second virtual channel.
结合第四方面的第一种可能的实现方式,在第四方面的第二种可能的实现方式中,所述第二对应关系中还包括所述接收设备的优先级。With reference to the first possible implementation manner of the fourth aspect, in a second possible implementation manner of the fourth aspect, the second corresponding relationship further includes a priority of the receiving device.
结合第四方面的第一种和第二种可能的实现方式,在第四方面的第三种可能的实现方式中,所述接收模块还被配置为,通过所述第一虚拟通道,从所述发送设备接收虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据。With reference to the first and second possible implementation manners of the fourth aspect, in a third possible implementation manner of the fourth aspect, the receiving module is further configured to pass the first virtual channel, The sending device receives the virtual local area network (VLAN) VLAN frame, wherein the priority field of the VLAN frame is written by the sending device to the priority of the received receiving device, and the payload of the VLAN frame includes the sending device The data sent by the receiving device.
结合第四方面的第三种可能的实现方式,在第四方面的第四种可能的实现方式中,还包括:In conjunction with the third possible implementation of the fourth aspect, in a fourth possible implementation manner of the fourth aspect, the method further includes:
发送模块,与所述接收模块连接,用于通过所述第二虚拟通道,向所述发送设备发送暂停OFF帧,所述OFF帧的优先级字段由所述接收设备写入所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,a sending module, configured to be connected to the receiving module, configured to send, by using the second virtual channel, a pause OFF frame to the sending device, where a priority field of the OFF frame is written by the receiving device into the VLAN frame The priority of the acquisition or the priority of the receiving device found in the second correspondence,
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。 The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
结合第四方面的第四种可能的实现方式,在第四方面的第五种可能的实现方式中,所述发送模块还被配置为,通过所述第二虚拟通道,向所述发送设备发送连通ON帧,所述ON帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,With the fourth possible implementation of the fourth aspect, in a fifth possible implementation manner of the fourth aspect, the sending module is further configured to send, by using the second virtual channel, the sending device Connecting an ON frame, the priority field of the ON frame being written by the receiving device, the priority acquired from the VLAN frame or the priority of the receiving device found in the second correspondence,
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
有益效果Beneficial effect
本发明实施例通过在发送设备中配置优先级、第一虚拟通道和接收设备标识之间的对应关系,可以实现不同的接收设备使用不同的第一虚拟通道从发送设备接收数据,在接收设备出现反压或通信异常时,只需要停止该接收设备通过其对应的第一虚拟通道从发送设备接收数据,而不会影响其他接收设备与发送设备的数据传输。In the embodiment of the present invention, by configuring a correspondence between the priority, the first virtual channel, and the receiving device identifier in the sending device, different receiving devices can receive data from the sending device by using different first virtual channels, and the receiving device appears. When the back pressure or communication is abnormal, it is only necessary to stop the receiving device from receiving data from the transmitting device through its corresponding first virtual channel without affecting data transmission of other receiving devices and the transmitting device.
根据下面参考附图对示例性实施例的详细说明,本发明的其它特征及方面将变得清楚。Further features and aspects of the present invention will become apparent from the Detailed Description of the Drawing.
附图说明DRAWINGS
包含在说明书中并且构成说明书的一部分的附图与说明书一起示出了本发明的示例性实施例、特征和方面,并且用于解释本发明的原理。The accompanying drawings, which are incorporated in FIG
图1示出根据本发明实施例一的基于优先级的流控PFC方法的流程图;1 is a flowchart showing a priority-based flow control PFC method according to Embodiment 1 of the present invention;
图2示出根据本发明实施例二的基于优先级的流控PFC方法的流程图;2 is a flowchart showing a priority-based flow control PFC method according to Embodiment 2 of the present invention;
图3示出根据本发明实施例三的基于优先级的流控PFC方法的流程图;3 is a flowchart showing a priority-based flow control PFC method according to Embodiment 3 of the present invention;
图4示出根据本发明实施例四的基于优先级的流控PFC方法的流程图;4 is a flowchart showing a priority-based flow control PFC method according to Embodiment 4 of the present invention;
图5a示出根据本发明实施例五的发送设备的结构框图; FIG. 5a is a structural block diagram of a transmitting device according to Embodiment 5 of the present invention; FIG.
图5b示出根据本发明实施例五的发送设备的结构框图;Figure 5b is a block diagram showing the structure of a transmitting device according to Embodiment 5 of the present invention;
图6示出根据本发明实施例六的发送设备的结构框图;6 is a block diagram showing the structure of a transmitting apparatus according to Embodiment 6 of the present invention;
图7a示出根据本发明实施例七的接收设备的结构框图;Figure 7a is a block diagram showing the structure of a receiving device according to Embodiment 7 of the present invention;
图7b示出根据本发明实施例七的接收设备的结构框图;Figure 7b is a block diagram showing the structure of a receiving device according to Embodiment 7 of the present invention;
图8示出根据本发明实施例八的接收设备的结构框图;FIG. 8 is a block diagram showing the structure of a receiving apparatus according to Embodiment 8 of the present invention; FIG.
图9示出根据本发明实施例九的基于优先级的流控PFC装置的结构框图。9 is a block diagram showing the structure of a priority-based flow control PFC device according to Embodiment 9 of the present invention.
具体实施方式detailed description
以下将参考附图详细说明本发明的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。Various exemplary embodiments, features, and aspects of the invention are described in detail below with reference to the drawings. The same reference numerals in the drawings denote the same or similar elements. Although the various aspects of the embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。The word "exemplary" is used exclusively herein to mean "serving as an example, embodiment, or illustrative." Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or preferred.
另外,为了更好的说明本发明,在下文的具体实施方式中给出了众多的具体细节。本领域技术人员应当理解,没有某些具体细节,本发明同样可以实施。在一些实例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本发明的主旨。In addition, numerous specific details are set forth in the Detailed Description of the invention in the Detailed Description. Those skilled in the art will appreciate that the invention may be practiced without some specific details. In some instances, methods, means, components, and circuits that are well known to those skilled in the art are not described in detail in order to facilitate the invention.
实施例1Example 1
图1示出根据本发明实施例一的基于优先级的流控PFC方法的流程图。如图1所示,可以应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景中,所述至少两个服务器可以包括至少一个发送设备和至少一个接收设备,至少两个虚拟通道可以包括不同发送设备与不同接收设备之间进行数据传输的通道。该PFC方法主要可以包括:FIG. 1 is a flow chart showing a priority-based flow control PFC method according to a first embodiment of the present invention. As shown in FIG. 1 , it may be applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, where the at least two servers may include at least one sending device and at least one receiving device, and at least two virtual devices. The channel may include a channel for data transmission between different transmitting devices and different receiving devices. The PFC method can mainly include:
步骤S100、所述发送设备根据所述接收设备的标识,在所述发送设备 中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道;其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系。Step S100: The sending device is in the sending device according to the identifier of the receiving device. Finding a priority of the corresponding first virtual channel and the receiving device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and the first Corresponding relationship between a virtual channel, the first virtual channel is a channel for the receiving device to receive data from the sending device on an Ethernet link; wherein different receiving devices have different identifiers, and the receiving device The identifier has a one-to-one correspondence with the first virtual channel.
具体地,在以太网发送设备与接收设备进行通讯的过程中,每个接收设备可以由网络管理员配置一个唯一的标识,发送设备通过此标识可以唯一确定接收设备。一方面,不同发送设备和不同接收设备均可以接收网络管理员对其优先级进行的配置,每个发送设备或每个接收设备的优先级在所有发送设备或接收设备中唯一。例如,在以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景中,包括2个发送设备(如HOST_0、HOST_1),则它们的优先级可分别被网络管理员设置为0、1;2个接收设备(如IO_0、IO_1),则它们的优先级也可分别被网络管理员设置为0、1。另一方面,发送设备可以接收网络管理员的配置,即在发送设备中设置接收设备与第一虚拟通道的一一对应关系,不同通道可以分别用来传输发往不同接收设备的数据,通道数目与接收设备数目相同。例如,有2个接收设备(如IO_0、IO_1),可以在发送设备端建立两条第一虚拟通道(如第一虚拟通道0、第一虚拟通道1),分别用来发送去往IO_0和IO_1的数据。根据接收设备的标识,发送设备可以在网络管理员为其配置的第一对应关系中查找对应的第一虚拟通道和接收设备的优先级,用于后续发送设备向接收设备发送数据,例如IO_0的优先级为0,对应第一虚拟通道0,HOST_0可以通过第一虚拟通道0向IO_0发送数据。Specifically, in the process of communicating between the Ethernet sending device and the receiving device, each receiving device may be configured by the network administrator to configure a unique identifier, and the sending device may uniquely determine the receiving device by using the identifier. On the one hand, different sending devices and different receiving devices can receive the configuration of their priorities by the network administrator, and the priority of each transmitting device or each receiving device is unique among all transmitting devices or receiving devices. For example, in a traffic control scenario where at least two servers share at least two virtual channels in an Ethernet network, including two sending devices (such as HOST_0, HOST_1), their priorities can be set to 0, 1 by the network administrator respectively. 2 receiving devices (such as IO_0, IO_1), their priority can also be set to 0, 1 by the network administrator. On the other hand, the sending device can receive the configuration of the network administrator, that is, set the one-to-one correspondence between the receiving device and the first virtual channel in the sending device, and different channels can respectively be used to transmit data to different receiving devices, and the number of channels. The same number as the receiving device. For example, there are two receiving devices (such as IO_0, IO_1), and two first virtual channels (such as the first virtual channel 0 and the first virtual channel 1) can be established on the sending device side, respectively, for sending to IO_0 and IO_1, respectively. The data. According to the identifier of the receiving device, the sending device may search for the priority of the corresponding first virtual channel and the receiving device in the first correspondence configured by the network administrator, and the sending device sends data to the receiving device, for example, IO_0. The priority is 0, corresponding to the first virtual channel 0, HOST_0 can send data to IO_0 through the first virtual channel 0.
步骤S120、所述发送设备通过所述查找到的第一虚拟通道,向所述接收设备发送报文,所述报文中包括所述接收设备的优先级和所述发送设备 向所述接收设备发送的数据。Step S120: The sending device sends a packet to the receiving device by using the first virtual channel that is found, where the packet includes the priority of the receiving device and the sending device. Data sent to the receiving device.
具体地,在发送设备查找到第一虚拟通道之后,发送设备可以通过与接收设备对应的第一虚拟通道与该接收设备进行通讯,即发送设备可以通过第一虚拟通道向该接收设备发送报文,并可以在该报文的优先级字段写入通过步骤S100查找到的该接收设备的优先级,在报文的有效载荷(Payload)中可以包括发送设备向接收设备发送的数据。Specifically, after the sending device finds the first virtual channel, the sending device can communicate with the receiving device by using the first virtual channel corresponding to the receiving device, that is, the sending device can send the packet to the receiving device by using the first virtual channel. And the priority of the receiving device found in step S100 may be written in the priority field of the packet, and the data sent by the sending device to the receiving device may be included in the payload of the packet.
在接收设备接收到上述数据时,接收设备可以根据自身接收缓存空间的数据空满状态向发送设备返回响应。若接收设备接收缓存空间的数据将满,不能继续接收数据时,接收设备可以根据流控技术,进行反压,即指示发送设备不再继续通过该接收设备的标识对应的第一虚拟通道向该接收设备发送数据。由于不同的接收设备的标识不同,接收设备的标识与第一虚拟通道存在一一对应的关系;这样,该接收设备的反压并不影响发送设备与以太网中其他接收设备通过其他接收设备的标识对应的第一虚拟通道进行通讯,例如IO_0接收缓存空间的数据将满,可以向HOST_0反压,HOST_0接收到反压后可以暂停与IO_0通过第一虚拟通道0的通讯,但是HOST_0仍可以与IO_1通过第一虚拟通道1进行通讯。When the receiving device receives the above data, the receiving device may return a response to the sending device according to the data empty state of the receiving buffer space. If the data received by the receiving device is full and the data cannot be continuously received, the receiving device may perform backpressure according to the flow control technology, that is, the sending device does not continue to use the first virtual channel corresponding to the identifier of the receiving device. The receiving device sends data. The identifiers of the receiving devices are in a one-to-one correspondence with the first virtual channel. Therefore, the back pressure of the receiving device does not affect the sending device and other receiving devices in the Ethernet through other receiving devices. The first virtual channel corresponding to the identifier is communicated. For example, the data of the IO_0 receiving buffer space is full, and the voltage can be reversed to HOST_0. After receiving the back pressure, HOST_0 can suspend communication with IO_0 through the first virtual channel 0, but HOST_0 can still be IO_1 communicates through the first virtual channel 1.
在一种可能的实现方式中,在步骤S100之前该PFC方法还可以包括:In a possible implementation, before the step S100, the PFC method may further include:
步骤S1001、在以太网链路上建立接收设备的标识对应的第一虚拟通道;Step S1001: Establish a first virtual channel corresponding to the identifier of the receiving device on the Ethernet link.
步骤S1002、在发送设备中预先设置第一对应关系,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。Step S1002: A first correspondence is preset in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channels.
具体地,参见本实施例上述步骤的相关描述,若在以太网中包括2个接收设备,标识分别被网络管理员配置为IO_0和IO_1,可以通过网络管理员的配置在发送设备端建立两条第一虚拟通道(如第一虚拟通道0和第一虚拟 通道1),结合2个接收设备的优先级,可以由网络管理员设置接收设备的优先级、接收设备的标识和第一虚拟通道之间的第一对应关系,例如,IO_0的优先级为0,对应第一虚拟通道0。该第一对应关系可以用于后续确定某一接收设备的优先级和向该接收设备发送数据的第一虚拟通道。For details, refer to the related description of the foregoing steps in this embodiment. If two receiving devices are included in the Ethernet, and the identifiers are respectively configured by the network administrator as IO_0 and IO_1, two configurations can be established on the sending device by the configuration of the network administrator. The first virtual channel (such as the first virtual channel 0 and the first virtual channel) Channel 1), combining the priorities of the two receiving devices, the network administrator can set the priority of the receiving device, the identifier of the receiving device, and the first correspondence between the first virtual channels, for example, the priority of IO_0 is 0. , corresponding to the first virtual channel 0. The first correspondence may be used to subsequently determine the priority of a certain receiving device and the first virtual channel that sends data to the receiving device.
进一步地,步骤S120还可以包括:Further, step S120 may further include:
步骤S140、所述发送设备生成虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据;Step S140: The sending device generates a virtual local area network (VLAN) VLAN frame, where the priority field of the VLAN frame is written by the sending device to the priority of the received receiving device, and the payload of the VLAN frame includes the Decoding data sent by the sending device to the receiving device;
步骤S160、所述发送设备通过所述查找到的第一虚拟通道将所述VLAN帧发送至所述接收设备。Step S160: The sending device sends the VLAN frame to the receiving device by using the first virtual channel that is found.
具体地,在发送设备向接收设备发送报文时,发送设备首先可以通过查找第一对应关系,查找到接收设备的优先级,并在虚拟局域网VLAN帧相应的优先级字段写入接收设备的优先级,在VLAN帧的有效载荷中可以包括发送设备向接收设备发送的数据。例如,HOST_0需要向IO_0发送数据时,HOST_0可以通过查找第一对应关系,查找到IO_0的优先级为0,对应第一虚拟通道0,HOST_0可以在VLAN帧的优先级字段写入0,将需要发送的数据写入VLAN帧的有效载荷,并通过第一虚拟通道0向IO_0发送VLAN帧。Specifically, when the sending device sends the packet to the receiving device, the sending device may first find the priority of the receiving device by searching for the first correspondence, and write the priority of the receiving device in the corresponding priority field of the VLAN frame of the virtual local area network. The level may include data sent by the sending device to the receiving device in the payload of the VLAN frame. For example, when HOST_0 needs to send data to IO_0, HOST_0 can find the priority of IO_0 by 0 by looking up the first correspondence, corresponding to the first virtual channel 0, HOST_0 can write 0 in the priority field of the VLAN frame, and will need The transmitted data is written to the payload of the VLAN frame and the VLAN frame is sent to IO_0 through the first virtual channel 0.
进一步地,在步骤S120之后,该PFC方法还可以包括:Further, after the step S120, the PFC method may further include:
步骤S170、如果所述发送设备从所述接收设备接收到暂停OFF帧,则根据所述OFF帧中的暂停时间,暂停与所述接收设备的通讯;其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的。Step S170: If the transmitting device receives the pause OFF frame from the receiving device, suspend communication with the receiving device according to the pause time in the OFF frame; wherein the OFF frame is received by the receiving device The device is generated in a state where the received buffer space occupied by the received data is higher than the upper threshold.
具体地,发送设备向接收设备发送VLAN帧之后,接收设备可以根据自身接收缓存空间中的数据空满状态向发送设备返回相应的响应。如果接收设备的接收缓存空间中的数据所占用的空间高于上限阈值,接收设备可以 向发送设备发送OFF帧,用来指示发送设备根据所述OFF帧中的暂停时间,暂停与该接收设备的通讯,在到达暂停时间时,发送设备可以自动恢复与该接收设备的通讯。其中,暂停时间可以由OFF帧中的暂停时间字段中的内容决定,发送设备接收到OFF帧之后,可以停止对该接收设备对应的第一虚拟通道的调度,以暂停与该接收设备的通讯。例如IO_0接收到的数据所占用的接收缓存空间高于上限阈值,IO_0可以向HOST_0发送OFF帧,HOST_0接收到OFF帧后,根据OFF帧中的暂停时间,停止对IO_0对应的第一虚拟通道0的调度,暂停与IO_0的通讯。其中上限阈值为该接收设备的接收缓存空间可以存储的数据量最大值,由于从接收设备发送OFF帧到发送设备接收到OFF并作出响应,需要一定的时间,在这段时间内还可能存在一些正在发送的数据需要接收设备接收,不能因为数据存满而丢弃,因此接收设备可以接收的数据量可以大于该上限阈值,即存储空间需要留有一定余量。若高于上限阈值,说明数据将满,该接收设备反压。Specifically, after the sending device sends the VLAN frame to the receiving device, the receiving device may return a corresponding response to the sending device according to the data empty state in the receiving buffer space. If the space occupied by the data in the receiving buffer space of the receiving device is higher than the upper threshold, the receiving device may Sending an OFF frame to the sending device, instructing the sending device to suspend communication with the receiving device according to the pause time in the OFF frame, and when the pause time is reached, the transmitting device can automatically resume communication with the receiving device. The pause time may be determined by the content in the pause time field in the OFF frame. After receiving the OFF frame, the sending device may stop scheduling the first virtual channel corresponding to the receiving device to suspend communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0. After receiving the OFF frame, HOST_0 stops the first virtual channel corresponding to IO_0 according to the pause time in the OFF frame. Dispatch, suspend communication with IO_0. The upper threshold is a maximum amount of data that can be stored in the receiving buffer space of the receiving device. Since the sending of the OFF frame from the receiving device to the sending device receiving the OFF and responding, it takes a certain time, and there may be some time during this time. The data being sent needs to be received by the receiving device, and cannot be discarded because the data is full. Therefore, the amount of data that the receiving device can receive can be greater than the upper threshold, that is, the storage space needs to have a certain margin. If it is higher than the upper threshold, the data will be full and the receiving device will back pressure.
在一种可能的实现方式中,在步骤S170之后,还可以包括:In a possible implementation, after step S170, the method may further include:
步骤S180、如果到达所述OFF帧中的暂停时间或所述发送设备从所述接收设备接收到连通ON帧,则恢复与所述接收设备的通讯;其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的。Step S180, if the pause time in the OFF frame is reached or the transmitting device receives the connected ON frame from the receiving device, resume communication with the receiving device; wherein the ON frame is received by the receiving device The device is generated in a state where the received buffer space occupied by the received data is lower than the lower threshold.
具体地,一方面,在到达暂停时间时,发送设备可以自动恢复与接收设备的通讯;另一方面,接收设备在反压之后,数据所占用的空间可能会减少,在没有到达暂停时间时,如果数据所占用的接收缓存空间低于下限阈值,接收设备可以向发送设备发送ON帧,用来指示发送设备恢复与该接收设备的通讯。例如IO_0接收到的数据所占用的接收缓存空间低于下限阈值,IO_0可以向HOST_0发送ON帧,HOST_0接收到ON帧后,可以重新开始对IO_0对应的第一虚拟通道0的调度,恢复与IO_0的通讯。其中下限阈值 为该接收设备的接收缓存空间存储的数据量最小值,若低于下限阈值,说明该接收设备的接收缓存空间即将没有数据,发送设备可以继续向其发送数据。Specifically, on the one hand, when the pause time is reached, the sending device can automatically resume communication with the receiving device; on the other hand, after the backing device receives the back pressure, the space occupied by the data may be reduced, and when the pause time is not reached, If the receiving buffer space occupied by the data is lower than the lower threshold, the receiving device may send an ON frame to the sending device to instruct the sending device to resume communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is lower than the lower threshold, IO_0 can send an ON frame to HOST_0. After receiving the ON frame, HOST_0 can restart the scheduling of the first virtual channel 0 corresponding to IO_0, and resume with IO_0. Communication. Lower threshold The minimum amount of data stored in the receiving buffer space of the receiving device is lower than the lower threshold, indicating that the receiving buffer space of the receiving device is about to have no data, and the transmitting device can continue to send data to it.
在一种可能的实现方式中,发送设备还可以作为接收端,根据被网络管理员预先设置的通道与设备的对应关系通过相应的通道从其他设备接收数据。In a possible implementation manner, the sending device may also serve as a receiving end, and receive data from other devices through corresponding channels according to the corresponding relationship between the channel and the device preset by the network administrator.
本实施例的基于优先级的流控PFC方法,通过在发送设备中建立第一对应关系,可以实现不同的接收设备使用不同的第一虚拟通道与发送设备通讯,某一接收设备数据存满出现反压或通信异常时,只需要停止该接收设备通过其对应的第一虚拟通道与发送设备的通讯,不会影响其他接收设备与发送设备的数据传输。In the priority-based flow control PFC method of the embodiment, by establishing a first correspondence relationship in the sending device, different receiving devices can communicate with the sending device by using different first virtual channels, and a receiving device data is full. When the back pressure or the communication is abnormal, it is only necessary to stop the communication of the receiving device through the corresponding first virtual channel and the transmitting device, and the data transmission of the other receiving device and the transmitting device is not affected.
实施例2Example 2
图2示出根据本发明实施例二的基于优先级的流控PFC方法的流程图。图2中标号与图1相同的步骤具有相同的功能,为简明起见,省略对这些步骤的详细说明。2 is a flow chart showing a priority-based flow control PFC method according to Embodiment 2 of the present invention. The steps in FIG. 2 having the same reference numerals as in FIG. 1 have the same functions, and a detailed description of these steps will be omitted for the sake of brevity.
如图2所示,图2所示的基于优先级的流控PFC方法与图1所示的基于优先级的流控PFC方法主要区别在于,该PFC方法包括:As shown in FIG. 2, the main difference between the priority-based flow control PFC method shown in FIG. 2 and the priority-based flow control PFC method shown in FIG. 1 is that the PFC method includes:
步骤S200、所述发送设备根据所述接收设备的标识和业务类型,在所述发送设备中预先设置的所述第一对应关系中查找所述对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。Step S200: The sending device searches for the priority of the corresponding first virtual channel and the receiving device in the first correspondence relationship preset in the sending device according to the identifier and the service type of the receiving device. The first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
具体地,在发送设备被网络管理员预先设置的第一对应关系中,还可以包括接收设备的业务类型,即设置业务类型、接收设备的优先级、接收设备的标识和第一虚拟通道之间的对应关系。例如,参见本发明实施例一 中基于优先级的流控PFC方法的相关描述,若以太网中包括2个接收设备(如IO_0、IO_1),IO_0和IO_1都分别包括两种业务类型(如业务类型0、业务类型1),则将IO_0业务类型0的优先级设置为0,IO_0业务类型1的优先级设置为1,IO_1业务类型0的优先级设置为2,IO_1业务类型1的优先级设置为3;还可以通过网络管理员在发送设备端建立四条第一虚拟通道(如第一虚拟通道0、第一虚拟通道1、第一虚拟通道2、第一虚拟通道3),第一虚拟通道0、第一虚拟通道1分别用来发送去往IO_0的业务类型0和业务类型1的数据,第一虚拟通道2、第一虚拟通道3分别用来发送去往IO_1的业务类型0和业务类型1的数据。这样,IO_0的业务类型0的优先级为0,对应第一虚拟通道0,IO_0的业务类型1的优先级为1,对应第一虚拟通道1,IO_1的业务类型0的优先级为2,对应第一虚拟通道2,IO_1的业务类型1的优先级为3,对应第一虚拟通道3。Specifically, in the first correspondence that the sending device is preset by the network administrator, the service type of the receiving device, that is, the setting service type, the priority of the receiving device, the identifier of the receiving device, and the first virtual channel may also be included. Correspondence. For example, refer to the first embodiment of the present invention. A description of the priority-based flow control PFC method. If the Ethernet includes two receiving devices (such as IO_0, IO_1), IO_0 and IO_1 respectively include two service types (such as service type 0 and service type 1). Then set the priority of IO_0 service type 0 to 0, the priority of IO_0 service type 1 to 1, the priority of IO_1 service type 0 to 2, the priority of IO_1 service type 1 to 3, and the network The administrator establishes four first virtual channels (such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3) on the sending device side, and the first virtual channel 0 and the first virtual channel 1 They are used to send data of service type 0 and service type 1 to IO_0, respectively, and the first virtual channel 2 and the first virtual channel 3 are respectively used to send data of service type 0 and service type 1 to IO_1. In this way, the service type 0 of the IO_0 has a priority of 0, corresponding to the first virtual channel 0, and the service type 1 of the IO_0 has a priority of 1, corresponding to the first virtual channel 1, and the service type 0 of the IO_1 has a priority of 2, corresponding to The service type 1 of the first virtual channel 2, IO_1 has a priority of 3, corresponding to the first virtual channel 3.
在一种可能的实现方式中,在步骤S200之前,该PFC方法还可以包括:In a possible implementation, before the step S200, the PFC method may further include:
步骤S2001、在以太网链路上建立接收设备的标识和业务类型对应的第一虚拟通道;Step S2001: Establish an identifier of the receiving device and a first virtual channel corresponding to the service type on the Ethernet link.
步骤S2002、在发送设备中预先设置第一对应关系,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。In step S2002, a first correspondence is preset in the sending device, where the first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and the first virtual channel. Correspondence relationship.
具体地,参见本实施例上述步骤的相关描述,若有2个接收设备,标识分别被网络管理员设置为IO_0和IO_1,每个接收设备具有两种业务类型(如业务类型0、业务类型1),可以在发送设备端建立四条第一虚拟通道(如第一虚拟通道0、第一虚拟通道1、第一虚拟通道2、第一虚拟通道3),结合2个接收设备各个业务类型的优先级,可以通过网络管理员配置业务类型、优先级、接收设备的标识和第一虚拟通道的对应关系,例如,IO_0的业务类型0的优先级为0,对应第一虚拟通道0,IO_0的业务类型1的优先级为1, 对应第一虚拟通道1,IO_1的业务类型0的优先级为2,对应第一虚拟通道2,IO_1的业务类型1的优先级为3,对应第一虚拟通道3。该第一对应关系可以用于后续确定某一接收设备的优先级和发送设备向该接收设备发送数据的第一虚拟通道。For details, refer to the related description of the foregoing steps in this embodiment. If there are two receiving devices, the identifiers are set to IO_0 and IO_1 by the network administrator respectively, and each receiving device has two service types (such as service type 0 and service type 1). The first virtual channel (such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3) may be established on the sending device side, and the priority of each service type of the two receiving devices is combined. The network administrator can configure the service type, the priority, the identifier of the receiving device, and the corresponding relationship of the first virtual channel. For example, the service type 0 of IO_0 has a priority of 0, and corresponds to the service of the first virtual channel 0, IO_0. Type 1 has a priority of 1, Corresponding to the first virtual channel 1, the service type 0 of the IO_1 has a priority of 2, corresponding to the first virtual channel 2, and the service type 1 of the IO_1 has a priority of 3, corresponding to the first virtual channel 3. The first correspondence may be used to subsequently determine the priority of a certain receiving device and the first virtual channel that the sending device sends data to the receiving device.
在一种可能的实现方式中,在步骤S120之后,接收设备可以根据自身某一业务类型的接收缓存空间的数据空满状态向发送设备返回相应的响应。具体地,如果接收设备接收到的某一业务类型的数据所占用的接收缓存空间高于上限阈值,接收设备可以向发送设备发送OFF帧,用来指示发送设备在暂停时间内暂停与该接收设备进行该业务类型的通讯,但不影响发送设备与该接收设备进行其他业务类型的通讯。进一步地,在到达暂停时间或者该接收设备接收到的该业务类型的数据所占用的接收缓存空间低于下限阈值时,接收设备可以向发送设备发送ON帧,用来指示发送设备恢复与该接收设备进行该业务类型的通讯。例如,IO_0接收到的业务类型0的数据所占用的接收缓存空间高于上限阈值,IO_0可以向HOST_0发送OFF帧,HOST_0接收到OFF帧后,暂停与IO_0通过第一虚拟通道0进行业务类型0的通讯;在IO_0接收到的业务类型0的数据所占用的接收缓存空间低于下限阈值,IO_0可以向HOST_0发送ON帧,HOST_0接收到ON帧后,恢复与IO_0通过第一虚拟通道0进行业务类型0的通讯。其中,上限阈值和下限阈值可以参见本发明实施例一中基于优先级的流控PFC方法的相关描述。In a possible implementation manner, after the step S120, the receiving device may return a corresponding response to the sending device according to the data empty state of the receiving buffer space of a certain service type of the service. Specifically, if the receiving buffer space occupied by the data of the certain service type received by the receiving device is higher than the upper threshold, the receiving device may send an OFF frame to the sending device, to indicate that the sending device pauses with the receiving device during the pause time. The communication of the service type is performed, but does not affect the communication between the sending device and the receiving device for other service types. Further, when the receiving buffer space occupied by the data of the service type received by the receiving device is lower than the lower threshold, the receiving device may send an ON frame to the sending device to indicate that the sending device recovers and receives the receiving buffer. The device performs communication for this type of service. For example, the receiving buffer space occupied by the data of the service type 0 received by IO_0 is higher than the upper threshold, IO_0 may send an OFF frame to HOST_0, and after receiving the OFF frame, HOST_0 suspends the service type 0 with the first virtual channel 0 by IO_0. Communication; the receive buffer space occupied by the data of service type 0 received at IO_0 is lower than the lower threshold, IO_0 can send an ON frame to HOST_0, and after receiving the ON frame, HOST_0 resumes service with IO_0 through the first virtual channel 0. Type 0 communication. For the upper threshold and the lower threshold, refer to the related description of the priority-based flow control PFC method in the first embodiment of the present invention.
本实施例的基于优先级的流控PFC方法,通过在发送设备中建立第一对应关系,可以实现不同的接收设备使用不同的第一虚拟通道与发送设备进行不同业务类型的通讯,某一接收设备的某一业务类型的数据存满出现反压或通信异常时,只需要停止该接收设备通过该业务类型对应的第一虚拟通道与发送设备进行该业务类型的通讯,不会影响该接收设备与发送设备进行其他业务类型的数据传输,同时也不会影响其他接收设备与发送设备 的数据传输。In the priority-based flow control PFC method of the present embodiment, by establishing a first correspondence relationship in the sending device, different receiving devices can use different first virtual channels to communicate with different sending services of the sending device, and a certain receiving When the data of a certain service type of the device is full or the communication is abnormal, the receiving device only needs to stop the receiving device from performing communication with the sending device through the first virtual channel corresponding to the service type, without affecting the receiving device. Perform data transmission with other types of services on the sending device, and it will not affect other receiving devices and sending devices. Data transfer.
实施例三Embodiment 3
图3示出根据本发明实施例三的基于优先级的流控PFC方法的流程图。如图3所示,该PFC方法可以应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,所述至少两个服务器包括至少一个发送设备和至少一个接收设备,至少两个虚拟通道可以包括不同发送设备与不同接收设备之间进行数据传输的通道。该PFC方法主要可以包括:FIG. 3 is a flow chart showing a priority-based flow control PFC method according to Embodiment 3 of the present invention. As shown in FIG. 3, the PFC method may be applied to a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, where the at least two servers include at least one sending device and at least one receiving device, at least two The virtual channel may include a channel for data transmission between different transmitting devices and different receiving devices. The PFC method can mainly include:
步骤S300、所述接收设备通过第一虚拟通道,从所述发送设备接收报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,所述接收设备的优先级为所述发送设备在预先设置的第一对应关系中查找到的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。Step S300: The receiving device receives a packet from the sending device by using a first virtual channel, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device. The first virtual channel is a channel for the receiving device to receive data from the sending device on an Ethernet link, and the priority of the receiving device is found by the sending device in a preset first correspondence relationship. Priority: the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channels.
具体地,一方面,在以太网发送设备与接收设备进行通讯的过程中,每个发送设备或接收设备可以由网络管理员配置相应的优先级,每个发送设备或接收设备的优先级在所有发送设备或接收设备中唯一。例如,在以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景中,包括2个发送设备(如HOST_0、HOST_1),则它们的优先级可分别被网络管理员设置为0、1;2个接收设备(如IO_0、IO_1),则它们的优先级也可分别被网络管理员设置为0、1。另一方面,发送设备可以接收网络管理员的配置,即在发送设备中设置接收设备与第一虚拟通道的一一对应关系,不同通道可以分别用来传输发往不同接收设备的数据,通道数目与接收设备数目相同。例如,有2个接收设备(如IO_0、IO_1),可以通过网络管理员的配置在发送设备端建立两条第一虚拟通道(如第一虚拟通道0、第一虚拟通道1),分别用来发送去往IO_0和IO_1的数据。接收设备可以通过其对应的第一虚 拟通道接收发送设备发送的报文,例如IO_0可以通过第一虚拟通道0接收HOST_0发送的报文。Specifically, on the one hand, in the process of communicating between the Ethernet sending device and the receiving device, each sending device or receiving device can be configured with a corresponding priority by the network administrator, and the priority of each sending device or receiving device is at all. The only one of the sending device or the receiving device. For example, in a traffic control scenario where at least two servers share at least two virtual channels in an Ethernet network, including two sending devices (such as HOST_0, HOST_1), their priorities can be set to 0, 1 by the network administrator respectively. 2 receiving devices (such as IO_0, IO_1), their priority can also be set to 0, 1 by the network administrator. On the other hand, the sending device can receive the configuration of the network administrator, that is, set the one-to-one correspondence between the receiving device and the first virtual channel in the sending device, and different channels can respectively be used to transmit data to different receiving devices, and the number of channels. The same number as the receiving device. For example, if there are two receiving devices (such as IO_0 and IO_1), two first virtual channels (such as the first virtual channel 0 and the first virtual channel 1) can be established on the sending device through the configuration of the network administrator. Send data to IO_0 and IO_1. The receiving device can pass its corresponding first virtual The pseudo channel receives the message sent by the sending device, for example, IO_0 can receive the message sent by HOST_0 through the first virtual channel 0.
在一种可能的实现方式中,在步骤S300之前,该PFC方法还可以包括:In a possible implementation, before the step S300, the PFC method may further include:
步骤S3001、在以太网链路上建立发送设备的标识对应的第二虚拟通道;Step S3001: Establish a second virtual channel corresponding to the identifier of the sending device on the Ethernet link.
步骤S3002、在接收设备中预先设置第二对应关系,所述第二对应关系包括所述发送设备的优先级、所述发送设备的标识和第二虚拟通道之间的对应关系。Step S3002: A second correspondence is preset in the receiving device, where the second correspondence includes a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channel.
具体地,参见本实施例上述步骤的相关描述,若在以太网中包括2个发送设备,标识分别被网络管理员配置为HOST_0和HOST_1,可以通过网络管理员的配置在接收设备端建立两条第二虚拟通道(如第二虚拟通道0、第二虚拟通道1),结合2个发送设备的优先级,可以由网络管理员设置发送设备的优先级、发送设备的标识和第二虚拟通道之间的第二对应关系,例如,HOST_0的优先级为0,对应第二虚拟通道0,用来传输发往HOST_0的数据。该第二对应关系可以用于后续确定某一发送设备的优先级和发送数据的第二虚拟通道。For details, refer to the related description of the foregoing steps in this embodiment. If two sending devices are included in the Ethernet, and the identifiers are respectively configured by the network administrator as HOST_0 and HOST_1, two configurations can be established on the receiving device by the configuration of the network administrator. The second virtual channel (such as the second virtual channel 0 and the second virtual channel 1) combines the priorities of the two sending devices, and the network administrator can set the priority of the sending device, the identifier of the sending device, and the second virtual channel. The second correspondence between the two, for example, HOST_0 has a priority of 0, corresponding to the second virtual channel 0, for transmitting data addressed to HOST_0. The second correspondence may be used to subsequently determine the priority of a certain sending device and the second virtual channel that sends data.
在一种可能的实现方式中,在接收设备中的第二对应关系中,还可以包括接收设备的优先级。例如,参见本实施例上述步骤的相关描述,若在以太网中包括2个接收设备,标识分别为IO_0和IO_1,它们的优先级可分别被网络管理员设置为0、1,则在第二对应关系中,IO_0的优先级为0,HOST_0的优先级为0,且IO_0通过第一虚拟通道0接收HOST_0发送的数据,通过第二虚拟通道0向HOST_0发送数据。In a possible implementation, the priority of the receiving device may also be included in the second correspondence in the receiving device. For example, refer to the related description of the foregoing steps in this embodiment. If two receiving devices are included in the Ethernet, the identifiers are IO_0 and IO_1, respectively, and their priorities may be set to 0, 1, respectively, by the network administrator. In the correspondence, the priority of IO_0 is 0, the priority of HOST_0 is 0, and IO_0 receives the data sent by HOST_0 through the first virtual channel 0, and sends data to HOST_0 through the second virtual channel 0.
在一种可能的实现方式中,步骤S300还可以包括:In a possible implementation, step S300 may further include:
步骤S320、所述接收设备通过所述第一虚拟通道,从所述发送设备接收虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备 写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据。Step S320: The receiving device receives a virtual local area network (VLAN) VLAN frame from the sending device by using the first virtual channel, where a priority field of the VLAN frame is used by the sending device Write the priority of the discovered receiving device, where the payload of the VLAN frame includes data sent by the sending device to the receiving device.
具体地,接收设备可以根据第一对应关系,通过接收设备对应的第一虚拟通道从发送设备接收VLAN帧。例如,IO_0与HOST_0进行通讯时,HOST_0可以根据第一对应关系,查找到IO_0的优先级为0,对应第一虚拟通道0,IO_0可以通过第一虚拟通道0接收VLAN帧,HOST_0可以在VLAN帧的优先级字段写入0,将向IO_0发送的数据写入VLAN帧的有效载荷。Specifically, the receiving device may receive the VLAN frame from the sending device by using the first virtual channel corresponding to the receiving device according to the first correspondence. For example, when IO_0 communicates with HOST_0, HOST_0 can find that the priority of IO_0 is 0 according to the first correspondence, corresponding to the first virtual channel 0, IO_0 can receive the VLAN frame through the first virtual channel 0, and HOST_0 can be in the VLAN frame. The priority field is written to 0, and the data sent to IO_0 is written to the payload of the VLAN frame.
进一步地,在步骤S300之后,该PFC方法还可以包括:Further, after step S300, the PFC method may further include:
步骤S340、所述接收设备通过所述第二虚拟通道,向所述发送设备发送暂停OFF帧,所述OFF帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Step S340: The receiving device sends a pause OFF frame to the sending device by using the second virtual channel, where a priority field of the OFF frame is written by the receiving device from a priority obtained by using the VLAN frame. Or the priority of the receiving device found in the second correspondence,
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state in which a receiving buffer space occupied by the received data is higher than an upper threshold.
具体地,接收设备可以根据自身接收缓存空间的数据空满状态向发送设备返回相应的响应。如果接收设备接收到的数据所占用的接收缓存空间高于上限阈值,接收设备可以从接收到的VLAN帧中获取接收设备的优先级,也可以从第二对应关系中获取接收设备的优先级,并在OFF帧的优先级字段写入该接收设备的优先级,通过第二虚拟通道向发送设备发送OFF帧,用来指示发送设备根据所述OFF帧中的暂停时间,暂停与该接收设备的通讯,在到达暂停时间时,发送设备可以自动恢复与接收设备的通讯。其中,暂停时间可以由OFF帧中的暂停时间字段中的内容决定,发送设备接收到OFF帧之后,可以停止对该接收设备对应的第一虚拟通道的调度,以暂停与该接收设备的通讯。例如IO_0接收到的数据所占用的接收缓存空间高于上限阈值,IO_0可以通过第二虚拟通道0向HOST_0发送OFF帧,HOST_0接收 到OFF帧后,根据OFF帧中的暂停时间,暂停与IO_0的通讯。其中上限阈值为该接收设备的接收缓存空间可以存储的数据量最大值,由于从接收设备发送OFF帧到发送设备接收到OFF并作出响应,需要一定的时间,在这段时间内还可能存在一些正在发送的数据需要接收设备接收,不能因为数据存满而丢弃,因此接收设备可以存储的数据量可以大于该上限阈值,即存储空间需要留有一定余量。若高于上限阈值,说明数据将满,该接收设备反压。Specifically, the receiving device may return a corresponding response to the sending device according to the data empty state of the receiving buffer space. If the receiving buffer space occupied by the data received by the receiving device is higher than the upper threshold, the receiving device may obtain the priority of the receiving device from the received VLAN frame, or obtain the priority of the receiving device from the second correspondence. And writing the priority of the receiving device in the priority field of the OFF frame, and sending an OFF frame to the sending device by using the second virtual channel, to instruct the sending device to pause the receiving device according to the pause time in the OFF frame. Communication, when the timeout period is reached, the sending device can automatically resume communication with the receiving device. The pause time may be determined by the content in the pause time field in the OFF frame. After receiving the OFF frame, the sending device may stop scheduling the first virtual channel corresponding to the receiving device to suspend communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0 through the second virtual channel 0, and HOST_0 receives After the OFF frame, communication with IO_0 is suspended according to the pause time in the OFF frame. The upper threshold is a maximum amount of data that can be stored in the receiving buffer space of the receiving device. Since the sending of the OFF frame from the receiving device to the sending device receiving the OFF and responding, it takes a certain time, and there may be some time during this time. The data being sent needs to be received by the receiving device and cannot be discarded because the data is full. Therefore, the amount of data that the receiving device can store can be greater than the upper threshold, that is, the storage space needs to have a certain margin. If it is higher than the upper threshold, the data will be full and the receiving device will back pressure.
在一种可能的实现方式中,在步骤S340之后,还可以包括:In a possible implementation, after step S340, the method may further include:
步骤S360、所述接收设备通过所述第二虚拟通道,向所述发送设备发送连通ON帧,所述ON帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Step S360: The receiving device sends, by using the second virtual channel, a connected ON frame to the sending device, where a priority field of the ON frame is used by the receiving device to write a priority obtained from the VLAN frame. Or the priority of the receiving device found in the second correspondence,
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that the receiving buffer space occupied by the received data is lower than a lower threshold.
具体地,接收设备在反压之后,接收到的数据所占用的接收缓存空间可能会减少,在到达暂停时间前,若接收到的数据所占用的接收缓存空间低于下限阈值,接收设备可以向发送设备发送ON帧,用来指示发送设备恢复与该接收设备的通讯。例如IO_0的数据所占用的空间低于下限阈值,IO_0可以通过第二虚拟通道0向发送ON帧,HOST_0接收到ON帧后,恢复与IO_0的通讯。其中下限阈值为该接收设备接收缓存空间存储的数据量最小值,若低于下限阈值,说明该接收设备的存储空间即将没有数据,发送设备可以继续向其发送数据。Specifically, after receiving the device, the receiving buffer space occupied by the received data may be reduced. Before the timeout period is reached, if the receiving buffer space occupied by the received data is lower than the lower threshold, the receiving device may The sending device sends an ON frame, which is used to instruct the sending device to resume communication with the receiving device. For example, the space occupied by the data of IO_0 is lower than the lower threshold, IO_0 can send the ON frame through the second virtual channel 0, and the communication with IO_0 is resumed after the HOST_0 receives the ON frame. The lower threshold is the minimum amount of data stored in the receiving buffer space of the receiving device. If the threshold is lower than the lower threshold, the storage space of the receiving device is about to have no data, and the sending device can continue to send data to the receiving device.
在一种可能的实现方式中,接收设备还可以作为发送端,根据第二对应关系中第二虚拟通道、发送设备的标识与优先级的对应关系,通过第二虚拟通道向该第二虚拟通道对应的发送设备发送数据。在这种情况下,参 见本发明实施例一中基于优先级的流控PFC方法的相关描述,发送设备可以作为接收端,通过对应的第二虚拟通道从接收设备接收数据。In a possible implementation, the receiving device may also serve as a sending end, according to the correspondence between the identifier of the second virtual channel and the sending device and the priority in the second correspondence, to the second virtual channel by using the second virtual channel. The corresponding sending device sends data. In this case, the reference For a description of the priority-based flow control PFC method in the first embodiment of the present invention, the sending device can serve as a receiving end, and receive data from the receiving device through the corresponding second virtual channel.
本实施例的基于优先级的流控PFC方法,通过在发送设备中建立第一对应关系,可以实现不同的接收设备使用不同的第一虚拟通道与发送设备通讯,某一接收设备数据存满出现反压或通信异常时,只需要停止该接收设备通过其对应的第一虚拟通道与发送设备的通讯,不会影响其他接收设备与发送设备间的数据传输。In the priority-based flow control PFC method of the embodiment, by establishing a first correspondence relationship in the sending device, different receiving devices can communicate with the sending device by using different first virtual channels, and a receiving device data is full. When the back pressure or communication is abnormal, it is only necessary to stop the communication of the receiving device through the corresponding first virtual channel and the transmitting device, and the data transmission between the other receiving device and the transmitting device is not affected.
实施例4Example 4
图4示出根据本发明实施例四的基于优先级的流控PFC方法的流程图。图4中标号与图3相同的步骤具有相同的功能,为简明起见,省略对这些步骤的详细说明。4 is a flow chart showing a priority-based flow control PFC method according to Embodiment 4 of the present invention. The same steps in FIG. 4 as those in FIG. 3 have the same functions, and a detailed description of these steps will be omitted for the sake of brevity.
如图4所示,图4所示的基于优先级的流控PFC方法与图3所示的基于优先级的流控PFC方法主要区别在于,在步骤S300之前,该PFC方法包括:As shown in FIG. 4, the main difference between the priority-based flow control PFC method shown in FIG. 4 and the priority-based flow control PFC method shown in FIG. 3 is that, before step S300, the PFC method includes:
步骤S4001、在以太网链路上建立发送设备的标识和业务类型对应的第二虚拟通道;Step S4001: Establish an identifier of the sending device and a second virtual channel corresponding to the service type on the Ethernet link.
步骤S4002、在接收设备中预先设置第二对应关系,所述第二对应关系包括所述业务类型、所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系。Step S4002, a second correspondence is preset in the receiving device, where the second correspondence includes the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel. Correspondence relationship.
具体地,在接收设备被网络管理员预先设置的第二对应关系中,还可以包括发送设备的业务类型,即设置业务类型、发送设备的优先级、发送设备的标识和第二虚拟通道之间的对应关系。例如,参见本发明实施例三中基于优先级的流控PFC方法的相关描述,若以太网中包括2个发送设备,标识分别被网络管理员设置为HOST_0和HOST_1,每个发送设备可以与接收设备进行两种业务类型(如业务类型0、业务类型1)的通讯,可以通过网络管理员在接收设备端建立四条第二虚拟通道(如第二虚拟通道0、第二 虚拟通道1、第二虚拟通道2、第二虚拟通道3),结合2个发送设备的优先级,可以通过网络管理员配置业务类型、发送设备的优先级、发送设备的标识和第二虚拟通道的第二对应关系,例如,HOST_0的业务类型0优先级为0,对应第二虚拟通道0,HOST_0的业务类型1优先级为1,对应第二虚拟通道1,HOST_1的业务类型0优先级为2,对应第二虚拟通道2,HOST_1的业务类型1优先级为3,对应第二虚拟通道3。该第二对应关系可以用于后续确定某一发送设备的优先级和接收设备向该发送设备发送数据的第二虚拟通道。Specifically, in the second correspondence that is preset by the network administrator, the service type of the sending device, that is, the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel may also be included. Correspondence. For example, refer to the description of the priority-based flow control PFC method in Embodiment 3 of the present invention. If the Ethernet includes two sending devices, the identifiers are respectively set by the network administrator as HOST_0 and HOST_1, and each transmitting device can receive and receive. The device performs communication between two service types (such as service type 0 and service type 1). The network administrator can create four second virtual channels on the receiving device (such as the second virtual channel 0 and the second). The virtual channel 1, the second virtual channel 2, and the second virtual channel 3) combine the priorities of the two sending devices, and the network administrator can configure the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel. The second correspondence of the service type 0 of HOST_0 is 0, corresponding to the second virtual channel 0, the service type 1 priority of HOST_0 is 1, corresponding to the second virtual channel 1, and the service type 0 priority of HOST_1 is 2, corresponding to the second virtual channel 2, the service type 1 of HOST_1 has a priority of 3, corresponding to the second virtual channel 3. The second correspondence may be used to subsequently determine the priority of a certain sending device and the second virtual channel that the receiving device sends data to the sending device.
在一种可能的实现方式中,在接收设备的第二对应关系中,还可以包括接收设备的优先级。具体示例可以参见本发明实施例三中基于优先级的流控PFC方法的相关描述。In a possible implementation manner, in the second correspondence relationship of the receiving device, the priority of the receiving device may also be included. For a specific example, refer to the related description of the priority-based flow control PFC method in Embodiment 3 of the present invention.
在一种可能的实现方式中,在步骤S300之后,接收设备可以根据自身某一业务类型的接收缓存空间的数据空满状态向发送设备返回相应的响应。具体地,如果接收设备接收到的某一业务类型的数据所占用的接收缓存空间高于上限阈值,接收设备可以通过第二虚拟通道向发送设备发送OFF帧,用来指示发送设备在暂停时间段内暂停与该接收设备进行该业务类型的通讯,但不影响发送设备与该接收设备进行其他业务类型的通讯。进一步地,在到达暂停时间或者该接收设备接收到的该业务类型的数据所占用的接收缓存空间低于下限阈值时,接收设备可以通过第二虚拟通道向发送设备发送ON帧,用来指示发送设备恢复与该接收设备进行该业务类型的通讯。例如,IO_0接收到的业务类型0的数据所占用的接收缓存空间高于上限阈值,IO_0可以通过第二虚拟通道0向HOST_0发送OFF帧,HOST_0接收到OFF帧后,暂停与IO_0进行业务类型0的通讯;在IO_0接收到的业务类型0的数据所占用的接收缓存空间低于下限阈值,IO_0可以通过第二虚拟通道0向HOST_0发送ON帧,HOST_0接收到ON帧后,恢复与IO_0进行业务类型0的通讯。其中,上限阈值和下限阈值可以参见本发明实施例一中基于优先 级的流控PFC方法的相关描述。In a possible implementation manner, after step S300, the receiving device may return a corresponding response to the sending device according to the data empty state of the receiving buffer space of a certain service type of the service. Specifically, if the receiving buffer space occupied by the data of the certain service type received by the receiving device is higher than the upper threshold, the receiving device may send an OFF frame to the sending device by using the second virtual channel, to indicate that the sending device is in the pause period. The communication of the service type is suspended within the receiving device, but does not affect the communication between the transmitting device and the receiving device for other service types. Further, the receiving device may send an ON frame to the sending device by using the second virtual channel to indicate the sending, when the receiving buffer space occupied by the data of the service type received by the receiving device is lower than the lower threshold. The device resumes communication with the receiving device for the type of service. For example, the receiving buffer space occupied by the data of the service type 0 received by IO_0 is higher than the upper threshold, and IO_0 can send the OFF frame to HOST_0 through the second virtual channel 0, and after receiving the OFF frame, HOST_0 suspends the service type with IO_0. Communication; the received buffer space occupied by the data of the service type 0 received at IO_0 is lower than the lower threshold, IO_0 can send an ON frame to HOST_0 through the second virtual channel 0, and HOST_0 resumes the service with IO_0 after receiving the ON frame. Type 0 communication. The upper threshold and the lower threshold may be referred to in the first embodiment of the present invention based on the priority. A description of the flow control PFC method of the class.
本实施例的基于优先级的流控PFC方法,通过在发送设备中建立第一对应关系,可以实现不同的接收设备使用不同的第一虚拟通道与发送设备进行不同业务类型的通讯,某一接收设备的某一业务类型的数据存满出现反压或通信异常时,只需要停止该接收设备通过该业务类型对应的第一虚拟通道与发送设备进行该业务类型的通讯,不会影响该接收设备与发送设备进行其他业务类型的数据传输,同时也不会影响其他接收设备与发送设备的数据传输。In the priority-based flow control PFC method of the present embodiment, by establishing a first correspondence relationship in the sending device, different receiving devices can use different first virtual channels to communicate with different sending services of the sending device, and a certain receiving When the data of a certain service type of the device is full or the communication is abnormal, the receiving device only needs to stop the receiving device from performing communication with the sending device through the first virtual channel corresponding to the service type, without affecting the receiving device. Data transmission with other types of services by the transmitting device does not affect the data transmission of other receiving devices and transmitting devices.
实施例5Example 5
图5a示出根据本发明实施例五的发送设备的结构框图。如图5a所示,该发送设备500可以应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,主要可以包括:Figure 5a is a block diagram showing the structure of a transmitting apparatus according to Embodiment 5 of the present invention. As shown in FIG. 5a, the sending device 500 can be applied to a traffic control scenario in which at least two servers in the Ethernet share at least two virtual channels, which may include:
查找模块510,用于根据接收设备的标识,在发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道。The searching module 510 is configured to search for a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device according to the identifier of the receiving device, where the first correspondence includes the receiving a priority of the device, an identifier of the receiving device, and a correspondence between the first virtual channel, where the first virtual channel is a channel that the receiving device receives data from the sending device on an Ethernet link. .
具体地,在以太网发送设备与接收设备进行通讯的过程中,每个接收设备可以由网络管理员配置一个唯一的标识,发送设备通过此标识可以唯一确定接收设备。一方面,不同发送设备和不同接收设备均可以接收网络管理员对其优先级进行的配置,每个发送设备或每个接收设备的优先级在所有发送设备或接收设备中唯一。例如,在以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景中,包括2个发送设备(如HOST_0、HOST_1),则它们的优先级可分别被网络管理员设置为0、1;2个接收设备(如IO_0、IO_1),则它们的优先级也可分别被网络管理员设置为0、1。另 一方面,发送设备可以接收网络管理员的配置,即在发送设备中设置接收设备与第一虚拟通道的一一对应关系,不同通道可以分别用来传输发往不同接收设备的数据,通道数目与接收设备数目相同。例如,有2个接收设备(如IO_0、IO_1),可以通过网络管理员的配置在发送设备端建立两条第一虚拟通道(如第一虚拟通道0、第一虚拟通道1),分别用来发送去往IO_0和IO_1的数据。根据接收设备的标识,查找模块510可以在发送设备500中的第一对应关系中查找对应的第一虚拟通道和接收设备的优先级,用于后续发送设备500向接收设备发送数据,例如HOST_0的查找模块510可以在HOST_0的第一对应关系中查找到IO_0的优先级为0,对应第一虚拟通道0,用于后续HOST_0可以通过第一虚拟通道0向IO_0发送数据。Specifically, in the process of communicating between the Ethernet sending device and the receiving device, each receiving device may be configured by the network administrator to configure a unique identifier, and the sending device may uniquely determine the receiving device by using the identifier. On the one hand, different sending devices and different receiving devices can receive the configuration of their priorities by the network administrator, and the priority of each transmitting device or each receiving device is unique among all transmitting devices or receiving devices. For example, in a traffic control scenario where at least two servers share at least two virtual channels in an Ethernet network, including two sending devices (such as HOST_0, HOST_1), their priorities can be set to 0, 1 by the network administrator respectively. 2 receiving devices (such as IO_0, IO_1), their priority can also be set to 0, 1 by the network administrator. Another On one hand, the sending device can receive the configuration of the network administrator, that is, set a one-to-one correspondence between the receiving device and the first virtual channel in the sending device, and different channels can be used to transmit data to different receiving devices, respectively, and the number of channels and The number of receiving devices is the same. For example, if there are two receiving devices (such as IO_0 and IO_1), two first virtual channels (such as the first virtual channel 0 and the first virtual channel 1) can be established on the sending device through the configuration of the network administrator. Send data to IO_0 and IO_1. According to the identifier of the receiving device, the searching module 510 may search for the priority of the corresponding first virtual channel and the receiving device in the first corresponding relationship in the sending device 500, where the sending device 500 sends data to the receiving device, for example, HOST_0. The searching module 510 may find that the priority of IO_0 is 0 in the first correspondence of HOST_0, corresponding to the first virtual channel 0, and the subsequent HOST_0 may send data to the IO_0 through the first virtual channel 0.
发送模块520,与所述查找模块510连接,用于通过所述查找到的第一虚拟通道,向所述接收设备发送报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据。The sending module 520 is connected to the searching module 510, and configured to send a packet to the receiving device by using the first virtual channel that is found, where the packet includes the priority of the receiving device and the The data transmitted by the transmitting device to the receiving device.
具体地,在查找模块510查找到第一虚拟通道之后,发送设备500可以通过与接收设备对应的第一虚拟通道与该接收设备进行通讯,即发送设备500的发送模块520可以通过第一虚拟通道向该接收设备发送报文,并可以在该报文的优先级字段可以写入查找模块510查找到的该接收设备的优先级,在报文的有效载荷(Payload)中可以包括发送设备500向接收设备发送的数据。Specifically, after the searching module 510 finds the first virtual channel, the sending device 500 can communicate with the receiving device by using the first virtual channel corresponding to the receiving device, that is, the sending module 520 of the sending device 500 can pass the first virtual channel. Sending a message to the receiving device, and the priority of the receiving device that is found by the searching module 510 can be written in the priority field of the packet, and the sending device 500 can be included in the payload of the packet (Payload). Receive data sent by the device.
在接收设备接收到上述数据时,接收设备可以根据自身接收缓存空间的数据空满状态向发送设备500返回响应。若接收设备接收缓存空间的数据将满,不能继续接收数据时,接收设备可以根据流控技术,进行反压,即指示发送设备500不再继续通过该接收设备对应的第一虚拟通道向该接收设备发送数据。这样,接收设备的反压并不影响以太网中其他接收设备与发送设备500通过其他接收设备对应的第一虚拟通道进行通讯,例如IO_0接 收缓存空间的数据将满,可以向HOST_0反压,HOST_0接收到反压后可以暂停与IO_0通过第一虚拟通道0的通讯,但是HOST_0仍可以与IO_1通过第一虚拟通道1进行通讯。When the receiving device receives the above data, the receiving device may return a response to the sending device 500 according to the data empty state of the receiving buffer space. If the data received by the receiving device is full and the data cannot be continuously received, the receiving device may perform backpressure according to the flow control technology, that is, the sending device 500 does not continue to receive the first virtual channel corresponding to the receiving device. The device sends data. In this way, the back pressure of the receiving device does not affect the other receiving devices in the Ethernet and the transmitting device 500 to communicate through the first virtual channel corresponding to the other receiving devices, for example, IO_0 The data in the buffer space will be full, and it can be back pressured to HOST_0. After receiving the back pressure, HOST_0 can suspend communication with IO_0 through the first virtual channel 0, but HOST_0 can still communicate with IO_1 through the first virtual channel 1.
图5b示出根据本发明实施例五的发送设备的结构框图。如图5b所示,发送设备500还可以包括:Figure 5b is a block diagram showing the structure of a transmitting apparatus according to Embodiment 5 of the present invention. As shown in FIG. 5b, the sending device 500 may further include:
建立模块530,用于在所述以太网链路上建立所述接收设备的标识对应的第一虚拟通道;The establishing module 530 is configured to establish, on the Ethernet link, a first virtual channel corresponding to the identifier of the receiving device;
配置模块540,与所述建立模块530连接,用于在发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The configuration module 540 is connected to the establishing module 530, and configured to preset the first correspondence in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a location The correspondence between the first virtual channels is described.
具体地,参见本实施例上述组件的相关描述,若在以太网中包括2个接收设备,标识分别被网络管理员配置为IO_0和IO_1,建立模块530可以建立两条第一虚拟通道(如第一虚拟通道0和第一虚拟通道1),结合2个接收设备的优先级,配置模块540可以设置接收设备的优先级、接收设备的标识和第一虚拟通道的第一对应关系,例如,IO_0的优先级为0,对应第一虚拟通道0。该第一对应关系可以用于后续确定某一接收设备的优先级和向该接收设备发送数据的第一虚拟通道。Specifically, referring to the related description of the foregoing components in this embodiment, if two receiving devices are included in the Ethernet, and the identifiers are respectively configured by the network administrator as IO_0 and IO_1, the establishing module 530 can establish two first virtual channels (such as A virtual channel 0 and a first virtual channel 1), combined with the priority of the two receiving devices, the configuration module 540 can set the priority of the receiving device, the identifier of the receiving device, and the first correspondence of the first virtual channel, for example, IO_0 The priority is 0, corresponding to the first virtual channel 0. The first correspondence may be used to subsequently determine the priority of a certain receiving device and the first virtual channel that sends data to the receiving device.
进一步地,发送模块520还可以包括:Further, the sending module 520 may further include:
生成单元521,用于生成虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据;a generating unit 521, configured to generate a virtual local area network (VLAN) VLAN frame, where a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, where a payload of the VLAN frame includes the Transmitting data sent by the device to the receiving device;
导入单元522,与所述生成单元521连接,用于通过所述查找到的第一虚拟通道将所述VLAN帧发送至所述接收设备。The importing unit 522 is connected to the generating unit 521, and configured to send the VLAN frame to the receiving device by using the first virtual channel that is found.
具体地,在发送设备500向接收设备发送报文时,发送设备首先可以通过查找模块510查找第一对应关系,查找到接收设备的优先级,并通过生成 单元521在虚拟局域网VLAN帧相应的优先级字段写入接收设备的优先级,在VLAN帧的有效载荷中可以包括发送设备向接收设备发送的数据。例如,HOST_0需要向IO_0发送数据时,HOST_0可以通过查找模块510查找第一对应关系,查找到IO_0的优先级为0,对应第一虚拟通道0,HOST_0可以通过生成单元521在VLAN帧的优先级字段写入0,将需要发送的数据写入VLAN帧的有效载荷,并通过第一虚拟通道0向IO_0发送VLAN帧。Specifically, when the sending device 500 sends a packet to the receiving device, the sending device may first search for the first correspondence through the searching module 510, find the priority of the receiving device, and generate the packet. The unit 521 writes the priority of the receiving device in the corresponding priority field of the virtual local area network VLAN frame, and may include the data sent by the sending device to the receiving device in the payload of the VLAN frame. For example, when HOST_0 needs to send data to IO_0, HOST_0 can search for the first correspondence through the lookup module 510, and find that the priority of IO_0 is 0, corresponding to the first virtual channel 0, and HOST_0 can pass the priority of the VLAN frame by the generating unit 521. The field is written with 0, the data to be sent is written to the payload of the VLAN frame, and the VLAN frame is sent to IO_0 through the first virtual channel 0.
进一步地,发送设备500还可以包括:Further, the sending device 500 may further include:
处理模块550,与所述发送模块520连接,用于如果所述发送设备从所述接收设备接收到暂停OFF帧,则根据所述OFF帧中的暂停时间,暂停与所述接收设备的通讯;The processing module 550 is connected to the sending module 520, and configured to suspend communication with the receiving device according to a pause time in the OFF frame if the sending device receives a pause OFF frame from the receiving device;
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state in which a receiving buffer space occupied by the received data is higher than an upper threshold.
具体地,发送设备500通过发送模块520向接收设备发送VLAN帧之后,接收设备可以根据自身接收缓存空间中的数据空满状态向发送设备500返回相应的响应。如果接收设备的接收缓存空间中的数据所占用的空间高于上限阈值,接收设备可以向发送设备500发送OFF帧,用来指示发送设备500的处理模块550根据所述OFF帧中的暂停时间,暂停与该接收设备的通讯,在到达暂停时间时,发送设备500可以自动恢复与该接收设备的通讯。其中,暂停时间可以由OFF帧中的暂停时间字段中的内容决定,发送设备接收到OFF帧之后,可以停止对该接收设备对应的第一虚拟通道的调度,以暂停与该接收设备的通讯。例如IO_0接收到的数据所占用的接收缓存空间高于上限阈值,IO_0可以向HOST_0发送OFF帧,HOST_0接收到OFF帧后,根据OFF帧中的暂停时间,停止对IO_0对应的第一虚拟通道0的调度,暂停与IO_0的通讯。其中上限阈值为该接收设备的接收缓存空间可以存储的数据量最大值,由于从接收设备发送OFF帧到发送设备接收到OFF并作出响应, 需要一定的时间,在这段时间内还可能存在一些正在发送的数据需要接收设备接收,不能因为数据存满而丢弃,因此接收设备可以接收的数据量可以大于该上限阈值,即存储空间需要留有一定余量。若高于上限阈值,说明数据将满,该接收设备反压。Specifically, after the sending device 500 sends the VLAN frame to the receiving device by using the sending module 520, the receiving device may return a corresponding response to the sending device 500 according to the data empty state in the receiving buffer space. If the space occupied by the data in the receiving buffer space of the receiving device is higher than the upper threshold, the receiving device may send an OFF frame to the sending device 500, which is used to indicate that the processing module 550 of the transmitting device 500 is based on the pause time in the OFF frame. The communication with the receiving device is suspended, and when the pause time is reached, the transmitting device 500 can automatically resume communication with the receiving device. The pause time may be determined by the content in the pause time field in the OFF frame. After receiving the OFF frame, the sending device may stop scheduling the first virtual channel corresponding to the receiving device to suspend communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0. After receiving the OFF frame, HOST_0 stops the first virtual channel corresponding to IO_0 according to the pause time in the OFF frame. Dispatch, suspend communication with IO_0. The upper threshold is a maximum amount of data that can be stored in the receiving buffer space of the receiving device. Since the receiving device sends an OFF frame to the transmitting device to receive an OFF and responds, It takes a certain amount of time. During this period of time, there may be some data being sent that needs to be received by the receiving device, and cannot be discarded because the data is full. Therefore, the amount of data that the receiving device can receive can be greater than the upper threshold, that is, the storage space needs to be left. There is a certain amount of margin. If it is higher than the upper threshold, the data will be full and the receiving device will back pressure.
在一种可能的实现方式中,处理模块550还可以被配置为:如果到达所述OFF帧中的暂停时间或从所述接收设备接收到连通ON帧,则恢复与所述接收设备的通讯;In a possible implementation manner, the processing module 550 is further configured to: resume communication with the receiving device if a pause time in the OFF frame is reached or a connected ON frame is received from the receiving device;
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that the receiving buffer space occupied by the received data is lower than a lower threshold.
具体地,一方面,在到达暂停时间时,发送设备500可以通过处理模块550自动恢复与接收设备的通讯;另一方面,接收设备在反压之后,数据所占用的空间可能会减少,在没有到达暂停时间时,如果数据所占用的接收缓存空间低于下限阈值,接收设备可以向发送设备500发送ON帧,用来指示发送设备500通过处理模块550恢复与该接收设备的通讯。例如IO_0接收到的数据所占用的接收缓存空间低于下限阈值,IO_0可以向HOST_0发送ON帧,HOST_0接收到ON帧后,可以重新开始对IO_0对应的第一虚拟通道0的调度,恢复与IO_0的通讯。其中下限阈值为该接收设备的接收缓存空间存储的数据量最小值,若低于下限阈值,说明该接收设备的接收缓存空间即将没有数据,发送设备500可以继续向其发送数据。Specifically, on the one hand, when the pause time is reached, the sending device 500 can automatically resume communication with the receiving device through the processing module 550; on the other hand, after the back-up device receives the data, the space occupied by the data may be reduced, in the absence of When the timeout period is reached, if the receiving buffer space occupied by the data is lower than the lower threshold, the receiving device may send an ON frame to the sending device 500 to instruct the sending device 500 to resume communication with the receiving device through the processing module 550. For example, if the received buffer space occupied by the data received by IO_0 is lower than the lower threshold, IO_0 can send an ON frame to HOST_0. After receiving the ON frame, HOST_0 can restart the scheduling of the first virtual channel 0 corresponding to IO_0, and resume with IO_0. Communication. The lower threshold is the minimum amount of data stored in the receiving buffer space of the receiving device. If the lower threshold is lower, the receiving buffer space of the receiving device is about to have no data, and the sending device 500 can continue to send data to the receiving device.
在一种可能的实现方式中,发送设备500还可以作为接收端,根据被网络管理员预先设置的通道与设备的对应关系通过相应的通道从其他设备接收数据。In a possible implementation, the sending device 500 can also serve as a receiving end, and receive data from other devices through corresponding channels according to the corresponding relationship between the channel and the device preset by the network administrator.
本实施例的发送设备,通过配置模块在发送设备中设置第一对应关系,可以实现不同的接收设备使用不同的第一虚拟通道与发送设备通讯,某一接收设备数据存满出现反压或通信异常时,只需要停止该接收设备通过其 对应的第一虚拟通道与发送设备的通讯,不会影响其他接收设备与发送设备的数据传输。In the sending device of this embodiment, the first corresponding relationship is set in the sending device by using the configuration module, so that different receiving devices can communicate with the sending device by using different first virtual channels, and a receiving device data is full of back pressure or communication. When an exception occurs, it only needs to stop the receiving device through it. The communication between the corresponding first virtual channel and the transmitting device does not affect the data transmission of other receiving devices and the transmitting device.
实施例6Example 6
图6示出根据本发明实施例六的发送设备的结构框图。图6中标号与图5a、图5b相同的组件具有相同的功能,为简明起见,省略对这些组件的详细说明。Figure 6 is a block diagram showing the structure of a transmitting apparatus according to Embodiment 6 of the present invention. The components in Fig. 6 having the same reference numerals as those in Figs. 5a and 5b have the same functions, and a detailed description of these components will be omitted for the sake of brevity.
如图6所示,图6所示的发送设备与图5a、图5b所示的发送设备主要区别在于,该发送设备600的查找模块610除了可以具备本发明实施例五中查找模块510的功能之外,还可以被配置为:As shown in FIG. 6, the main difference between the transmitting device shown in FIG. 6 and the transmitting device shown in FIG. 5a and FIG. 5b is that the searching module 610 of the transmitting device 600 can have the function of the searching module 510 in the fifth embodiment of the present invention. In addition, it can be configured as:
根据所述接收设备的标识和业务类型,在所述发送设备中预先设置的所述第一对应关系中查找所述对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。例如IO_0的业务类型0的优先级为0,对应第一虚拟通道0,HOST_0通过第一虚拟通道0向IO_0发送业务类型0的数据。Searching, in the first correspondence relationship preset in the sending device, the priority of the corresponding first virtual channel and the receiving device according to the identifier and the service type of the receiving device, where the first corresponding The relationship includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels. For example, the service type 0 of IO_0 has a priority of 0, corresponding to the first virtual channel 0, and HOST_0 transmits the data of the service type 0 to the IO_0 through the first virtual channel 0.
具体地,在发送设备的第一对应关系中,还可以包括接收设备的业务类型,即设置业务类型、接收设备的优先级、接收设备的标识和第一虚拟通道之间的对应关系。例如,参见本发明实施例一中基于优先级的流控PFC方法的相关描述,若以太网中包括2个接收设备(如IO_0、IO_1),IO_0和IO_1都分别包括两种业务类型(如业务类型0、业务类型1),则可以将设置IO_0业务类型0的优先级设置为0,IO_0业务类型1的优先级设置为1,IO_1业务类型0的优先级设置为2,IO_1业务类型1的优先级设置为3;还可以在发送设备端建立四条第一虚拟通道(如第一虚拟通道0、第一虚拟通道1、第一虚拟通道2、第一虚拟通道3),第一虚拟通道0、第一虚拟通道1分别用来发送去往IO_0的业务类型0和业务类型1的数据,第一虚拟通道2、第一虚 拟通道3分别用来发送去往IO_1的业务类型0和业务类型1的数据。这样,IO_0的业务类型0的优先级为0,对应第一虚拟通道0,IO_0的业务类型1的优先级为1,对应第一虚拟通道1,IO_1的业务类型0的优先级为2,对应第一虚拟通道2,IO_1的业务类型1的优先级为3,对应第一虚拟通道3。Specifically, in the first correspondence of the sending device, the service type of the receiving device, that is, the setting of the service type, the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels may also be included. For example, refer to the description of the priority-based flow control PFC method in the first embodiment of the present invention. If the Ethernet includes two receiving devices (such as IO_0, IO_1), IO_0 and IO_1 respectively include two service types (such as services). Type 0, service type 1), the priority of setting IO_0 service type 0 can be set to 0, the priority of IO_0 service type 1 is set to 1, the priority of IO_1 service type 0 is set to 2, and the priority of IO_1 service type 1 The priority is set to 3; four first virtual channels (such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3) may be established on the sending device end, and the first virtual channel 0 The first virtual channel 1 is used to send data of service type 0 and service type 1 to IO_0, the first virtual channel 2, the first virtual The quasi-channel 3 is used to send data of service type 0 and service type 1 to IO_1, respectively. In this way, the service type 0 of the IO_0 has a priority of 0, corresponding to the first virtual channel 0, and the service type 1 of the IO_0 has a priority of 1, corresponding to the first virtual channel 1, and the service type 0 of the IO_1 has a priority of 2, corresponding to The service type 1 of the first virtual channel 2, IO_1 has a priority of 3, corresponding to the first virtual channel 3.
在一种可能的实现方式中,该发送设备600的建立模块630除了可以具备本发明实施例五中建立模块530的功能之外,还可以被配置为:在所述以太网链路上建立所述接收设备的标识和所述业务类型对应的第一虚拟通道;In a possible implementation manner, the establishing module 630 of the sending device 600 may be configured to: establish a function on the Ethernet link, in addition to the function of the establishing module 530 in the fifth embodiment of the present invention. Determining, by the identifier of the receiving device, a first virtual channel corresponding to the service type;
该发送设备600的配置模块640除了可以具备本发明实施例五中配置模块540的功能之外,还可以被配置为:在所述发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The configuration module 640 of the sending device 600 may be configured to: in addition to the function of the configuration module 540 in the fifth embodiment of the present invention, the first corresponding relationship is preset in the sending device, the first The correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
具体地,参见本实施例上述组件的相关描述,若有2个接收设备,标识分别被网络管理员设置为IO_0和IO_1,每个接收设备具有两种业务类型(如业务类型0、业务类型1),建立模块630可以在发送设备端建立四条第一虚拟通道(如第一虚拟通道0、第一虚拟通道1、第一虚拟通道2、第一虚拟通道3),结合2个接收设备各个业务类型的优先级,配置模块640可以配置业务类型、优先级、接收设备的标识和第一虚拟通道的对应关系,例如,IO_0的业务类型0的优先级为0,对应第一虚拟通道0,IO_0的业务类型1的优先级为1,对应第一虚拟通道1,IO_1的业务类型0的优先级为2,对应第一虚拟通道2,IO_1的业务类型1的优先级为3,对应第一虚拟通道3。该第一对应关系可以用于后续确定某一接收设备的优先级和向该接收设备发送数据的第一虚拟通道。For details, refer to the related description of the foregoing components in this embodiment. If there are two receiving devices, the identifiers are respectively set by the network administrator as IO_0 and IO_1, and each receiving device has two service types (such as service type 0 and service type 1). The establishing module 630 can establish four first virtual channels (such as the first virtual channel 0, the first virtual channel 1, the first virtual channel 2, and the first virtual channel 3) on the sending device end, and combine the services of the two receiving devices. The priority of the type, the configuration module 640 can configure the service type, the priority, the identifier of the receiving device, and the corresponding relationship of the first virtual channel. For example, the service type 0 of IO_0 has a priority of 0, corresponding to the first virtual channel 0, IO_0. The service type 1 has a priority of 1, corresponding to the first virtual channel 1, and the service type 0 of the IO_1 has a priority of 2, corresponding to the first virtual channel 2, and the service type 1 of the IO_1 has a priority of 3, corresponding to the first virtual Channel 3. The first correspondence may be used to subsequently determine the priority of a certain receiving device and the first virtual channel that sends data to the receiving device.
在一种可能的实现方式中,接收设备可以根据自身某一业务类型的接收缓存空间的数据空满状态向发送设备600返回相应的响应。具体地,如果 接收设备接收到的某一业务类型的数据所占用的接收缓存空间高于上限阈值,接收设备可以向发送设备600发送OFF帧,用来指示发送设备600的处理模块550在暂停时间内暂停与该接收设备进行该业务类型的通讯,但不影响发送设备与该接收设备进行其他业务类型的通讯。进一步地,在到达暂停时间或者该接收设备接收到的该业务类型的数据所占用的接收缓存空间低于下限阈值时,接收设备可以向发送设备600发送ON帧,用来指示发送设备600的处理模块550恢复与该接收设备进行该业务类型的通讯。例如,IO_0接收到的业务类型0的数据所占用的接收缓存空间高于上限阈值,IO_0可以向HOST_0发送OFF帧,HOST_0接收到OFF帧后,暂停与IO_0通过第一虚拟通道0进行业务类型0的通讯;在IO_0接收到的业务类型0的数据所占用的接收缓存空间低于下限阈值,IO_0可以向HOST_0发送ON帧,HOST_0接收到ON帧后,恢复与IO_0通过第一虚拟通道0进行业务类型0的通讯。其中,上限阈值和下限阈值可以参见本发明实施例一中基于优先级的流控PFC方法的相关描述。In a possible implementation manner, the receiving device may return a corresponding response to the sending device 600 according to the data empty state of the receiving buffer space of a certain service type of the service. Specifically, if The receiving buffer space occupied by the data of a certain service type received by the receiving device is higher than the upper threshold, and the receiving device may send an OFF frame to the sending device 600 to indicate that the processing module 550 of the sending device 600 pauses during the pause time. The receiving device performs communication of the service type, but does not affect the communication device and other communication types of the receiving device. Further, the receiving device may send an ON frame to the sending device 600 to indicate the processing of the sending device 600 when the receiving buffer space occupied by the data of the service type received by the receiving device is lower than the lower threshold. Module 550 resumes communication with the receiving device for the type of service. For example, the receiving buffer space occupied by the data of the service type 0 received by IO_0 is higher than the upper threshold, IO_0 may send an OFF frame to HOST_0, and after receiving the OFF frame, HOST_0 suspends the service type 0 with the first virtual channel 0 by IO_0. Communication; the receive buffer space occupied by the data of service type 0 received at IO_0 is lower than the lower threshold, IO_0 can send an ON frame to HOST_0, and after receiving the ON frame, HOST_0 resumes service with IO_0 through the first virtual channel 0. Type 0 communication. For the upper threshold and the lower threshold, refer to the related description of the priority-based flow control PFC method in the first embodiment of the present invention.
本实施例的发送设备,通过配置模块在发送设备中配置第一对应关系,可以实现不同的接收设备使用不同的第一虚拟通道与发送设备进行不同业务类型的通讯,某一接收设备的某一业务类型的数据存满出现反压或通信异常时,只需要停止该接收设备通过该业务类型对应的第一虚拟通道与发送设备进行该业务类型的通讯,不会影响该接收设备与发送设备进行其他业务类型的数据传输,同时也不会影响其他接收设备与发送设备的数据传输。In the sending device of this embodiment, the first mapping relationship is configured in the sending device by the configuration module, so that different receiving devices use different first virtual channels to communicate with different sending services of the sending device, and a certain receiving device When the data of the service type is full or the communication is abnormal, the receiving device only needs to stop the receiving device from performing communication with the sending device through the first virtual channel corresponding to the service type, and does not affect the receiving device and the sending device. Data transmission of other service types does not affect the data transmission of other receiving devices and transmitting devices.
实施例7Example 7
图7a示出根据本发明实施例七的接收设备的结构框图。如图7a所示,该接收设备700可以应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,主要可以包括: Fig. 7a is a block diagram showing the structure of a receiving apparatus according to a seventh embodiment of the present invention. As shown in FIG. 7a, the receiving device 700 can be applied to a traffic control scenario in which at least two servers in the Ethernet share at least two virtual channels, which may include:
接收模块710,用于通过第一虚拟通道,从发送设备接收报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,所述接收设备的优先级为所述发送设备在预先设置的第一对应关系中查找到的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系;其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系。The receiving module 710 is configured to receive, by using the first virtual channel, a packet from a sending device, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first The virtual channel is a channel for the receiving device to receive data from the sending device on the Ethernet link, and the priority of the receiving device is a priority that the sending device finds in the preset first correspondence. The first correspondence includes the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels. The identifiers of the receiving devices are different. There is a one-to-one correspondence with the first virtual channel.
具体地,一方面,在以太网发送设备与接收设备进行通讯的过程中,每个发送设备或接收设备可以由网络管理员配置相应的优先级,每个发送设备或接收设备的优先级在所有发送设备或接收设备中唯一。例如,在以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景中,包括2个发送设备(如HOST_0、HOST_1),则它们的优先级可分别被网络管理员设置为0、1;2个接收设备(如IO_0、IO_1),则它们的优先级也可分别被网络管理员设置为0、1。另一方面,发送设备可以接收网络管理员的配置,即在发送设备中设置接收设备与第一虚拟通道的一一对应关系,不同通道可以分别用来传输发往不同接收设备的数据,通道数目与接收设备数目相同。例如,有2个接收设备(如IO_0、IO_1),可以通过网络管理员的配置在发送设备端建立两条第一虚拟通道(如第一虚拟通道0、第一虚拟通道1),分别用来发送去往IO_0和IO_1的数据。接收设备700的接收模块710可以通过其对应的第一虚拟通道接收发送设备发送的报文,例如IO_0可以通过第一虚拟通道0接收HOST_0发送的报文。Specifically, on the one hand, in the process of communicating between the Ethernet sending device and the receiving device, each sending device or receiving device can be configured with a corresponding priority by the network administrator, and the priority of each sending device or receiving device is at all. The only one of the sending device or the receiving device. For example, in a traffic control scenario where at least two servers share at least two virtual channels in an Ethernet network, including two sending devices (such as HOST_0, HOST_1), their priorities can be set to 0, 1 by the network administrator respectively. 2 receiving devices (such as IO_0, IO_1), their priority can also be set to 0, 1 by the network administrator. On the other hand, the sending device can receive the configuration of the network administrator, that is, set the one-to-one correspondence between the receiving device and the first virtual channel in the sending device, and different channels can respectively be used to transmit data to different receiving devices, and the number of channels. The same number as the receiving device. For example, if there are two receiving devices (such as IO_0 and IO_1), two first virtual channels (such as the first virtual channel 0 and the first virtual channel 1) can be established on the sending device through the configuration of the network administrator. Send data to IO_0 and IO_1. The receiving module 710 of the receiving device 700 can receive the message sent by the sending device through its corresponding first virtual channel, for example, IO_0 can receive the message sent by HOST_0 through the first virtual channel 0.
图7b示出根据本发明实施例七的接收设备的结构框图。如图7b所示,该接收设备700还可以包括:Figure 7b is a block diagram showing the structure of a receiving device according to Embodiment 7 of the present invention. As shown in FIG. 7b, the receiving device 700 may further include:
建立模块720,用于在所述以太网链路上建立所述发送设备的标识对应 的第二虚拟通道;An establishing module 720, configured to establish, on the Ethernet link, an identifier corresponding to the sending device Second virtual channel;
配置模块730,与所述建立模块720连接,用于在所述接收设备中预先设置所述接收设备中的第二对应关系,所述第二对应关系包括所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系。The configuration module 730 is connected to the establishing module 720, and configured to preset a second correspondence in the receiving device in the receiving device, where the second correspondence includes a priority of the sending device, and the Corresponding relationship between the identifier of the sending device and the second virtual channel.
具体地,参见本实施例上述组件的相关描述,若在以太网中包括2个发送设备,标识分别被网络管理员配置为HOST_0和HOST_1,建立模块720可以在接收设备端建立两条第二虚拟通道(如第二虚拟通道0和第二虚拟通道1),结合2个发送设备的优先级,配置模块730可以设置发送设备的优先级、发送设备的标识和第二虚拟通道之间的第二对应关系,例如,HOST_0的优先级为0,对应第二虚拟通道0,用来传输发往HOST_0的数据。该第二对应关系可以用于后续确定某一发送设备的优先级和发送数据的第二虚拟通道。Specifically, referring to the related description of the foregoing components in this embodiment, if two sending devices are included in the Ethernet, and the identifiers are respectively configured by the network administrator as HOST_0 and HOST_1, the establishing module 720 can establish two second virtualities on the receiving device end. The channel (such as the second virtual channel 0 and the second virtual channel 1), in combination with the priorities of the two sending devices, the configuration module 730 can set the priority of the sending device, the identifier of the sending device, and the second between the second virtual channel. Correspondence relationship, for example, HOST_0 has a priority of 0, corresponding to the second virtual channel 0, for transmitting data addressed to HOST_0. The second correspondence may be used to subsequently determine the priority of a certain sending device and the second virtual channel that sends data.
在一种可能的实现方式中,在接收设备700中的第二对应关系中,还可以包括接收设备700的优先级。例如,参见本实施例上述组件的相关描述,若在以太网中包括2个接收设备,标识分别为IO_0和IO_1,它们的优先级可分别被网络管理员设置为0、1,则在第二对应关系中,IO_0的优先级为0,HOST_0的优先级为0,且IO_0通过第一虚拟通道0接收HOST_0发送的数据,通过第二虚拟通道0向HOST_0发送数据。In a possible implementation manner, in the second correspondence relationship in the receiving device 700, the priority of the receiving device 700 may also be included. For example, referring to the related description of the foregoing components in this embodiment, if two receiving devices are included in the Ethernet, the identifiers are IO_0 and IO_1, respectively, and their priorities can be set to 0, 1, respectively, by the network administrator, then in the second In the correspondence, the priority of IO_0 is 0, the priority of HOST_0 is 0, and IO_0 receives the data sent by HOST_0 through the first virtual channel 0, and sends data to HOST_0 through the second virtual channel 0.
在一种可能的实现方式中,接收模块710还可以被配置为:所述接收设备通过所述第一虚拟通道,从所述发送设备接收虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据。In a possible implementation manner, the receiving module 710 is further configured to: receive, by the receiving device, a virtual local area network (VLAN) VLAN frame from the sending device by using the first virtual channel, where a priority of the VLAN frame The field is written by the sending device to the priority of the found receiving device, and the payload of the VLAN frame includes data sent by the sending device to the receiving device.
具体地,接收设备700的接收模块710可以根据第一对应关系,通过接收设备700对应的第一虚拟通道从发送设备接收VLAN帧。例如,IO_0与 HOST_0进行通讯时,HOST_0可以根据第一对应关系,查找到IO_0的优先级为0,对应第一虚拟通道0,IO_0可以通过第一虚拟通道0接收VLAN帧,HOST_0可以在VLAN帧的优先级字段写入0,将向接收设备发送的数据写入VLAN帧的有效载荷。Specifically, the receiving module 710 of the receiving device 700 may receive the VLAN frame from the sending device by using the first virtual channel corresponding to the receiving device 700 according to the first correspondence. For example, IO_0 and When HOST_0 is communicating, HOST_0 can find that the priority of IO_0 is 0 according to the first correspondence, corresponding to the first virtual channel 0, IO_0 can receive the VLAN frame through the first virtual channel 0, and HOST_0 can be in the priority field of the VLAN frame. Write 0 to write the data sent to the receiving device to the payload of the VLAN frame.
进一步地,该接收设备700还可以包括:Further, the receiving device 700 may further include:
发送模块740,与所述接收模块710连接,用于所述接收设备通过所述第二虚拟通道,向所述发送设备发送暂停OFF帧,所述OFF帧的优先级字段由所述接收设备写入所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,The sending module 740 is connected to the receiving module 710, and is configured to send, by the receiving device, a pause OFF frame to the sending device by using the second virtual channel, where a priority field of the OFF frame is written by the receiving device a priority obtained in the VLAN frame or a priority of the receiving device found in the second correspondence,
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state in which a receiving buffer space occupied by the received data is higher than an upper threshold.
具体地,接收设备700的发送模块740可以根据自身接收缓存空间的数据空满状态向发送设备返回相应的响应。如果接收设备700接收到的数据所占用的接收缓存空间高于上限阈值,接收设备700可以从接收到的VLAN帧中获取接收设备的优先级,也可以从第二对应关系中获取接收设备700的优先级,并在OFF帧的优先级字段写入该接收设备的优先级,发送模块740通过第二虚拟通道向发送设备发送OFF帧,用来指示发送设备根据所述OFF帧中的暂停时间,暂停与该接收设备的通讯,在到达暂停时间时,发送设备可以自动恢复与接收设备的通讯。其中,暂停时间可以由OFF帧中的暂停时间字段中的内容决定,发送设备接收到OFF帧之后,可以停止对该接收设备对应的第一虚拟通道的调度,以暂停与该接收设备的通讯。例如IO_0接收到的数据所占用的接收缓存空间高于上限阈值,IO_0可以通过第二虚拟通道0向HOST_0发送OFF帧,HOST_0接收到OFF帧后,根据OFF帧中的暂停时间,暂停与IO_0的通讯。其中上限阈值为该接收设备的接收缓存空间可以存储的数据量最大值,由于从接收设备发送OFF帧到发送设备接收到OFF 并作出响应,需要一定的时间,在这段时间内还可能存在一些正在发送的数据需要接收设备700接收,不能因为数据存满而丢弃,因此接收设备700可以存储的数据量可以大于该上限阈值,即存储空间需要留有一定余量。若高于上限阈值,说明数据将满,该接收设备700反压。Specifically, the sending module 740 of the receiving device 700 may return a corresponding response to the sending device according to the data empty state of the receiving buffer space. If the receiving buffer space occupied by the data received by the receiving device 700 is higher than the upper threshold, the receiving device 700 may obtain the priority of the receiving device from the received VLAN frame, or obtain the receiving device 700 from the second corresponding relationship. Priority, and writing the priority of the receiving device in the priority field of the OFF frame, the sending module 740 sends an OFF frame to the sending device through the second virtual channel, to indicate that the sending device is based on the pause time in the OFF frame. The communication with the receiving device is suspended, and when the pause time is reached, the transmitting device can automatically resume communication with the receiving device. The pause time may be determined by the content in the pause time field in the OFF frame. After receiving the OFF frame, the sending device may stop scheduling the first virtual channel corresponding to the receiving device to suspend communication with the receiving device. For example, if the received buffer space occupied by the data received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0 through the second virtual channel 0. After receiving the OFF frame, HOST_0 pauses with IO_0 according to the pause time in the OFF frame. communication. The upper threshold is a maximum amount of data that can be stored in the receiving buffer space of the receiving device, and is sent from the receiving device to the transmitting device to the OFF. And responding, it takes a certain time, during which time some data that is being sent needs to be received by the receiving device 700, and cannot be discarded because the data is full, so the amount of data that the receiving device 700 can store can be greater than the upper threshold. That is, the storage space needs to have a certain margin. If it is higher than the upper threshold, the data will be full and the receiving device 700 will back pressure.
在一种可能的实现方式中,发送模块740还可以被配置为:In a possible implementation manner, the sending module 740 can also be configured to:
所述接收设备通过所述第二虚拟通道,向所述发送设备发送连通ON帧,所述ON帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Transmitting, by the receiving device, a connected ON frame to the sending device by using the second virtual channel, where a priority field of the ON frame is written by the receiving device to a priority obtained from the VLAN frame or Determining the priority of the receiving device in the second correspondence,
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that the receiving buffer space occupied by the received data is lower than a lower threshold.
具体地,接收设备700在反压之后,接收到的数据所占用的接收缓存空间可能会减少,在到达暂停时间前,若接收到的数据所占用的接收缓存空间低于下限阈值,接收设备700的发送模块740可以向发送设备发送ON帧,用来指示发送设备恢复与该接收设备的通讯。例如IO_0的数据所占用的空间低于下限阈值,IO_0可以通过第二虚拟通道0向发送ON帧,HOST_0接收到ON帧后,恢复与IO_0的通讯。其中下限阈值为该接收设备接收缓存空间存储的数据量最小值,若低于下限阈值,说明该接收设备700的存储空间即将没有数据,发送设备可以继续向其发送数据。Specifically, after receiving the back pressure, the receiving device 700 may reduce the receiving buffer space occupied by the received data. Before the timeout period is reached, if the received buffer space occupied by the received data is lower than the lower threshold, the receiving device 700 The sending module 740 can send an ON frame to the sending device to instruct the sending device to resume communication with the receiving device. For example, the space occupied by the data of IO_0 is lower than the lower threshold, IO_0 can send the ON frame through the second virtual channel 0, and the communication with IO_0 is resumed after the HOST_0 receives the ON frame. The lower threshold is the minimum amount of data stored in the receiving buffer space of the receiving device. If the threshold is lower than the lower threshold, the storage space of the receiving device 700 is about to have no data, and the sending device can continue to send data to the receiving device.
在一种可能的实现方式中,接收设备700还可以作为发送端,根据第二对应关系中第二虚拟通道、发送设备的标识与优先级的对应关系,发送模块740可以通过第二虚拟通道向第二虚拟通道对应的发送设备发送数据。在这种情况下,参见本发明实施例一中基于优先级的流控PFC方法的相关描述,发送设备可以作为接收端,通过对应的第二虚拟通道从接收设备700接收数据。In a possible implementation, the receiving device 700 can also serve as a sending end, and according to the correspondence between the identifier of the second virtual channel and the sending device and the priority in the second correspondence, the sending module 740 can use the second virtual channel to The transmitting device corresponding to the second virtual channel sends data. In this case, referring to the description of the priority-based flow control PFC method in the first embodiment of the present invention, the sending device may serve as a receiving end, and receive data from the receiving device 700 through the corresponding second virtual channel.
本实施例的接收设备,通过配置模块在接收设备中设置第二对应关系, 可以实现不同的接收设备使用不同的第一虚拟通道与发送设备通讯,某一接收设备数据存满出现反压或通信异常时,只需要停止该接收设备通过其对应的第一虚拟通道与发送设备的通讯,不会影响其他接收设备与发送设备的数据传输。The receiving device of this embodiment sets a second correspondence relationship in the receiving device by using the configuration module. Different receiving devices can use different first virtual channels to communicate with the sending device. When a receiving device data is full and there is a back pressure or communication abnormality, the receiving device only needs to stop the receiving device through its corresponding first virtual channel and sending device. Communication does not affect the data transmission of other receiving devices and transmitting devices.
实施例8Example 8
图8示出根据本发明实施例八的接收设备的结构框图。图8中标号与图7a、图7b相同的组件具有相同的功能,为简明起见,省略对这些组件的详细说明。FIG. 8 is a block diagram showing the structure of a receiving apparatus according to Embodiment 8 of the present invention. The components in Fig. 8 having the same reference numerals as those in Figs. 7a and 7b have the same functions, and a detailed description of these components will be omitted for the sake of brevity.
如图8所示,图8所示的接收设备与图7a、图7b所示接收设备的主要区别在于,该接收设备800的建立模块820除了可以具备本发明实施例七中建立模块720的功能之外,还可以被配置为:As shown in FIG. 8, the main difference between the receiving device shown in FIG. 8 and the receiving device shown in FIG. 7a and FIG. 7b is that the establishing module 820 of the receiving device 800 can have the function of establishing the module 720 in the seventh embodiment of the present invention. In addition, it can be configured as:
在所述以太网链路上建立所述发送设备的标识和所述业务类型对应的第二虚拟通道;Establishing, on the Ethernet link, an identifier of the sending device and a second virtual channel corresponding to the service type;
该接收设备800的配置模块830除了可以具备本发明实施例七中配置模块730的功能之外,还可以被配置为:The configuration module 830 of the receiving device 800 can be configured to: in addition to the function of the configuration module 730 in the seventh embodiment of the present invention,
在所述接收设备中预先设置所述接收设备中的第二对应关系,所述第二对应关系包括业务类型、所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系。Determining, in the receiving device, a second correspondence in the receiving device, where the second correspondence includes a service type, a priority of the sending device, an identifier of the sending device, and the second virtual channel Correspondence between them.
具体地,在接收设备被网络管理员预先设置的第二对应关系中,还可以包括接收设备的业务类型,即设置业务类型、发送设备的优先级、发送设备的标识和第二虚拟通道之间的对应关系。例如,参见本发明实施例三中基于优先级的流控PFC方法的相关描述,若以太网中包括2个发送设备,标识分别被网络管理员设置为HOST_0和HOST_1,每个发送设备可以与接收设备进行两种业务类型(如业务类型0、业务类型1)的通讯,建立模块820可以在接收设备端建立四条第二虚拟通道(如第二虚拟通道0、第二虚 拟通道1、第二虚拟通道2、第二虚拟通道3),结合2个发送设备的优先级,配置模块830可以配置业务类型、发送设备的优先级、发送设备的标识和第二虚拟通道的第二对应关系,例如,HOST_0的业务类型0优先级为0,对应第二虚拟通道0,HOST_0的业务类型1优先级为1,对应第二虚拟通道1,HOST_1的业务类型0优先级为2,对应第二虚拟通道2,HOST_1的业务类型1优先级为3,对应第二虚拟通道3。该第二对应关系可以用于后续确定某一发送设备的优先级和向该发送设备发送数据的第二虚拟通道。Specifically, in the second correspondence that is preset by the network administrator, the service type of the receiving device, that is, the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel may also be included. Correspondence. For example, refer to the description of the priority-based flow control PFC method in Embodiment 3 of the present invention. If the Ethernet includes two sending devices, the identifiers are respectively set by the network administrator as HOST_0 and HOST_1, and each transmitting device can receive and receive. The device performs communication between two service types (such as service type 0 and service type 1), and the establishing module 820 can establish four second virtual channels (such as the second virtual channel 0 and the second virtual channel) on the receiving device end. The configuration module 830 can configure the service type, the priority of the sending device, the identifier of the sending device, and the second virtual channel, in combination with the priority of the two sending devices. The second correspondence, for example, the service type 0 of the HOST_0 has a priority of 0, corresponding to the second virtual channel 0, the service type 1 of the HOST_0 has a priority of 1, corresponding to the second virtual channel 1, and the service type 0 of the HOST_1 has a priority of 2 Corresponding to the second virtual channel 2, the service type 1 of HOST_1 has a priority of 3, corresponding to the second virtual channel 3. The second correspondence may be used to subsequently determine the priority of a certain sending device and the second virtual channel that sends data to the sending device.
在一种可能的实现方式中,在接收设备800中的第二对应关系中,还可以包括接收设备800的优先级。具体示例可以参见本发明实施例三中基于优先级的流控PFC方法的相关描述。In a possible implementation manner, in the second correspondence relationship in the receiving device 800, the priority of the receiving device 800 may also be included. For a specific example, refer to the related description of the priority-based flow control PFC method in Embodiment 3 of the present invention.
在一种可能的实现方式中,接收设备800的发送模块740可以根据自身某一业务类型的接收缓存空间的数据空满状态向发送设备返回相应的响应。具体地,如果接收设备800接收到的某一业务类型的数据所占用的接收缓存空间高于上限阈值,接收设备800的发送模块740可以通过第二虚拟通道向发送设备发送OFF帧,用来指示发送设备在暂停时间段内暂停与该接收设备进行该业务类型的通讯,但不影响发送设备与该接收设备进行其他业务类型的通讯。进一步地,在到达暂停时间或者该接收设备800接收到的该业务类型的数据所占用的接收缓存空间低于下限阈值时,接收设备800的发送模块740可以通过第二虚拟通道向发送设备发送ON帧,用来指示发送设备恢复与该接收设备进行该业务类型的通讯。例如,IO_0接收到的业务类型0的数据所占用的接收缓存空间高于上限阈值,IO_0可以通过第二虚拟通道0向HOST_0发送OFF帧,HOST_0接收到OFF帧后,暂停与IO_0通过虚拟通道0进行业务类型0的通讯;在IO_0接收到的业务类型0的数据所占用的接收缓存空间低于下限阈值,IO_0可以通过第二虚拟通道0向HOST_0发送ON帧,HOST_0接收到ON帧后,恢复与IO_0进行业务类型0的通讯。其中,上 限阈值和下限阈值可以参见本发明实施例一中基于优先级的流控PFC方法的相关描述。In a possible implementation manner, the sending module 740 of the receiving device 800 may return a corresponding response to the sending device according to the data empty state of the receiving buffer space of a certain service type of the service. Specifically, if the receiving buffer space occupied by the data of the certain service type received by the receiving device 800 is higher than the upper threshold, the sending module 740 of the receiving device 800 may send an OFF frame to the sending device by using the second virtual channel, to indicate The sending device pauses communication with the receiving device for the service type during the pause period, but does not affect the communication device and other communication type communication with the receiving device. Further, when the receiving buffer space occupied by the data of the service type received by the receiving device 800 is lower than the lower threshold, the sending module 740 of the receiving device 800 may send the ON to the sending device through the second virtual channel. A frame, used to instruct the sending device to resume communication with the receiving device for the service type. For example, the receive buffer space occupied by the data of service type 0 received by IO_0 is higher than the upper threshold, IO_0 can send an OFF frame to HOST_0 through the second virtual channel 0, and HOST_0 receives the OFF frame, pauses and IO_0 passes the virtual channel 0. The service type 0 communication is performed; the receiving buffer space occupied by the data of the service type 0 received at IO_0 is lower than the lower threshold, and IO_0 can send the ON frame to the HOST_0 through the second virtual channel 0, and the HOST_0 recovers after receiving the ON frame. Communication with service type 0 with IO_0. Among them, on For the threshold value and the lower threshold, refer to the description of the priority-based flow control PFC method in the first embodiment of the present invention.
本实施例的接收设备,通过配置模块在接收设备中设置第二对应关系,可以实现不同的接收设备使用不同的第一虚拟通道与发送设备进行不同业务类型的通讯,某一接收设备的某一业务类型的数据存满出现反压或通信异常时,只需要停止该接收设备通过该业务类型对应的第一虚拟通道与发送设备进行该业务类型的通讯,不会影响该接收设备与发送设备进行其他业务类型的数据传输,同时也不会影响其他接收设备与发送设备的数据传输。In the receiving device of this embodiment, the second mapping relationship is set in the receiving device by the configuration module, so that different receiving devices use different first virtual channels to communicate with different sending services of the sending device, and a certain receiving device When the data of the service type is full or the communication is abnormal, the receiving device only needs to stop the receiving device from performing communication with the sending device through the first virtual channel corresponding to the service type, and does not affect the receiving device and the sending device. Data transmission of other service types does not affect the data transmission of other receiving devices and transmitting devices.
实施例9Example 9
图9示出根据本发明实施例九的一种基于优先级的流控PFC装置的结构框图。所述PFC装置900可以是具备计算能力的主机服务器、个人计算机PC、或者可携带的便携式计算机或终端等。本发明具体实施例并不对计算节点的具体实现做限定。FIG. 9 is a block diagram showing the structure of a priority-based flow control PFC device according to Embodiment 9 of the present invention. The PFC device 900 may be a host server having a computing capability, a personal computer PC, or a portable computer or terminal that can be carried. The specific embodiments of the present invention do not limit the specific implementation of the computing node.
所述PFC装置900包括处理器(processor)910、通信接口(Communications Interface)920、存储器(memory)930和总线940。其中,处理器910、通信接口920、以及存储器930通过总线940完成相互间的通信。The PFC device 900 includes a processor 910, a communications interface 920, a memory 930, and a bus 940. The processor 910, the communication interface 920, and the memory 930 complete communication with each other through the bus 940.
通信接口920用于与网络设备通信,其中网络设备包括例如虚拟机管理中心、共享存储等。 Communication interface 920 is for communicating with network devices, including, for example, a virtual machine management center, shared storage, and the like.
处理器910用于执行程序。处理器910可能是一个中央处理器CPU,或者是专用集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。The processor 910 is configured to execute a program. The processor 910 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention.
存储器930用于存放文件。存储器930可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。存储器930也可以是存储器阵列。存储器930还可能被分块,并且所述块可 按一定的规则组合成虚拟卷。The memory 930 is used to store files. The memory 930 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory. Memory 930 can also be a memory array. The memory 930 may also be partitioned, and the block may Combine into virtual volumes according to certain rules.
在一种可能的实施方式中,上述程序可为包括计算机操作指令的程序代码。在以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景中,所述至少两个服务器包括至少一个发送设备和至少一个接收设备,该程序具体可用于使得发送设备可以:In a possible implementation, the above program may be program code including computer operating instructions. In a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, the at least two servers include at least one transmitting device and at least one receiving device, and the program is specifically operable to enable the transmitting device to:
根据所述接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道;其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系;Determining, according to the identifier of the receiving device, a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device, where the first correspondence includes the receiving device a priority, a correspondence between the identifier of the receiving device, and the first virtual channel, where the first virtual channel is a channel that the receiving device receives data from the sending device on an Ethernet link; The identifiers of the different receiving devices are different, and the identifiers of the receiving devices have a one-to-one correspondence with the first virtual channel.
通过所述查找到的第一虚拟通道,向所述接收设备发送报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据。Sending, by the first virtual channel that is found, a packet to the receiving device, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device.
在一种可能的实施方式中,根据所述接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,包括:In a possible implementation, the first virtual channel and the priority of the receiving device are searched for in the first corresponding relationship preset in the sending device according to the identifier of the receiving device, where The correspondence between the priority of the receiving device, the identifier of the receiving device, and the first virtual channel includes:
所述发送设备根据所述接收设备的标识和业务类型,在所述发送设备中预先设置的所述第一对应关系中查找所述对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The sending device searches for the priority of the corresponding first virtual channel and the receiving device in the first correspondence relationship preset in the sending device, according to the identifier and the service type of the receiving device, The first correspondence relationship includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
在一种可能的实施方式中,根据所述接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级之前,该程序还可用于使得发送设备可以: In a possible implementation, the program is searched for the priority of the corresponding first virtual channel and the receiving device in the first corresponding relationship preset in the sending device according to the identifier of the receiving device It can also be used to enable the sending device to:
在所述以太网链路上建立所述接收设备的标识对应的所述第一虚拟通道,或,所述接收设备的标识和所述业务类型对应的所述第一虚拟通道;Establishing, by the Ethernet link, the first virtual channel corresponding to the identifier of the receiving device, or the identifier of the receiving device and the first virtual channel corresponding to the service type;
在所述发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系;或,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The first correspondence is preset in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channel; or The first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
在一种可能的实施方式中,通过所述查找到的第一虚拟通道,向所述接收设备发送报文,包括:In a possible implementation, sending, by the first virtual channel that is found, a message to the receiving device, including:
所述发送设备生成虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据;The sending device generates a virtual local area network (VLAN) VLAN frame, wherein a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, and a payload of the VLAN frame includes the sending device Data sent to the receiving device;
所述发送设备通过所述查找到的第一虚拟通道将所述VLAN帧发送至所述接收设备。Sending, by the sending device, the VLAN frame to the receiving device by using the first virtual channel that is found.
在一种可能的实施方式中,在通过所述查找到的第一虚拟通道,向所述接收设备发送报文之后,该程序还可用于使得发送设备可以:In a possible implementation manner, after sending the message to the receiving device by using the first virtual channel that is found, the program is further configured to enable the sending device to:
如果所述发送设备从所述接收设备接收到暂停OFF帧,则根据所述OFF帧中的暂停时间,暂停与所述接收设备的通讯;If the transmitting device receives the pause OFF frame from the receiving device, suspending communication with the receiving device according to the pause time in the OFF frame;
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
在一种可能的实施方式中,所述暂停与所述接收设备的通讯之后,该程序还可用于使得发送设备可以:In a possible implementation manner, after the suspending communication with the receiving device, the program is further configured to enable the sending device to:
如果到达所述OFF帧中的暂停时间或所述发送设备从所述接收设备接收到连通ON帧,则恢复与所述接收设备的通讯;Recovering communication with the receiving device if a pause time in the OFF frame is reached or the transmitting device receives a connected ON frame from the receiving device;
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存 空间低于下限阈值的状态下生成的,或,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is a receiving buffer occupied by the receiving device in the received data. The state generated when the space is lower than the lower threshold, or generated by the receiving device in the state that the received buffer space occupied by the received data of the service type is lower than the lower threshold.
在一种可能的实施方式中,在以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景中,所述至少两个服务器包括至少一个发送设备和至少一个接收设备,该程序具体还可以用于使得接收设备可以:In a possible implementation manner, in a traffic control scenario in which at least two servers share at least two virtual channels in an Ethernet, the at least two servers include at least one sending device and at least one receiving device, and the program specifically Can be used to enable the receiving device to:
通过第一虚拟通道,从所述发送设备接收报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,所述接收设备的优先级为所述发送设备在预先设置的第一对应关系中查找到的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系。Receiving, by the first virtual channel, a packet from the sending device, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first virtual channel is a channel for receiving data from the sending device on the Ethernet link, where the priority of the receiving device is a priority that is found by the sending device in a preset first correspondence, the first The correspondence includes the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels, where different identifiers of the receiving devices are different, and the identifier of the receiving device is different from the first There is a one-to-one correspondence between a virtual channel.
在一种可能的实施方式中,在通过第一虚拟通道,从所述发送设备接收报文之前,该程序还可用于使得接收设备可以:In a possible implementation, before receiving a message from the sending device through the first virtual channel, the program is further configured to enable the receiving device to:
在所述以太网链路上建立所述发送设备的标识对应的第二虚拟通道,或,所述发送设备的标识和所述业务类型对应的第二虚拟通道;Establishing, by the Ethernet link, a second virtual channel corresponding to the identifier of the sending device, or an identifier of the sending device and a second virtual channel corresponding to the service type;
在所述接收设备中预先设置第二对应关系,所述第二对应关系包括所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系;或,所述第二对应关系包括业务类型、所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系。Setting a second correspondence in the receiving device, where the second correspondence includes a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channel; or The second correspondence includes a service type, a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channels.
在一种可能的实施方式中,所述第二对应关系中还包括所述接收设备的优先级。In a possible implementation manner, the priority of the receiving device is further included in the second correspondence.
在一种可能的实施方式中,通过第一虚拟通道,从所述发送设备接收报文,包括: In a possible implementation, receiving, by the first virtual channel, a message from the sending device, including:
通过所述第一虚拟通道,从所述发送设备接收虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据。Receiving, by the first virtual channel, a virtual local area network (VLAN) VLAN frame from the sending device, wherein a priority field of the VLAN frame is written by the sending device to a priority of the discovered receiving device, where the VLAN The payload of the frame includes data transmitted by the transmitting device to the receiving device.
在一种可能的实施方式中,通过第一虚拟通道,从所述发送设备接收报文之后,该程序还可用于使得接收设备可以:In a possible implementation manner, after receiving the message from the sending device by using the first virtual channel, the program is further configured to enable the receiving device to:
通过所述第二虚拟通道,向所述发送设备发送暂停OFF帧,所述OFF帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Transmitting, by the second virtual channel, a pause OFF frame to the sending device, the priority field of the OFF frame being written by the receiving device from a priority obtained in the VLAN frame or in the second corresponding The priority of the receiving device found in the relationship,
其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
在一种可能的实施方式中,向所述发送设备发送暂停OFF帧之后,该程序还可用于使得接收设备可以:In a possible implementation, after transmitting the pause OFF frame to the transmitting device, the program is further configured to enable the receiving device to:
通过所述第二虚拟通道,向所述发送设备发送连通ON帧,所述ON帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Transmitting, by the second virtual channel, a connected ON frame to the sending device, where a priority field of the ON frame is written by the receiving device from a priority obtained in the VLAN frame or in the second corresponding The priority of the receiving device found in the relationship,
其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
本领域普通技术人员可以意识到,本文所描述的实施例中的各示例性单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件形式来实现,取决于技术方案的特定应用和设计约束条件。专业技术人员可以针对特定的应用选择不同的方法来实现所描述的功能,但是这种实现不应认为超出本发明的范围。 Those of ordinary skill in the art will appreciate that the various exemplary elements and algorithm steps in the embodiments described herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can select different methods for implementing the described functions for a particular application, but such implementation should not be considered to be beyond the scope of the present invention.
如果以计算机软件的形式来实现所述功能并作为独立的产品销售或使用时,则在一定程度上可认为本发明的技术方案的全部或部分(例如对现有技术做出贡献的部分)是以计算机软件产品的形式体现的。该计算机软件产品通常存储在计算机可读取的非易失性存储介质中,包括若干指令用以使得计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本发明各实施例方法的全部或部分步骤。而前述的存储介质包括U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the function is implemented in the form of computer software and sold or used as a stand-alone product, it is considered to some extent that all or part of the technical solution of the present invention (for example, a part contributing to the prior art) is It is embodied in the form of computer software products. The computer software product is typically stored in a computer readable non-volatile storage medium, including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform all of the methods of various embodiments of the present invention. Or part of the steps. The foregoing storage medium includes various media that can store program codes, such as a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims (24)

  1. 一种基于优先级的流控PFC方法,其特征在于,应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,所述至少两个服务器包括至少一个发送设备和至少一个接收设备,所述PFC方法包括:A priority-based flow control PFC method, characterized in that it is applied to a flow control scenario in which at least two servers share at least two virtual channels in an Ethernet, the at least two servers including at least one transmitting device and at least one receiving The device, the PFC method includes:
    所述发送设备根据所述接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系;The sending device searches for a priority of the corresponding first virtual channel and the receiving device in a first correspondence that is preset in the sending device according to the identifier of the receiving device, where the first correspondence includes the Determining a priority of the receiving device, a relationship between the identifier of the receiving device, and the first virtual channel, where the first virtual channel is the receiving device receiving data from the sending device on an Ethernet link Channels in which the identifiers of different receiving devices are different, and the identifiers of the receiving devices have a one-to-one correspondence with the first virtual channel;
    所述发送设备通过所述查找到的第一虚拟通道,向所述接收设备发送报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据。The sending device sends a packet to the receiving device by using the first virtual channel that is found, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device. .
  2. 根据权利要求1所述的PFC方法,其特征在于,所述发送设备根据所述接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,包括:The PFC method according to claim 1, wherein the sending device searches for a corresponding first virtual channel and the first corresponding relationship in a first correspondence relationship preset in the sending device according to the identifier of the receiving device Receiving a priority of the device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channel, including:
    所述发送设备根据所述接收设备的标识和业务类型,在所述发送设备中预先设置的所述第一对应关系中查找所述对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The sending device searches for the priority of the corresponding first virtual channel and the receiving device in the first correspondence relationship preset in the sending device, according to the identifier and the service type of the receiving device, The first correspondence relationship includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
  3. 根据权利要求1或2所述的PFC方法,其特征在于,所述发送设备根据所述接收设备的标识,在所述发送设备中预先设置的第一对应关系中查找对应的第一虚拟通道和所述接收设备的优先级之前,包括: The PFC method according to claim 1 or 2, wherein the transmitting device searches for a corresponding first virtual channel and a corresponding first virtual relationship in the first correspondence relationship preset in the sending device according to the identifier of the receiving device Before the priority of the receiving device, the following:
    在所述以太网链路上建立所述接收设备的标识对应的所述第一虚拟通道,或,所述接收设备的标识和所述业务类型对应的所述第一虚拟通道;Establishing, by the Ethernet link, the first virtual channel corresponding to the identifier of the receiving device, or the identifier of the receiving device and the first virtual channel corresponding to the service type;
    在所述发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系;或,The first correspondence is preset in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a correspondence between the first virtual channel; or ,
    所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The first correspondence includes the service type, the priority of the receiving device, the identifier of the receiving device, and a correspondence between the first virtual channels.
  4. 根据权利要求1至3中任一项所述的PFC方法,其特征在于,所述发送设备通过所述查找到的第一虚拟通道,向所述接收设备发送报文,包括:The PFC method according to any one of claims 1 to 3, wherein the sending device sends a message to the receiving device by using the first virtual channel that is found, including:
    所述发送设备生成虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据;The sending device generates a virtual local area network (VLAN) VLAN frame, wherein a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, and a payload of the VLAN frame includes the sending device Data sent to the receiving device;
    所述发送设备通过所述查找到的第一虚拟通道将所述VLAN帧发送至所述接收设备。Sending, by the sending device, the VLAN frame to the receiving device by using the first virtual channel that is found.
  5. 根据权利要求4所述的PFC方法,其特征在于,在所述发送设备通过所述查找到的第一虚拟通道,向所述接收设备发送报文之后,包括:The PFC method according to claim 4, wherein after the sending device sends a message to the receiving device by using the first virtual channel that is found, the method includes:
    如果所述发送设备从所述接收设备接收到暂停OFF帧,则根据所述OFF帧中的暂停时间,暂停与所述接收设备的通讯;If the transmitting device receives the pause OFF frame from the receiving device, suspending communication with the receiving device according to the pause time in the OFF frame;
    其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  6. 根据权利要求5所述的PFC方法,其特征在于,所述暂停与所述接收设备的通讯之后,包括:The PFC method according to claim 5, wherein after the suspending communication with the receiving device, the method comprises:
    如果到达所述OFF帧中的暂停时间或所述发送设备从所述接收设备接收到连通ON帧,则恢复与所述接收设备的通讯; Recovering communication with the receiving device if a pause time in the OFF frame is reached or the transmitting device receives a connected ON frame from the receiving device;
    其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
  7. 一种基于优先级的流控PFC方法,其特征在于,应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,所述至少两个服务器包括至少一个发送设备和至少一个接收设备,所述PFC方法包括:A priority-based flow control PFC method, characterized in that it is applied to a flow control scenario in which at least two servers share at least two virtual channels in an Ethernet, the at least two servers including at least one transmitting device and at least one receiving The device, the PFC method includes:
    所述接收设备通过第一虚拟通道,从所述发送设备接收报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,所述接收设备的优先级为所述发送设备在预先设置的第一对应关系中查找到的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系。The receiving device receives a packet from the sending device by using a first virtual channel, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first The virtual channel is a channel for the receiving device to receive data from the sending device on the Ethernet link, and the priority of the receiving device is a priority that the sending device finds in the preset first correspondence. The first correspondence includes the priority of the receiving device, the identifier of the receiving device, and the correspondence between the first virtual channels, where different identifiers of the receiving devices are different, and the identifier of the receiving device There is a one-to-one correspondence with the first virtual channel.
  8. 根据权利要求7所述的PFC方法,其特征在于,在所述接收设备通过第一虚拟通道,从所述发送设备接收报文之前,包括:The PFC method according to claim 7, wherein before the receiving device receives the message from the sending device by using the first virtual channel, the method includes:
    在所述以太网链路上建立所述发送设备的标识对应的第二虚拟通道,或,所述发送设备的标识和所述业务类型对应的第二虚拟通道;Establishing, by the Ethernet link, a second virtual channel corresponding to the identifier of the sending device, or an identifier of the sending device and a second virtual channel corresponding to the service type;
    在所述接收设备中预先设置第二对应关系,所述第二对应关系包括所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系;或,Determining, in the receiving device, a second correspondence, where the second correspondence includes a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channel; or
    所述第二对应关系包括业务类型、所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系。The second correspondence includes a service type, a priority of the sending device, an identifier of the sending device, and a correspondence between the second virtual channels.
  9. 根据权利要求8所述的PFC方法,其特征在于,所述第二对应关系中还包括所述接收设备的优先级。 The PFC method according to claim 8, wherein the second correspondence further includes a priority of the receiving device.
  10. 根据权利要求8或9所述的PFC方法,其特征在于,所述接收设备通过第一虚拟通道,从所述发送设备接收报文,包括:The PFC method according to claim 8 or 9, wherein the receiving device receives the message from the sending device by using the first virtual channel, including:
    所述接收设备通过所述第一虚拟通道,从所述发送设备接收虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据。The receiving device receives a virtual local area network (VLAN) VLAN frame from the sending device by using the first virtual channel, where a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device The payload of the VLAN frame includes data sent by the sending device to the receiving device.
  11. 根据权利要求10所述的PFC方法,其特征在于,所述接收设备通过第一虚拟通道,从所述发送设备接收报文之后,包括:The PFC method according to claim 10, after the receiving device receives the message from the sending device by using the first virtual channel, the method includes:
    所述接收设备通过所述第二虚拟通道,向所述发送设备发送暂停OFF帧,所述OFF帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Sending, by the receiving device, a pause OFF frame to the sending device by using the second virtual channel, where a priority field of the OFF frame is written by the receiving device from a priority obtained in the VLAN frame or in a location Determining the priority of the receiving device in the second correspondence,
    其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  12. 根据权利要求11所述的PFC方法,其特征在于,向所述发送设备发送暂停OFF帧之后,包括:The PFC method according to claim 11, wherein after transmitting the pause OFF frame to the transmitting device, the method comprises:
    所述接收设备通过所述第二虚拟通道,向所述发送设备发送连通ON帧,所述ON帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,Transmitting, by the receiving device, a connected ON frame to the sending device by using the second virtual channel, where a priority field of the ON frame is written by the receiving device to a priority obtained from the VLAN frame or Determining the priority of the receiving device in the second correspondence,
    其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
  13. 一种发送设备,其特征在于,应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,包括:A transmitting device, which is applied to a traffic control scenario in which at least two servers in an Ethernet share at least two virtual channels, including:
    查找模块,用于根据接收设备的标识,在发送设备中预先设置的第一 对应关系中查找对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系;a search module, configured to be first preset in the sending device according to the identifier of the receiving device Finding a priority of the corresponding first virtual channel and the receiving device in the correspondence, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and the first virtual channel Corresponding relationship, the first virtual channel is a channel for the receiving device to receive data from the sending device on an Ethernet link, where different receiving devices have different identifiers, and the identifier of the receiving device is different from the first There is a one-to-one correspondence between a virtual channel;
    发送模块,与所述查找模块连接,用于通过所述查找到的第一虚拟通道,向所述接收设备发送报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据。a sending module, configured to be connected to the searching module, configured to send a packet to the receiving device by using the first virtual channel that is found, where the packet includes a priority of the receiving device and the sending device Data sent to the receiving device.
  14. 根据权利要求13所述的发送设备,其特征在于,所述查找模块还被配置为,根据所述接收设备的标识和业务类型,在所述发送设备中预先设置的所述第一对应关系中查找所述对应的第一虚拟通道和所述接收设备的优先级,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The transmitting device according to claim 13, wherein the searching module is further configured to: in the first correspondence relationship preset in the sending device, according to an identifier and a service type of the receiving device Determining a priority of the corresponding first virtual channel and the receiving device, where the first correspondence includes the service type, a priority of the receiving device, an identifier of the receiving device, and the first virtual Correspondence between channels.
  15. 根据权利要求13或14所述的发送设备,其特征在于,还包括:The transmitting device according to claim 13 or 14, further comprising:
    建立模块,用于在所述以太网链路上建立所述接收设备的标识对应的所述第一虚拟通道;Establishing a module, configured to establish, on the Ethernet link, the first virtual channel corresponding to the identifier of the receiving device;
    所述建立模块还被配置为,在所述以太网链路上建立所述接收设备的标识和所述业务类型对应的所述第一虚拟通道;The establishing module is further configured to establish, on the Ethernet link, an identifier of the receiving device and the first virtual channel corresponding to the service type;
    配置模块,与所述建立模块连接,用于在所述发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系;a configuration module, configured to be connected to the establishing module, configured to preset the first correspondence in the sending device, where the first correspondence includes a priority of the receiving device, an identifier of the receiving device, and a location Corresponding relationship between the first virtual channels;
    所述配置模块还被配置为,在所述发送设备中预先设置所述第一对应关系,所述第一对应关系包括所述业务类型、所述接收设备的优先级、所述接收设备的标识和所述第一虚拟通道之间的对应关系。The configuration module is further configured to pre-set the first correspondence in the sending device, where the first correspondence includes the service type, a priority of the receiving device, and an identifier of the receiving device. Correspondence relationship with the first virtual channel.
  16. 根据权利要求13至15中任一项所述的发送设备,其特征在于,所 述发送模块包括:A transmitting device according to any one of claims 13 to 15, characterized in that The sending module includes:
    生成单元,用于生成虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据;a generating unit, configured to generate a virtual local area network (VLAN) VLAN frame, wherein a priority field of the VLAN frame is written by the sending device to a priority of the received receiving device, where a payload of the VLAN frame includes the sending Data sent by the device to the receiving device;
    导入单元,与所述生成单元连接,用于通过所述查找到的第一虚拟通道将所述VLAN帧发送至所述接收设备。The import unit is connected to the generating unit, and configured to send the VLAN frame to the receiving device by using the first virtual channel that is found.
  17. 根据权利要求16所述的发送设备,其特征在于,还包括:The transmitting device according to claim 16, further comprising:
    处理模块,与所述发送模块连接,用于如果从所述接收设备接收到暂停OFF帧,则根据所述OFF帧中的暂停时间,暂停与所述接收设备的通讯;a processing module, connected to the sending module, is configured to suspend communication with the receiving device according to a pause time in the OFF frame if a paused OFF frame is received from the receiving device;
    其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  18. 根据权利要求17所述的发送设备,其特征在于,所述处理模块还被配置为,如果到达所述OFF帧中的暂停时间或从所述接收设备接收到连通ON帧,则恢复与所述接收设备的通讯;The transmitting device according to claim 17, wherein the processing module is further configured to resume and if the pause time in the OFF frame is reached or a connected ON frame is received from the receiving device Receiving communication from the device;
    其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
  19. 一种接收设备,其特征在于,应用于以太网中至少两个服务器共享至少两个虚拟通道的流量控制场景,包括:A receiving device, which is applied to a traffic control scenario in which at least two servers in an Ethernet share at least two virtual channels, including:
    接收模块,用于通过第一虚拟通道,从发送设备接收报文,所述报文中包括所述接收设备的优先级和所述发送设备向所述接收设备发送的数据,所述第一虚拟通道为所述接收设备在以太网链路上从所述发送设备接收数据的通道,所述接收设备的优先级为所述发送设备在预先设置的第一对应关系中查找到的优先级,所述第一对应关系包括所述接收设备的优先 级、所述接收设备的标识和所述第一虚拟通道之间的对应关系,其中,不同的接收设备的标识不同,所述接收设备的标识与所述第一虚拟通道存在一一对应的关系。a receiving module, configured to receive, by using a first virtual channel, a packet from a sending device, where the packet includes a priority of the receiving device and data sent by the sending device to the receiving device, where the first virtual The channel is a channel for the receiving device to receive data from the sending device on the Ethernet link, and the priority of the receiving device is a priority that the sending device finds in the preset first correspondence relationship. The first correspondence includes the priority of the receiving device a relationship between the identifier of the receiving device and the first virtual channel, where different identifiers of the receiving devices are different, and the identifier of the receiving device has a one-to-one correspondence with the first virtual channel .
  20. 根据权利要求19所述的接收设备,其特征在于,还包括:The receiving device according to claim 19, further comprising:
    建立模块,用于在所述以太网链路上建立所述发送设备的标识对应的第二虚拟通道;Establishing a module, configured to establish, on the Ethernet link, a second virtual channel corresponding to the identifier of the sending device;
    所述建立模块还被配置为,在所述以太网链路上建立所述发送设备的标识和所述业务类型对应的第二虚拟通道;The establishing module is further configured to establish, on the Ethernet link, an identifier of the sending device and a second virtual channel corresponding to the service type;
    配置模块,与所述建立模块连接,用于在所述接收设备中预先设置所述接收设备中的第二对应关系,所述第二对应关系包括所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系;a configuration module, configured to be connected to the establishing module, configured to pre-set a second correspondence in the receiving device, where the second correspondence includes a priority of the sending device, and the sending device Correspondence between the identifier and the second virtual channel;
    所述配置模块还被配置为,在所述接收设备中预先设置所述接收设备中的第二对应关系,所述第二对应关系包括业务类型、所述发送设备的优先级、所述发送设备的标识和所述第二虚拟通道之间的对应关系。The configuration module is further configured to pre-set a second correspondence in the receiving device in the receiving device, where the second correspondence includes a service type, a priority of the sending device, and the sending device Correspondence between the identifier and the second virtual channel.
  21. 根据权利要求20所述的接收设备,其特征在于,所述第二对应关系中还包括所述接收设备的优先级。The receiving device according to claim 20, wherein the second correspondence further includes a priority of the receiving device.
  22. 根据权利要求19至21中任一项所述的接收设备,其特征在于,所述接收模块还被配置为,通过所述第一虚拟通道,从所述发送设备接收虚拟局域网VLAN帧,其中,所述VLAN帧的优先级字段由所述发送设备写入查找到的所述接收设备的优先级,所述VLAN帧的有效载荷包括所述发送设备向所述接收设备发送的数据。The receiving device according to any one of claims 19 to 21, wherein the receiving module is further configured to receive a virtual local area network (VLAN) VLAN frame from the transmitting device by using the first virtual channel, where The priority field of the VLAN frame is written by the sending device to the priority of the received receiving device, and the payload of the VLAN frame includes data sent by the sending device to the receiving device.
  23. 根据权利要求22所述的接收设备,其特征在于,还包括:The receiving device according to claim 22, further comprising:
    发送模块,与所述接收模块连接,用于通过所述第二虚拟通道,向所述发送设备发送暂停OFF帧,所述OFF帧的优先级字段由所述接收设备写入所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收 设备的优先级,a sending module, configured to be connected to the receiving module, configured to send, by using the second virtual channel, a pause OFF frame to the sending device, where a priority field of the OFF frame is written by the receiving device into the VLAN frame The acquired priority or the receipt found in the second correspondence The priority of the device,
    其中,所述OFF帧是由所述接收设备在接收到的数据所占用的接收缓存空间高于上限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间高于上限阈值的状态下生成的。The OFF frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is higher than an upper threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is higher than the upper threshold.
  24. 根据权利要求23所述的接收设备,其特征在于,所述发送模块还被配置为,通过所述第二虚拟通道,向所述发送设备发送连通ON帧,所述ON帧的优先级字段由所述接收设备写入从所述VLAN帧中获取的优先级或在所述第二对应关系中查找到的所述接收设备的优先级,The receiving device according to claim 23, wherein the sending module is further configured to send, by using the second virtual channel, a connected ON frame to the sending device, where a priority field of the ON frame is The receiving device writes a priority obtained from the VLAN frame or a priority of the receiving device found in the second correspondence,
    其中,所述ON帧是由所述接收设备在接收到的数据所占用的接收缓存空间低于下限阈值的状态下生成的,或者,由所述接收设备在接收到的所述业务类型的数据所占用的接收缓存空间低于下限阈值的状态下生成的。 The ON frame is generated by the receiving device in a state that a receiving buffer space occupied by the received data is lower than a lower threshold, or data received by the receiving device in the service type. Generated when the occupied receive buffer space is lower than the lower threshold.
PCT/CN2014/089645 2013-12-27 2014-10-28 Priority-based flow control (pfc) method, transmitting device and receiving device WO2015096548A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310742800.6A CN103746927B (en) 2013-12-27 2013-12-27 Priority-based fluid control PFC (Power Factor Correction) method, transmitting device and receiving device
CN201310742800.6 2013-12-27

Publications (1)

Publication Number Publication Date
WO2015096548A1 true WO2015096548A1 (en) 2015-07-02

Family

ID=50503918

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/089645 WO2015096548A1 (en) 2013-12-27 2014-10-28 Priority-based flow control (pfc) method, transmitting device and receiving device

Country Status (2)

Country Link
CN (1) CN103746927B (en)
WO (1) WO2015096548A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103746927B (en) * 2013-12-27 2017-02-15 杭州华为数字技术有限公司 Priority-based fluid control PFC (Power Factor Correction) method, transmitting device and receiving device
CN104092619B (en) 2014-07-25 2017-07-21 华为技术有限公司 Flow control methods and device
CN105471754B (en) * 2014-09-01 2019-01-18 华为技术有限公司 A kind of data transfer control method, equipment and system
JP7251075B2 (en) * 2018-09-03 2023-04-04 株式会社オートネットワーク技術研究所 Relay device, relay method and computer program
CN109445855B (en) * 2018-10-30 2021-11-16 天津津航计算技术研究所 Bridging device for multi-path low-speed peripheral integration
CN111835652B (en) * 2019-04-17 2024-04-16 华为技术有限公司 Method and device for setting virtual channel of data stream
CN111555939B (en) * 2020-04-28 2022-08-05 中国人民解放军总医院第四医学中心 Monitor information acquisition system
CN112565087A (en) * 2020-11-23 2021-03-26 盛科网络(苏州)有限公司 PFC (Power factor correction) back-pressure message and processing method thereof
CN116636183A (en) * 2021-05-31 2023-08-22 华为技术有限公司 Computer system and bus flow control method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902395A (en) * 2009-05-29 2010-12-01 甲骨文美国公司 The system and method for the resource on the management host
CN103746927A (en) * 2013-12-27 2014-04-23 杭州华为数字技术有限公司 Priority-based fluid control PFC (Power Factor Correction) method, transmitting device and receiving device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102035722B (en) * 2009-09-28 2014-03-19 中兴通讯股份有限公司 Flow control method and device
CN102025617B (en) * 2010-11-26 2015-04-01 中兴通讯股份有限公司 Method and device for controlling congestion of Ethernet
US8588224B2 (en) * 2011-05-14 2013-11-19 International Business Machines Corporation Priority based flow control in a distributed fabric protocol (DFP) switching network architecture
US9124524B2 (en) * 2011-06-29 2015-09-01 Broadcom Corporation System and method for priority based flow control between nodes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101902395A (en) * 2009-05-29 2010-12-01 甲骨文美国公司 The system and method for the resource on the management host
CN103746927A (en) * 2013-12-27 2014-04-23 杭州华为数字技术有限公司 Priority-based fluid control PFC (Power Factor Correction) method, transmitting device and receiving device

Also Published As

Publication number Publication date
CN103746927A (en) 2014-04-23
CN103746927B (en) 2017-02-15

Similar Documents

Publication Publication Date Title
WO2015096548A1 (en) Priority-based flow control (pfc) method, transmitting device and receiving device
US8429446B2 (en) Method and apparatus for managing virtual ports on storage systems
CN108874307B (en) Ethernet solid state drive system and method for providing storage unloading function
US10594565B2 (en) Multicast advertisement message for a network switch in a storage area network
US9442812B2 (en) Priming failover of stateful offload adapters
US8560878B2 (en) System and method for failure detection by a storage expander preceding an expander experiencing a failure
TWI712876B (en) Computer system and computer-implemented method for managing power consumption of storage subsystem
US20180131182A1 (en) Power-over-ethernet power method and system
CN108199962B (en) Address migration method and device, network equipment and readable storage medium
WO2016082078A1 (en) Path management system, device and method
JP5262145B2 (en) Cluster system and information processing method
WO2012100671A1 (en) Method for binding physical network ports, network card and communication system
WO2016135919A1 (en) Storage device
US9882737B2 (en) Network system
CN111131224B (en) Method for maintaining connection and storage device
US8874984B2 (en) High performance virtual converged enhanced ethernet with persistent state flow control
US9467419B2 (en) System and method for N port ID virtualization (NPIV) login limit intimation to converged network adaptor (CNA) in NPIV proxy gateway (NPG) mode
CN115801642A (en) RDMA communication management module, method, device and medium based on state control
JP2014033268A (en) Repeating device, repeating system, and repeating device power state changing method
CN111224803B (en) Multi-master detection method in stacking system and stacking system
CN115834362A (en) Network link protection method and related equipment
CN116095192A (en) Message processing method, system and computer equipment
JP2018165851A (en) Network path determination system, network path determination apparatus, network path determination method, and network path determination program
WO2016044970A1 (en) Control channel processing method, apparatus and system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14873548

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14873548

Country of ref document: EP

Kind code of ref document: A1