Method and device for determining MAC address of virtual network card and electronic equipment

By deploying a virtual network card in the basic deployment unit Pod and determining the shared RDMA network card MAC address, the problem of the surge in MAC address table entries is solved, ensuring the normal operation of RDMA communication.

CN119835095APending Publication Date: 2025-04-15BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411982713.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

When using the Media Access Control Virtual Local Area Network (MACVLAN) to generate remote direct address access (RDMA) sub-device, the large number of creation and deletion of the basic deployment unit Pods resulted in a surge in MAC address table entries, and the new MAC address cannot be learned after reaching the upper limit, resulting in the failure of RDMA communication.

Method used

By creating N basic deployment units Pods and deploying virtual network cards of different RDMA network cards in each pod, determine the virtual network card group affiliated to the same RDMA network card, and determine the shared RDMA network card MAC address for the virtual network card.

Benefits of technology

Effectively manage the MAC address, avoid overloading of MAC address table entries, and ensure the normal operation of the newly created RDMA and RDMA communication between the containers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835095A_ABST
    Figure CN119835095A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for determining an MAC address of a virtual network card and electronic equipment, and relates to the technical field of computer storage and network communication. According to the specific implementation scheme, N basic deployment units Pod are created, wherein N is an integer larger than or equal to 1; for each Pod, virtual network cards of different RDMA network cards are deployed in the Pod; determining a virtual network card group belonging to the same RDMA network card from the virtual network cards deployed in the N Pods; and determining the MAC address of the affiliated RDMA network card shared by each virtual network card in the virtual network card group.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical fields of computer storage and network communication, and in particular to a method, device and electronic device for determining a MAC address of a virtual network card. Background Art

[0002] When using the Media Access Control Virtual Local Area Network (MACVLAN) method to generate the management method of Remote Direct Memory Access (RDMA) sub-devices, a new MAC address will be generated for each sub-device. When a large number of basic deployment units Pod are created and deleted, a large number of MAC addresses will be generated in a short period of time, resulting in a surge in the MAC address table entries of the Layer 2 forwarding table of the upstream switch. When the upper limit of the MAC address table size is reached, new MAC addresses cannot be learned, resulting in the inability of the newly created RDMA to work properly, and the inability to complete the communication of the Ethernet-based Remote Direct Memory Access protocol (RDMA over ConvergedEthernet version 2, RoCE v2), which further causes the container to be unable to use RDMA for communication. Summary of the invention

[0003] The present disclosure provides a method, device and electronic device for determining a MAC address of a virtual network card.

[0004] According to one aspect of the present disclosure, a method for determining a MAC address of a virtual network card is provided, including: creating N basic deployment units Pods, where N is an integer greater than or equal to 1; for each of the Pods, deploying virtual network cards of different RDMA network cards in the Pod; determining a virtual network card group belonging to the same RDMA network card from the virtual network cards deployed in the N Pods; and determining the MAC address of the RDMA network card to which each virtual network card in the virtual network card group belongs.

[0005] According to another aspect of the present disclosure, a device for determining a MAC address of a virtual network card is provided, including: a creation module, used to create N basic deployment units Pods, N being an integer greater than or equal to 1; a deployment module, used to deploy, for each of the Pods, virtual network cards of different RDMA network cards in the Pod; a first determination module, used to determine, from the virtual network cards deployed in the N Pods, a virtual network card group belonging to the same RDMA network card; and a second determination module, used to determine the MAC address of the RDMA network card to which each virtual network card in the virtual network card group belongs.

[0006] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method for determining the MAC address of the virtual network card described in the above-mentioned first embodiment.

[0007] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, on which a computer program / instructions are stored, and the computer instructions are used to enable the computer to execute the method for determining the MAC address of the virtual network card described in the above-mentioned embodiment.

[0008] According to another aspect of the present disclosure, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the method for determining the MAC address of a virtual network card described in the above-mentioned first embodiment.

[0009] 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

[0010] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0011] Figure 1 A flowchart of a method for determining a MAC address of a virtual network card provided in an embodiment of the present disclosure;

