A data transmission method and device of an intelligent network card

By adding a fragmentation and reassembly switch to the virtual switch software in the smart network interface card (NIC), large-volume data packets are transmitted to the physical server for reassembly based on the traffic enable/disable status. This solves the stuttering problem of smart NICs in processing large-volume UDP data packets, achieving efficient data transmission and cost reduction.

CN116886651BActive Publication Date: 2026-07-21DUXIAOMAN TECH (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
DUXIAOMAN TECH (BEIJING) CO LTD
Filing Date
2023-07-11
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Smart network interface cards (NICs) suffer from lag and poor throughput when handling large volumes of UDP packets due to hardware limitations. Existing solutions, such as limiting packet length or upgrading equipment, are costly and cannot meet users' needs for a smooth experience and reduced transmission costs.

Method used

Add a fragmentation and reassembly switch to the smart network interface card (NIC) and the virtual switch software can transmit large data packets to the physical server for reassembly based on the transmission traffic. This avoids the need for equipment upgrades and improves throughput performance.

Benefits of technology

Without upgrading equipment, it meets user needs in high-traffic scenarios, ensures a smooth experience, reduces transmission costs, and improves data transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116886651B_ABST
    Figure CN116886651B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data transmission method and device of an intelligent network card, and relates to the technical field of data transmission. The intelligent network card comprises a fragmentation reassembly switch. The specific implementation of the method comprises: detecting transmission traffic of a data transmission request, setting an on-off state of the fragmentation reassembly switch according to the transmission traffic; receiving a plurality of data transmission requests; wherein the data transmission request comprises a data packet; performing layer-by-layer analysis on the data packet, and extracting an IP header in each data packet; judging whether the data packet exists IP fragmentation according to the IP header, and in the case that the IP fragmentation exists and the fragmentation reassembly switch is off, transmitting the data packet to a physical server cooperating with the intelligent network card in a transparent manner, so that the physical server performs fragmentation reassembly on the data packet. The implementation can meet the user demand of the application program in the UDP large traffic scene, ensure the smooth user experience, avoid the dependence on the upgrade cost, improve the throughput performance of the intelligent network card, and improve the data transmission efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data transmission technology, and in particular to a data transmission method and apparatus for a smart network interface card (NIC). Background Technology

[0002] When smart network interface cards (NICs) work with physical servers to transmit data, they perform fragmentation and reassembly of UDP packets whose length exceeds the MTU. However, as application traffic increases, smart NICs, limited by their hardware capabilities, often experience stuttering and bottlenecks during multi-fragmentation and reassembly, resulting in poor throughput.

[0003] To meet the demands of high-traffic applications, measures such as limiting the packet length sent by the requester or upgrading smart network interface cards (NICs) and their supporting devices are often taken to prevent packet fragmentation, balance application traffic, avoid lag and blockage of smart NICs, and improve traffic throughput performance.

[0004] However, on the one hand, the limited packet length puts pressure on application traffic, making it impossible to guarantee a smooth user experience; on the other hand, the way network equipment is upgraded causes the upgrade cost and dependency cost to soar, resulting in excessively high data transmission costs and low practicality. Summary of the Invention

[0005] In view of this, the present disclosure provides a data transmission method and apparatus for a smart network card, which can solve the problems of application traffic pressure failing to guarantee a smooth user experience and the high cost of upgrading equipment leading to a surge in data transmission costs.

[0006] To achieve the above objectives, according to one aspect of this disclosure, a data transmission method for a smart network interface card (NIC) is provided, the smart NIC including a fragmentation and reassembly switch, the data transmission method comprising:

[0007] The transmission traffic of the data transmission request is detected, and the on / off state of the fragmentation and reassembly switch is set according to the transmission traffic.

[0008] Receive multiple data transmission requests; wherein, the data transmission request includes a data packet;

[0009] The data packets are parsed layer by layer to extract the IP header from each data packet;

[0010] Based on the IP header, it is determined whether the data packet contains IP fragments. If IP fragments exist and the fragmentation reassembly switch is turned off, the data packet is forwarded to the physical server that works with the smart network card, so that the physical server can reassemble the data packet into fragments.

[0011] According to another aspect of this disclosure, a data transmission device for a smart network interface card (NIC) is provided, the smart NIC including a fragmentation and reassembly switch, comprising:

[0012] An on / off module is used to detect the transmission flow of the data transmission request and set the on / off state of the fragment reassembly switch according to the transmission flow.

[0013] A receiving module is used to receive multiple data transmission requests; wherein the data transmission request includes a data packet;

[0014] The parsing module is used to parse the data packets layer by layer and extract the IP headers from each data packet;

[0015] The transmission module is used to determine whether the data packet has IP fragmentation based on the IP header. If IP fragmentation exists and the fragmentation reassembly switch is off, the transmission module will forward the data packet to the physical server that works with the smart network card, so that the physical server can reassemble the data packet into fragments.

[0016] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0017] Processor; and

[0018] Stored program memory,

[0019] The program includes instructions that, when executed by the processor, cause the processor to perform the data transmission method of the smart network card.

[0020] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to perform the data transmission method of the smart network interface card.

