EP-4407451-B1 - METHOD FOR CROSS-CARD LINK AGGREGATION OF VIRTUAL FUNCTION PORTS OF DATA PROCESSING UNITS, DEVICE AND MEDIUM
Inventors
- LI, WEI
- SUN, Xu
Dates
- Publication Date
- 20260513
- Application Date
- 20240125
Claims (13)
- A method for cross-card link aggregation of virtual function ports of data processing units, wherein each of the data processing units is communicatively connected to a virtual machine and a switch respectively, the method comprising: performing (S101, S401) link negotiation for the virtual machine and the switch respectively; acquiring (S102, S304) a to-be-communicated data message which comprises a destination identifier, a source identifier, and a message type; determining (S103) a communication link for the to-be-communicated data message, wherein the communication link is a message channel between a virtual function port in the virtual machine, a virtual function port representor corresponding to the virtual function port in the virtual machine, an uplink corresponding to a physical port in the data processing unit, the physical port in the data processing unit, and the switch; and performing (S104, S307) communication for the to-be-communicated data message based on the communication link, wherein the performing (S101, S401) link negotiation for the virtual machine and the switch respectively comprises: acquiring (S301) a first negotiation message transmitted from the virtual machine and a second negotiation message transmitted from the switch; forwarding (S302) the first negotiation message and the second negotiation message to a link aggregation controller based on a virtual switch; and processing (S303) the first negotiation message and the second negotiation message based on the link aggregation controller, providing a first response protocol message to the virtual machine, and providing a second response protocol message to the switch.
- The method according to claim 1, wherein the providing the first response protocol message to the virtual machine, and providing the second response protocol message to the switch comprises: transmitting (S3031) the first response protocol message and the second response protocol message to the virtual switch; forwarding (S3032), by the virtual switch, the first response protocol message to the virtual machine; and forwarding (S3033), by the virtual switch, the second response protocol message to the switch.
- The method according to any one of claims 1 to 2, wherein the to-be-communicated data message comprises at least one of: a first data message transmitted from the virtual machine or a second data message transmitted from the switch.
- The method according to any one of claims 1 to 3, wherein the acquiring (S102, S304) the to be-communicated data message comprises: transmitting (S402) the to-be-communicated data message to the virtual switch through the virtual function port representor corresponding to the virtual function port in the virtual machine; or transmitting (S403) the to-be-communicated data message to the virtual switch through the uplink corresponding to the physical port in the data processing unit; and obtaining (S404) the to-be-communicated data message based on the virtual switch.
- The method according to any one of claims 1 to 4, wherein the determining (S103) the communication link for the to-be-communicated data message comprises: acquiring (S305) a correspondence between a preset destination identifier and a preset communication link; and determining (S306) a communication link corresponding to the destination identifier in the to-be-communicated data message from the correspondence.
- The method according to any one of claims 1 to 5, wherein the performing (S104, S307) communication for the to-be-communicated data message based on the communication link comprises: acquiring (S406) the destination identifier from the to-be-communicated data message based on the virtual switch; and forwarding (S407) the to-be-communicated data message through the communication link to a destination corresponding to the destination identifier based on the virtual switch.
- An electronic device (80), comprising: a memory (81); a processor (82); and a computer program; wherein the computer program is stored in the memory (81), and is configured to be executed by the processor (82) to implement a method for cross-card link aggregation of virtual function ports of data processing units, each of the data processing units being communicatively connected to a virtual machine and a switch respectively, the method comprising: performing (S101, S401) link negotiation for the virtual machine and the switch respectively; acquiring (S102, S304) a to-be-communicated data message which comprises a destination identifier, a source identifier, and a message type; determining (S103) a communication link for the to-be-communicated data message, wherein the communication link is a message channel between a virtual function port in the virtual machine, a virtual function port representor corresponding to the virtual function port in the virtual machine, an uplink corresponding to a physical port in the data processing unit, the physical port in the data processing unit, and the switch; and performing (S104, S307) communication for the to-be-communicated data message based on the communication link, wherein the performing (S101, S401) link negotiation for the virtual machine and the switch respectively comprises: acquiring (S301) a first negotiation message transmitted from the virtual machine and a second negotiation message transmitted from the switch; forwarding (S302) the first negotiation message and the second negotiation message to a link aggregation controller based on a virtual switch; and processing (S303) the first negotiation message and the second negotiation message based on the link aggregation controller, providing a first response protocol message to the virtual machine, and providing a second response protocol message to the switch.
- The electronic device (80) according to claim 7, wherein the providing the first response protocol message to the virtual machine, and providing the second response protocol message to the switch comprises: transmitting (S3031) the first response protocol message and the second response protocol message to the virtual switch; forwarding (S3032), by the virtual switch, the first response protocol message to the virtual machine through the virtual switch; and forwarding (S3033), by the virtual switch, the second response protocol message to the switch.
- The electronic device (80) according to any one of claims 7 to 8, wherein the to-becommunicated data message comprises at least one of: a first data message transmitted from the virtual machine or a second data message transmitted from the switch.
- The electronic device (80) according to any one of claims 7 to 9, wherein the acquiring (S102, S304) the to-be-communicated data message comprises: transmitting (S402) the to-be-communicated data message to the virtual switch through the virtual function port representor corresponding to the virtual function port in the virtual machine; or transmitting (S403) the to-be-communicated data message to the virtual switch through the uplink corresponding to the physical port in the data processing unit; and obtaining (S404) the to-be-communicated data message based on the virtual switch.
- The electronic device (80) according to any one of claims 7 to 10, wherein the determining (S103) the communication link for the to-be-communicated data message comprises: acquiring (S305) a correspondence between a preset destination identifier and a preset communication link; and determining (s306) a communication link corresponding to the destination identifier in the to-be-communicated data message from the correspondence.
- The electronic device (80) according to any one of claims 7 to 11, wherein the performing (S104, S307) communication for the to-be-communicated data message based on the communication link comprises: acquiring (S406) the destination identifier from the to-be-communicated data message based on the virtual switch; and forwarding (S407) the to-be-communicated data message through the communication link to a destination corresponding to the destination identifier based on the virtual switch.
- A computer-readable non-transitory storage medium, storing a computer program, wherein the computer program, when executed by a processor, implements the method according to any one of claims 1-6.
Description
TECHNICAL FIELD The present disclosure relates to the technical field of computers, and particularly relates to a method and an apparatus for cross-card link aggregation of virtual function ports of DPUs, a device, and a medium. BACKGROUND A Data Processing Unit (DPU) is a new generation of a data-centered, I/O intensive computing chip, which supports infrastructure resource layer virtualization using a software-defined technical route, and functions to improve computing system efficiency, reduce total ownership costs of the whole system, improve data processing efficiency, and reduce performance losses of other computing chips. At present, DPU cards divide a physical port (a MAC port) into several virtual function ports (Virtual Functions, VFs) for use by a virtual machine (VM) running on a host. Each of the VFs has a corresponding virtual function port representor (Virtual Function representor, VF rep), forming a combination of (VF, VF rep), where the VF rep is configured to transmit a message to a virtual switch (Open vSwitch OVS). The MAC port also has a corresponding uplink, forming a combination of (MAC, uplink), where the uplink is also configured to transmit a message to the OVS. The OVS processes and distributes messages passing through the OVS. In existing technologies, there is only one DPU card, and VFs in each VM belongs to one DPU card. The traffic of all VFs needs to pass through the DPU card, thus resulting in a problem of single point of failure. Once the DPU card has hardware failure, network interruption will be caused, thus failing to ensure high availability. Patent document EP3236623A1 discloses a link management method, device and system in virtual machine environment. Document "Link aggregation - Wikipedia - Version of 27 November 2021" (27 November 2021 (2021-11-27), Retrieved from the Internet: URL: https://en.wikipedia.org/w/index.php?title=Link_aggregation&oldid=1057438660 [retrieved on 2022-05-18]) discloses the concept of link aggregation in computer networking. SUMMARY The invention is defined by the appended claims. In order to solve the above technical problems, the present disclosure provides a method for cross-card link aggregation of virtual function ports of DPUs, a device, and a medium, thereby avoiding a problem of network interruption caused by single point of failure, and ensuring high availability. One or more embodiments of the present disclosure provide a method for cross-card link aggregation of virtual function ports ofDPUs, each of which is communicatively connected to a virtual machine and a switch respectively, the method including: performing link negotiation for the virtual machine and the switch respectively;acquiring a to-be-communicated data message, which includes a destination identifier, a source identifier, and a message type;determining a communication link for the to-be-communicated data message, where the communication link is a message channel between a virtual function port in the virtual machine, a virtual function port representor corresponding to the virtual function port in the virtual machine, an uplink corresponding to a physical port in the data processing unit, the physical port in the data processing unit, and the switch; andperforming communication for the to-be-communicated data message based on the communication link. The performing link negotiation for the virtual machine and the switch respectively includes: acquiring a first negotiation message transmitted from the virtual machine and a second negotiation message transmitted from the switch;forwarding the first negotiation message and the second negotiation message to a link aggregation controller based on a virtual switch; andprocessing the first negotiation message and the second negotiation message based on the link aggregation controller, providing a first response protocol message to the virtual machine, and providing a second response protocol message to the switch. In some embodiments, the providing the first response protocol message to the virtual machine, and providing the second response protocol message to the switch includes: transmitting the first response protocol message and the second response protocol message to the virtual switch;forwarding, by the virtual switch, the first response protocol message to the virtual machine; andforwarding, by the virtual switch, the second response protocol message to the switch. In some embodiments, the to-be-communicated data message includes at least one of: a first data message transmitted from the virtual machine or a second data message transmitted from the switch. In some embodiments, the acquiring the to-be-communicated data message includes: transmitting the to-be-communicated data message to the virtual switch through the virtual function port representor corresponding to the virtual function port in the virtual machine; ortransmitting the to-be-communicated data message to the virtual switch through the uplink correspon