[0012] Figure 2 A flowchart of another method for determining a MAC address of a virtual network card provided in an embodiment of the present disclosure;

[0013] Figure 3 A schematic diagram of a process of determining a network resource set in a method for determining a MAC address of a virtual network card provided in an embodiment of the present disclosure;

[0014] Figure 4 A schematic diagram of allocating auxiliary address information to a cloud server provided in an embodiment of the present disclosure;

[0015] Figure 5 A schematic diagram of MAC address management based on the IPVlan algorithm provided in an embodiment of the present disclosure;

[0016] Figure 6 A schematic diagram of the structure of a device for determining a MAC address of a virtual network card provided in an embodiment of the present disclosure;

[0017] Figure 7 The present invention is a block diagram of an electronic device for implementing the method for determining the MAC address of a virtual network card according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0018] 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.

[0019] The following describes a method, device, and electronic device for determining a MAC address of a virtual network card according to an embodiment of the present disclosure with reference to the accompanying drawings.

[0020] Figure 1 A flowchart of a method for determining a MAC address of a virtual network card provided in an embodiment of the present disclosure.

[0021] like Figure 1 As shown, the method for determining the MAC address of the virtual network card may include:

[0022] S101, create N basic deployment units Pod, where N is an integer greater than or equal to 1.

[0023] It should be noted that the execution subject of the method for determining the MAC address of the virtual network card in the embodiment of the present disclosure may be a hardware device with data processing capabilities and / or the necessary software required to drive the hardware device to work. Optionally, the execution subject may include a server, a user terminal and other intelligent devices. Optionally, the user terminal includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, etc. Optionally, the server includes but is not limited to a network server, an application server, and may also be a server of a distributed system, or a server combined with a blockchain, etc. The embodiment of the present disclosure is not specifically limited.

[0024] In some embodiments, N basic deployment units Pods may be created on nodes in the cluster based on the creation instruction.

[0025] In some embodiments, configuration information of the Pod may also be set, and the Pod may be created based on the configuration information and the creation instructions.

[0026] S102, for each Pod, deploy a virtual network card of a different RDMA network card in the Pod.

[0027] In some embodiments, different Remote Direct Memory Access (RDMA) network cards are virtualized by network virtualization technology to obtain respective virtual network cards of the RDMA network cards. Further, the virtual network cards are deployed in the Pod.

[0028] In some embodiments, by identifying the RDMA network card, multiple different RDMA network cards are identified, and then the RDMA network card is virtualized to obtain virtual network cards of different RDMA network cards. For example, the Internet Protocol Virtual Local Area Network (IPVlan) technology can be used to virtualize the virtual network card of the RDMA network card.

[0029] In some embodiments, before deploying the virtual network card into the Pod, the virtual network card may also be verified to ensure that the virtual network card is correctly deployed.

[0030] S103, determining a virtual network card group belonging to the same RDMA network card from the virtual network cards deployed in the N Pods.

[0031] In some embodiments, by reading the configuration information of each virtual network card in N Pods, and based on the configuration information of each virtual network card, the RDMA network card to which each virtual network card belongs can be determined, and multiple virtual network cards belonging to the same RDMA network card can be grouped as a virtual network card group.

[0032] In some embodiments, the RDMA network card to which the virtual network card belongs can be determined according to the connection position of the virtual network card in the configuration information. Optionally, if the virtual network card is connected to a physical network interface associated with the same RDMA network card, the virtual network card belongs to the same RDMA network card.

[0033] S104, determining the MAC address of the RDMA network card to which each virtual network card in the virtual network card group belongs.

[0034] It is understandable that when using IPVlan to virtualize the RDMA network card, the virtual network cards of the same RDMA network card will share the media access control (MAC) address of the RDMA network card, that is, the MAC address of the RDMA network card to which the virtual network card belongs can be determined as the MAC address of the virtual network card.

[0035] In some embodiments, configuration information of the RDMA network card is read, and a MAC address of the RDMA network card is determined from the configuration information as the MAC address of each virtual network card in the virtual network card group.