[0021] One or more technical solutions provided in this application embodiment use existing smart network cards and physical servers. By adding a virtual switch software pass-through setting to the smart network card, fragmented data packets that meet preset conditions are directly passed through to the physical server for reassembly. This can fully meet the user needs of applications in UDP high-traffic scenarios, ensure a smooth user experience, and eliminate the need for additional upgrades to the smart network card and its supporting network devices, thereby avoiding reliance on upgrade costs. This can improve the throughput performance of the smart network card and enhance data transmission efficiency. Attached Figure Description

[0022] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0023] Figure 1 A flowchart illustrating a data transmission method for a smart network interface card according to an exemplary embodiment of the present disclosure is shown;

[0024] Figure 2 A flowchart illustrating the opening and closing method of a segmented reconfiguration switch according to another exemplary embodiment of the present disclosure is shown;

[0025] Figure 3 A flowchart illustrating a method for extracting metadata from a data packet according to an exemplary embodiment of the present disclosure is shown;

[0026] Figure 4 A flowchart illustrating a method for determining IP fragments according to exemplary embodiments of the present disclosure is shown;

[0027] Figure 5 A flowchart of a method for reassembling IP fragments according to an exemplary embodiment of the present disclosure is shown;

[0028] Figure 6 A flowchart illustrating a method for transmitting reassembled data packets according to exemplary embodiments of the present disclosure is shown;

[0029] Figure 7 A schematic block diagram of a data transmission apparatus for a smart network interface card according to an exemplary embodiment of the present disclosure is shown;

[0030] Figure 8 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0031] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0032] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0033] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0034] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0035] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0036] A smart network interface card (NIC) is a flexible, programmable network card that works in conjunction with a physical server and has its own independent operating system.

[0037] UDP: User Datagram Protocol, provides software with a method to send encapsulated IP packets without establishing a connection.

[0038] MTU: Maximum Transmission Unit, refers to the largest data service unit of a single data packet or data frame received by the receiver, also known as the maximum payload, and is generally measured in bytes.

[0039] IP Fragmentation: In the multiple layers of the Internet transport protocol, the data link layer limits the size of transmitted data packets through the MTU. When the size of a data packet exceeds the MTU, the data packet is fragmented.

[0040] IP fragmentation reassembly: IP fragments belonging to the same data packet need to be reassembled and restored to the original data packet before reaching their destination.

[0041] ACL: Access Control Lists, is a packet filtering-based access control technology that can filter data packets on an interface based on set conditions, allowing the interface to pass or drop them.

[0042] When smart network interface cards (NICs) work with physical servers to transmit data, common transmission protocols include UDP. Since the requester and receiver of UDP data cannot pre-determine the size of data segments, when a data packet exceeds the NIC's MTU (Maximum Transmission Unit), the requester fragments the large UDP packet (i.e., the UDP packet exceeding the MTU) at the IP layer. The receiving NIC then reassembles the IP fragments to ensure data packet integrity. However, due to the relatively weak hardware configuration of smart NICs, they suffer from poor throughput and significant traffic bottlenecks when dealing with UDP large packet fragmentation and reassembly, making it difficult to meet the application requirements of high-volume UDP scenarios. Existing solutions include changing the application's UDP large packet sending to UDP small packet sending to avoid IP fragmentation, or upgrading all network devices (including gateways) including the smart NIC to support the complete transmission of large UDP packets. The former restricts data transmission and reception on the application side, sharply reduces the amount of data accessed by users, creates a significant traffic bottleneck, and lowers the user experience; the latter requires upgrading other devices at excessively high costs, and not all supporting devices can support the upgrade, resulting in a high failure rate for UDP large packet transmission and reception, and application interaction crashes.

[0043] The data transmission method of the smart network interface card (NIC) disclosed herein, based on current smart NICs and physical servers, employs a technique of setting a fragmentation and reassembly switch in the virtual switch software of the smart NIC to adapt to real-time application traffic by enabling and disabling the fragmentation and reassembly switch. In cases of excessive traffic, the data is forwarded to the physical server for reassembly. This approach ensures that without changing the existing physical environment and equipment, equipment upgrades are avoided, thereby reducing data transmission costs, meeting the application interaction needs of large-scale IP fragmentation and reassembly, improving data throughput performance, enhancing UDP transmission capabilities and user experience, and ultimately improving data transmission efficiency.

[0044] Similarly, UDP packets are fragmented into IP segments by the protocol stack of the requesting party sending the data transmission request. The size and number of each segment are determined by the UDP packet and the MTU of the smart network interface card (NIC). The data transmission method of the smart NIC disclosed herein is applicable to the smart NIC of the receiving party, so that the requesting party's application does not need to make any changes. While maintaining the existing application access scenario, the data transmission efficiency is improved by controlling the reassembly method of the data transmission request through the fragmentation and reassembly switch.

[0045] The present disclosure is described below with reference to the accompanying drawings.

[0046] Figure 1 A flowchart illustrating a data transmission method for a smart network interface card according to an exemplary embodiment of the present disclosure is shown, such as... Figure 1 As shown, the data transmission method of the smart network interface card disclosed herein includes the following steps:

[0047] In this embodiment of the disclosure, the data transmission method of the smart network card is executed by the smart network card. The smart network card is equipped with a fragmentation and reassembly switch, which is turned on and off according to the data transmission traffic, thereby controlling the reassembly method of IP fragments of UDP large packets.

[0048] Furthermore, the smart network interface card (NIC) runs an independent operating system with a CPU, enabling functions such as IP fragmentation and reassembly, and security filtering, which were originally implemented in the kernel network protocol stack of the physical server, to be implemented in the independent operating system. This reduces the path consumption of data packet transmission and reception, and improves data transmission performance. Software used for network virtualization, such as virtual switches, also runs within this independent operating system.

[0049] Furthermore, the smart network card has hardware interfaces such as serial ports and an independent IP address, and it can interconnect with the physical server through a driver. The virtual switch software can be OpenVSwitch, which uses the VXLAN network architecture.

[0050] Step S101: Detect the transmission traffic of the smart network card, and set the on / off state of the fragmentation and reassembly switch according to the transmission traffic.

[0051] In this embodiment, the unit of transmission traffic for the smart network interface card (NIC) is bytes per second (Byte / s), representing the size of data packets sent by the application per second. Based on the size of data packets received by the smart NIC per unit time, the transmission traffic of the smart NIC can be calculated in real time to determine whether to disable the fragmentation and reassembly switch, thereby alleviating the transmission pressure on the smart NIC and ensuring a good user experience. It should be noted that the traffic threshold can be selectively set according to actual needs; for example, the traffic threshold can be 9K MTU.

[0052] In one embodiment of this disclosure, setting the on / off state of the fragmentation and reassembly switch according to the transmission traffic includes:

[0053] If the transmission traffic of the smart network interface card (NIC) is detected to be greater than or equal to the traffic threshold, the fragmentation and reassembly switch is turned off; if the transmission traffic of the smart NIC is detected to be less than the traffic threshold, the fragmentation and reassembly switch is turned on.

[0054] In this embodiment of the disclosure, a fragmentation reassembly switch is added to the explicit settings of the virtual switch software of the smart network interface card (NIC) to enable or disable the fragmentation reassembly switch. When the fragmentation reassembly switch is enabled, the smart NIC reassembles multiple IP fragments belonging to the same fragmentation tag; when the fragmentation reassembly switch is disabled, the smart NIC forwards the data transmission request to the physical server, which then reassembles the multiple IP fragments belonging to the same fragmentation tag.

[0055] Furthermore, in the explicit settings of the virtual switch software, the enabling or disabling of the fragmentation reassembly switch is determined by setting the attribute values ​​of network protocol parameters and pass-through parameters. The attribute values ​​of the network protocol parameters and pass-through parameters are Boolean variables; that is, the attribute values ​​of the network protocol parameters and pass-through parameters are TRUE or FALSE. The explicit settings of the virtual switch software include multiple network protocol parameters. If the attribute values ​​of all multiple network protocol parameters are set to FALSE and the attribute value of the pass-through parameter is set to TRUE, the fragmentation reassembly switch is disabled; otherwise, the fragmentation reassembly switch is enabled.

[0056] Furthermore, when the virtual switch software is OpenVSWitch, the network protocol parameters of OpenVSWitch include ipfset_v4 and ipfset_v6, and the paths for these parameters are Openvswitch\\ipfset_v4 and Openvswitch\\ipfset_v6; the pass-through parameter is pass-udp, and the path for this parameter is Openvswitch\\pass-udp. By optimizing the display settings at the OpenVSWitch code layer and adding configuration files related to the network protocol and pass-through parameters, the fragmentation and reassembly switch can be flexibly controlled to adapt to real-time application traffic demands, improve user experience, and increase data transmission efficiency while avoiding cost overruns.

[0057] In another embodiment of this disclosure, or, setting the on / off state of the fragmentation and reassembly switch according to the transmission traffic includes:

[0058] If the transmission traffic of the smart network interface card (NIC) is detected to be greater than or equal to the traffic threshold, the fragmentation and reassembly switch of the virtual switch software can be set to normally closed. The normally closed time can be selectively set according to actual needs. That is, for example, when the access data served by the smart NIC is relatively fixed, setting the fragmentation and reassembly switch of the smart NIC to a normal and persistent normally closed configuration, without adjusting in real time with changes in transmission traffic, can ensure the stability and persistence of data transmission between the smart NIC and the physical server.

[0059] In another embodiment of this disclosure, or, unlike simple transmission traffic detection to determine the on / off state of the fragmentation reassembly switch, the virtual switch software can set multiple fragmentation reassembly switches, each corresponding to a different source application. Setting the on / off state of the fragmentation reassembly switch according to the transmission traffic includes:

[0060] like Figure 2 As shown, the opening and closing method of the segmented reconfiguration switch in another embodiment of this disclosure includes the following steps:

[0061] Step S201: Obtain historical data transmission requests from various source applications during a preset historical period.

[0062] In this embodiment of the disclosure, historical data transmission requests from various source applications within a preset historical period are statistically analyzed. These historical data transmission requests include historical data packets. It should be noted that the preset historical period can be selectively set as needed, requiring only that it can characterize the historical transmission traffic of the source applications.

