Smart network card component, physical machine, cloud service system and message sending method
By using the LACP protocol and MAC address/operation Key configuration on the physical machine, multiple smart network cards form an aggregation port group, solving the problem that multiple smart network cards cannot effectively aggregate ports, achieving full utilization of broadband and improving network performance.
Patent Information
- Application Number
- CN202310119120.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-26
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-01-26
AI Technical Summary
When the physical machine is equipped with multiple smart network cards, multiple smart network cards cannot effectively aggregate ports, resulting in the inability to fully utilize the broadband of multiple smart network cards and is inconvenient to use.
By using the LACP protocol, the communication port of the smart network card communicates with the physical machine, and by configuring the MAC address and operation key of the smart network card to be the same, an aggregated port group of the smart network card is formed, thereby realizing the port aggregation of multiple smart network cards.
It realizes the full utilization of broadband of multiple smart network cards, simplifies the operational complexity of applications when connecting to the network, and improves the network performance and user experience of the physical machine.
Smart Images

Figure CN116112426B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a smart network card component, a physical machine, a cloud service system, and a message sending method. Background Art
[0002] In the related art, in the scenario where a physical machine is equipped with multiple smart network cards, the multiple smart network cards need to be used separately, which causes many inconveniences during application and fails to effectively utilize the broadband of the multiple smart network cards. Summary of the invention
[0003] The present disclosure provides a smart network card component, a physical machine, a cloud service system and a message sending method.
[0004] According to one aspect of the present disclosure, a smart network card component is provided, including multiple smart network card groups, which are configured on corresponding physical machines, and the smart network card group includes multiple smart network cards; the communication port of the smart network card communicates with the physical machine using the LACP protocol, and the data unit fed back by the communication port of each smart network card in the smart network card group to the physical machine is configured to be the same to form an aggregated port group of the smart network card group, wherein the data unit includes the MAC address and operation key of the smart network card.
[0005] According to another aspect of the present disclosure, a physical machine is provided, which communicates with an aggregated port group of a smart NIC group of a smart NIC assembly.
[0006] According to another aspect of the present disclosure, a cloud service system is provided, including: a smart network card component, including multiple smart network card groups, the smart network card group is configured on a corresponding physical machine, and the smart network card group includes multiple smart network cards; the communication port of the smart network card communicates with the physical machine using the LACP protocol, and the data unit fed back by the communication port of each smart network card in the smart network card group to the physical machine is configured to be the same to form an aggregated port group of the smart network card group, wherein the data unit includes a MAC address and an operation key of the smart network card; a physical machine, wherein there are multiple physical machines, and the physical machine communicates with the aggregated port group of the corresponding smart network card group.
[0007] According to another aspect of the present disclosure, a method for sending a message of a physical machine is provided, comprising:
[0008] According to the header of the network message, a first destination smart network card is determined from the smart network card group communicating with the source physical machine by using a hash algorithm;
[0009] The network message is sent to the first destination smart network card by using the aggregated port group of the smart network card group.
[0010] According to another aspect of the present disclosure, a method for sending a message of a smart network card component is provided, comprising:
[0011] According to the header of the network message, determine the destination tunnel port group from multiple tunnel port groups of the virtual switch of the first destination smart network card;
[0012] According to the header of the network message, the destination tunnel and the second destination smart network card are determined by using a hash algorithm;
[0013] Sending the network message to the second destination smart network card through the destination tunnel;
[0014] The network message is sent to the destination physical machine by using the aggregated port group of the smart network card group corresponding to the second destination smart network card.
[0015] According to another aspect of the present disclosure, a message sending device of a physical machine is provided, comprising:
[0016] A first destination smart network card determination module, configured to determine the first destination smart network card from the smart network card group communicating with the source physical machine by using a hash algorithm according to a header of the network message;
[0017] The first sending module is used to send the network message to the first destination smart network card by using the aggregation port group of the smart network card group.
[0018] According to another aspect of the present disclosure, a message sending device of a smart network card component is provided, comprising:
[0019] A destination tunnel port group determination module, configured to determine a destination tunnel port group from a plurality of tunnel port groups of a virtual switch of a first destination smart network card using a hash algorithm according to a header of a network message;
[0020] A destination tunnel and second destination smart network card determination module, configured to determine a destination tunnel and a second destination smart network card from a destination tunnel port group according to a header of a network message;
[0021] A second sending module, used to send the network message to the second destination smart network card through the destination tunnel;
[0022] The third sending module is used to send the network message to the destination physical machine by using the aggregation port group of the smart network card group corresponding to the second destination smart network card.
[0023] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0024] at least one processor; and
[0025] a memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method in any embodiment of the present disclosure.
[0027] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to enable a computer to execute the method in any embodiment of the present disclosure.
[0028] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method in any embodiment of the present disclosure is implemented.
[0029] According to another aspect of the present disclosure, a data center is provided, including the smart network card component of any embodiment of the present disclosure, or the physical machine of any embodiment of the present disclosure, or the cloud service system of any embodiment of the present disclosure.
[0030] Through the above technical solution, port aggregation of multiple smart network cards on a physical machine can be achieved, thereby ensuring that the bandwidth of multiple smart network cards can be fully utilized by the physical machine.
[0031] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0033] Figure 1 is a schematic diagram of a cloud service system according to an embodiment of one aspect of the present disclosure;
[0034] Figure 2 is a flow chart of a method for sending a message by a physical machine according to another embodiment of the present disclosure;
[0035] Figure 3 is a specific flow chart of determining a first destination smart network card according to another embodiment of the present disclosure;
[0036] Figure 4 is a flow chart of generating and sending fault information according to another embodiment of the present disclosure;
[0037] Figure 5 is a flow chart of a message sending method of a smart network card component according to another embodiment of the present disclosure;
[0038] Figure 6is a specific flow chart of determining a destination tunnel and a second destination smart network card according to another embodiment of the present disclosure;
[0039] Figure 7 is a schematic diagram of a message sending device of a physical machine according to another embodiment of the present disclosure;
[0040] Figure 8 is a schematic diagram of a message sending device of a smart network card component according to another embodiment of the present disclosure;
[0041] Fig. 9 It is a block diagram of an electronic device used to implement the message sending method of a physical machine in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0043] A cloud physical machine is a high-performance cloud computing resource that is different from a cloud virtual machine. When using a cloud physical machine, users can obtain all of its computing resources without incurring virtualization overhead. In order for users to connect to a VPC (Virtual Private Cloud) network, a cloud physical machine needs to be equipped with a smart network card. The smart network card is equipped with an independent operating system for use by cloud IaaS (Infrastructure as a Service) operators. All messages sent by users through the smart network card will be encapsulated in the virtual switch running on the smart network card to prevent tenants from directly contacting the physical network.
[0044] When the bandwidth provided by the smart network card is insufficient, it is necessary to increase the number of smart network cards configured in the cloud physical machine. However, after assembling multiple smart network cards in the cloud physical machine, the network ports of multiple smart network cards cannot be aggregated, so the multiple smart network cards need to be used separately.
[0045] Based on this, each time an application on a cloud physical machine connects to the network, it needs to explicitly select one from multiple local virtual network IPs (Internet Protocol) as the source IP, and specify one from multiple virtual network IPs on the other end as the destination IP. Otherwise, all outgoing traffic can only use one of the smart network cards, and the bandwidth of multiple local smart network cards cannot be fully utilized.
[0046] It can be seen that in the related technology, in the usage scenario where a cloud physical machine is equipped with multiple smart network cards, the multiple smart network cards need to be used separately, which causes many inconveniences during application and fails to effectively utilize the broadband of the multiple smart network cards.
[0047] In order to solve the above problems existing in the related art, an embodiment of the present disclosure provides a smart network card component.
[0048] like Figure 1 As shown, the smart network card assembly according to the embodiment of the present disclosure includes multiple smart network card groups.
[0049] Specifically, the smart network card group is configured in the corresponding physical machine, that is, each smart network card group is configured corresponding to a single physical machine, and the smart network card group includes multiple smart network cards. The communication port of the smart network card uses the LACP (Link Aggregation Control Protocol) protocol to communicate with the physical machine. In any smart network card group, the data unit fed back by the communication port of each smart network card to the physical machine is configured to be the same to form an aggregated port group of the smart network card group, wherein the data unit includes the MAC (Media Access Control) address and operation Key (key value) of the smart network card.
[0050] It should be noted that the LACP protocol is a protocol based on the IEEE802.3ad standard (a standard method for performing link aggregation). The communication port of each smart network card adopts the LACP protocol, and realizes information interaction with the opposite physical machine by feeding back data units to the physical machine. Among them, the data unit fed back by the communication port of each smart network card to the physical machine can be a link aggregation control protocol data unit (Link Aggregation Control Protocol Data Unit, LACPDU). The interface in the dynamic aggregation group will automatically use the LACP protocol. The interface will notify the opposite physical machine of its system LACP protocol priority, system MAC, port LACP protocol priority, port number and operation key by sending a link aggregation control protocol data unit.
[0051] After receiving the link aggregation control protocol data unit sent by each smart network card, the opposite physical machine compares the information therein and determines the communication port of the smart network card with the same MAC address and operation key as the selected state. By configuring the MAC address and operation key of the smart network card in the link aggregation control protocol data unit sent by each smart network card to the physical machine to be the same, each smart network card in the same smart network card group can reach a consensus on the communication port being in the selected state, thereby ensuring that the communication ports of multiple smart network cards in the smart network card group can be aggregated into an aggregated port group, so that the opposite physical machine can exchange information with the smart network card through each information port in the aggregated port group.
[0052] For example, Figure 1 As shown, the smart network card assembly may include a first smart network card group and a second smart network card group, the first smart network card group communicates with the first physical machine, and the second smart network card group communicates with the second physical machine. The first smart network card group includes the first smart network card and the second smart network card, the first smart network card and the second smart network card communicate with the first physical machine through the aggregation port group of the first smart network card group, and the communication ports of the first smart network card and the second smart network card respectively use the LACP protocol to communicate with the first physical machine. The second smart network card group includes the third smart network card and the fourth smart network card, the third smart network card and the fourth smart network card communicate with the second physical machine through the aggregation port group of the second smart network card group, and the communication ports of the third smart network card and the fourth smart network card respectively use the LACP protocol to communicate with the second physical machine.
[0053] The communication ports of the first smart network card and the second smart network card feed back the same data unit to the first physical machine to form an aggregation port group of the first smart network card group. The communication ports of the third smart network card and the fourth smart network card feed back the same data unit to the second physical machine to form an aggregation port group of the second smart network card group.
[0054] It is understandable that the above is only an illustrative description and cannot be understood as a limitation of the present disclosure. For example, the number of smart network card groups can be multiple, and the number of smart network cards in each smart network card group can be any number, and the number of smart network cards in different smart network card groups can be the same or different. Among them, the number of smart network card groups can be specifically set according to the number of physical machines, and the number of smart network cards in the smart network card group can be specifically set according to the bandwidth requirements of the opposite physical machine.
[0055] According to the smart network card component of the embodiment of the present disclosure, by using the LACP (Link Aggregation Control Protocol) protocol for the communication port of the smart network card to communicate with the physical machine, and the data units fed back by the communication ports of each smart network card in any smart network card group to the physical machine are configured to be the same, it can be achieved that the communication ports of each smart network card in the smart network card group can be aggregated into an aggregation port group according to the LACP protocol. Therefore, when the application on the opposite physical machine is in use, since the data units fed back to it by each smart network card of the corresponding smart network card group are the same, the opposite physical machine can use the communication port of any smart network card for information interaction, thereby ensuring that the opposite physical machine can use each smart network card in the smart network card group at will, and there is no need to explicitly select the source IP and the destination IP from the local multiple virtual network IPs, so that the multiple smart network cards in the smart network card group can be used by the application of the opposite physical machine in a transparent manner, and it can be ensured that the broadband of the multiple smart network cards in the smart network card group can be fully utilized.
[0056] like Figure 1 As shown, in one embodiment, the smart network card is configured with a virtual switch, and the virtual switches of different smart network card groups communicate with each other through tunnels. In other words, the virtual switches of any two smart network cards in different smart network card groups communicate with each other through tunnels. Among them, the virtual switch of the smart network card is provided with a tunnel port group, and the tunnel port group is obtained by merging multiple tunnels between the virtual switch and the virtual switches of other smart network card groups.
[0057] It can be understood that tunneling is a way to pass data between networks by using the infrastructure of the internetwork. The messages passed using tunneling can be data frames or packets of different protocols. The tunnel re-encapsulates the messages of these other protocols in a new header and sends them. The new header provides routing information so that the encapsulated payload data can be passed between different SmartNICs through the internetwork.
[0058] Among them, Figure 1 As shown, the two endpoints of the tunnel are located between two smart network cards in different smart network card groups. For example, the first virtual switch of the first smart network card and the third virtual switch of the third smart network card exchange information through the first tunnel (1-3). The encapsulated message is routed through the public Internet between the two endpoints of the tunnel. The logical path that the encapsulated message passes through when it is transmitted on the public Internet is called a tunnel. Once it reaches the network end point, the data will be unpacked and forwarded to the final destination. In other words, a tunnel refers to the entire process including message encapsulation, transmission, and unpacking.
[0059] Tunnels enable two different Smart NIC virtual switches to transmit messages on incompatible transport networks, allowing users using VPC networks to gain access to other Smart NICs. In addition, tunnels can use data encryption to transmit messages, ensuring that encapsulated messages can be displayed as public data. Any two Smart NIC virtual switches in different Smart NIC groups can exchange information.
[0060] Exemplarily, according to the classification of the Open System Interconnection Reference Model (OSI model), the tunnel can be a layer 2 tunnel protocol or a layer 3 tunnel protocol. The layer 2 tunnel protocol uses frames as data exchange units, such as PPTP (Point to Point Tunneling Protocol) or L2TP (Layer 2 Tunneling Protocol), both of which encapsulate messages and send them through the Internet in point-to-point protocol frames. The layer 3 tunnel protocol uses packets as data exchange units, such as IPSec (Internet Protocol Security), which is a set of protocols that provide IP security at the network layer to ensure secure communication between network layers, and can encapsulate IP packets in additional IP headers for transmission over IP networks.
[0061] In a specific example, if Figure 1 As shown, in the first smart network card, the first virtual switch of the first smart network card and the third virtual switch of the third smart network card communicate through the first tunnel (1-3); the first virtual switch of the first smart network card and the fourth virtual switch of the fourth smart network card communicate through the second tunnel (1-4). Among them, 1-3 indicates that the two endpoints of the first tunnel are respectively connected to the first virtual switch and the third virtual switch, and 1-4 indicates that the two endpoints of the second tunnel are respectively connected to the first virtual switch and the fourth virtual switch. The first tunnel and the second tunnel together constitute a tunnel port group for the first virtual switch to communicate with the second smart network card group.
[0062] In the second smart network card, the second virtual switch of the second smart network card communicates with the third virtual switch of the third smart network card through the third tunnel (2-3); the second virtual switch of the second smart network card communicates with the fourth virtual switch of the fourth smart network card through the fourth tunnel (2-4). 2-3 indicates that the two endpoints of the third tunnel are respectively connected to the second virtual switch and the third virtual switch, and 2-4 indicates that the two endpoints of the fourth tunnel are respectively connected to the second virtual switch and the fourth virtual switch. The third tunnel and the fourth tunnel constitute a tunnel port group for the second virtual switch to communicate with the second smart network card group.
[0063] Similarly, the first tunnel and the third tunnel constitute a tunnel port group for communication between the third virtual switch and the first smart network card group; the second tunnel and the fourth tunnel constitute a tunnel port group for communication between the fourth virtual switch and the first smart network card group.
[0064] It is understandable that the number of tunnel port groups on the virtual switch of each smart NIC is related to the number of smart NIC groups. Specifically, if the number of smart NIC groups is N (N≥2), the number of tunnel port groups on the virtual switch of each smart NIC is N-1. Figure 1 In the example, the number of Smart NIC groups is 2, and the number of tunnel port groups on the virtual switch of each Smart NIC is 1.
[0065] By merging multiple tunnels between a smart NIC and multiple smart NICs in a smart NIC group into a tunnel port group, multiple tunnels can be uniformly deployed and managed for the virtual switch of each smart NIC. A hash table can be constructed based on the tunnel port group, thereby providing convenience for determining the destination smart NIC for message transmission using a hash algorithm.
[0066] According to an embodiment of the present disclosure, the present disclosure also provides a physical machine.
[0067] like Figure 1 As shown, the physical machine of the embodiment of the present disclosure communicates with the aggregation port group of the smart NIC group of the smart NIC assembly.
[0068] Among them, the smart network card component can be the smart network card component of the above-mentioned embodiment of the present disclosure, which will not be repeated here.
[0069] According to the physical machine of the embodiment of the present disclosure, by communicating with the aggregated port group of the smart network card group of the smart network card assembly, the broadband of each smart network card in the smart network card group can be effectively utilized, thereby improving the network performance of the physical machine and further improving the user experience.
[0070] According to an embodiment of the present disclosure, the present disclosure also provides a cloud service system, which includes a smart network card component and a physical machine.
[0071] Specifically, the smart network card assembly includes multiple smart network card groups, the smart network card groups are configured on corresponding physical machines, and the smart network card groups include multiple smart network cards; the communication port of the smart network card communicates with the physical machine using the LACP protocol, and the data units fed back by the communication ports of each smart network card in the smart network card group to the physical machine are configured to be the same to form an aggregated port group of the smart network card group, wherein the data unit includes the MAC address and operation key of the smart network card. There are multiple physical machines, and the physical machines communicate with the aggregated port group of the corresponding smart network card group.
[0072] Among them, the smart network card component can be the smart network card component of the above embodiment of the present disclosure, and the physical machine can be the physical machine of the above embodiment of the present disclosure, which will not be repeated here.
[0073] For example, the cloud service system can be an elastic bare metal server. Specifically, an elastic bare metal server is a high-performance physical bare metal that users can enjoy exclusively in a cloud environment. Users have full physical device management rights and can be flexibly networked in combination with elastic public network (Elastic IPIP, EIP) and Baidu Load Balance (Baidu Load Balance, BLB), and can communicate with the cloud server intranet to flexibly respond to the business needs of users in various complex scenarios and build an intranet hybrid cloud.
[0074] Refer to the following Figure 1 A specific example of a cloud service system according to an embodiment of the present disclosure is described.
[0075] like Figure 1 As shown, the multiple physical machines include a first physical machine and a second physical machine, and the smart network card assembly includes a first smart network card group and a second smart network card group. The first smart network card group communicates with the first physical machine, and the second smart network card group communicates with the second physical machine. The first smart network card group includes a first smart network card and a second smart network card, and the first smart network card and the second smart network card communicate with the first physical machine through the aggregation port group of the first smart network card group, and the communication ports of the first smart network card and the second smart network card respectively use the LACP protocol to communicate with the first physical machine. The second smart network card group includes a third smart network card and a fourth smart network card, and the third smart network card and the fourth smart network card communicate with the second physical machine through the aggregation port group of the second smart network card group, and the communication ports of the third smart network card and the fourth smart network card respectively use the LACP protocol to communicate with the second physical machine. Among them, the data units fed back by the communication ports of the first smart network card and the second smart network card to the first physical machine are the same, so as to form the aggregation port group of the first smart network card group. The data units fed back by the communication ports of the third smart network card and the fourth smart network card to the second physical machine are the same, so as to form the aggregation port group of the second smart network card group.
[0076] In the first smart network card, the first virtual switch of the first smart network card communicates with the third virtual switch of the third smart network card through the first tunnel (1-3); the first virtual switch of the first smart network card communicates with the fourth virtual switch of the fourth smart network card through the second tunnel (1-4). Among them, 1-3 indicates that the two endpoints of the first tunnel are respectively connected to the first virtual switch and the third virtual switch, and 1-4 indicates that the two endpoints of the second tunnel are respectively connected to the first virtual switch and the fourth virtual switch. The first tunnel and the second tunnel together constitute a tunnel port group for the first virtual switch to communicate with the second smart network card group. In the second smart network card, the second virtual switch of the second smart network card communicates with the third virtual switch of the third smart network card through the third tunnel (2-3); the second virtual switch of the second smart network card communicates with the fourth virtual switch of the fourth smart network card through the fourth tunnel (2-4). Among them, 2-3 indicates that the two endpoints of the third tunnel are respectively connected to the second virtual switch and the third virtual switch, and 2-4 indicates that the two endpoints of the fourth tunnel are respectively connected to the second virtual switch and the fourth virtual switch. The third tunnel and the fourth tunnel constitute a tunnel port group for the second virtual switch to communicate with the second smart network card group.
[0077] Similarly, the first tunnel and the third tunnel constitute a tunnel port group for communication between the third virtual switch and the first smart network card group; the second tunnel and the fourth tunnel constitute a tunnel port group for communication between the fourth virtual switch and the first smart network card group.
[0078] According to the cloud service system of the embodiment of the present disclosure, by adopting the interactive method of communicating between the physical machine and the smart network card group of the smart network card component, the bandwidth of the physical machine can be improved, the complexity of using the application on the physical machine can be reduced, and it is beneficial to reduce network latency and improve user experience.
[0079] According to an embodiment of the present disclosure, the present disclosure further provides a data center, which includes a smart network card component according to any of the above embodiments of the present disclosure, or a physical machine according to any of the above embodiments of the present disclosure, or a cloud service system according to any of the above embodiments of the present disclosure. The data center can be a data center in cloud computing or cloud field.
[0080] According to an embodiment of the present disclosure, the present disclosure also provides a method for sending a message of a physical machine.
[0081] like Figure 2 As shown, the message sending method of the physical machine includes:
[0082] Step S201: according to the header of the network message, a hash algorithm (Hash, hash function) is used to determine a first destination smart network card from the smart network card group communicating with the source physical machine;
[0083] Step S202: using the aggregation port group of the smart network card group, sending the network message to the first destination smart network card.
[0084] Exemplarily, a hash table can be constructed based on the header of the network message and the sending path of the message. It can be understood that the hash table is a data structure that is directly accessed based on the key value. For the constructed hash table, there is a function f(key). For any given keyword value key, if the address of the record containing the keyword in the table can be obtained after substituting it into the function. Among them, the header of the network message can be used as the keyword value of the hash table, and the sending path of the message can be the key value. After obtaining the keyword value based on the header of the network message, the hash algorithm will be used to obtain the corresponding key value in the hash table, that is, the sending path of the message is obtained, and finally the first destination smart network card is determined from the smart network card group that communicates with the source physical machine according to the sending path of the message. The source physical machine sends a network message to the first destination smart network card through the aggregation port group of the smart network card group where the first destination smart network card is located.
[0085] Exemplarily, the header of the network message may be a message header of the network message at a network layer or a transport layer.
[0086] According to the message sending method of the physical machine in the embodiment of the present disclosure, by using a hash algorithm to determine the first destination smart network card, the smart network card for forwarding network messages can be reasonably determined in the smart network card group that communicates with the source physical machine, thereby achieving balanced allocation and use of multiple smart network cards in the smart network card group.
[0087] like Figure 3 As shown, in one implementation, step S201 may include:
[0088] Step S301: Obtain the source flag and destination flag of the network message according to the header of the network message;
[0089] Step S302: constructing a first keyword value based on the source flag and the destination flag, wherein the first keyword value is represented from the source flag to the destination flag;
[0090] Step S303: Based on the first keyword value, a hash algorithm is used to determine a first destination smart network card from the smart network card group corresponding to the source physical machine.
[0091] Exemplarily, the source flag of the network message may include other information such as the source IP address of the network message or the source port number of the network message, and the destination flag of the network message may include other information such as the destination IP address of the network message or the destination port number of the network message. The representation of the first keyword value may be (src->dst), where src (source) is the source flag of the network message, dst (destination) is the destination flag of the network message, and the first keyword value is the forward sending direction of the network message from the source flag to the destination flag. Thus, the hash algorithm can be used to determine the sending path of the network message from the source flag to the destination flag, and the object to which the source physical machine sends the network message, namely the first destination smart network card, can be determined based on the sending path.
[0092] Through the above implementation, by constructing the source mark to the destination mark of the network message as a first keyword value, and using a hash algorithm based on the first keyword value, the first destination smart network card that the network message sent by the source physical machine passes through in the forward sending direction can be determined, thereby ensuring that multiple smart network cards communicating with the source physical machine can be used evenly.
[0093] like Figure 4 As shown, in one embodiment, the method further includes:
[0094] Step S401: when any intelligent network card is detected to be abnormal, fault information is generated, and the fault information is synchronized to other intelligent network cards by using an aggregated port group.
[0095] For example, the media independent interface (MII) of the physical machine can be used to detect whether the smart network card is abnormal, and when a smart network card is detected to be abnormal, the control network of the physical machine generates fault information, and uses the aggregation port group to synchronize the fault information to multiple smart network cards that communicate with the physical machine. In addition, the smart network card can also use the live detection mechanism through the network control plane to detect whether the smart network card is abnormal, and when the smart network card is detected to be abnormal, it generates fault information and synchronizes the fault information to the smart network cards in other smart network card groups through the tunnel.
[0096] Through the above implementation, the smart network card can be detected for anomalies, and when the smart network card sends an anomaly, fault information can be synchronized to other smart network cards to block other smart network cards from selecting tunnels to the faulty smart network card, thereby ensuring the stability of information interaction between the smart network card component and the physical machine.
[0097] According to an embodiment of the present disclosure, the present disclosure also provides a message sending method of a smart network card component.
[0098] like Figure 5 As shown, the message sending method of the smart network card component includes:
[0099] Step S501: Determine a destination tunnel port group from multiple tunnel port groups of a virtual switch of a first destination smart network card according to a header of a network message;
[0100] Step S502: Determine the destination tunnel and the second destination smart network card using a hash algorithm according to the header of the network message;
[0101] Step S503: Send the network message to the second destination smart network card through the destination tunnel;
[0102] Step S504: Send the network message to the destination physical machine by using the aggregation port group of the smart network card group corresponding to the second destination smart network card.
[0103] For example, in step S501, the destination physical machine corresponding to the destination virtual network can be obtained according to the IP address of the destination virtual network of the network message in the header of the network message, and the destination tunnel port group corresponding to the smart network card group can be determined from the multiple tunnel port groups of the virtual switch of the first destination smart network card according to the smart network card group communicating with the destination physical machine. Figure 1 In the example shown, the source physical machine is the first physical machine, and the first destination smart network card is the first smart network card. The header of the network message includes the destination virtual network IP address, and the destination virtual network IP address is virtual network IP2. The destination physical machine of the network message is physical machine B corresponding to virtual network IP2, and then the second smart network card group communicating with physical machine B is obtained. In the first virtual switch of the first smart network card, the tunnel port group corresponding to the second smart network card group is selected from multiple tunnel port groups as the destination tunnel port group.
[0104] Exemplarily, in step S502, a hash table can be constructed based on the header of the network message and the sending path of the message. The header of the network message can be used as the keyword value of the hash table, and the sending path of the message can be the key code value. After obtaining the keyword value based on the header of the network message, the corresponding key code value is obtained in the hash table using a hash algorithm, that is, the sending path of the network message is obtained, and finally the second destination smart network card is determined from the smart network card group communicating with the destination physical machine according to the sending path of the network message, and the destination tunnel is determined from the destination tunnel port group.
[0105] Exemplarily, the header of the network message may be a message header of the network message at a network layer or a transport layer.
[0106] According to the message sending method of the network card component of the embodiment of the present disclosure, the second destination smart network card that communicates with the destination physical machine is determined by using a hash algorithm based on the header of the network message, and then the network message is sent from the first smart network card to the second smart network card, and finally the message is sent to the destination physical machine through the aggregation port group of the smart network card group where the second smart network card is located. In this way, message forwarding between different physical machines of the smart network card component can be realized.
[0107] like Figure 6 As shown, in one implementation, step S501 includes:
[0108] Step S601: Obtain the source flag and destination flag of the network message according to the header of the network message;
[0109] Step S602: construct a second keyword value based on the source flag and the destination flag, wherein the second keyword value is characterized from the destination flag to the source flag;
[0110] Step S603: Based on the second keyword value, a hash algorithm is used to determine a destination tunnel from the destination tunnel port group, and a second destination smart network card is determined from a group of smart network cards that communicate with the destination physical machine.
[0111] Exemplarily, the source flag of the network message may include other information such as the source IP address of the network message or the source port number of the network message, and the destination flag of the network message may include other information such as the destination IP address of the network message or the destination port number of the network message. The representation of the second keyword value may be (dst->src), where src(source) is the source flag of the network message, dst(destination) is the destination flag of the network message, and the second keyword value is the reverse sending direction of the network message from the destination flag to the source flag, that is, the second keyword value is the sending direction of the reverse message opposite to the network message.
[0112] It is understandable that the hash function has the following basic characteristics: if two key code values are different (according to the same function), then the key values of the two hash values are also different. This characteristic is the result of the determinism of the hash function. But on the other hand, the input and output of the hash function are not one-to-one corresponding. If the two key code values are the same, the two key values are likely to be the same. Therefore, the hash algorithm can be used to determine the reverse sending path of the network message from the destination mark to the source mark, and determine the object to which the first destination smart network card sends the network message based on the reverse sending path of the network message, that is, the second destination smart network card.
[0113] Through the above implementation, by constructing the destination flag to the source flag of the network message as a second keyword value, and using the hash algorithm based on the second keyword value, not only the object of the forward sending of the network message, that is, the second destination smart network card, can be determined, but also the reverse message sent by the destination physical machine can be ensured to return to the source physical machine along the reverse sending path opposite to the forward sending path of the network message, thereby realizing connection tracking of network messages in both forward and reverse directions.
[0114] According to an embodiment of the present disclosure, the present disclosure also provides a message sending device of a physical machine.
[0115] like Figure 7 As shown, the message sending device of the physical machine includes:
[0116] A first destination smart network card determination module 701 is used to determine the first destination smart network card from the smart network card group communicating with the source physical machine by using a hash algorithm according to the header of the network message;
[0117] The first sending module 702 is configured to send the network message to the first destination smart network card by using the aggregation port group of the smart network card group.
[0118] In one implementation, the first destination smart network card determination module 701 includes:
[0119] A source flag and destination flag acquisition submodule, used to acquire the source flag and destination flag of the network message according to the header of the network message;
[0120] A first keyword value construction submodule, configured to construct a first keyword value based on a source flag and a destination flag, wherein the first keyword value is characterized from the source flag to the destination flag;
[0121] The first destination smart network card determination submodule is used to determine the first destination smart network card from the smart network card group corresponding to the source physical machine by using a hash algorithm based on the first keyword value.
[0122] In one embodiment, the device further comprises:
[0123] The fault information generation module is used to generate fault information when any intelligent network card is detected to be abnormal, and synchronize the fault information to other intelligent network cards by using the aggregation port group.
[0124] According to an embodiment of the present disclosure, the present disclosure also provides a message sending device of a smart network card component.
[0125] like Figure 8 The message sending device of the smart network card component includes:
[0126] The destination tunnel port group determination module 801 is used to determine the destination tunnel port group from multiple tunnel port groups of the virtual switch of the first destination smart network card by using a hash algorithm according to the header of the network message;
[0127] A destination tunnel and second destination smart network card determination module 802, configured to determine a destination tunnel and a second destination smart network card according to a header of a network message;
[0128] A second sending module 803, configured to send the network message to a second destination smart network card through a destination tunnel;
[0129] The third sending module 804 is used to send the network message to the destination physical machine by using the aggregation port group of the smart network card group corresponding to the second destination smart network card.
[0130] In one implementation, the destination tunnel and the second destination smart network card determination module 802 includes:
[0131] A source flag and destination flag acquisition submodule, used to acquire the source flag and destination flag of the network message according to the header of the network message;
[0132] A second keyword value construction module, used to construct a second keyword value based on a source flag and a destination flag, wherein the second keyword value is represented from the destination flag to the source flag;
[0133] The destination tunnel and second destination smart network card determination submodule is used to determine the destination tunnel from the destination tunnel port group and determine the second destination smart network card from a group of smart network cards communicating with the destination physical machine using a hash algorithm based on the second keyword value.
[0134] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0135] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0136] like Fig. 9As shown, the electronic device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0137] Multiple components in the electronic device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the electronic device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0138] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as a message sending method of a physical machine or a message sending method of a smart network card component. For example, in some embodiments, the message sending method of a physical machine or the message sending method of a smart network card component may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the message sending method of the physical machine or the message sending method of the smart network card component described above may be executed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the message sending method of the physical machine or the message sending method of the smart network card component in any other appropriate manner (for example, by means of firmware).
[0139] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0140] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0141] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0142] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0143] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0144] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.
[0145] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0146] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A message sending method, characterized in that: include: According to the header of the network message, a first destination smart network card is determined from the smart network card group communicating with the source physical machine by using a hash algorithm; Using the aggregated port group of the smart network card group, sending the network message to the first destination smart network card; Determine, according to a header of the network message, a destination tunnel port group from a plurality of tunnel port groups of the virtual switch of the first destination smart network card; and determining a destination tunnel from the destination tunnel port group; Determining a second destination intelligent network card according to a header of the network message; Sending the network message to the second destination smart network card through the destination tunnel; The network message is sent to the destination physical machine by using the aggregated port group of the smart network card group corresponding to the second destination smart network card.
2. The method according to claim 1, characterized in that Determining a first destination smart network card from a smart network card group communicating with a source physical machine according to a header of the network message includes: According to the header of the network message, obtaining the source flag and the destination flag of the network message; Based on the source flag and the destination flag, construct a first keyword value, wherein the first keyword value is represented from the source flag to the destination flag; Based on the first keyword value, a first destination smart network card is determined from the smart network card group corresponding to the source physical machine using a hash algorithm.
3. The method according to claim 1, characterized in that Also includes: When any of the smart network cards is detected to be abnormal, fault information is generated, and the fault information is synchronized to other smart network cards using an aggregated port group.
4. A message sending device, characterized in that: include: A first destination smart network card determination module, configured to determine the first destination smart network card from the smart network card group communicating with the source physical machine by using a hash algorithm according to a header of the network message; A first sending module, configured to send the network message to the first destination smart network card by using the aggregated port group of the smart network card group; a destination tunnel port group determination module, configured to determine a destination tunnel port group from a plurality of tunnel port groups of the virtual switch of the first destination smart network card according to a header of the network message; A destination tunnel and second destination smart network card determination module, configured to determine a destination tunnel and a second destination smart network card according to a header of the network message and the destination tunnel port group; A second sending module, used to send the network message to a second destination smart network card through the destination tunnel; The third sending module is used to send the network message to the destination physical machine by using the aggregation port group of the smart network card group corresponding to the second destination smart network card.
5. The device according to claim 4, characterized in that The first destination smart network card determination module includes: A source flag and destination flag acquisition submodule, used to acquire the source flag and destination flag of the network message according to the header of the network message; A first keyword value construction submodule, configured to construct a first keyword value based on the source flag and the destination flag, wherein the first keyword value is characterized from the source flag to the destination flag; The first destination smart network card determination submodule is used to determine the first destination smart network card from the smart network card group corresponding to the source physical machine by using a hash algorithm based on the first keyword value.
6. The device according to claim 4, characterized in that Also includes: The fault information generating module is used to generate fault information when any of the smart network cards is detected to be abnormal, and synchronize the fault information to other smart network cards by using the aggregation port group.
7. A physical machine, characterized in that: Includes the message sending device as described in claim 5 or 6.
8. A cloud service system, characterized in that: include: The physical machine described in claim 7, wherein there are multiple physical machines, and the physical machines communicate with the aggregation port group of the corresponding smart network card group.
9. A data center, characterized in that: Includes any one of the physical machine described in claim 7 and the cloud service system described in claim 8.
10. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 3.
11. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 3.
12. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Message processing method and equipment
CN103401797A
Methods and apparatus to configure and manage network resources for use in network-based computing
US20190230025A1