[0036] According to the method for determining the MAC address of the virtual network card provided by the embodiment of the present disclosure, N Pods are created, and different virtual network cards of different RDMA network cards are deployed in each Pod. The virtual network card group belonging to the same RDMA network card is further determined to determine the MAC address of the RDMA network card according to the virtual network card group. Multiple containers can be associated through Pod to share the same RDMA network card resources, thereby improving resource utilization. When the virtual network card shares the MAC address of the RDMA network card to which it belongs, the management of the MAC address can be simplified and the network communication efficiency can be improved.

[0037] Figure 2 A flowchart of a method for determining a MAC address of a virtual network card provided in an embodiment of the present disclosure.

[0038] like Figure 2 As shown, the method for determining the MAC address of the virtual network card may include:

[0039] S201, create N basic deployment units Pod, where N is an integer greater than or equal to 1.

[0040] S202: For each Pod, deploy virtual network cards of different RDMA network cards in the Pod.

[0041] The relevant contents of steps S201 - S202 can be found in the above embodiment and will not be described again here.

[0042] In some embodiments, before creating a Pod, the RDMA network card may be virtualized to obtain respective virtual network cards of different RDMA network cards.

[0043] In some embodiments, the RDMA network card can be virtualized based on the L3 mode in the Internet Protocol Virtual Local Area Network (IPVlan) algorithm to obtain a virtual network card of the RDMA network card. By using the L3 mode in the IPVlan algorithm, the virtual network cards of the RDMA network cards can share the same MAC address with the RDMA network card to simplify the management of the MAC address and improve the network communication efficiency.

[0044] S203: Configure available auxiliary address information for the virtual network card.

[0045] In some embodiments, available auxiliary address information can be obtained from the network resource set corresponding to the RDMA network card, and the available auxiliary address information can be used to configure the virtual network card. The available auxiliary address information is auxiliary address information that has not been used. Configuring the virtual network card based on the available auxiliary address information avoids repeated use of the auxiliary address information, thereby avoiding address conflicts with other virtual network cards and ensuring stable operation of the network.

[0046] In some embodiments, by determining a network resource set of the RDMA network card, the network resource set has cached auxiliary address information allocated to the RDMA network card, determining available auxiliary address information from the network resource set, and configuring the virtual network card based on the available auxiliary address information, efficient use of the RDMA network card resources is achieved and waste of resources is avoided.

[0047] In some embodiments, the network resource set includes first auxiliary address information that has been used and second auxiliary address information that has not been used. The available auxiliary address information can be determined based on the second auxiliary address information, thereby avoiding repeated use of the auxiliary address information, thereby avoiding address conflicts with other virtual network cards and ensuring stable operation of the network.

[0048] That is, by determining the first auxiliary address information that has been used in the network resource set, and according to the first auxiliary address information, determining the second auxiliary address information that is not used in the network resource set. By comparing the first auxiliary address information with the remaining auxiliary address information in the network resource set, the auxiliary address information different from the first auxiliary address information can be used as the unused second auxiliary address information. Further, one of the second auxiliary address information is selected as the available auxiliary address information.

[0049] It is understood that a network resource set refers to a collection of resources and information configured in a network environment to support network communication and data transmission. An information domain refers to an area or range in a network resource set for storing specific types of information.

[0050] That is, the network resource set includes different information domains, each of which can store auxiliary address information. The first information domain of the network resource set can be determined, and the auxiliary address information can be written into the first information domain. In other words, the auxiliary address information stored in the first information domain has not been used. By storing the auxiliary address information in the first information domain, network communication can be accelerated, communication delay can be reduced, and the reliability and efficiency of communication can be improved.

[0051] That is, by determining the first information domain of the network resource set and writing the auxiliary address information into the first information domain. After configuring the virtual network card based on the available auxiliary address information, the available auxiliary address information is marked as the first auxiliary address information that has been used, and the available auxiliary address information is written into the second information domain of the network resource set. Then, the second information domain is read to read the first auxiliary address information from the second information domain.