[0063] Step S202: For each of the aforementioned source applications, analyze the historical transmission traffic of the smart network card to find the source applications whose historical transmission traffic is greater than or equal to the traffic threshold.

[0064] In this embodiment of the disclosure, based on the historical data packets of historical data transmission requests, the historical transmission traffic of the smart network interface card is calculated for each source application, and the historical transmission traffic is compared with the traffic threshold.

[0065] Step S203: Use the application identifier corresponding to the source application that is greater than or equal to the traffic threshold as the target shutdown identifier, and turn off the fragment reassembly switch corresponding to the target shutdown identifier.

[0066] In this embodiment of the disclosure, the fragmentation and reassembly switch corresponding to the source application whose historical transmission traffic is greater than or equal to the traffic threshold is turned off, and the fragmentation and reassembly switch corresponding to the source application whose historical transmission traffic is less than the traffic threshold is turned on. That is, when the historical transmission traffic is greater than or equal to the traffic threshold, the application identifier corresponding to the source application that is greater than or equal to the traffic threshold is used as the target shutdown identifier, and the fragmentation and reassembly switch of the source application corresponding to the application identifier that is the same as the target shutdown identifier is turned off. Correspondingly, the fragmentation and reassembly switch of the source application corresponding to the application identifier that is different from the target shutdown identifier is turned on.

[0067] In this embodiment of the disclosure, the opening and closing method of the segmented reconfiguration switch according to another embodiment of the disclosure is compared to Figure 1 The real-time adjustment of the data transmission method of the smart network card can adaptively change the setting of the fragmentation and reassembly switch. A fragmentation and reassembly switch can be set for each application to adjust the fragmentation and reassembly method of each application, thereby further improving data transmission efficiency and user satisfaction with each application.

[0068] Step S102: Receive multiple data transmission requests; wherein, the data transmission request includes a data packet.

[0069] In this embodiment of the disclosure, a data transmission request is a data packet. The data transmission request comes from a variety of applications. Therefore, the data packet of the data transmission request includes an application identifier corresponding to the source application of the data transmission request.

[0070] Furthermore, the data transmission method of the smart network interface card disclosed herein can be executed by the virtual switch software of the smart network interface card.

[0071] Step S103: Parse the data packets layer by layer and extract the IP headers from each data packet.

[0072] In this embodiment of the disclosure, the data packet of the application's data transmission request is fragmented by the physical server of the source IP address and sent to the smart network card. After receiving the data transmission request, the smart network card parses the data packet of the data transmission request layer by layer to obtain the information of each layer in the data packet.

[0073] In the embodiments disclosed herein, such as Figure 3 As shown, the method for extracting metadata from data packets disclosed herein includes the following steps:

[0074] In this embodiment of the disclosure, the virtual switch software of the smart network card adopts VXLAN (Virtual eXtensible Local Area Network) technology, which is essentially a tunneling technology used to establish a logical tunnel on the IP network between the source network device and the destination network device, and forward the packets after specific encapsulation.

[0075] Step S301: Parse the data packet of the data transmission request.

[0076] In this embodiment of the disclosure, the extraction process of the metadata of the data packet is the reverse process of the encapsulation process of the data packet. During the encapsulation process, the data packet sent by the application layer is encapsulated layer by layer by the switching layer, the transport protocol layer, the network layer and the data link layer to obtain the encapsulated data packet. When the data packet is transmitted to the smart network card, a data transmission request is initiated.

[0077] Step S302: Strip the outermost MAC address of the data packet to obtain the intermediate parsing packet.

[0078] In this embodiment of the disclosure, the outermost layer is the data link layer, and the MAC address is the physical address of the destination server. Based on the MAC address, the location of the physical server can be determined, so that during transparent transmission, the data transmission request can be directly sent to the physical server, enabling the physical server to perform operations such as reassembly and security filtering.

[0079] Furthermore, after stripping the data link layer from the data packet, an intermediate parsed packet is obtained.

[0080] Step S303: Separate the virtual identifier from the intermediate parsing packet.

[0081] In this embodiment of the disclosure, the intermediate resolution packet is a VXLAN resolution packet, and the virtual identifier is a VXLAN identifier.

[0082] Furthermore, the intermediate parsing packet separates the VXLAN layer to obtain the IP packet.

[0083] Step S304: Extract the network layer IP header from the separated IP packets; wherein the IP header includes the fragmentation mark and the upper layer protocol.

[0084] In this embodiment of the disclosure, when the requesting party encapsulates the data packet, the network layer determines whether the UDP data packet encapsulated by the transport protocol layer is a large UDP packet or a small UDP packet based on the MKU. If the UDP data packet is a large UDP packet, the large UDP packet is divided into multiple fragments, and an IP header is added to each fragment to obtain multiple IP packets.

[0085] In this embodiment of the disclosure, the IP header includes the IP protocol version, upper-layer protocol, fragmentation flags, fragment offset, source IP address (i.e., the IP address of the source host), and destination IP address (i.e., the IP address of the destination host).

