Multi-host network card port aggregation service hardware unloading system under celestial vein operating system
By designing multi -host network card port aggregation business hardware unloading systems under the Tianmai operating system, using the FPGA network card module and Bond business module to achieve the creation and management of the Bond port, solve the Tianmai operating system does not support the multi -host network card port aggregation business hardware unloading The problem improves the traffic bandwidth and availability of the network equipment.
Patent Information
- Application Number
- CN202411521476.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-01-28
AI Technical Summary
Tianmai real-time operating system does not support the uninstallation of bond service hardware for multi-host network card port aggregation (bond) service hardware for bond service hardware for multi-host connections cannot be realized.
Design a multi -host network card port polymerization business hardware unloading system under the Tianmai operating system, including FPGA -based network card modules and multiple hosts. Each host connects to the network card module through the PCIE interface. The BOND business module implements the port aggregation business control, including the creation and management of the Bond port, and the link dynamic load distribution of the link.
The problem of multi -host network card BOND business hardware unloading under the Tianmai operating system has been solved, the traffic bandwidth and usability of network equipment are improved, and the link dynamic load distribution of the multi -host network card BOND business uninstallation field is realized.
Smart Images

Figure CN119383152A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Ethernet network transmission, and in particular to a multi-host network card port aggregation (bond) service hardware unloading system under a Tianmai operating system. Background Art
[0002] With the development of cloud computing, data centers, and network technologies, various redundant designs are generally provided in network planning and design for the sake of business reliability and continuity, such as link redundancy and node redundancy. Multiple physical devices can also be connected together to access the network through bonding technology, such as bonding multiple physical network cards into one logical network card. However, the current bond solution for aggregating multiple physical network cards is proposed for the Linux open source operating system and cannot be applied to the Tianmai real-time operating system. The network protocol stack of the Tianmai real-time operating system only supports basic network protocol functions such as TCP, UDP, ICMP, FTP, TFTP, etc. It does not have an operating system software architecture that supports bond service features, and cannot achieve hardware offloading of bond services under a single network card connected to multiple hosts. Summary of the invention
[0003] The purpose of the present invention is to provide a multi-host network card port aggregation service hardware unloading system under the Tianmai operating system, solve the problem of multi-host network card bond service hardware unloading under the Tianmai real-time operating system, and improve the traffic bandwidth and availability of network equipment in this usage scenario.
[0004] According to a first aspect of the present invention, a multi-host network card port aggregation service hardware unloading system under the Tianmai operating system is proposed, comprising:
[0005] FPGA-based network card module, equipped with FPGA module and PCIE interface;
[0006] Multiple hosts using the Tianmai operating system, each host is connected to the network card module via a PCIE interface;
[0007] Among them, in the network card module, the bond service management table item is configured in the FPGA module, which is composed of a bond member table, a bond binding mode table, a bond hash table, and a member port status table:
[0008] The bond member table is used to represent the bond port information and member port information of a host;
[0009] The bond mode table is used to indicate the bonding mode information corresponding to the bond port under a host;
[0010] The bond hash algorithm table is used to indicate the hash algorithm information corresponding to the bond port under a certain host;
[0011] The member port status table is used to indicate whether the current member port link load status is in a state where traffic can continue to be shared;
[0012] In addition, the Tianmai operating system of each host is configured with a bond service module for implementing port aggregation service control under the Tianmai operating system. The bond service module is configured to implement the creation of bond ports and the management of member ports by creating and deleting the bond member table, bond binding mode table and bond hash table in the FPGA module, and to implement the update of the bond member table and the update of the network card device status under the Tianmai operating system of the host through polling detection.
[0013] As an optional embodiment, the bond service module configured in the Tianmai operating system of each host includes:
[0014] The configuration interface module is used to connect to the upper-layer user application and receive configuration commands issued by the upper-layer user application;
[0015] LACP protocol processing module, used for negotiation and processing of LACP protocol under bond mode 4;
[0016] Port aggregation service module, used for creating and deleting bond ports and managing member ports;
[0017] The hardware entry configuration module is used to create and delete bond service management entries in the FPGA module;
[0018] The port detection module is used to poll the link status of the Ethernet physical ports of the network cards configured by multiple hosts, and complete the bond member table update and the device status update of the host network card under the Tianmai operating system based on the detection results;
[0019] The OPS interface module is used to provide a standard API for the underlying network card driver module to call, and complete the interaction between the underlying network card driver module and the various sub-modules of the bond service module.
[0020] As an optional embodiment, the bond service module is configured to receive a configuration command, and complete bond port creation and member port management based on bond creation, bond binding mode, and HASH algorithm information in the configuration command;
[0021] Furthermore, the hardware entry configuration module sends the bond service management entry configuration to the FPGA module of the network card module by calling the hardware entry configuration module API provided by the OPS interface module, and creates a bond member table, a bond binding mode table and a bond hash table in the FPGA module; and
[0022] The port detection module starts polling detection of the link status of the Ethernet physical ports of the network cards configured by the multiple hosts themselves by calling the port detection module API provided by the OPS interface module.
[0023] As an optional embodiment, the bond service module is configured to receive a configuration command, and complete the unloading of the bond port and the release of the member port based on the bond aggregation unloading information in the configuration command;
[0024] In addition, the hardware entry configuration module sends the bond service management entry configuration to the FPGA module of the network card module by calling the hardware entry configuration module API provided by the OPS interface module, clears the bond member table, bond binding mode table and bond hash table in the FPGA module, and completes the unloading.
[0025] As an optional embodiment, in the bond service management table items configured by the FPGA module, the data structure of each item is as follows:
[0026] (1) Bond member table:
[0027] host_id bond_id slave_num slave_id_bitmap
[0028] (2) Bond mode table
[0029] host_id bond_id mode_num
[0030] (3) Bond hash algorithm table
[0031] host_id bond_id hash_num
[0032] (4) Member Port Status Table
[0033] slave_id_bitmap status Waterline
[0034] The table entry fields in the table entry data structure are defined as follows:
[0035] host_id: host id, which indicates which specific host the entry belongs to. It is used for subsequent table lookup and forwarding of traffic from the host. This id is used to implement forwarding behavior between multiple hosts and isolation of entry resources.
[0036] bond_id: bond port id, indicating which bond port the current entry belongs to;
[0037] slave_num: indicates the number of member ports bound to the bond port;
[0038] slave_id_bitmap: indicates the bitmap information of bond member ports, where each bit represents the egress port of an Ethernet physical port, 0bit represents eth0, 1bit represents eth1; a bit position 1 indicates that the port is a member port of the bond port;
[0039] mode_num: indicates the bonding mode of the bond port;
[0040] hash_num: indicates the bond port load sharing hash algorithm;
[0041] status: indicates whether the member port is currently in a state where traffic can be sent. The state is determined by the real-time link status and whether the set traffic watermark is exceeded.
[0042] waterline: indicates the current traffic that can be sent by the member port. It is used to dynamically adjust the port's load capacity.
[0043] As an optional embodiment, the bond service module is configured to complete link dynamic load distribution forwarding in the following manner:
[0044] After completing the outbound member port of the traffic based on the bond member table and the bond hash table, further determine the status of the outbound member port, and determine whether the traffic is forwarded from the selected outbound member port based on the status in the member port status table of the outbound member port:
[0045] If the status in the member port status table of the egress member port is that the traffic can be forwarded, the traffic is forwarded through the egress member port;
[0046] If the status in the member port status table of the outgoing member port is a non-forwardable traffic state, continue to traverse and determine other member ports bound to the bond port until the first available member port is found, and the status in its member port status table is a forwardable traffic state, then forward the traffic from the first available member port;
[0047] If the traversal is completed and there is no available member port among all the member ports bound to the bond port, the traffic is discarded and the exception is reported. The bond service module updates the bond service management table according to the exception information.
[0048] As an optional embodiment, the network card module is further configured with a DMA module;
[0049] The host using the Tianmai operating system exchanges data packets with the network card module through the DMA module to achieve network communication.
[0050] The design and implementation of the multi-host network card port aggregation service hardware unloading system architecture under the Tianmai operating system in the above embodiments solves the problem that the Tianmai operating system does not support bond service hardware unloading, and at the same time solves the bond service hardware unloading problem in the usage scenario of the Tianmai operating system connecting to multiple host network cards. Based on the multi-host network card bond hardware unloading software and hardware fusion architecture design and software and hardware interaction design, the network availability, stability and network device bandwidth of the Tianmai operating system are improved, and the dynamic load distribution of the link in the multi-host network card bond service unloading scenario is realized, expanding and enriching the usage scenarios of multiple host network cards under the Tianmai operating system.
[0051] It should be understood that all combinations of the aforementioned concepts and the additional concepts described in more detail below can be considered as part of the inventive subject matter of the present disclosure as long as such concepts are not mutually inconsistent. In addition, all combinations of the claimed subject matter are considered as part of the inventive subject matter of the present disclosure.
[0052] The foregoing and other aspects, embodiments and features of the present invention can be more fully understood from the following description in conjunction with the accompanying drawings. Other additional aspects of the present invention, such as the features and / or beneficial effects of the exemplary embodiments, will be apparent from the following description or learned from the practice of the specific embodiments according to the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings are not intended to be drawn to scale. In the accompanying drawings, each identical or nearly identical component shown in each figure may be represented by the same reference numeral. For clarity, not every component is labeled in each figure. Embodiments of various aspects of the present invention will now be described by way of example and with reference to the accompanying drawings.
[0054] Figure 1 It is an architectural design diagram of a multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to an embodiment of the present invention.
[0055] Figure 2 It is a logic diagram of the bond service module and its interaction with FPGA in the multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to an embodiment of the present invention.
[0056] Figure 3It is a schematic diagram of bond hardware table item configuration of a multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to an embodiment of the present invention.
[0057] Figure 4 It is a link dynamic load distribution flow chart of a multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0058] In order to better understand the technical content of the present invention, specific embodiments are given and described as follows in conjunction with the accompanying drawings.
[0059] Various aspects of the present invention are described in this disclosure with reference to the accompanying drawings, in which many illustrative embodiments are shown. The embodiments of the present disclosure are not necessarily intended to include all aspects of the present invention. It should be understood that the various concepts and embodiments introduced above, as well as those described in more detail below, can be implemented in any of many ways, because the concepts and embodiments disclosed by the present invention are not limited to any implementation. In addition, some aspects disclosed by the present invention can be used alone or in any appropriate combination with other aspects disclosed by the present invention.
[0060] Combination Figure 1 , Figure 2 , Figure 3 As shown, the multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to an embodiment of the present invention includes: an FPGA-based network card module 100 and multiple hosts 200.
[0061] like Figure 1 The system architecture shown, in which two hosts are used as an example for explanation, does not mean that the system of the present invention only supports multi-host scenarios with two hosts. The architecture is applicable to any number of multi-host application scenarios as long as the software and hardware resource design capabilities and resources permit.
[0062] like Figure 1 As shown, the FPGA-based network card module 100 is configured with an FPGA module, a DMA module and a PCIE interface.
[0063] Among the multiple hosts 200 using the Tianmai operating system, each host is connected to the network card module 100 via a PCIE interface, and exchanges data packets with the network card module 100 in a DMA manner through a DMA module to achieve network communication.
[0064] Tianmai operating system can support multiple architectures such as PowerPC, X86, ARM, MIPS, and supports basic network protocol functions such as TCP, UDP, ICMP, FTP, TFTP, etc., but it does not have an operating system software architecture that supports bond service features, and it does not have the ability to unload bond services in the use scenario of multiple host network cards docking operating systems. To this end, in order to solve this problem, in an embodiment of the present invention, a new bond service module is designed in the operating system to implement the basic functions of the bond aggregation service software control plane under the Tianmai operating system.
[0065] like Figure 3 As shown, an architectural diagram of the bond service management table entry configuration is exemplarily shown.
[0066] In the network card module 100, a bond service management table is configured in the FPGA module, which is composed of a bond member table, a bond binding mode table, a bond hash table, and a member port status table. The specific design is as follows:
[0067] The bond member table is used to represent the bond port information and member port information of a host;
[0068] The bond mode table is used to indicate the bonding mode information corresponding to the bond port under a host;
[0069] The bond hash algorithm table is used to indicate the hash algorithm information corresponding to the bond port under a certain host;
[0070] The member port status table is used to indicate whether the current member port link load status is in a state where traffic can continue to be shared.
[0071] Combination Figures 1 to 3 As shown, the Tianmai operating system of each host is configured with a bond service module for implementing port aggregation service control under the Tianmai operating system.
[0072] As an optional embodiment, the bond service module is configured to implement the creation of bond ports and the management of member ports by creating and deleting the bond member table, bond binding mode table and bond hash table in the FPGA module, and to implement the update of the bond member table and the update of the network card device status under the host's Tianmai operating system through polling detection.
[0073] Combination Figure 1 , Figure 2 As shown in the figure, the bond business modules configured in the Tianmai operating system of each host include:
[0074] The configuration interface module is used to connect to the upper-layer user application and receive configuration commands issued by the upper-layer user application;
[0075] LACP protocol processing module, used for negotiation and processing of LACP protocol under bond mode 4;
[0076] Port aggregation service module, used for creating and deleting bond ports and managing member ports;
[0077] The hardware entry configuration module is used to create and delete bond service management entries in the FPGA module;
[0078] The port detection module is used to poll the link status of the Ethernet physical ports of the network cards configured by multiple hosts, and complete the bond member table update and the device status update of the host network card under the Tianmai operating system based on the detection results;
[0079] The OPS interface module is used to provide a standard API for the underlying network card driver module to call, and complete the interaction between the underlying network card driver module and the various sub-modules of the bond service module.
[0080] It should be understood that bond aggregation based on the LACP protocol negotiates link aggregation by exchanging information such as system priority and port priority between member ports of link aggregation through LACP packets. Multiple physical member ports are combined to form an aggregation group, which builds a logical port and acts as a unified network interface to the outside world, namely, a bond port.
[0081] Combination Figure 2 , Figure 3 As shown, the bond service module is configured to receive configuration commands, and complete bond port creation and member port management based on the bond creation, bond binding mode, and HASH algorithm information in the configuration commands;
[0082] Furthermore, the hardware entry configuration module sends the bond service management entry configuration to the FPGA module of the network card module 100 by calling the hardware entry configuration module API provided by the OPS interface module, and creates a bond member table, a bond binding mode table and a bond hash table in the FPGA module; and
[0083] The port detection module starts polling detection of the link status of the Ethernet physical ports of the network cards configured by the multiple hosts themselves by calling the port detection module API provided by the OPS interface module.
[0084] Combination Figure 2 , Figure 3As shown, the bond service module is configured to receive a configuration command, and complete the unloading of the bond port and the release of the member port based on the bond aggregation unloading information in the configuration command;
[0085] In addition, the hardware entry configuration module sends the bond service management entry configuration to the FPGA module of the network card module 100 by calling the hardware entry configuration module API provided by the OPS interface module, clears the bond member table, bond binding mode table and bond hash table in the FPGA module, and completes the unloading.
[0086] In the embodiment of the present invention, a bond port, namely an aggregation interface (or a link aggregation group interface), is a logical interface that combines multiple physical network interfaces (member ports) together and appears as a unified network interface to the outside.
[0087] Member ports are the Ethernet physical ports of each network card that constitute the bond port, such as the network card interface corresponding to the commonly used RJ-45 interface. In a bond aggregation group, the number of member ports can be configured according to actual needs and device support, and there can usually be 2 or more member ports.
[0088] In order to solve the problem of multi-host network card table entry conflicts, we further propose a hardware table entry structure design suitable for multi-host network card bond service offloading. As an example, in the bond service management table entry design, the data structure of each table entry is as follows:
[0089] (1) Bond member table:
[0090] host_id bond_id slave_num slave_id_bitmap
[0091] (2) Bond mode table
[0092] host_id bond_id mode_num
[0093] (3) Bond hash algorithm table
[0094] host_id bond_id hash_num
[0095] (4) Member Port Status Table
[0096] slave_id_bitmap status Waterline
[0097] The table entry fields in the table entry data structure are defined as follows:
[0098] host_id: host id, which indicates which specific host the entry belongs to. It is used for subsequent table lookup and forwarding of traffic from the host. This id is used to implement forwarding behavior between multiple hosts and isolation of entry resources.
[0099] bond_id: bond port id, indicating which bond port the current entry belongs to;
[0100] slave_num: indicates the number of member ports bound to the bond port;
[0101] slave_id_bitmap: indicates the bitmap information of bond member ports, where each bit represents the egress port of an Ethernet physical port, 0bit represents eth0, 1bit represents eth1; a bit position 1 indicates that the port is a member port of the bond port;
[0102] mode_num: indicates the bonding mode of the bond port;
[0103] hash_num: indicates the bond port load sharing hash algorithm;
[0104] status: indicates whether the member port is currently in a state where traffic can be sent. The state is determined by the real-time link status and whether the set traffic watermark is exceeded.
[0105] waterline: indicates the current traffic that can be sent by the member port. It is used to dynamically adjust the port's load capacity.
[0106] In a further embodiment, we also propose a method for link dynamic load distribution to address the problem of inconsistent hardware and software entries of multiple host network cards under the Tianmai operating system, which leads to packet loss in link switching and the problem of the total traffic of multiple hosts exceeding the bandwidth of member ports. Figure 4 As shown, the bond service module is configured to complete link dynamic load distribution forwarding in the following manner:
[0107] After completing the outbound member port of the traffic based on the bond member table and the bond hash table, further determine the status of the outbound member port, and determine whether the traffic is forwarded from the selected outbound member port based on the status in the member port status table of the outbound member port:
[0108] If the status in the member port status table of the egress member port is that the traffic can be forwarded, the traffic is forwarded through the egress member port;
[0109] If the status in the member port status table of the outgoing member port is a non-forwardable traffic state, continue to traverse and determine other member ports bound to the bond port until the first available member port is found, and the status in its member port status table is a forwardable traffic state, then forward the traffic from the first available member port;
[0110] If the traversal is completed and there is no available member port among all the member ports bound to the bond port, the traffic is discarded and the exception is reported. The bond service module updates the bond service management table according to the exception information.
[0111] Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. A person with ordinary knowledge in the technical field to which the present invention belongs may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be determined by the definition of the claims.
Claims
1. A multi-host network card port aggregation service hardware unloading system under the Tianmai operating system, characterized in that: include: An FPGA-based network card module (100) is configured with an FPGA module and a PCIE interface; A plurality of hosts (200) using the Tianmai operating system, each host being connected to a network card module (100) via a PCIE interface; Wherein, in the network card module (100), a bond service management table item is configured in the FPGA module, which is composed of a bond member table, a bond binding mode table, a bond hash table and a member port status table: The bond member table is used to represent the bond port information and member port information of a host; The bond mode table is used to indicate the bonding mode information corresponding to the bond port under a host; The bond hash algorithm table is used to indicate the hash algorithm information corresponding to the bond port under a certain host; The member port status table is used to indicate whether the current member port link load status is in a state where traffic can continue to be shared; In addition, the Tianmai operating system of each host is configured with a bond service module for implementing port aggregation service control under the Tianmai operating system. The bond service module is configured to implement the creation of bond ports and the management of member ports by creating and deleting the bond member table, bond binding mode table and bond hash table in the FPGA module, and to implement the update of the bond member table and the update of the network card device status under the Tianmai operating system of the host through polling detection.
2. The multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to claim 1 is characterized in that: The bond service module configured in the Tianmai operating system of each host includes: The configuration interface module is used to connect to the upper-layer user application and receive configuration commands issued by the upper-layer user application; LACP protocol processing module, used for negotiation and processing of LACP protocol under bond mode 4; Port aggregation service module, used for creating and deleting bond ports and managing member ports; The hardware entry configuration module is used to create and delete bond service management entries in the FPGA module; The port detection module is used to poll the link status of the Ethernet physical ports of the network cards configured by multiple hosts, and complete the bond member table update and the device status update of the host network card under the Tianmai operating system based on the detection results; The OPS interface module is used to provide a standard API for the underlying network card driver module to call, and complete the interaction between the underlying network card driver module and the various sub-modules of the bond service module.
3. The multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to claim 2 is characterized in that: The bond service module is configured to receive a configuration command, and complete bond port creation and member port management based on bond creation, bond binding mode, and HASH algorithm information in the configuration command; Furthermore, the hardware table item configuration module sends the bond service management table item configuration to the network card module (100) FPGA module by calling the hardware table item configuration module API provided by the OPS interface module, and creates a bond member table, a bond binding mode table and a bond hash table in the FPGA module; as well as The port detection module starts polling detection of the link status of the Ethernet physical ports of the network cards configured by the multiple hosts themselves by calling the port detection module API provided by the OPS interface module.
4. The multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to claim 1 is characterized in that: The bond service module is configured to receive a configuration command, and complete the unloading of the bond port and the release of the member port based on the bond aggregation unloading information in the configuration command; Furthermore, the hardware table item configuration module sends the bond service management table item configuration to the network card module (100) FPGA module by calling the hardware table item configuration module API provided by the OPS interface module, clears the bond member table, bond binding mode table and bond hash table in the FPGA module, and completes the uninstallation.
5. The multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to any one of claims 1 to 4, characterized in that: In the bond service management table items configured by the FPGA module, the data structure of each item is as follows: (1) Bond member table: (2) Bond mode table (3) Bond hash algorithm table (4) Member Port Status Table The table entry fields in the table entry data structure are defined as follows: host_id: host id, which indicates which specific host the entry belongs to. It is used for subsequent table lookup and forwarding of traffic from the host. This id is used to implement forwarding behavior between multiple hosts and isolation of entry resources. bond_id: bond port id, indicating which bond port the current entry belongs to; slave_num: indicates the number of member ports bound to the bond port; slave_id_bitmap: indicates the bitmap information of bond member ports, where each bit represents the egress port of an Ethernet physical port, 0bit represents eth0, 1bit represents eth1; a bit position 1 indicates that the port is a member port of the bond port; mode_num: indicates the bonding mode of the bond port; hash_num: indicates the bond port load sharing hash algorithm; status: indicates whether the member port is currently in a state where traffic can be sent. The state is determined by the real-time link status and whether the set traffic watermark is exceeded. waterline: indicates the current traffic that can be sent by the member port. It is used to dynamically adjust the port's load capacity.
6. The multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to claim 5 is characterized in that: The bond service module is configured to complete link dynamic load distribution forwarding in the following manner: After completing the outbound member port of the traffic based on the bond member table and the bond hash table, further determine the status of the outbound member port, and determine whether the traffic is forwarded from the selected outbound member port based on the status in the member port status table of the outbound member port: If the status in the member port status table of the egress member port is that the traffic can be forwarded, the traffic is forwarded through the egress member port; If the status in the member port status table of the outgoing member port is a non-forwardable traffic state, continue to traverse and determine other member ports bound to the bond port until the first available member port is found, and the status in its member port status table is a forwardable traffic state, then forward the traffic from the first available member port; If the traversal is completed and there is no available member port among all the member ports bound to the bond port, the traffic is discarded and the exception is reported. The bond service module updates the bond service management table according to the exception information.
7. The multi-host network card port aggregation service hardware unloading system under the Tianmai operating system according to claim 1 is characterized in that: The network card module (100) is also configured with a DMA module; The Tianmai operating system host (200) exchanges data messages with the network card module (100) via the DMA module to achieve network communication.
Citation Information
Cited By
Deployment method and device for hardware link aggregation, chip, network card and equipment
CN121334040A
Method, device, chip, network card and equipment for deploying hardware link aggregation
CN121334040B