[0052] In some embodiments, in response to any auxiliary address information being used, any auxiliary address information is determined to be the first auxiliary address information that has been used. Then, the first auxiliary address information is written into the second information field in the network resource set, and the first auxiliary address information is deleted from the first information field, and one of the second auxiliary address information currently remaining in the first information field is further selected as the available auxiliary address information. By updating the use status of the auxiliary address information in real time, the virtual network card can be configured with the correct auxiliary address information to avoid repeated use of the auxiliary address information.

[0053] In some embodiments, the auxiliary address information that has been used can also be marked to clarify the auxiliary address information that has been used and the auxiliary address information that has not been used in the network resource set. In response to any auxiliary address information being used, any auxiliary address information is determined to be the first auxiliary address information that has been used, and a status mark is performed on any auxiliary address information.

[0054] In some embodiments, when auxiliary address information in a network resource set is used, the status mark of the auxiliary address information in the network resource set is obtained, and based on the status mark of the auxiliary address information, the unused second auxiliary address information in the network resource set is determined to select one from the second auxiliary address information as the available auxiliary address information.

[0055] Optionally, if the status of the auxiliary address information is marked as unused, it can be determined that the auxiliary address information is the second auxiliary address information; if the status of the auxiliary address information is marked as used, it can be determined that the auxiliary address information is the first auxiliary address information.

[0056] S204: Update the Address Resolution Protocol ARP table entry of the switch in the container network based on the available auxiliary address information and the MAC address.

[0057] It is understood that the Address Resolution Protocol (ARP) table entry is used to map IP addresses to MAC addresses. When a device needs to communicate with another device, it first checks whether the MAC address of the target device exists in the ARP table. If it exists, it directly uses the MAC address for communication; if it does not exist, it sends an ARP request to obtain the MAC address of the target device.

[0058] In some embodiments, the correspondence between the available auxiliary address information and the MAC address can be determined, and the correspondence can be updated to the ARP table of the switch in the container network. This allows the MAC address to be directly included in the communication based on the ARP table, without sending an ARP request, thus ensuring the efficiency of network communication.

[0059] In some embodiments, an ARP update request can be sent to the upstream switch based on the available auxiliary address information, and based on the ARP update request, a correspondence between the available auxiliary address information and the MAC address is added to the ARP table entry. The MAC table entry in the switch remains unchanged. Optionally, keeping the MAC table entry unchanged can reduce the processing burden of the switch and improve network performance.

[0060] S205, determining a virtual network card group belonging to the same RDMA network card from the virtual network cards deployed in the N Pods.

[0061] S206, determining the MAC address of the RDMA network card to which each virtual network card in the virtual network card group belongs.

[0062] The relevant contents of steps S205-S206 can be found in the above embodiment and will not be repeated here.

[0063] According to the method for determining the MAC address of the virtual network card provided by the embodiment of the present disclosure, after deploying the virtual network cards of different RDMA network cards in each Pod, the virtual network card is configured, and based on the configured available auxiliary address information and MAC address, the ARP table entry of the switch in the container network is updated. The virtual network card is configured based on the available auxiliary address information, thereby avoiding the reuse of auxiliary address information, thereby avoiding address conflicts with other virtual network cards, ensuring the stable operation of the network, and realizing that when communicating based on the ARP table entry, the MAC address included can be directly included for communication without sending an ARP request, thereby ensuring the efficiency of network communication.

[0064] Based on the above embodiments, the embodiments of the present disclosure can explain the process of determining the network resource set, such as: Figure 3 As shown, the process of determining the network resource set may include:

[0065] S301, obtaining the auxiliary address information allocated by the cloud server to the RDMA network card.

[0066] In some embodiments, before creating a Pod, the auxiliary address information of the RDMA network card can be requested from the cloud server, so that after the Pod is created, the cached auxiliary address information can be used for communication immediately without waiting for address allocation, thereby reducing communication delays.

[0067] In some embodiments, an address application request can be sent to the cloud server based on the interface of the cloud server to receive auxiliary address information allocated by the cloud server. Based on the interface of the cloud server, an automated process of address application can be implemented, manual operations can be reduced, and address allocation efficiency can be improved.

[0068] In some embodiments, an address application request may be sent to a cloud server through an Infrastructure as a Service (Iaas) Application Programming Interface (API) calling a High Performance Computing (HPC) interface. Further, auxiliary address information allocated to an RDMA network card by the cloud server may be received.