[0086] Furthermore, the upper-layer protocol, i.e. the transport protocol used by the transport protocol layer, commonly includes TCP, UDP, etc.; the destination host's IP address is the IP address of the recipient of the data transmission request.

[0087] Step S305: Analyze the remaining parsed packets after extraction according to the upper-layer protocol, and extract the transport protocol header from the transport protocol layer.

[0088] In this embodiment of the disclosure, the transport protocol header includes a source port (Src port) and a destination port (Des port).

[0089] In this embodiment of the disclosure, the data packet metadata extraction method is used to parse the data packet layer by layer until the fragmentation mark of the required IP header is obtained, so as to perform subsequent pass-through judgment. In the case of excessive transmission traffic, the large UDP packet is sent to the physical server for reassembly, which relieves the transmission pressure of the smart network card, improves the application response speed, ensures a good user experience, improves data transmission efficiency, and reduces data transmission costs.

[0090] Step S104: Based on the IP header, determine whether the data packet has IP fragmentation. If IP fragmentation exists and the fragmentation reassembly switch is off, transmit the data packet to the physical server that works with the smart network card, so that the physical server can reassemble the data packet into fragments.

[0091] In this embodiment of the disclosure, the upper-layer protocol in the IP header, or the attribute value of the upper-layer protocol and the fragmentation tag, is used to determine whether the data packet is fragmented. In combination with the on / off state of the fragmentation reassembly switch, the system selects whether to pass the packet through to the physical server for fragmentation reassembly or to have the smart network interface card perform the fragmentation reassembly.

[0092] Furthermore, based on the network protocol parameters and pass-through parameters of the virtual switch software, the on / off status of the fragmentation and reassembly switch is determined. If the attribute values ​​of multiple network protocol parameters are all set to FALSE and the attribute value of the pass-through parameter is set to TRUE, the fragmentation and reassembly switch is determined to be off; otherwise, the fragmentation and reassembly switch is determined to be on.

[0093] Furthermore, if the network protocol parameters ipfset_v4 and ipfset_v6 are both set to FALSE and the pass-through parameter pass-udp is set to TRUE, then the fragmentation reassembly switch is determined to be off; otherwise, the fragmentation reassembly switch is determined to be on.

[0094] In the embodiments disclosed herein, such as Figure 4 As shown, the method for determining IP fragmentation disclosed herein includes the following steps:

[0095] In this embodiment of the disclosure, the IP header of the default UDP packet must contain a fragmentation marker data item.

[0096] Step S401: Determine whether there is a fragmentation mark in the IP header. If yes, proceed to step S402; otherwise, proceed to step S403.

[0097] Step S402: Determine whether the attribute value of the fragmentation marker is empty. If yes, proceed to step S403; otherwise, proceed to step S404.

[0098] In this embodiment of the disclosure, if a fragmentation marker exists in the IP header, the attribute value of the fragmentation marker is further determined.

[0099] Step S403: Determine that the data packet does not contain IP fragmentation.

[0100] In this embodiment, commonly used transmission protocols include TCP / UDP. TCP (Transmission Control Protocol) is a connection-oriented, reliable, byte-stream-based transport layer communication protocol. In network transmission, TCP data transmission employs an MSS (Maximum Segment Size) self-negotiation mechanism. That is, the parties involved in TCP data transmission autonomously negotiate the MSS size to determine the maximum segment length that can be transmitted each time. Therefore, during subsequent data transmission, the size of the data packets sent by the sender remains within the MSS range, preventing IP fragmentation. Consequently, since the sent TCP data packets do not generate IP fragmentation, there are no fragmentation markers, and therefore, the received TCP data packets also do not contain IP fragmentation.

[0101] Furthermore, UDP lacks a MSS mechanism similar to TCP. This has no impact on small UDP packets, which can be directly filtered for security. However, large UDP packets, exceeding the MTU, require IP fragmentation and reassembly for security filtering to ensure data transmission security. Therefore, small UDP packets do not require fragmentation; their fragmentation flag attribute is empty, and consequently, the data packets do not exhibit IP fragmentation.

[0102] Step S404: Determine that the data packet contains IP fragmentation.

[0103] In this embodiment of the disclosure, since UDP packets need to be fragmented and reassembled, UDP packets have IP fragments. The attribute value of the fragmentation tag is not empty, which is used to identify the various IP fragments belonging to the same data packet.

[0104] In the embodiments of this disclosure, the method for determining the fragmentation mark can determine whether there is a fragmentation mark in the IP header based on the upper-layer protocol of the IP header and the attribute value of the fragmentation mark, thereby performing subsequent pass-through judgment, so as to improve the throughput performance of the smart network card and improve data transmission efficiency.

[0105] In this embodiment of the disclosure, alternatively, the presence of a fragmentation tag in the IP header can be determined by the attribute values ​​of the upper-layer protocol and the fragmentation tag in the IP header, that is:

[0106] Obtain the upper-layer protocol of the IP header and determine whether the attribute value of the upper-layer protocol is TCP;

[0107] If the attribute value of the upper-layer protocol is TCP, it is determined that there is no IP fragmentation in the IP header;

[0108] Alternatively, if the attribute value of the upper-layer protocol is not TCP, the presence of IP fragmentation in the IP header can be determined based on the attribute value of the fragmentation tag; wherein, a non-empty attribute value of the fragmentation tag indicates that the data packet contains IP fragmentation.

