Information configuration method, device, equipment and storage medium
By setting up the protocol stack and message processing block in the data processor, and using the host CPU and DPU to interact to complete the IKE negotiation, the problem of excessive CPU resource usage during the IKE negotiation process of the traditional IPSec VPN device is solved, and the processing performance and stability are improved. .
Patent Information
- Application Number
- CN202311810485.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2043-12-26
AI Technical Summary
Traditional IPSec VPN devices occupy a large amount of host CPU resources during the IKE negotiation process, resulting in performance degradation and low service processing efficiency. Especially when multiple VPNs are established concurrently, the working stability of the DPU is affected.
By setting up the protocol stack and message processing block in the data processor, the negotiation message sent by the Internet key exchange application is obtained, and forwarded to the message processing block, and the interaction between the host CPU and DPU is used to complete the IKE negotiation. work to reduce the negotiation pressure on the DPU.
Effectively balances the processing pressure between the host CPU and DPU, avoids a large number of IKE negotiation tasks from affecting the working stability of the DPU, and improves the processing performance of IKE negotiation.
Smart Images

Figure CN117811787B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an information configuration method, device, equipment and storage medium. Background Art
[0002] In order to realize the secure networking and interconnection between different networks, the Internet Protocol Security Virtual Private Network (IPSec VPN) based on the Internet Security Protocol is the most widely deployed mainstream technology, which can realize the remote interconnection of private networks on the basis of fully ensuring the confidentiality and integrity of data. Traditional IPSec VPN equipment usually adopts the solution of the central processing unit (CPU) and the network interface card working together. The network interface card is responsible for the sending and receiving of network messages, and the CPU provides VPN network message processing capabilities, including encryption and decryption of messages, encapsulation and decapsulation operations, and the completion of the initial negotiation process based on the Internet Key Exchange (IKE) protocol. However, the above method requires a large amount of host CPU processing resources, which not only affects the host performance, but also leads to low efficiency in IPSec business processing.
[0003] In order to reduce the processing pressure of the CPU, a data processor (DPU) is generally set up to replace the work of the CPU and the network interface card, and the work of the data plane and control plane in IPSec is offloaded to the DPU. The CPU on the DPU executes all the tasks originally performed by the host CPU. However, during the execution of tasks by the CPU on the DPU, the negotiation process based on the IKE protocol is relatively complicated, and the concurrency pressure is relatively large when many VPNs are established at the same time. Although the data processing chip in the DPU has strong data processing capabilities, the CPU in the DPU often has poor performance. A large amount of IKE negotiation pressure will affect the overall working stability of the DPU. Summary of the invention
[0004] In order to solve the above technical problems, the present disclosure provides an information configuration method, apparatus, device and storage medium.
[0005] A first aspect of an embodiment of the present disclosure provides an information configuration method, which is applicable to a data processor, wherein the data processor includes a protocol stack and a message processing block, and the method includes:
[0006] Acquire a first negotiation message sent by an Internet key exchange application based on the protocol stack, and forward the first negotiation message to the message processing block, the Internet key exchange application being deployed in a central processor of a host connected to the data processor;
[0007] Sending the first negotiation message to the target device based on the message processing block, receiving the second negotiation message returned by the target device, and sending the second negotiation message to the protocol stack;
[0008] Based on the protocol stack, the second negotiation message is forwarded to the Internet key exchange application, and security configuration information sent by the Internet key exchange application is received, and the security configuration information is sent down to the message processing block, so that the message processing block completes the Internet security protocol configuration based on the security configuration information.
[0009] A second aspect of an embodiment of the present disclosure provides an information configuration device, which is applicable to a data processor, wherein the data processor includes a protocol stack and a message processing block, and the device includes:
[0010] a first sending module, configured to obtain a first negotiation message sent by an Internet key exchange application based on the protocol stack, and forward the first negotiation message to the message processing block, wherein the Internet key exchange application is deployed in a central processor of a host connected to the data processor;
[0011] a second sending module, configured to send the first negotiation message to a target device based on the message processing block, receive a second negotiation message returned by the target device, and send the second negotiation message to the protocol stack;
[0012] The third sending module is used to forward the second negotiation message to the Internet key exchange application based on the protocol stack, receive security configuration information sent by the Internet key exchange application, and send the security configuration information to the message processing block so that the message processing block completes the Internet security protocol configuration based on the security configuration information.
[0013] A third aspect of an embodiment of the present disclosure provides a computer device, including a memory and a processor, and a computer program, wherein the computer program is stored in the memory, and when the computer program is executed by the processor, the information configuration method of the first aspect described above is implemented.
[0014] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the information configuration method of the first aspect described above is implemented.
[0015] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0016] In the information configuration method, apparatus, device and storage medium provided in the embodiments of the present disclosure, a first negotiation message sent by an Internet key exchange application is obtained based on a protocol stack, and the first negotiation message is forwarded to a message processing block. The Internet key exchange application is deployed in a central processor of a host connected to a data processor. The first negotiation message is sent to a target device based on the message processing block, and a second negotiation message returned by the target device is received. The second negotiation message is sent to the protocol stack, and the second negotiation message is forwarded to the Internet key exchange application based on the protocol stack. The security configuration information sent by the Internet key exchange application is received, and the security configuration information is sent to the message processing block, so that the message processing block completes the Internet security protocol configuration based on the security configuration information. The Internet key exchange application can be set in the host CPU, and the first negotiation message can be sent and received by using the interaction between the host and the DPU and the message transmission capability managed by the DPU, so that the IKE negotiation work is completed based on the better processing performance of the host CPU, and other work is still completed by the DPU, which can balance the processing pressure between the host CPU and the DPU, and avoid a large number of IKE negotiation tasks affecting the overall work stability of the DPU. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0018] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 is a flow chart of an information configuration method provided by an embodiment of the present disclosure;
[0020] Figure 2 is an application scenario diagram provided by an embodiment of the present disclosure;
[0021] Figure 3 is a flow chart of a method for receiving a data packet provided by an embodiment of the present disclosure;
[0022] Figure 4 is a flowchart of another method for receiving a data packet provided by an embodiment of the present disclosure;
[0023] Figure 5is a flow chart of a method for sending a data packet provided by an embodiment of the present disclosure;
[0024] Figure 6 is a flowchart of another method for sending a data packet provided by an embodiment of the present disclosure;
[0025] Figure 7 is a structural diagram of an information configuration device provided by an embodiment of the present disclosure;
[0026] Figure 8 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0029] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0030] Figure 1 1 is a flowchart of an information configuration method provided by an embodiment of the present disclosure. The method can be executed by an information configuration device. The information configuration device can be set in a data processor. The data processor includes a protocol stack and a message processing block. Figure 1 As shown, the information configuration method provided in this embodiment includes the following steps:
[0031] S101. Acquire a first negotiation message sent by an Internet key exchange application based on a protocol stack, and forward the first negotiation message to a message processing block, where the Internet key exchange application is deployed in a central processor of a host connected to a data processor.
[0032] The protocol stack in the disclosed embodiment is also called a protocol stack, which is a specific software implementation of a computer network protocol suite, including multiple layers of network protocols, such as Socket, TCP / UDP, IP, Ethernet, etc. The protocol stack can parse the message layer by layer and pass it to the corresponding processing module. Optionally, when the Internet Protocol Security Virtual Private Network (IPSec VPN) based on the Internet Security Protocol is unloaded from the host device to the data processing unit (DPU) device, the protocol stack is unloaded to the SOC on the DPU, and can be specifically unloaded to the central processing unit (CPU) in the SOC.
[0033] The message processing block in the embodiment of the present disclosure can be understood as a module for processing messages. Optionally, in order to realize IPSec related functions, the message processing block can include basic layer 2 and layer 3 message processing blocks and IPSec message processing blocks. The message processing block can be set in the data processing chip on the DPU.
[0034] The Internet Key Exchange application in the disclosed embodiment can be understood as an application for performing Internet Key Exchange (IKE) protocol related work, specifically an application for performing negotiation on encryption protocols, hash functions, encapsulation protocols, encapsulation modes, key validity periods and other information based on the IKE protocol. During the negotiation process, multiple message exchanges will be performed with the target device. The contents of the messages transmitted in the multiple exchanges are different, but the transmission paths and modes are the same. In order to realize the unloading of the IPSec processing function, a protocol stack and a message processing block are set on the DPU. If the message generated by the IKE application is to be sent to the protocol stack on the DPU, a dynamic library needs to be set in the IKE application, and the host side protocol stack is bypassed by preloading the dynamic library, so that the IKE application can send the message to the protocol stack on the DPU.
[0035] The first negotiation message in the disclosed embodiment may be a negotiation message generated by an IKE application based on information configured by the user, such as the IP address of the destination device, the encryption and decryption algorithm used by the target, the key, the key validity period, and other information. The content of the first negotiation message generated by the IKE application may be different at different stages of the negotiation.
[0036] In the disclosed embodiment, when it is necessary to perform IKE negotiation with the target device, the IKE application deployed on the host CPU will send a first negotiation message to the protocol stack deployed on the DPU. After obtaining the first negotiation message, the protocol stack will forward it to the message processing block on the DPU, specifically to the second and third layer message processing blocks, wherein the protocol stack on the DPU and the message processing block can be connected via a high-speed serial computer expansion bus (Peripheral Component Interconnect Express, PCIE), and then perform message transmission based on PCIE.
[0037] In an exemplary implementation of the disclosed embodiment, a first random access memory is deployed in a host, a second random access memory is deployed in a data processor, data synchronization is maintained between the first random access memory and the second random access memory, and the information configuration device can obtain the first negotiation message in the second random access memory based on the protocol stack after the Internet key exchange application sends the first negotiation message to the first random access memory.
[0038] Figure 2 This is an application scenario diagram provided by the embodiment of the present disclosure. Figure 2 Provide explanation.
[0039] like Figure 2 As shown, the first random access memory in the host and the second random access memory in the DPU are connected through PCIE, and a flexible direct memory access device (Flexible-Direct Memory Access Device, F-DMA Device) is respectively provided in the host and the DPU. The IKE application in the host needs to forward the first negotiation message to the protocol stack in the DPU. To achieve the above process, a dynamic library can be set inside the IKE application, and the kernel protocol stack on the host side is bypassed by preloading the dynamic library, and the first negotiation message is written to the F-DMA device in the host, and the F-DMA device in the host sends the first negotiation message to the first random access memory. The first random access memory synchronizes the first negotiation message to the second random access memory based on PCIE, and the F-DMA device in the DPU obtains the first negotiation message from the second random access memory, and then sends the first negotiation message to the protocol stack in the DPU, so that the protocol stack obtains the first negotiation message in the second random access memory.
[0040] S102: Send a first negotiation message to a target device based on a message processing block, receive a second negotiation message returned by the target device, and send the second negotiation message to a protocol stack.
[0041] The target device in the embodiment of the present disclosure can be understood as other IPSec VPN devices that need to perform IKE negotiation.
[0042] The second negotiation message in the disclosed embodiment can be understood as a message returned by the target device after receiving the first negotiation message. The negotiation process requires multiple message exchanges with the target device. The content of the second negotiation message is different at different stages of the negotiation.
[0043] In the embodiment of the present disclosure, the information configuration device can forward the first negotiation message to the message processing block based on the protocol stack, and then send the first negotiation message to the target device based on the message processing block. Specifically, the first negotiation message can be sent to the target device through the network interface set on the DPU, and the second negotiation message returned by the target device after receiving the first negotiation message can be received, and the second negotiation message can be sent to the protocol stack.
[0044] S103: forwarding the second negotiation message to the Internet key exchange application based on the protocol stack, receiving security configuration information sent by the Internet key exchange application, and sending the security configuration information to the message processing block, so that the message processing block completes the Internet security protocol configuration based on the security configuration information.
[0045] The security configuration information in the disclosed embodiment can be understood as configuration information for implementing related processing of the Internet Protocol Security (IPSec). Optionally, the security configuration information includes security policy information and security alliance information. The security policy information includes the correspondence between the target address, the transmission protocol and the identifier of the security alliance information. The specific security alliance information can be located according to the security policy information. The security alliance information includes processing information for encrypting, decrypting, encapsulating and decapsulating data packets.
[0046] In the disclosed embodiment, after the information configuration device forwards the second negotiation message returned by the target device to the protocol stack based on the message processing block, the second negotiation message can be further forwarded to the IKE application based on the protocol stack, so that the IKE application processes the second negotiation message, generates the next first negotiation message based on the second negotiation message, and continues to execute the operations in S101 and S102 until the negotiation process is completed. The IKE application generates security configuration information according to the negotiation result, and sends the security configuration information to the message processing block, specifically to the IPSec message processing block, so that it completes the IPSec configuration based on the security configuration information, and then performs corresponding processing on the data message related to the target device based on the configuration.
[0047] In an exemplary implementation of the embodiments of the present disclosure, the information configuration device can send the second negotiation message to the second random memory based on the protocol stack, so that the Internet key exchange application obtains the second negotiation message in the first random memory, and after the Internet key exchange application sends the security configuration information to the first random memory, obtains the security configuration information in the second random memory based on the protocol stack.
[0048] refer to Figure 2 When the protocol stack in the DPU forwards the second negotiation message to the IKE application in the host, the second negotiation message can be written into the F-DMA device on the DPU. The F-DMA device on the DPU sends the second negotiation message to the second random memory. Through the PCIe connection between the first random memory and the second random memory, the first random memory on the host synchronously obtains the second negotiation message. The F-DMA device on the host obtains the second negotiation message from the first random memory and forwards it to the IKE application, thereby realizing that the message processing block forwards the second negotiation message to the IKE application. After receiving the second negotiation message and determining that the negotiation process is completed, the IKE application can generate security configuration information according to the negotiation result, bypass the host-side protocol stack by preloading the dynamic library, write the security configuration information into the F-DMA device in the host, and the F-DMA device sends the security configuration information to the first random memory. The second random memory on the DPU obtains the security configuration information through data synchronization based on the PCIe connection. The F-DMA device on the DPU obtains the security configuration information in the second random memory and forwards it to the protocol stack, which is then sent by the protocol stack to the message processing block for IPSec configuration.
[0049] The disclosed embodiment obtains a first negotiation message sent by an Internet key exchange application based on a protocol stack, and forwards the first negotiation message to a message processing block. The Internet key exchange application is deployed in a central processor of a host connected to a data processor. The first negotiation message is sent to a target device based on the message processing block, and a second negotiation message returned by the target device is received, and the second negotiation message is sent to the protocol stack. The second negotiation message is forwarded to the Internet key exchange application based on the protocol stack, and security configuration information sent by the Internet key exchange application is received. The security configuration information is sent to the message processing block, so that the message processing block completes the Internet security protocol configuration based on the security configuration information. The Internet key exchange application can be set in the host CPU, and the first negotiation message is sent and received by utilizing the interaction between the host and the DPU and the message transmission capability managed by the DPU, so that the IKE negotiation work is completed based on the better processing performance of the host CPU, and other work is still completed by the DPU, which can balance the processing pressure between the host CPU and the DPU, and avoid a large number of IKE negotiation tasks affecting the overall working stability of the DPU.
[0050] Figure 3 is a flow chart of a method for receiving a data packet provided by an embodiment of the present disclosure, such as Figure 3 As shown, based on the above embodiment, a data packet can be received by the following method.
[0051] S301: Receive a first data packet sent by a first virtual machine deployed in a host based on a message processing block, and search security policy information for a first identifier of security association information corresponding to a first address in the first data packet and a first transmission protocol.
[0052] The first address in the embodiment of the present disclosure may be understood as a source address and a destination address corresponding to the first data packet, and may specifically be an Internet Protocol (IP) address.
[0053] The transmission protocol in the embodiments of the present disclosure may be specifically represented by a protocol number.
[0054] In the disclosed embodiment, there is a virtual interface based on SR-IOV (Single Root IO Virtualization) between the virtual machine deployed on the host and the message processing block on the DPU. The information configuration device can receive a first data packet sent by the first virtual machine through the virtual interface based on the message processing block. Since the first data packet is a plaintext data packet, the message processing block can directly extract information about the first address and information about the first transmission protocol from the first data packet, and based on pre-configured security policy information, search and match the first identifier corresponding to the first address and the first transmission protocol. The first identifier is the first identifier of the security alliance information, which can also be called an index of the security alliance information.
[0055] In an exemplary implementation of the presently disclosed embodiment, the information configuration device can extract the first address and the first transmission protocol in the first data packet based on the second and third layer message processing modules, and determine whether the first data packet needs to be processed related to IPSec based on the first address and the first transmission protocol. If necessary, the first data packet, the first address and the first transmission protocol are sent to the IPSec message processing block, and the IPSec message processing block searches the security policy information for the first identifier of the security association information corresponding to the first address and the first transmission protocol.
[0056] S302: Obtain first processing information from the security association information corresponding to the first identifier, and encrypt and encapsulate the first data packet based on the first processing information.
[0057] The first processing information in the embodiment of the present disclosure can be understood as the information required for IPSec-related processing such as encryption and decryption, encapsulation and decapsulation of the first data packet. Specifically, the first processing information may include encryption and decryption algorithms, keys, key validity periods, encapsulation protocols, encapsulation modes and other information, which are not limited here.
[0058] In the embodiment of the present disclosure, after determining the first identifier of the security association information corresponding to the first data packet based on the message processing block, the information configuration device can further determine the security association information corresponding to the first identifier based on the message processing block, obtain first processing information therefrom, and encrypt the first data packet using the corresponding key and encryption algorithm based on the first processing information, and then use the encapsulation protocol and encapsulation mode information to complete the encapsulation of the first data packet.
[0059] In an exemplary implementation of the disclosed embodiment, the information configuration device may obtain first processing information from the security association information corresponding to the first identifier based on the IPSec message processing block, and then encrypt and encapsulate the first data packet based on the first processing information.
[0060] S303: Send the processed first data packet to a first device corresponding to the first data packet.
[0061] The first device in the embodiment of the present disclosure may be understood as a device to which the first data packet is sent.
[0062] In the disclosed embodiment, the information configuration device may encrypt and encapsulate the first data packet based on the message processing block, and then send the processed first data packet to the first device corresponding to the first data packet.
[0063] In an exemplary implementation of the embodiment of the present disclosure, the information configuration device can encrypt and encapsulate the first data packet based on the IPSec message processing block, and then send the processed first data packet to the second and third layer message processing block, which will forward it to the first device.
[0064] The disclosed embodiment receives a first data packet sent by a first virtual machine deployed in a host based on a message processing block, searches for a first identifier of security association information corresponding to a first address in the first data packet and a first transmission protocol in the security policy information, obtains first processing information from the security association information corresponding to the first identifier, encrypts and encapsulates the first data packet based on the first processing information, and sends the processed first data packet to a first device corresponding to the first data packet. The data packet to be sent can be encrypted and encapsulated according to the security policy information and security configuration information corresponding to the data packet to be sent, and then sent to the first device, thereby improving the security of the data packet during transmission.
[0065] Figure 4 is a flowchart of another method for receiving a data packet provided by an embodiment of the present disclosure, such as Figure 4 As shown, based on the above embodiment, a data packet can be received by the following method.
[0066] S401. Obtain a second address from security association information corresponding to a first identifier, where the second address is an address of a transmission channel corresponding to a first device.
[0067] In the embodiment of the present disclosure, when the first data packet is sent to the corresponding first device, it needs to be sent through a pre-established transmission channel. The second address is the address of the transmission channel corresponding to the first device. The security association information corresponding to the first identifier includes not only the first processing information, but also the second address of the transmission channel corresponding to the first device.
[0068] In the embodiment of the present disclosure, the information configuration device may acquire the second address of the transmission channel corresponding to the first device from the security association information corresponding to the first identifier based on the message processing block.
[0069] In an exemplary implementation of the embodiment of the present disclosure, the information configuration device may obtain the second address from the security association information corresponding to the first identifier based on the IPSec message processing block, and send it to the layer 2 and 3 message processing blocks.
[0070] S402: Based on the second address, send the processed first data packet to the first device through a transmission channel corresponding to the first device.
[0071] In the disclosed embodiment, after determining the second address based on the message processing block, the information configuration device may search for a route based on the second address and send the processed first data packet to the first device through a transmission channel corresponding to the first device.
[0072] In an exemplary implementation of the disclosed embodiment, the information configuration device may set the second address as the target address based on the layer 2 and 3 message processing blocks, and send the processed first data packet to the first device through the transmission channel corresponding to the first device.
[0073] The disclosed embodiment obtains a second address from the security association information corresponding to the first identifier, where the second address is the address of the transmission channel corresponding to the first device. Based on the second address, the processed first data packet is sent to the first device through the transmission channel corresponding to the first device. After the first data packet is encrypted and encapsulated, the first data packet can be accurately sent based on the second address obtained from the security association information.
[0074] Figure 5 FIG. 1 is a flow chart of a method for sending a data packet provided by an embodiment of the present disclosure. Figure 5As shown, based on the above embodiment, a data packet can be sent by the following method.
[0075] S501. Receive a second data packet sent by a second device based on a message processing block, and obtain a second identifier from the second data packet.
[0076] The second device in the embodiment of the present disclosure may be understood as a device that has established an IPSec VPN connection.
[0077] In the embodiment of the present disclosure, the data packet encrypted and encapsulated based on the IPSec protocol contains an identifier of the security association information, i.e., a security association index. The information configuration device can receive a second data packet sent by the second device based on the message processing block and obtain a second identifier from the second data packet.
[0078] In an exemplary implementation of the present disclosure, the information configuration device can receive a second data packet sent by a second device based on a layer 2 and 3 message processing block, obtain a second identifier from the second data packet, and send the second identifier and the second data packet to the IPSec message processing block.
[0079] S502: Obtain second processing information from the security association information corresponding to the second identifier, and decrypt and decapsulate the second data packet based on the second processing information.
[0080] The second processing information in the embodiment of the present disclosure may be understood as information required for performing IPSec related processing on the second data packet.
[0081] In the embodiment of the present disclosure, after determining the second identifier included in the first data packet based on the message processing block, the information configuration device can further determine the security association information corresponding to the second identifier based on the message processing block, obtain the second processing information therefrom, and according to the second processing information, use the information of the encapsulation protocol and the encapsulation mode to complete the decapsulation of the second data packet, and then use the corresponding key and encryption algorithm to decrypt the second data packet.
[0082] In an exemplary implementation of the disclosed embodiment, the information configuration device may obtain second processing information from the security association information corresponding to the second identifier based on the IPSec message processing block, and decrypt and decapsulate the second data packet based on the second processing information.
[0083] S503: Send the processed second data packet to a second virtual machine corresponding to the second data packet.
[0084] In the disclosed embodiment, the information configuration device may decrypt and decapsulate the second data packet based on the message processing block, and then send the processed second data packet to the second virtual machine corresponding to the second data packet.
[0085] In an exemplary implementation of the embodiment of the present disclosure, the information configuration device may send the processed second data packet to the second virtual machine through the virtual interface corresponding to the second virtual machine based on the layer 2 and layer 3 message processing blocks.
[0086] The disclosed embodiment receives a second data packet sent by a second device based on a message processing block, obtains a second identifier from the second data packet, obtains second processing information from security association information corresponding to the second identifier, decrypts and decapsulates the second data packet based on the second processing information, and sends the processed second data packet to a second virtual machine corresponding to the second data packet. After obtaining the second data packet transmitted in ciphertext, the decryption and decapsulation processing can be completed in the DPU, so that the second virtual machine can directly obtain the information therein after receiving the processed second data packet, thereby reducing the processing pressure of the host.
[0087] Figure 6 is a flowchart of another method for sending a data packet provided by an embodiment of the present disclosure, such as Figure 6 As shown, based on the above embodiment, a data packet can be sent by the following method.
[0088] S601. Obtain a third address of a second virtual machine from a processed second data packet.
[0089] In the disclosed embodiment, the information configuration device may directly obtain the third address of the second virtual machine from the second data packet in plain text after decrypting and decapsulating the second data packet based on the message processing block.
[0090] In an exemplary implementation of the embodiment of the present disclosure, the information configuration device can send the second data packet in plain text to the layer 2 and 3 message processing block after decrypting and decapsulating the second data packet based on the IPSec message processing block, and obtain the third address of the second virtual machine from the second data packet based on the layer 2 and 3 message processing block.
[0091] S602: Send the processed second data packet to the second virtual machine based on the third address.
[0092] In the embodiment of the present disclosure, after determining the third address, the information configuration device may search for a route based on the third address and send the processed second data packet to the second virtual machine.
[0093] In an exemplary implementation of the embodiment of the present disclosure, the information configuration device may send the processed second data packet to the second virtual machine according to the third address based on the layer 2 and layer 3 message processing block.
[0094] The disclosed embodiment obtains the third address of the second virtual machine from the processed second data packet, and sends the processed second data packet to the second virtual machine based on the third address. After decrypting and decapsulating the first data packet, the second data packet can be accurately sent based on the third address obtained from the second data packet in plain text.
[0095] Figure 7 Schematic diagram of the structure of an information configuration device provided by an embodiment of the present disclosure. Figure 7 As shown, the information configuration device 700 includes: a first sending module 710, a second sending module 720, and a third sending module 730, wherein the first sending module 710 is used to obtain a first negotiation message sent by an Internet key exchange application based on the protocol stack, and forward the first negotiation message to the message processing block, and the Internet key exchange application is deployed in the central processor of the host connected to the data processor; the second sending module 720 is used to send the first negotiation message to the target device based on the message processing block, receive the second negotiation message returned by the target device, and send the second negotiation message to the protocol stack; the third sending module 730 is used to forward the second negotiation message to the Internet key exchange application based on the protocol stack, receive the security configuration information sent by the Internet key exchange application, and send the security configuration information to the message processing block, so that the message processing block completes the Internet security protocol configuration based on the security configuration information.
[0096] Optionally, the first sending module 710 is specifically used to obtain the first negotiation message in the second random access memory based on the protocol stack after the Internet key exchange application sends the first negotiation message to the first random access memory, the first random access memory is deployed in the host, the second random access memory is deployed in the data processor, and the first random access memory and the second random access memory maintain data synchronization; the third sending module 730 is specifically used to send the second negotiation message to the second random access memory based on the protocol stack, so that the Internet key exchange application obtains the second negotiation message in the first random access memory, and after the Internet key exchange application sends the security configuration information to the first random access memory, obtain the security configuration information in the second random access memory based on the protocol stack.
[0097] Optionally, the security configuration information includes security policy information and security association information, the security policy information includes the correspondence between the target address, the transmission protocol and the identifier of the security association information, and the security association information includes processing information for encrypting, decrypting, encapsulating and decapsulating data packets.
[0098] Optionally, the information configuration device 700 also includes: a first receiving module, used to receive a first data packet sent by a first virtual machine deployed in the host based on the message processing block, and search the security policy information for a first identifier of the security association information corresponding to the first address and the first transmission protocol in the first data packet; a first processing module, used to obtain first processing information from the security association information corresponding to the first identifier, and encrypt and encapsulate the first data packet based on the first processing information; and a fourth sending module, used to send the processed first data packet to a first device corresponding to the first data packet.
[0099] Optionally, the information configuration device 700 also includes: an acquisition module, used to obtain a second address from the security association information corresponding to the first identifier, the second address being the address of the transmission channel corresponding to the first device; the fourth sending module, specifically used to send the processed first data packet to the first device through the transmission channel corresponding to the first device based on the second address.
[0100] Optionally, the information configuration device also includes: a second receiving module, used to receive a second data packet sent by a second device based on the message processing block, and obtain a second identifier from the second data packet; a second processing module, used to obtain second processing information from the security association information corresponding to the second identifier, and decrypt and decapsulate the second data packet based on the second processing information; and a fifth sending module, used to send the processed second data packet to a second virtual machine corresponding to the second data packet.
[0101] Optionally, the fifth sending module includes: an acquisition unit, used to obtain a third address of the second virtual machine from the processed second data packet; and a sending unit, used to send the processed second data packet to the second virtual machine based on the third address.
[0102] The information configuration device provided in this embodiment can execute the method described in any of the above embodiments. Its execution method and beneficial effects are similar and will not be described in detail here.
[0103] Figure 8 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.
[0104] like Figure 8 As shown, the computer device may include a processor 810 and a memory 820 storing computer program instructions.
[0105] Specifically, the processor 810 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0106] The memory 820 may include a large capacity memory for information or instructions. By way of example and not limitation, the memory 820 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 820 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 820 may be inside or outside the integrated gateway device. In a particular embodiment, the memory 820 is a non-volatile solid-state memory. In a particular embodiment, the memory 820 includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (Electrically Erasable Programmable ROM, EEPROM), an electrically rewritable ROM (EAROM) or a flash memory, or a combination of two or more of these.
[0107] The processor 810 reads and executes the computer program instructions stored in the memory 820 to perform the steps of the information configuration method provided in the embodiment of the present disclosure.
[0108] In one example, the computer device may further include a transceiver 830 and a bus 840. Figure 8 As shown, the processor 810, the memory 820 and the transceiver 830 are connected via a bus 840 and communicate with each other.
[0109] The bus 840 includes hardware, software, or both. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industrial Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses or a combination of two or more of these. Where appropriate, the bus 840 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0110] The embodiments of the present disclosure further provide a computer-readable storage medium, which may store a computer program. When the computer program is executed by a processor, the processor implements the information configuration method provided by the embodiments of the present disclosure.
[0111] The above-mentioned storage medium may, for example, include a memory 820 of computer program instructions, and the above-mentioned instructions may be executed by the processor 810 of the information configuration device to complete the information configuration method provided by the embodiment of the present disclosure. Optionally, the storage medium may be a non-temporary computer-readable storage medium, for example, the non-temporary computer-readable storage medium may be a ROM, a random access memory (Random Access Memory, RAM), a compact disc read-only memory (Compact Disc ROM, CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device, etc. The above-mentioned computer program may be written in any combination of one or more programming languages to perform the program code of the operation of the embodiment of the present disclosure, and the programming language includes an object-oriented programming language, such as Java, C++, etc., and also includes a conventional procedural programming language, such as "C" language or similar programming language. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device, partially on the remote computing device, or completely on the remote computing device or server.
[0112] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0113] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An information configuration method, characterized in that: The method is applicable to a data processor, the data processor comprising a protocol stack and a message processing block, and the method comprises: Acquire a first negotiation message sent by an Internet key exchange application based on the protocol stack, and forward the first negotiation message to the message processing block, the Internet key exchange application being deployed in a central processor of a host connected to the data processor; Sending the first negotiation message to the target device based on the message processing block, receiving the second negotiation message returned by the target device, and sending the second negotiation message to the protocol stack; forwarding the second negotiation message to the Internet key exchange application based on the protocol stack, receiving security configuration information sent by the Internet key exchange application, and sending the security configuration information to the message processing block, so that the message processing block completes Internet security protocol configuration based on the security configuration information; The obtaining, based on the protocol stack, a first negotiation message sent by an Internet key exchange application program includes: After the Internet Key Exchange application sends the first negotiation message to a first random access memory, the first negotiation message in a second random access memory is acquired based on the protocol stack, the first random access memory is deployed in the host, the second random access memory is deployed in the data processor, and the first random access memory and the second random access memory maintain data synchronization; The forwarding the second negotiation message to the Internet key exchange application based on the protocol stack includes: Sending the second negotiation message to the second random access memory based on the protocol stack, so that the Internet Key Exchange application obtains the second negotiation message in the first random access memory; The receiving of security configuration information sent by the Internet Key Exchange application comprises: After the Internet Key Exchange application sends the security configuration information to the first random access memory, the security configuration information in the second random access memory is obtained based on the protocol stack.
2. The method according to claim 1, characterized in that The security configuration information includes security policy information and security association information. The security policy information includes the correspondence between the target address, the transmission protocol and the identifier of the security association information. The security association information includes processing information for encrypting, decrypting, encapsulating and decapsulating data packets.
3. The method according to claim 2, characterized in that After sending the security configuration information to the message processing block, the method further includes: Receiving, based on the message processing block, a first data packet sent by a first virtual machine deployed in the host, and searching, in the security policy information, for a first identifier of security association information corresponding to a first address and a transmission protocol in the first data packet; Acquire first processing information from the security association information corresponding to the first identifier, and encrypt and encapsulate the first data packet based on the first processing information; The processed first data packet is sent to a first device corresponding to the first data packet.
4. The method according to claim 3, characterized in that The method further comprises: Acquire a second address from the security association information corresponding to the first identifier, where the second address is an address of a transmission channel corresponding to the first device; The step of sending the processed first data packet to a first device corresponding to the first data packet includes: Based on the second address, the processed first data packet is sent to the first device through a transmission channel corresponding to the first device.
5. The method according to claim 2, characterized in that: After sending the security configuration information to the message processing block, the method further includes: receiving a second data packet sent by a second device based on the message processing block, and acquiring a second identifier from the second data packet; Acquire second processing information from the security association information corresponding to the second identifier, and perform decryption and decapsulation processing on the second data packet based on the second processing information; The processed second data packet is sent to a second virtual machine corresponding to the second data packet.
6. The method according to claim 5, characterized in that The sending the processed second data packet to a second virtual machine corresponding to the second data packet includes: Acquire a third address of the second virtual machine from the processed second data packet; Based on the third address, the processed second data packet is sent to the second virtual machine.
7. An information configuration device, characterized in that: The device is applicable to a data processor, the data processor includes a protocol stack and a message processing block, and the device includes: a first sending module, configured to obtain a first negotiation message sent by an Internet key exchange application based on the protocol stack, and forward the first negotiation message to the message processing block, wherein the Internet key exchange application is deployed in a central processor of a host connected to the data processor; a second sending module, configured to send the first negotiation message to a target device based on the message processing block, receive a second negotiation message returned by the target device, and send the second negotiation message to the protocol stack; a third sending module, configured to forward the second negotiation message to the Internet key exchange application based on the protocol stack, receive security configuration information sent by the Internet key exchange application, and send the security configuration information to the message processing block, so that the message processing block completes the Internet security protocol configuration based on the security configuration information; The first sending module is specifically configured to obtain the first negotiation message in the second random access memory based on the protocol stack after the Internet Key Exchange application sends the first negotiation message to the first random access memory, the first random access memory is deployed in the host, the second random access memory is deployed in the data processor, and the first random access memory and the second random access memory maintain data synchronization; The third sending module is specifically used to send the second negotiation message to the second random access memory based on the protocol stack, so that the Internet key exchange application obtains the second negotiation message in the first random access memory, and after the Internet key exchange application sends the security configuration information to the first random access memory, obtains the security configuration information in the second random access memory based on the protocol stack.
8. A computer device, characterized in that: include: Memory; processor; and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the information configuration method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Method for asynchronously implementing IPSec vpn through multi-nuclear
CN101471839A
Message forwarding method, device and equipment based on DPU (Data Processing Unit) and national secret, and medium
CN115766172A