[0069] In some embodiments, the cloud server may also allocate primary address information to the RDMA network card.

[0070] Optionally, the cloud server may allocate different amounts of auxiliary address information to different RDMA network cards, or may allocate the same amount of auxiliary address information to different RDMA network cards.

[0071] S302, centrally cache auxiliary address information in the network resources of the RDMA network card.

[0072] In some embodiments, the auxiliary address information allocated by the cloud server to the RDMA network card is stored in the network resource set of each RDMA network card, that is, each RDMA network card has its corresponding network resource set.

[0073] For example, Figure 4 Shown is a schematic diagram of cloud server allocation of auxiliary address information. Figure 4 There are N RDMA network cards in the system, and the process of applying for auxiliary address information for each RDMA network card is the same. Taking RDMA network card 1 as an example, the HPC interface is called through IaasAPI to send an address application request to the cloud server. After receiving the address application request, the cloud server can allocate M IP address information for RDMA network card 1, where the M address information includes 1 primary IP address information and M-1 auxiliary IP address information.

[0074] According to the method for determining the MAC address of the virtual network card provided by the embodiment of the present disclosure, before creating a Pod, the auxiliary address information of each RDMA network card is obtained based on the cloud server, and the auxiliary address information is stored in the network resource set corresponding to the RDMA network card. After the Pod is created, the RDMA network card can immediately use the cached auxiliary address information for communication without waiting for address allocation, thereby reducing communication delays.

[0075] Figure 5 The figure shows a schematic diagram of MAC address management based on the IPVlan algorithm. Figure 5 There are N Pods in the cluster, and each Pod has 8 virtual network cards corresponding to the primary network card and 8 RDMA network cards.

[0076] For any RDMA network card, the RDMA network card is virtualized based on the L3 model in the IPVlan algorithm to obtain the virtual network card of each RDMA network card and deploy the virtual network card to the Pod. In other words, each Pod has 8 virtual network cards allocated based on the IPVlan algorithm.

[0077] After the virtual network card is deployed in the Pod, the network resource set corresponding to the RDMA network card of the virtual network card is used, and the available auxiliary address information is obtained from the network resource set to configure the virtual network card according to the available auxiliary address information. Figure 5 There are N Pods in total, consuming 8*N available auxiliary address information. Since the primary network card also consumes auxiliary address information, the N Pods consume a total of 8*(N+1) auxiliary address information.

[0078] When the MAC address of the virtual network card needs to be determined, the RDMA network card to which each virtual network card belongs is determined, and the MAC address of the RDMA network card is read as the MAC address of the virtual network card.

[0079] Corresponding to the methods for determining the MAC address of the virtual network card provided in the above-mentioned embodiments, an embodiment of the present disclosure further provides a device for determining the MAC address of the virtual network card. Since the device for determining the MAC address of the virtual network card provided in the embodiment of the present disclosure corresponds to the methods for determining the MAC address of the virtual network card provided in the above-mentioned embodiments, the implementation methods of the above-mentioned methods for determining the MAC address of the virtual network card are also applicable to the device for determining the MAC address of the virtual network card provided in the embodiment of the present disclosure, and will not be described in detail in the following embodiments.

[0080] Figure 6 A schematic diagram of the structure of a device for determining a MAC address of a virtual network card provided in an embodiment of the present disclosure.

[0081] like Figure 6As shown, the device 600 for determining the MAC address of a virtual network card according to an embodiment of the present disclosure includes a creation module 601 , a deployment module 602 , a first determination module 603 and a second determination module 604 .

[0082] A creation module 601 is used to create N basic deployment units Pod, where N is an integer greater than or equal to 1;

[0083] A deployment module 602 is used to deploy virtual network cards of different RDMA network cards in each Pod;

[0084] The first determination module 603 is used to determine a virtual network card group belonging to the same RDMA network card from the virtual network cards deployed in the N Pods;

[0085] The second determination module 604 is used to determine the MAC address of the RDMA network card to which each virtual network card in the virtual network card group belongs.