[0109] It should be noted that if the UDP large packet scenario in the default UDP data packet has data items marked with fragmentation due to the need for fragmentation, and the UDP small packet scenario does not have data items marked with fragmentation due to the need for fragmentation, then the determination can be made directly based on whether there is a fragmentation mark in the IP header. That is, in another embodiment of this disclosure, or, when making the determination, if there is a fragmentation mark in the extracted IP header, it is determined that the data packet has IP fragmentation; if there is no fragmentation mark in the extracted IP header, it is determined that the data packet does not have IP fragmentation.

[0110] In this embodiment of the disclosure, when IP fragmentation exists in the data packet and the fragmentation and reassembly switch is off, the physical server performs fragmentation and reassembly on the transparent data transmission request; when IP fragmentation exists in the data packet and the fragmentation and reassembly switch is on, the smart network interface card (NIC) performs fragmentation and reassembly on the data transmission request, such as... Figure 5 As shown, the method for reassembling IP fragments disclosed herein includes the following steps:

[0111] In this embodiment of the disclosure, the method for reassembling IP fragments is performed by a smart network interface card or a physical server.

[0112] Step S501: Determine that the parsed IP packet is the corresponding IP fragment.

[0113] In this embodiment of the disclosure, whether the fragmentation and reassembly switch is on and the smart network card performs fragmentation and reassembly, or the fragmentation and reassembly switch is off and the physical server performs fragmentation and reassembly, both the smart network card and the physical server need to parse the data packets to obtain each IP packet in order to determine the IP and then perform fragmentation and reassembly.

[0114] Step S502: Count the multiple IP fragments that belong to the same fragmentation tag.

[0115] Step S503: Reassemble multiple IP fragments in ascending order of the fragment offset attribute value of the IP header to obtain a reassembled data packet.

[0116] In this embodiment of the disclosure, since only UDP large packets need to be fragmented during encapsulation, the data packets are reassembled into UDP large packets.

[0117] In this embodiment of the disclosure, the method for reassembling IP fragments first determines IP fragments belonging to the same fragment group based on fragmentation tags, and then reassembles multiple IP fragments belonging to the same fragment group to obtain a reassembled data packet corresponding to the original data, thereby obtaining complete access content. This method can meet different application requirements and satisfy the user's access experience.

[0118] In this embodiment of the disclosure, both the reassembled data packets from the smart network interface card and the reassembled data packets from the physical server require security filtering to ensure the security of data transmission, thereby achieving the purpose of network policy isolation and control and meeting the requirements of network security policies. Figure 6 As shown, the method for transmitting reassembled data packets disclosed herein includes the following steps:

[0119] In this embodiment of the disclosure, the method for transmitting reassembled data packets is executed by a smart network interface card or a physical server.

[0120] Step S601: Extract the source IP address and destination IP address from the IP header of the reassembled data packet.

[0121] In this embodiment of the disclosure, the source port and destination port, the source IP address and the priority identifier of the destination IP address, etc. of the transport protocol layer can also be obtained.

[0122] Step S602: Search the local session table to determine if the source IP address has a historical session. If yes, proceed to step S603; otherwise, proceed to step S604.

[0123] In this embodiment, the session table stores session information for multiple historical sessions, including the requester identifier, receiver identifier, session initiation time, and session end time. This information is used to determine whether the source IP address has participated in a historical session, thereby verifying the trustworthiness of the source IP address and enabling direct forwarding of the reassembled data packet or security filtering of the reassembled data packet. The requester identifier and receiver identifier can be IP addresses.

[0124] Step S603: Search for a routing entry leading to the destination IP address, and forward the reassembled data packet according to the routing entry.

[0125] In this embodiment of the disclosure, the routing table stores multiple routing entries to search for one or more routing entries from the source IP address to the destination IP address based on the destination IP address, so as to forward the reassembled data packet to the destination.

[0126] Step S604: Filter the reconstructed data packet according to the preset ACL policy, and determine whether the filtering result of the reconstructed data packet is data secure. If yes, proceed to step S603; otherwise, proceed to step S605.

[0127] In this embodiment, ACL policies include whitelist policies, priority policies, edge policies, etc., with different policies corresponding to different ACL statements to perform ACL security filtering on data. ACL policies can be used in the form of flow tables, which are collections of policy entries for a specific flow, responsible for packet lookup and forwarding.

[0128] Step S6041: Match the source IP address using the address whitelist to determine whether the source IP address belongs to the address whitelist. If yes, proceed to step S6042; otherwise, proceed to step S6043.

[0129] In this embodiment of the disclosure, the whitelist strategy includes address whitelist, port whitelist, protocol whitelist, etc., which are used to match and filter source IP address, destination IP address, source port, destination port, transmission protocol, network protocol, etc. according to the actual scenario to ensure the security of data transmission.

[0130] Step S6042: Determine that the filtering result of the reconstructed data packet is data secure.

[0131] In this embodiment of the disclosure, if the source IP address belongs to the address whitelist, or the source IP address has a priority identifier, or the source IP address complies with the edge policy, the filtering result of the reconstructed data packet is determined to be data secure.

