Message transmission system, method, device and cluster
By detecting the remote MTU in the virtual switch and generating adapter flow table entries, the packet drop problem caused by MTU mismatch in the virtual switch is solved, and reliable message transmission under the condition of offloading hardware is achieved.
Patent Information
- Application Number
- CN202411344104.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2025-01-03
AI Technical Summary
In a virtual switch (OVS), when the maximum transmission unit (MTU) of the devices on both ends of the communication does not match, the data packet is discarded, and the prior art is difficult to solve this problem under the condition of unloading hardware.
The processor detects the largest transmission unit of the remote end, compares the MTUs of the local end and the remote end, and generates different flow table entries based on the comparison results, and stores them in the unloading hardware to ensure that the MTUs of the remote end are matched during message transmission and avoid discarding .
It effectively avoids packet transmission failures caused by MTU mismatch, ensures that data packets can be transmitted normally, and improves the reliability and efficiency of data forwarding.
Smart Images

Figure CN119254728A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the computer field, and in particular to a message transmission system, method, device and cluster. Background Art
[0002] With the development of cloud computing networks, the amount of forwarded data is increasing. Forwarding massive amounts of data is a huge challenge for virtual switches (Open vSwitch, OVS). Simply relying on virtual switch forwarding can no longer meet the current growing business needs. In order to solve this problem, a dedicated forwarding chip is needed to carry data forwarding services. OVS / OVS+Data Plane Development Kit (DPDK) data forwarding is offloaded to hardware and came into being.
[0003] However, the offloaded data is directly forwarded to the destination according to the flow table entries in the offload hardware, and no longer needs to be forwarded through the virtual switch or other upper-layer software. However, if the maximum transmission unit (MTU) configured on the devices at both ends of the communication does not match, the data packet will be discarded. Summary of the invention
[0004] The present application provides a message transmission system, method, device and cluster, which can avoid mismatch between maximum transmission units between different ends under the condition of unloading hardware, thereby causing message transmission failure.
[0005] In a first aspect, a message transmission system is provided, including:
[0006] Offload hardware for storing flow tables;
[0007] A network card, used to query the flow table in the offloading hardware and provide hardware resources for network communication;
[0008] A processor, configured to communicate with the network card, run a virtual switch and a data plane development kit, wherein the virtual switch is a switch virtualized based on hardware resources of the processor, the network card and a memory, and the data plane development kit is configured to assist the virtual switch to improve the performance of the virtual switch;
[0009] The processor is also used to detect the maximum transmission unit of the remote end, compare the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, generate different flow table entries according to different comparison results, and store them in the offloading hardware.
[0010] In some possible designs, the processor is also used to generate a first flow table entry when the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, wherein the first flow table entry includes a matching item and a first action item, the matching item is used to match the message sent by the local end to the remote end, and the first action item is used to indicate that the message is sent through a designated port connected to the remote end.
[0011] In some possible designs, the processor is also used to generate a second flow table entry when the comparison result is that the maximum transmission unit of the local end is larger than the maximum transmission unit of the remote end, wherein the second flow table entry includes a matching item and a second action item, the matching item is used to match the message sent by the local end to the remote end, and the second action item is used to divide the message into multiple fragments and send the multiple fragments through a designated port connected to the remote end, and the length of each fragment in the multiple fragments is smaller than the maximum transmission unit of the remote end.
[0012] In some possible designs, the virtual switch is used to generate the first flow table entry, send the first flow table entry to the data plane development kit,
[0013] The data plane development kit is used to send the first flow table entry to the offloading hardware when the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end; and to modify the first action item in the first flow table entry to the second action item to obtain the second flow table entry when the comparison result is that the maximum transmission unit of the local end is greater than the maximum transmission unit of the remote end, thereby obtaining the second flow table entry, and send the second flow table entry to the offloading hardware.
[0014] In some possible designs, the processor is used to send a first detection message of a first length to the remote end, and upon receiving a rejection message sent by the remote end, send a second detection message of a second length shorter than the first length to the remote end, and so on, until a confirmation message sent by the remote end is received, and the length of the current detection message is used as the maximum transmission unit of the remote end.
[0015] In a second aspect, a message transmission method is provided, the method comprising:
[0016] By offloading the hardware storage flow table;
[0017] Querying the flow table in the offloading hardware through the network card to provide hardware resources for network communication;
[0018] Communicating with the network card through a processor, running a virtual switch and a data plane development kit, wherein the virtual switch is a switch virtualized based on hardware resources of the processor, the network card and memory, and the data plane development kit is used to assist the virtual switch to improve the performance of the virtual switch;
[0019] The maximum transmission unit of the remote end is detected by the processor, and the maximum transmission unit of the local end is compared with the maximum transmission unit of the remote end to obtain different comparison results, and different flow table entries are generated according to different comparison results and stored in the offloading hardware.
[0020] In some possible designs, a processor detects a maximum transmission unit of a remote end, compares the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, and generates different flow table entries according to different comparison results, including:
[0021] When the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, the processor generates a first flow table entry, wherein the first flow table entry includes a matching item and a first action item, the matching item is used to match the message sent by the local end to the remote end, and the first action item is used to indicate that the message is sent through a designated port connected to the remote end.
[0022] In some possible designs, a processor detects a maximum transmission unit of a remote end, compares the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, and generates different flow table entries according to different comparison results, including:
[0023] When the comparison result is that the maximum transmission unit of the local end is larger than the maximum transmission unit of the remote end, the processor generates a second flow table entry, wherein the second flow table entry includes a matching item and a second action item, the matching item is used to match the message sent by the local end to the remote end, and the second action item is used to divide the message into multiple fragments, and send the multiple fragments through a designated port connected to the remote end, and the length of each fragment in the multiple fragments is smaller than the maximum transmission unit of the remote end.
[0024] In some possible designs, a processor detects a maximum transmission unit of a remote end, compares the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, and generates different flow table entries according to different comparison results, including:
[0025] generating the first flow table entry by using the virtual switch, and sending the first flow table entry to the data plane development kit;
[0026] Through the data plane development kit, when the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, the first flow table entry is sent to the offloading hardware; when the comparison result is that the maximum transmission unit of the local end is greater than the maximum transmission unit of the remote end, the first action item in the first flow table entry is modified to the second action item to obtain the second flow table entry, and the second flow table entry is sent to the offloading hardware.
[0027] In some possible designs, the method further includes:
[0028] A first detection message of a first length is sent to the remote end through the processor, and when a rejection message sent by the remote end is received, a second detection message of a second length shorter than the first length is sent to the remote end, and so on, until a confirmation message sent by the remote end is received, and the length of the current detection message is used as the maximum transmission unit of the remote end.
[0029] In a third aspect, a computing device is provided, including a message transmission system and a storage unit, wherein the peripheral device interconnection expansion device speed limiting system and the storage unit can communicate with each other, and the message transmission system is a system as described in any one of the first aspects.
[0030] In a fourth aspect, a computing device cluster is provided, comprising a plurality of computing devices, at least one computing device comprising a message transmission system and a storage unit, the message transmission system and the storage unit being capable of communicating with each other, and the message transmission system being a system as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0032] Figure 1 It is a structural diagram of a software-defined network provided by this application;
[0033] Figure 2 It is a structural diagram of a message transmission system provided by the present application;
[0034] Figure 3 It is a flowchart of a message transmission method provided by the present application;
[0035] Figure 4 It is a structural schematic diagram of a computing device provided by this application. DETAILED DESCRIPTION
[0036] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention. The terms used in the implementation mode of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.
[0037] See also Figure 1 , Figure 1 Schematic diagram of the structure of a software defined network (SDN) provided by this application. Figure 1 As shown, the software defined network of the present application includes: an SDN controller 110 and an open virtual switch (open vSwitch, OVS) 120.
[0038] The SDN controller 110 is a core component in the SDN architecture, which is responsible for the centralized management and control of the entire network. The SDN controller separates the control plane of the network from the data plane, thereby providing a more flexible, programmable and scalable network management method. The main functions of the SDN controller include: managing the control plane of the entire network, including topology discovery, route calculation, flow table delivery, etc. Specifically, the SDN controller 110 collects the topology information of the network by communicating with OVS120, calculates the route according to the application requirements, and then delivers the flow table to OVS120. Secondly, the SDN controller 110 can dynamically adjust the network routing and traffic distribution according to the characteristics and requirements of the traffic, thereby achieving load balancing, congestion control and service quality assurance of the traffic; it can implement security measures such as access control, traffic filtering and intrusion detection, and respond to network security events in a timely manner to protect the network from malicious attacks and data leakage threats, etc. The SDN controller 110 can be a physical device or a virtual device. When the number of SDN controllers 110 is multiple, physical devices and virtual devices can also be used in combination. The SDN controller 110 can run in physical servers, virtual machines, containers, cloud platforms, and bare metal servers.
[0039] OVS120 is an open source virtual switch software that implements a flexible, programmable and scalable switch platform for communicating with the SDN controller through the OpenFlow protocol, receiving the flow table issued by the SDN controller 110, and implementing traffic forwarding and routing according to the flow table. OVS120 supports packet switching and routing in Layer 2 and Layer 3 networks, so OVS120 supports processing of Ethernet data frames and data packets, etc. OVS120 can run on physical servers, virtual machines, containers, cloud platforms, and bare metal servers. OVS120 can also be used in combination with physical switches, etc.
[0040] The SDN controller 110 and OVS120 can both be set in a container. In this case, the SDN controller 110 and OVS120 can be concentrated in the same container or distributed in different containers. The SDN controller 110 and OVS120 can both be set in a virtual machine. In this case, the SDN controller 110 and OVS120 can be concentrated in the same virtual machine or distributed in different virtual machines. The SDN controller 110 and OVS120 can both be set in a server. In this case, the SDN controller 110 and OVS120 can be concentrated in the same server or distributed in different servers. The SDN controller 110 and OVS120 can both be set in a bare metal server. In this case, the SDN controller 110 and OVS120 can be concentrated in the same bare metal server or distributed in different bare metal servers. Alternatively, the SDN controller 110 is set in a container, and OVS120 is set in any one of a virtual machine, a server, and a bare metal server. The SDN controller 110 is set in the virtual machine, and the OVS 120 is set in any one of the container, the server, and the bare metal server. The SDN controller 110 is set in the server, and the OVS 120 is set in any one of the container, the virtual machine, and the bare metal server. The SDN controller 110 is set in the bare metal server, and the OVS 120 is set in any one of the container, the virtual machine, and the server.
[0041] The message of the local end can be forwarded to the remote end through the above software defined network. Among them, the local end can be integrated with at least one of OVS120 and SDN controller 110 in the same server. The remote end can also be integrated with at least one of OVS120 and SDN controller 110 in the same server.
[0042] The above OVS120 is usually virtualized using computing resources (e.g., processor), storage resources, and network resources (e.g., network card) of computing devices, and in order to improve the forwarding performance of OVS120, it is often necessary to set up offloading hardware for acceleration. Therefore, the processor, offloading hardware, and network card can form a message transmission system.
[0043] In the above example, the controller is an SDN controller and the forwarding device is OVS. In actual applications, the controller can also be other open source controllers such as OpenStack, Kubernetes, etc. In addition, the controller can also be a privately developed controller, and the forwarding device can also be other privately developed forwarding devices, etc., which are not specifically limited here.
[0044] See also Figure 2 , Figure 2 This is a schematic diagram of the structure of a message transmission system provided by this application. Figure 2 As shown, the message transmission system of the present application includes a processor 11, offloading hardware 12 and a network card 13.
[0045] The processor 11 is used to communicate with the network card, run the virtual switch and the data plane development kit. The virtual switch is a switch virtualized based on the hardware resources of the processor, the network card and the memory. The data plane development kit is used to assist the virtual switch to improve the performance of the virtual switch. The processor 11 is a computing core and a control core, which can handle complex situations. The processor 11 can be a very large-scale integrated circuit. An operating system and other software programs are installed in the processor 11, so that the processor 11 can access the memory and various PCIE devices. The processor 11 can quickly access the memory through the on-chip bus. The processor 11 may include one or more processor cores. In one implementation, the processor 11 may be a multi-core chip, that is, a chip containing multiple processing cores. In another implementation, the processor 11 may include one or more processor cores. It can be a chip with one processing core. OVS and the Data Plane Development Kit (DPDK) can be run in the processor 11. For an introduction to OVS, see Figure 1 The relevant description in . OVS is also not efficient in reading memory. DPDK's lightweight library function uses a very effective memory processing mechanism, that is, it uses a ring buffer to transmit data packets back and forth between the physical network card and the virtual switch using DPDK, thereby improving the overall performance of the system. OVS lacks optimization for the processing of high-speed data packets, which leads to the use of processors in many steps of the data packet processing process. Since the processor needs to handle multiple tasks, its availability (especially when overloaded) will have performance bottlenecks. In order to reduce the number of processor interrupts required for data packet reading, DPDK uses a periodic polling mechanism to periodically poll new data packets. If the packet rate drops to a very low value, it can be switched to interrupt mode instead of periodic polling mode. Through effective cache management, optimized minimum number of CPU interrupts and other enhanced features, DPDK can enable virtual switches to achieve near-native performance.
[0046] The offloading hardware 12 is usually used to store flow tables, etc. The offloading hardware 12 can use ternary content addressable memory (TCAM), dynamic random access memory (DRAM), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), data processing unit (DPU), etc. The offloading hardware 12 can also be other random access memories, such as static random access memory (SRAM), etc. This embodiment does not limit the number and type of offloading hardware 12. In addition, the offloading hardware 12 can be configured to have a power preservation function. The power preservation function means that when the system loses power and then powers on again, the data stored in the memory will not be lost.
[0047] The network card 13 is used to query the flow table in the unloading hardware and provide hardware resources for network communication. Because it has a Media Access Control Address (MAC) address, it belongs between Layer 1 and Layer 2 of the Open System Interconnection (OSI) model. It allows users to connect to each other via cables or wirelessly. Each network card has a unique 48-bit serial number called a MAC address, which is written in a read-only memory on the card. Here, the network card can be a Field Programmable Gate Array (FPGA) network card or an Application Specific Integrated Circuit (ASIC) network card, etc.
[0048] The processor is also used to detect the maximum transmission unit of the remote end, compare the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, generate different flow table entries according to different comparison results, and store them in the offloading hardware.
[0049] The process of the processor detecting the maximum transmission unit of the remote end may be: the processor sends a first detection message of a first length to the remote end, and when receiving a rejection message sent by the remote end, sends a second detection message of a second length shorter than the first length to the remote end, and so on, until receiving a confirmation message sent by the remote end, and taking the length of the current detection message as the maximum transmission unit of the remote end. In the above manner, the processor first assumes that the MTU of the remote end is large enough and sends a message of large enough. If the MTU of the remote end is smaller than the size of the message, the remote end will discard the message and send a rejection message to the local end. After receiving the rejection message, the processor at the local end will reduce the size of the message (usually to the next smaller MTU standard value), and then resend the message. Repeat the above steps until the message can successfully reach the destination without being discarded, at which time the processor determines the MTU size of the path. In addition, the processor can also send a request message to the remote end, wherein the request message is used to instruct the remote end to send its own MTU to the processor. After receiving the request message, the remote end encapsulates its own MTU in a response message and returns it.
[0050] The process in which the processor compares the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results and generates different flow table entries according to the different comparison results may be:
[0051] When the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, the processor generates a first flow table entry and sends the first flow table entry to the offload hardware for storage. The first flow table entry includes a matching item and a first action item, the matching item is used to match the message sent from the local end to the remote end, and the first action item is used to indicate that the message is sent out through the designated port connected to the remote end. More specifically, when the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, the virtual switch generates a first flow table entry, sends the first flow table entry to the data plane development kit, and the data plane development kit sends the first flow table entry to the offload hardware for storage.
[0052] When the comparison result shows that the maximum transmission unit of the local end is greater than the maximum transmission unit of the remote end, a second flow table entry is generated, and the second flow table entry is sent to the offload hardware for storage. The second flow table entry includes a matching item and a second action item, the matching item is used to match the message sent by the local end to the remote end, and the second action item is used to divide the message into multiple fragments, and send the multiple fragments through a designated port connected to the remote end, and the length of each fragment in the multiple fragments is less than the maximum transmission unit of the remote end. More specifically, when the comparison result shows that the maximum transmission unit of the local end is greater than the maximum transmission unit of the remote end, the virtual switch generates a first flow table entry, sends the first flow table entry to the data plane development kit, and the data plane development kit modifies the first action item in the first flow table entry into the second action item, thereby obtaining a second flow table entry, and sending the second flow table entry to the offload hardware process for storage.
[0053] If the first flow table entry is stored in the offloading hardware, when the local end sends a message to the remote end normally, the local end matches based on the matching item, thereby finding the first flow table entry from the offloading hardware, and then, according to the first action item in the first flow table entry, the message is sent out through the designated port connected to the remote end.
[0054] If the second flow table entry is stored in the offloading hardware, when the local end sends a message to the remote end normally, the local end matches based on the matching item, thereby finding the second flow table entry from the offloading hardware, and then, according to the second action item in the second flow table entry, the message is divided into multiple fragments, and the multiple fragments are sent out through the designated port connected to the remote end, and the length of each fragment in the multiple fragments is smaller than the maximum transmission unit of the remote end.
[0055] See also Figure 3 , Figure 3 This is a flow chart of a message transmission method provided by this application. Figure 3 As shown, the message transmission method of the present application includes:
[0056] S101: The flow table is stored by uninstalling hardware.
[0057] S102: querying the flow table in the offload hardware through the network card to provide hardware resources for network communication.
[0058] S103: Communicate with the network card through the processor to run the virtual switch and the data plane development kit. The virtual switch is a switch virtualized based on the hardware resources of the processor, the network card and the memory. The data plane development kit is used to assist the virtual switch to improve the performance of the virtual switch.
[0059] S104: Detect the maximum transmission unit of the remote end through the processor, compare the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, generate different flow table entries according to different comparison results, and store them in the offloading hardware.
[0060] The process of the processor detecting the maximum transmission unit of the remote end may be: the processor sends a first detection message of a first length to the remote end, and when receiving a rejection message sent by the remote end, sends a second detection message of a second length shorter than the first length to the remote end, and so on, until receiving a confirmation message sent by the remote end, and taking the length of the current detection message as the maximum transmission unit of the remote end. In the above manner, the processor first assumes that the MTU of the remote end is large enough and sends a message of large enough. If the MTU of the remote end is smaller than the size of the message, the remote end will discard the message and send a rejection message to the local end. After receiving the rejection message, the processor at the local end will reduce the size of the message (usually to the next smaller MTU standard value), and then resend the message. Repeat the above steps until the message can successfully reach the destination without being discarded, at which time the processor determines the MTU size of the path. In addition, the processor can also send a request message to the remote end, wherein the request message is used to instruct the remote end to send its own MTU to the processor. After receiving the request message, the remote end encapsulates its own MTU in a response message and returns it.
[0061] The process in which the processor compares the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results and generates different flow table entries according to the different comparison results may be:
[0062] When the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, the processor generates a first flow table entry and sends the first flow table entry to the offload hardware for storage. The first flow table entry includes a matching item and a first action item, the matching item is used to match the message sent from the local end to the remote end, and the first action item is used to indicate that the message is sent out through the designated port connected to the remote end. More specifically, when the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, the virtual switch generates a first flow table entry, sends the first flow table entry to the data plane development kit, and the data plane development kit sends the first flow table entry to the offload hardware for storage.
[0063] When the comparison result shows that the maximum transmission unit of the local end is greater than the maximum transmission unit of the remote end, a second flow table entry is generated, and the second flow table entry is sent to the offload hardware for storage. The second flow table entry includes a matching item and a second action item, the matching item is used to match the message sent by the local end to the remote end, and the second action item is used to divide the message into multiple fragments, and send the multiple fragments through a designated port connected to the remote end, and the length of each fragment in the multiple fragments is less than the maximum transmission unit of the remote end. More specifically, when the comparison result shows that the maximum transmission unit of the local end is greater than the maximum transmission unit of the remote end, the virtual switch generates a first flow table entry, sends the first flow table entry to the data plane development kit, and the data plane development kit modifies the first action item in the first flow table entry into the second action item, thereby obtaining a second flow table entry, and sending the second flow table entry to the offload hardware process for storage.
[0064] If the first flow table entry is stored in the offloading hardware, when the local end sends a message to the remote end normally, the local end matches based on the matching item, thereby finding the first flow table entry from the offloading hardware, and then, according to the first action item in the first flow table entry, the message is sent out through the designated port connected to the remote end.
[0065] If the second flow table entry is stored in the offloading hardware, when the local end sends a message to the remote end normally, the local end matches based on the matching item, thereby finding the second flow table entry from the offloading hardware, and then, according to the second action item in the second flow table entry, the message is divided into multiple fragments, and the multiple fragments are sent out through the designated port connected to the remote end, and the length of each fragment in the multiple fragments is smaller than the maximum transmission unit of the remote end.
[0066] See also Figure 4 , Figure 4 4 is a schematic diagram of a computing device provided by the present application. The computing device 400 includes: one or more processing units 410 , a communication interface 420 and a storage unit 430 .
[0067] The processing unit 410, the communication interface 420 and the storage unit 430 are interconnected via a bus 440. Optionally, the computing device 400 may also include an input / output interface 450, which is connected to an input / output device for receiving parameters set by a user, etc. The computing device 400 can be used to implement some or all of the functions of the device embodiment or system embodiment in the above-mentioned embodiment of the present application; the processing unit 410 can also be used to implement some or all of the operation steps of the method embodiment in the above-mentioned embodiment of the present application. For example, the specific implementation of the various operations performed by the computing device 400 can refer to the specific details in the above-mentioned embodiment, such as the processing unit 410 is used to perform some or all of the steps in the above-mentioned method embodiment or some or all of the operations in the above-mentioned method embodiment. For another example, in the embodiment of the present application, the computing device 400 can be used to implement some or all of the functions of one or more components in the above-mentioned device embodiment, and the communication interface 420 can be specifically used for the communication functions necessary to implement the functions of these devices and components, and the processing unit 410 can be specifically used for the processing functions necessary to implement the functions of these devices and components, etc.
[0068] Figure 4 The computing device 400 may include one or more processing units 410, and the multiple processing units 410 may provide processing capabilities in a coordinated manner in a parallel connection manner, a serial connection manner, a serial-parallel connection manner, or any connection manner, or the multiple processing units 410 may constitute a processor sequence or a processor array, or the multiple processing units 410 may be divided into a main processor and an auxiliary processor, or the multiple processing units 410 may have different architectures such as a heterogeneous computing architecture. In addition, Figure 4 The computing device 400 shown in the figure, and the related structural description and functional description are exemplary and non-limiting. In some exemplary embodiments, the computing device 400 may include Figure 4 More or fewer components may be shown, or some components may be combined or separated, or may have a different arrangement of components.
[0069] The processing unit 410 may have a variety of specific implementation forms. For example, the processing unit 410 may include a central processing unit (CPU), a graphic processing unit (GPU), a neural-network processing unit (NPU), a tensor processing unit (TPU) or a data processing unit (DPU), etc., and the embodiment of the present application does not specifically limit it. The processing unit 410 may also be a single-core processor or a multi-core processor. The processing unit 410 may be a combination of a CPU and a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The processing unit 410 may also be implemented using a logic device with built-in processing logic alone, such as an FPGA or a digital signal processor (DSP). The communication interface 420 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface may be a cellular network interface or a wireless local area network interface, etc.
[0070] The storage unit 430 may be a non-volatile memory, such as a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The storage unit 430 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). The storage unit 430 may also be used to store program codes and data, so that the processing unit 410 can call the program codes stored in the storage unit 430 to execute some or all of the operation steps in the above method embodiment, or to execute the corresponding functions in the above device embodiment. Figure 4 Show more or fewer components, or have different component configurations.
[0071] The bus 440 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 440 may be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 440 may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0072] The present application also provides a system, which includes multiple computing devices, and the structure of each computing device can refer to the structure of the computing device described above. The functions or operations that can be implemented by the system can refer to the specific implementation steps in the above method embodiment and / or the specific functions described in the above device embodiment, which will not be repeated here.
[0073] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one network site, computer, server or data center to another network site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer, or it can be a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape, etc.), an optical medium (e.g., a DVD, etc.), or a semiconductor medium (e.g., a solid-state hard disk), etc. In the above embodiments, the description of each embodiment has different emphases. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
Claims
1. A message transmission system, characterized in that: include: Offload hardware for storing flow tables; A network card, used to query the flow table in the offloading hardware and provide hardware resources for network communication; A processor, configured to communicate with the network card, run a virtual switch and a data plane development kit, wherein the virtual switch is a switch virtualized based on hardware resources of the processor, the network card and a memory, and the data plane development kit is configured to assist the virtual switch to improve the performance of the virtual switch; The processor is also used to detect the maximum transmission unit of the remote end, compare the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, generate different flow table entries according to different comparison results, and store them in the offloading hardware.
2. The system according to claim 1, characterized in that The processor is also used to generate a first flow table entry when the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, wherein the first flow table entry includes a matching item and a first action item, the matching item is used to match the message sent by the local end to the remote end, and the first action item is used to instruct the message to be sent out through a designated port connected to the remote end.
3. The system according to claim 2, characterized in that The processor is also used to generate a second flow table entry when the comparison result is that the maximum transmission unit of the local end is larger than the maximum transmission unit of the remote end, wherein the second flow table entry includes a matching item and a second action item, the matching item is used to match the message sent by the local end to the remote end, and the second action item is used to divide the message into multiple fragments and send the multiple fragments through a designated port connected to the remote end, and the length of each of the multiple fragments is smaller than the maximum transmission unit of the remote end.
4. The system according to claim 3, characterized in that The virtual switch is used to generate the first flow table entry and send the first flow table entry to the data plane development kit, The data plane development kit is used to send the first flow table entry to the offloading hardware when the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end; and to modify the first action item in the first flow table entry to the second action item to obtain the second flow table entry when the comparison result is that the maximum transmission unit of the local end is greater than the maximum transmission unit of the remote end, thereby obtaining the second flow table entry, and send the second flow table entry to the offloading hardware.
5. The system according to any one of claims 1 to 4, characterized in that: The processor is used to send a first detection message of a first length to the remote end, and upon receiving a rejection message sent by the remote end, send a second detection message of a second length shorter than the first length to the remote end, and so on, until a confirmation message sent by the remote end is received, and use the length of the current detection message as the maximum transmission unit of the remote end.
6. A message transmission method, characterized in that: The method comprises: By offloading the hardware storage flow table; Querying the flow table in the offloading hardware through the network card to provide hardware resources for network communication; Communicating with the network card through a processor, running a virtual switch and a data plane development kit, wherein the virtual switch is a switch virtualized based on hardware resources of the processor, the network card and memory, and the data plane development kit is used to assist the virtual switch to improve the performance of the virtual switch; The maximum transmission unit of the remote end is detected by the processor, and the maximum transmission unit of the local end is compared with the maximum transmission unit of the remote end to obtain different comparison results, and different flow table entries are generated according to different comparison results and stored in the offloading hardware.
7. The method according to claim 6, characterized in that The processor detects the maximum transmission unit of the remote end, compares the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, and generates different flow table entries according to different comparison results, including: When the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, the processor generates a first flow table entry, wherein the first flow table entry includes a matching item and a first action item, the matching item is used to match the message sent by the local end to the remote end, and the first action item is used to indicate that the message is sent through a designated port connected to the remote end.
8. The method according to claim 6, characterized in that The processor detects the maximum transmission unit of the remote end, compares the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, and generates different flow table entries according to different comparison results, including: When the comparison result is that the maximum transmission unit of the local end is larger than the maximum transmission unit of the remote end, the processor generates a second flow table entry, wherein the second flow table entry includes a matching item and a second action item, the matching item is used to match the message sent by the local end to the remote end, and the second action item is used to divide the message into multiple fragments, and send the multiple fragments through a designated port connected to the remote end, and the length of each fragment in the multiple fragments is smaller than the maximum transmission unit of the remote end.
9. The method according to claim 8, characterized in that The processor detects the maximum transmission unit of the remote end, compares the maximum transmission unit of the local end with the maximum transmission unit of the remote end to obtain different comparison results, and generates different flow table entries according to different comparison results, including: generating the first flow table entry by using the virtual switch, and sending the first flow table entry to the data plane development kit; Through the data plane development kit, when the comparison result is that the maximum transmission unit of the local end is less than or equal to the maximum transmission unit of the remote end, the first flow table entry is sent to the offloading hardware; when the comparison result is that the maximum transmission unit of the local end is greater than the maximum transmission unit of the remote end, the first action item in the first flow table entry is modified to the second action item to obtain the second flow table entry, and the second flow table entry is sent to the offloading hardware.
10. The method according to any one of claims 6 to 9, characterized in that: The method further comprises: A first detection message of a first length is sent to the remote end through the processor, and when a rejection message sent by the remote end is received, a second detection message of a second length shorter than the first length is sent to the remote end, and so on, until a confirmation message sent by the remote end is received, and the length of the current detection message is used as the maximum transmission unit of the remote end.
11. A computing device, characterized in that: It comprises a message transmission system and a storage unit, the peripheral device interconnection expansion equipment speed limiting system and the storage unit can communicate with each other, and the message transmission system is a system as described in any one of claims 1-5.
12. A computing device cluster, characterized in that: It comprises a plurality of computing devices, at least one computing device comprises a message transmission system and a storage unit, the message transmission system and the storage unit are capable of communicating with each other, and the message transmission system is a system as described in any one of claims 1-5.