[0086] In one embodiment of the present disclosure, the deployment module 602 is further used to: configure available auxiliary address information for the virtual network card; and update the address resolution protocol ARP table entry of the switch in the container network based on the available auxiliary address information and the MAC address.

[0087] In one embodiment of the present disclosure, the deployment module 602 is further used to: send an ARP update request to the upstream switch based on the available auxiliary address information, and add a correspondence between the available auxiliary address information and the MAC address in the ARP table entry based on the ARP update request.

[0088] In one embodiment of the present disclosure, the MAC table entries in the switch remain unchanged.

[0089] In one embodiment of the present disclosure, the creation module 601 is further used to: perform virtualization processing on the RDMA network card based on the L3 mode in the Internet Protocol address virtual local area network IPVlan algorithm to obtain a virtual network card of the RDMA network card.

[0090] In one embodiment of the present disclosure, the deployment module 602 is further used to: determine a network resource set of the RDMA network card, in which the auxiliary address information allocated to the RDMA network card has been cached; determine available auxiliary address information from the network resource set, and configure the virtual network card based on the available auxiliary address information.

[0091] In one embodiment of the present disclosure, the creation module 601 is further used to: obtain the auxiliary address information allocated by the cloud server to the RDMA network card; and cache the auxiliary address information in the network resource center of the RDMA network card.

[0092] In one embodiment of the present disclosure, the creation module 601 is also used to: call the high-performance computing HPC interface through the infrastructure as a service Iaas application program interface API to send an address application request to the cloud server; receive the auxiliary address information allocated to the RDMA network card from the cloud server.

[0093] In one embodiment of the present disclosure, the deployment module 602 is further used to: determine the first auxiliary address information that has been used in the network resource set; determine the second auxiliary address information that is not used in the network resource set based on the first auxiliary address information; and select one from the second auxiliary address information as the available auxiliary address information.

[0094] In one embodiment of the present disclosure, the deployment module 602 is further used to: determine a first information domain of a network resource set, and write auxiliary address information into the first information domain; after configuring the virtual network card based on the available auxiliary address information, mark the available auxiliary address information as the first auxiliary address information that has been used, and write the available auxiliary address information into a second information domain of the network resource set; and read the second information domain to read the first auxiliary address information from the second information domain.

[0095] In one embodiment of the present disclosure, the deployment module 602 is further used to: in response to any auxiliary address information being used, determine that any auxiliary address information is the first auxiliary address information that has been used; write the first auxiliary address information into the second information domain in the network resource set, and delete the first auxiliary address information from the second information domain; select one from the second auxiliary address information currently remaining in the first information domain as the available auxiliary address information.

[0096] In one embodiment of the present disclosure, the deployment module 602 is further used to: in response to any auxiliary address information being used, determine that any auxiliary address information is the first auxiliary address information that has been used, and mark the status of any auxiliary address information; obtain the status mark of the auxiliary address information in the network resource set; determine the second auxiliary address information that is not used in the network resource set based on the status mark of the auxiliary address information; and select one from the second auxiliary address information as the available auxiliary address information.

[0097] According to the device for determining the MAC address of the virtual network card provided by the embodiment of the present disclosure, N Pods are created, and different virtual network cards of different RDMA network cards are deployed in each Pod. The virtual network card group belonging to the same RDMA network card is further determined to determine the MAC address of the RDMA network card according to the virtual network card group. Multiple containers can be associated through Pod to share the same RDMA network card resources, thereby improving resource utilization. When the virtual network card shares the MAC address of the RDMA network card to which it belongs, the management of the MAC address can be simplified and the network communication efficiency can be improved.

[0098] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0099] 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.

[0100] Figure 7 A schematic block diagram of an example electronic device 700 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.

[0101] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program / instruction stored in a read-only memory (ROM) 702 or a computer program / instruction loaded from a storage unit 706 to a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0102] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706 such as a keyboard, a mouse, etc.; an output unit 707 such as various types of displays, speakers, etc.; a storage unit 708 such as a disk, an optical disk, etc.; and a communication unit 709 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0103] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 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 701 performs the various methods and processes described above, such as a method for determining a MAC address of a virtual network card. For example, in some embodiments, the method for determining a MAC address of a virtual network card may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 706. In some embodiments, part or all of the computer program / instructions may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program / instructions are loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the method for determining the MAC address of the virtual network card described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to execute the method for determining the MAC address of the virtual network card in any other appropriate manner (for example, by means of firmware).