[0132] Step S6043: Locate the priority identifier of the source IP address and determine whether the priority identifier of the source IP address exists. If it does, proceed to step S6042; otherwise, proceed to step S6044.

[0133] In this embodiment of the disclosure, if the source IP address is not in the address whitelist, a priority strategy is still used to determine the priority of the source IP address. The priority strategy includes address priority, port priority, protocol priority, etc., to determine the priority of source IP address, destination IP address, source port, destination port, transport protocol, network protocol, etc., according to the actual scenario, so as to ensure data transmission security.

[0134] Furthermore, the presence of a priority identifier in the IP header indicates that the address priority is met, while the absence of a priority identifier indicates that the address priority is not met.

[0135] Step S6044: Determine whether the source IP address complies with the edge policy. If yes, proceed to step S6042; otherwise, proceed to step S6045.

[0136] In this embodiment of the disclosure, if the priority identifier of the source IP address does not exist, the priority of the source IP address is still determined using an edge strategy. The edge strategy includes catch-all clauses, such as whether the value range of each field of the source IP address meets the requirements.

[0137] Step S6045: Determine that the filtering result of the recombined data packet is a data risk.

[0138] In this embodiment of the disclosure, when the source IP address does not comply with the edge policy, the filtering result of the reassembled data packet is determined to be a data risk.

[0139] Step S605: Reject the data transmission request.

[0140] In this embodiment of the disclosure, if the filtering result of the reconstructed data packet indicates a data risk, the data transmission request is rejected.

[0141] It should be noted that the above ACL policies only use the source IP address as a filtering example. In actual transmission, various packet headers or packet bodies can be filtered for security purposes as needed. Selective settings can be made according to actual transmission requirements.

[0142] In this embodiment of the disclosure, the method for transmitting reassembled data packets first determines whether a historical session exists through a session table. If a session exists, a direct matching routing entry is found; otherwise, ACL filtering is performed. Based on the information at each layer of the reassembled data packet, ACL checks are performed on the reassembled data packet to achieve the purpose of network policy isolation and control, thereby controlling the mutual access connectivity between the access source and the accessed target and ensuring the security and reliability of data transmission.

[0143] In this embodiment of the disclosure, when IP fragmentation is absent, there is no need to determine the on / off state of the fragmentation reassembly switch; the smart network interface card directly transmits the data body of the data packet requesting data transmission. Similar to... Figure 6 The method for transmitting reassembled data packets shown extracts information such as the source IP address and destination IP address from the IP header of the data transmission request packet, searches the local session table, and if a historical session exists, directly searches the routing entry for forwarding; if no historical session exists, performs security filtering according to the ACL policy, and obtains the filtering results to match the routing entry or reject the data transmission request.

[0144] In this embodiment of the disclosure, when IP fragmentation exists and the fragmentation reassembly switch is turned on, it indicates that the transmission traffic of the smart network interface card (NIC) has not exceeded the traffic threshold. The smart NIC can process the data transmission request to meet the traffic requirements of UDP large packets, and directly transmit the data body of the data packet of the data transmission request by the smart NIC.

[0145] In this embodiment, the data transmission method of the smart network interface card (NIC) ensures the data transmission capability of the NIC in scenarios with large UDP packets and high traffic volumes. The NIC transparently transmits large UDP packets in high-traffic scenarios to the physical server, which then performs fragmentation, reassembly, and security filtering. The NIC also performs security filtering on small UDP packets and TCP data packets that do not trigger IP fragmentation. Furthermore, the NIC performs fragmentation, reassembly, and security filtering on large UDP packets in non-high-traffic scenarios. This satisfies the application-side traffic requirements while achieving network policy isolation and control, ensuring the high throughput requirements of the NIC and preventing throughput bottlenecks.

[0146] Figure 7 This is a schematic diagram of the main modules of a data transmission device for a smart network interface card according to an embodiment of the present disclosure, such as... Figure 7 As shown, the data transmission device 700 of the smart network card disclosed herein includes:

[0147] The on / off module 701 is used to detect the transmission flow of the data transmission request and set the on / off state of the fragmentation and reassembly switch according to the transmission flow.

[0148] The receiving module 702 is used to receive multiple data transmission requests; wherein the data transmission request includes a data packet.

[0149] The parsing module 703 is used to parse the data packets layer by layer and extract the IP headers from each data packet.

[0150] The transmission module 704 is used to determine whether the data packet has IP fragmentation based on the IP header. If IP fragmentation exists and the fragmentation reassembly switch is off, the transmission module 704 transmits the data packet to the physical server that works with the smart network card, so that the physical server performs fragmentation and reassembly on the data packet.

[0151] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.

[0152] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.

[0153] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a processor of a computer, the computer program is used to cause the computer to perform a method according to an embodiment of this disclosure.