[0104] 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 / instructions 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.

[0105] 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.

[0106] 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.

[0107] 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).

[0108] The systems and techniques described herein can be implemented in a computing system that includes backend 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 frontend 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 backend components, middleware components, or frontend components. The components of the system can 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), the Internet, and a blockchain network.

[0109] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs / instructions running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0110] 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 the disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in the disclosure can be achieved, and this document does not limit them here.

[0111] 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 method for determining a media access control MAC address of a virtual network card, characterized in that: The method comprises: Create N basic deployment unit Pods, where N is an integer greater than or equal to 1; For each of the Pods, deploying virtual network cards of different RDMA network cards in the Pod; Determine a virtual network card group belonging to the same RDMA network card from the virtual network cards deployed in the N Pods; Determine the MAC address of the RDMA network card to which each virtual network card in the virtual network card group belongs.

2. The method according to claim 1, wherein: After deploying the virtual network cards of different RDMA network cards in the Pod, the method further includes: Configuring available auxiliary address information for the virtual network card; Based on the available auxiliary address information and the MAC address, an Address Resolution Protocol ARP table entry of a switch in the container network is updated.

3. The method according to claim 2, wherein: The updating of the address resolution protocol ARP table entry of the switch in the container network based on the available auxiliary address information and the MAC address includes: Based on the available auxiliary address information, an ARP update request is sent to the upstream switch, and based on the ARP update request, a correspondence between the available auxiliary address information and the MAC address is added to the ARP table entry.

4. The method according to claim 2, wherein: The MAC table entries in the switch remain unchanged.

5. The method according to any one of claims 1 to 4, wherein: Before creating N basic deployment unit Pods, the following steps are also included: Based on the L3 mode in the Internet Protocol address virtual local area network (IPVlan) algorithm, the RDMA network card is virtualized to obtain a virtual network card of the RDMA network card.

6. The method according to any one of claims 2 to 4, wherein: The configuring available auxiliary address information for the virtual network card includes: Determine a network resource set of the RDMA network card, wherein auxiliary address information allocated to the RDMA network card has been cached in the network resource set; The available auxiliary address information is determined from the network resource set, and the virtual network card is configured based on the available auxiliary address information.

7. The method according to claim 6, wherein: Before creating N basic deployment unit Pods, the following steps are also included: Obtain the auxiliary address information allocated by the cloud server to the RDMA network card; The auxiliary address information is centrally cached in the network resource of the RDMA network card.

8. The method according to claim 7, wherein: The obtaining the auxiliary address information allocated by the cloud server to the RDMA network card includes: Call the high-performance computing (HPC) interface through the Infrastructure as a Service (Iaas) application program interface (API) to send an address application request to the cloud server; Receive the auxiliary address information allocated to the RDMA network card sent by the cloud server.

9. The method according to claim 6, wherein: The determining the available auxiliary address information from the network resource set includes: Determine the first auxiliary address information that has been used in the network resource set; Determining, according to the first auxiliary address information, unused second auxiliary address information in the network resource set; One is selected from the second auxiliary address information as the available auxiliary address information.

10. The method according to claim 9, wherein: The method further comprises: Determine a first information field of the network resource set, and write the auxiliary address information into the first information field; After configuring the virtual network card based on the available auxiliary address information, marking the available auxiliary address information as first auxiliary address information that has been used, and writing the available auxiliary address information into the second information field of the network resource set; The second information field is read to read the first auxiliary address information from the second information field.

11. The method according to claim 9, wherein: The method further comprises: In response to any one of the auxiliary address information being used, determining the any one of the auxiliary address information as first auxiliary address information that has been used; Writing the first auxiliary address information into a second information field in the network resource set, and deleting the first auxiliary address information from the second information field; One of the second auxiliary address information currently remaining in the first information field is selected as the available auxiliary address information.

12. The method according to claim 9, wherein: The method further comprises: In response to any one of the auxiliary address information being used, determining that the any one of the auxiliary address information is the first auxiliary address information that has been used, and marking a status of the any one of the auxiliary address information; Acquire the status mark of the auxiliary address information in the network resource set; Determining unused second auxiliary address information in the network resource set according to the state mark of the auxiliary address information; One is selected from the second auxiliary address information as the available auxiliary address information.

13. A device for determining a media access control MAC address of a virtual network card, characterized in that: The device comprises: The creation module is used to create N basic deployment units Pod, where N is an integer greater than or equal to 1; A deployment module, used for deploying virtual network cards of different RDMA network cards in each Pod; A first determination module is used to determine a virtual network card group belonging to the same RDMA network card from the virtual network cards deployed in the N Pods; The second determination module is used to determine the MAC address of the RDMA network card to which each virtual network card in the virtual network card group belongs.

14. The device according to claim 13, wherein: The deployment module is further used to: Configuring available auxiliary address information for the virtual network card; Based on the available auxiliary address information and the MAC address, an Address Resolution Protocol ARP table entry of a switch in the container network is updated.

15. The device according to claim 14, wherein: The deployment module is further used to: Based on the available auxiliary address information, an ARP update request is sent to the upstream switch, and based on the ARP update request, a correspondence between the available auxiliary address information and the MAC address is added to the ARP table entry.

16. The device according to claim 14, wherein: The MAC table entries in the switch remain unchanged.

17. The device according to any one of claims 13 to 16, wherein: The creation module is also used to: Based on the L3 mode in the Internet Protocol address virtual local area network (IPVlan) algorithm, the RDMA network card is virtualized to obtain a virtual network card of the RDMA network card.

18. The device according to any one of claims 14 to 16, wherein: The deployment module is further used to: Determine a network resource set of the RDMA network card, wherein auxiliary address information allocated to the RDMA network card has been cached in the network resource set; The available auxiliary address information is determined from the network resource set, and the virtual network card is configured based on the available auxiliary address information.

19. The device according to claim 18, wherein: The creation module is also used to: Obtain the auxiliary address information allocated by the cloud server to the RDMA network card; The auxiliary address information is centrally cached in the network resource of the RDMA network card.

20. The device according to claim 19, wherein The creation module is also used to: Call the high-performance computing (HPC) interface through the Infrastructure as a Service (Iaas) application program interface (API) to send an address application request to the cloud server; Receive the auxiliary address information allocated to the RDMA network card sent by the cloud server.

21. The device according to claim 18, wherein The deployment module is further used to: Determine the first auxiliary address information that has been used in the network resource set; Determining, according to the first auxiliary address information, unused second auxiliary address information in the network resource set; One is selected from the second auxiliary address information as the available auxiliary address information.

22. The device according to claim 21, wherein The deployment module is further used to: Determine a first information field of the network resource set, and write the auxiliary address information into the first information field; After configuring the virtual network card based on the available auxiliary address information, marking the available auxiliary address information as first auxiliary address information that has been used, and writing the available auxiliary address information into the second information field of the network resource set; The second information field is read to read the first auxiliary address information from the second information field.

23. The device according to claim 21, wherein The deployment module is further used to: In response to any one of the auxiliary address information being used, determining the any one of the auxiliary address information as first auxiliary address information that has been used; Writing the first auxiliary address information into a second information field in the network resource set, and deleting the first auxiliary address information from the second information field; One of the second auxiliary address information currently remaining in the first information field is selected as the available auxiliary address information.

24. The device according to claim 21, wherein The deployment module is further used to: In response to any one of the auxiliary address information being used, determining that the any one of the auxiliary address information is the first auxiliary address information that has been used, and marking a status of the any one of the auxiliary address information; Acquire the status mark of the auxiliary address information in the network resource set; Determining unused second auxiliary address information in the network resource set according to the state mark of the auxiliary address information; One is selected from the second auxiliary address information as the available auxiliary address information.

25. An electronic device comprising: 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 12.

26. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-12.

27. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.