[0154] refer to Figure 8 The present invention describes a structural block diagram of an electronic device 800 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0155] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. The RAM 803 may also store various programs and data required for the operation of the device 800. The computing unit 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0156] Multiple components in electronic device 800 are connected to I / O interface 805, including: input unit 806, output unit 807, storage unit 808, and communication unit 809. Input unit 806 can be any type of device capable of inputting information to electronic device 800. Input unit 806 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 807 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 808 may include, but is not limited to, disk and optical disk. Communication unit 809 allows electronic device 800 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers and / or chipsets, such as Bluetooth™ devices, WiFi devices, WiMa8 devices, cellular communication devices, and / or the like.

[0157] The computing unit 801 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 801 performs the various methods and processes described above. For example, in some embodiments, Figures 1 to 6 The method can be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as storage unit 808. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 800 via ROM 802 and / or communication unit 809. In some embodiments, computing unit 801 can be configured to execute by any other suitable means (e.g., by means of firmware). Figures 1 to 6 The method.

[0158] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0159] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0160] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0161] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0162] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0163] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

Claims

1. A data transmission method for a smart network interface card (NIC), characterized in that, The smart network interface card includes a fragmentation and reassembly switch, and the data transmission method includes: The transmission traffic of the smart network card is detected, and the on / off state of the fragmentation and reassembly switch is set according to the transmission traffic. Receive multiple data transmission requests; wherein, the data transmission request includes a data packet; The data packets are parsed layer by layer to extract the IP header from each data packet; Based on the IP header, it is determined whether the data packet contains IP fragments. If IP fragments exist and the fragmentation reassembly switch is turned off, the data packet is forwarded to the physical server that works with the smart network card, so that the physical server can reassemble the data packet into fragments.

2. The data transmission method as described in claim 1, characterized in that, The fragmentation reassembly switch is implemented by adding explicit settings to the smart network card; disabling the fragmentation reassembly switch includes: Set the attribute value of the network protocol parameter of the smart network card to FALSE, and set the attribute value of the pass-through parameter of the smart network card to TRUE; wherein the attribute values ​​of the network protocol parameter and the pass-through parameter are Boolean variables.

3. The data transmission method as described in claim 2, characterized in that, The network protocol parameters include ipfset_v4 and ipfset_v6, and the pass-through parameter is pass-udp.

4. The data transmission method as described in claim 1, characterized in that, In the case where the IP fragment exists but the fragment reassembly switch is enabled, the method further includes: The data packets are fragmented and reassembled.

5. The data transmission method as described in claim 1 or 4, characterized in that, The data packet of the data transmission request also includes the application identifier of the source application; the smart network interface card includes multiple fragmentation and reassembly switches, each fragmentation and reassembly switch corresponding to a different source application; setting the on / off state of the fragmentation and reassembly switches according to the transmission traffic includes: Obtain historical data transmission requests from each of the aforementioned source applications during a preset historical period; For each of the aforementioned source applications, the historical transmission traffic of the smart network card is analyzed to identify source applications whose historical transmission traffic is greater than or equal to a traffic threshold; Use the application identifier corresponding to the source application that is greater than or equal to the traffic threshold as the target shutdown identifier, and turn off the fragment reassembly switch corresponding to the target shutdown identifier.

6. The data transmission method as described in claim 1, characterized in that, The step of parsing the data packets layer by layer to extract the IP headers from each data packet includes: The data packet of the data transmission request is parsed, and the outermost MAC address of the data packet is stripped off to obtain the intermediate parsed packet; Extract the virtual identifier from the intermediate parsing packet; Extract the network layer IP header from the separated IP packets.

7. The data transmission method as described in claim 6, characterized in that, The step of determining whether the data packet contains IP fragments based on the IP header includes: Obtain the upper-layer protocol of the IP header and determine whether the attribute value of the upper-layer protocol is TCP; If the attribute value of the upper-layer protocol is not TCP, determine whether IP fragmentation exists in the IP header based on the attribute value of the fragmentation tag; wherein, a non-empty attribute value of the fragmentation tag indicates that the data packet contains IP fragmentation.

8. The data transmission method as described in claim 1, characterized in that, Also includes: Extract the source IP address and destination IP address from the IP header of the reassembled data packet; The source IP address is matched using an address whitelist. If the source IP address does not belong to the address whitelist, the priority identifier of the source IP address is searched. If the priority identifier of the source IP address exists, the filtering result of the reconstructed data packet is determined to be data secure. A routing entry to the destination IP address is searched, and the reconstructed data packet is forwarded according to the routing entry.

9. A data transmission device for a smart network card, characterized in that, The smart network interface card includes a fragmentation and reassembly switch, and the data transmission device includes: An on / off module is used to detect the transmission traffic of the smart network card and set the on / off state of the fragmentation and reassembly switch according to the transmission traffic. A receiving module is used to receive multiple data transmission requests; wherein the data transmission request includes a data packet; The parsing module is used to parse the data packets layer by layer and extract the IP headers from each data packet; The transmission module is used to determine whether the data packet has IP fragmentation based on the IP header. If IP fragmentation exists and the fragmentation reassembly switch is off, the transmission module will forward the data packet to the physical server that works with the smart network card, so that the physical server can reassemble the data packet into fragments.

10. An electronic device, comprising: processor; as well as Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the data transmission method of the smart network card according to any one of claims 1-8.

11. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to execute the data transmission method of the smart network card according to any one of claims 1-8.