Forwarding control method and device, equipment and medium

By introducing a first gigabit Ethernet media access controller (GMAC) to receive and classify data packets, distinguishing between ordinary traffic and traffic that needs to be processed, intelligent forwarding control is achieved, solving the performance degradation problem caused by hardware acceleration and improving system performance and stability.

CN121151292APending Publication Date: 2025-12-16SHEN ZHOU SHU MA WANG LUO BEI JING YOU XIAN GONG SI +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202511681353.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-17
Publication Date
2025-12-16

AI Technical Summary

Technical Problem

In existing technologies, globally disabling hardware acceleration functions leads to a sharp drop in system throughput and a surge in CPU load, severely impacting the device's forwarding performance.

Method used

By introducing a first Gigabit Ethernet Media Access Controller (GMAC) to receive data packets and classify them based on a forwarding table, distinguishing between Class 1 and Class 2 data packets, Class 1 data packets are forwarded by hardware acceleration, while Class 2 data packets are forwarded after being processed by the application, thus achieving intelligent forwarding control.

Benefits of technology

It reduced transmission latency, increased throughput, improved overall processing capacity and stability, and achieved a fine division of labor between hardware acceleration for ordinary traffic and software processing for important business applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121151292A_ABST
    Figure CN121151292A_ABST
Patent Text Reader

Abstract

The invention relates to a forwarding control method and device, equipment and a medium, and relates to the technical field of communication. The method comprises the following steps: receiving a target data packet sent by a target terminal through a first gigabit Ethernet media access controller GMAC; wherein the first GMAC corresponds to a local area network side; under the condition that the target data packet is a first type of data packet, forwarding the target data packet through a second GMAC based on the forwarding table; wherein the first type of data packets are data packets which do not need to be processed by an application program and are forwarded based on a basic network protocol; the second GMAC corresponds to a wide area network side; under the condition that the target data packet is the second type of data packet, processing the target data packet through the application program, and forwarding the target data packet through the second GMAC after processing; wherein the second type of data packets are data packets which need to be forwarded after being processed by the application program. By adopting the method, intelligent forwarding control of the data packet can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of communication, in particular to a forwarding control method, device, equipment and medium. BACKGROUND

[0002] With the deepening of the process of digitization, embedded network facilities such as home gateways, industrial routers and edge computing devices not only need to undertake the primary work of high-speed data forwarding, but also are expected to integrate intelligent services such as user authentication, content filtering, security detection and traffic management. This makes the data processing mode of network devices evolve from the traditional, single pipe forwarding to intelligent forwarding that combines sensing, analysis and control.

[0003] Currently, mainstream embedded SoCs generally integrate hardware acceleration engines (such as HNAT / PPE) and provide SDKs to achieve high-performance data exchange through hardware-based flow table forwarding. At the same time, to implement the above intelligent services, the upper application program must be able to intercept and analyze specific data packets. A common existing technology is to globally disable hardware acceleration when application layer intervention is required, forcing all network packets to be processed through the CPU's software protocol stack for application program capture and analysis. However, the scheme of globally disabling hardware acceleration has a major defect, which causes a sharp decline in system throughput and a surge in CPU load, severely sacrificing the fundamental forwarding performance of the device.

[0004] Therefore, how to achieve intelligent forwarding control of data packets has become a problem to be solved. SUMMARY

[0005] The present application provides a forwarding control method, device, equipment and medium, which can realize intelligent forwarding control of data packets.

[0006] To achieve the above purpose, the present application adopts the following technical scheme: In a first aspect, the present application provides a forwarding control method, comprising: receiving a target data packet sent by a target terminal through a first Gigabit Ethernet Media Access Controller (GMAC); wherein the first GMAC corresponds to a local area network side; in the case that the target data packet is a first type of data packet, forwarding the target data packet through a second GMAC based on a forwarding table; wherein the first type of data packet is a data packet that does not need to be processed by an application program and is forwarded based on a basic network protocol; the second GMAC corresponds to a wide area network side; in the case that the target data packet is a second type of data packet, processing the target data packet through an application program and forwarding the target data packet through the second GMAC after processing; wherein the second type of data packet is a data packet that needs to be processed by an application program before being forwarded.

[0007] In one embodiment, before the target data packet is processed by the application program, the method further comprises: classifying the target data packet based on a preset classification rule, and marking the target data packet according to a classification result to obtain a type mark corresponding to the target data packet; wherein the preset classification rule comprises a quintuple rule, a protocol type rule or a port number rule; determining the application program corresponding to the target data packet according to the type mark.

[0008] In one embodiment, after the target data packet is processed by the application program, the method further comprises: clearing the type mark corresponding to the target data packet, and clearing a mark record corresponding to a quintuple to which the target data packet belongs; wherein the quintuple comprises a source IP address, a destination IP address, a source port, a destination port and a transmission protocol.

[0009] In one embodiment, in the case that the target data packet is a first type data packet, the target data packet is forwarded by a second GMAC based on a forwarding table, comprising: creating the forwarding table for the target data packet in the case that the target data packet is a first data packet; forwarding the target data packet by the second GMAC based on the forwarding table.

[0010] In one embodiment, in the case that the target data packet is a first type data packet, the target data packet is forwarded by a second GMAC based on a forwarding table, comprising: determining the forwarding table corresponding to the target data packet in the case that the target data packet is a non-first data packet; forwarding the target data packet by the second GMAC based on the forwarding table.

[0011] In one embodiment, the target data packet is classified based on a preset classification rule, comprising: determining a classification result of the target data packet based on a preset priority order in the case that the target data packet matches at least two preset classification rules.

[0012] In a second aspect, the application provides a forwarding control device, comprising: a receiving module configured to receive a target data packet sent by a target terminal through a first Gigabit Ethernet Media Access Controller (GMAC); wherein the first GMAC corresponds to a local area network side; The first forwarding module is configured to, in a case where the target data packet is a first type of data packet, forward the target data packet based on the forwarding table and by using a second GMAC; the first type of data packet is a data packet that does not need to be processed by an application and is forwarded based on a basic network protocol; and the second GMAC corresponds to a wide area network side. The second forwarding module is configured to, in a case where the target data packet is a second type of data packet, process the target data packet by using an application and then forward the target data packet by using the second GMAC; the second type of data packet is a data packet that needs to be processed by an application before being forwarded.

[0013] In one embodiment, the forwarding control device further includes: The classification module is configured to classify the target data packet based on a preset classification rule and mark the target data packet according to a classification result to obtain a type mark corresponding to the target data packet; the preset classification rule includes a five-tuple rule, a protocol type rule, or a port number rule; and the application corresponding to the target data packet is determined according to the type mark.

[0014] In a third aspect, the present application provides a computing device including a memory and a processor. The memory stores one or more computer programs including instructions; and when the instructions are executed by the processor, the computing device performs the method according to any one of the first aspect.

[0015] In a fourth aspect, the present application provides a computer readable storage medium for storing a computer program, the computer program being used to perform the method according to any one of the first aspect.

[0016] In a fifth aspect, the present application provides a computer program product including one or more computer instructions, when the computer instructions are executed by a computer, the computer performs the method according to any one of the first aspect.

[0017] According to the above technical solution, the present application has at least the following beneficial effects: In the present application, the target data packet sent by the target terminal is received by the first Gigabit Ethernet Media Access Controller (GMAC) corresponding to the local area network side, and the fixed path of the internal network data inflow is determined, which lays a foundation for subsequent implementation of accurate forwarding strategy based on physical port and logical direction. Further, in the case that the target data packet is the first type of data packet, the target data packet is forwarded by the second GMAC corresponding to the wide area network side based on the forwarding table, so that the traffic without deep processing is directly processed by the hardware acceleration engine, greatly reducing the transmission delay and improving the throughput. Finally, in the case that the target data packet is the second type of data packet, the target data packet is processed by the application program, and after processing, the target data packet is forwarded by the second GMAC, so that the CPU computing resource is focused on the second type of data packet which needs to be processed, system management and other value-added services, thereby improving the overall processing capability and stability. The present scheme introduces the first GMAC and the second GMAC, realizes the hardware acceleration of ordinary traffic and the fine division of labor of important business software processing, and finally realizes the intelligent forwarding control of the data packet.

[0018] It should be understood that the description of technical features, technical solutions, beneficial effects or similar language in the present application does not imply that all features and advantages can be achieved in any single embodiment. On the contrary, it can be understood that the description of a feature or beneficial effect means that the specific technical feature, technical solution or beneficial effect is included in at least one embodiment. Therefore, the description of technical features, technical solutions or beneficial effects in the specification does not necessarily refer to the same embodiment. Further, the technical features, technical solutions and beneficial effects described in the embodiments can be combined in any appropriate manner. Those skilled in the art will understand that the embodiments can be implemented without one or more specific technical features, technical solutions or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects can be identified in specific embodiments that do not embody all embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 An application environment diagram of a forwarding control method provided in an embodiment of the present application; Figure 2 A flowchart of a forwarding control method provided in an embodiment of the present application; Figure 3 A structure block diagram of a forwarding control device provided in an embodiment of the present application; Figure 4 An internal structure diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The terms "first," "second," and "third," etc., used in this application specification and accompanying drawings are used to distinguish different objects, not to limit a specific order.

[0021] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0022] To make the technical solution of this application clearer and easier to understand, the application scenarios of the technical solution of this application are described below with reference to the accompanying drawings. Figure 1 As shown, this figure is an application environment diagram provided by an embodiment of this application.

[0023] In this application scenario, network device 104 connects to terminal 102 through a communication network to enable terminal 102 to connect to the external network.

[0024] To make the technical solution of this application clearer and easier to understand, the following describes how this method is applied in the above-mentioned application scenario. Figure 1 Taking network device 104 as an example, this application describes a forwarding control method provided in its embodiments. Figure 2 As shown in the figure, this figure is a flowchart illustrating a forwarding control method provided in an embodiment of this application.

[0025] S201. Receive the target data packet sent by the target terminal through the first gigabit Ethernet media access controller (GMAC).

[0026] The first GMAC corresponds to the local area network side, referring to the network interface controller on the network device that connects to the local area network (LAN) side, and is used to receive data traffic from internal network devices (such as computers, mobile phones, IoT terminals, etc.).

[0027] The target terminal refers to a specific terminal device within a local area network (LAN) that needs to communicate or access external networks through network devices; it could be a computer that needs to be subject to internet access management, a smartphone undergoing Portal authentication, an IoT sensor that sends specific control commands, or a smart TV that needs to be filtered for domain names, etc.

[0028] A target data packet refers to a network data packet sent by the target terminal that meets specific conditions and needs to be identified and processed. It can be a domain name resolution request packet sent to a specific DNS (Domain Name System) server, the first TCP SYN (Transmission Control Protocol - Synchronization Sequence Number) packet sent to an authentication server on HTTP (Hypertext Transfer Protocol) port 80, or a custom management protocol data packet using a specific non-standard port, etc.

[0029] For example, a hardware module on a network device that is specifically responsible for local area network communication, such as the first GMAC, continuously listens to the physical port it is bound to, such as the LAN port; when a target terminal in the local area network, such as a computer that is initiating an HTTP request, sends a network data packet, the data packet arrives at the port managed by the first GMAC through the physical link.

[0030] S202. If the target data packet is a type 1 data packet, forward the target data packet through the second GMAC based on the forwarding table.

[0031] One possible approach is to create a forwarding table for the target data packet when the target data packet is the first data packet; and then forward the target data packet through a second GMAC based on the forwarding table.

[0032] Another possible approach is to determine the forwarding table corresponding to the target data packet when the target data packet is not the first data packet; based on the forwarding table, the target data packet is forwarded through the second GMAC.

[0033] The first type of data packet is a data packet that does not require processing by the application (upper-layer software) and is forwarded based on the basic network protocol. That is, its content does not need to be recognized and intervened by the application layer, including first-time data packets and non-first-time data packets.

[0034] A forwarding table is a data structure that can be stored in the hardware acceleration module of a network device or in the associated memory. It can pre-record forwarding information of the data stream and may include, but is not limited to, key forwarding parameters such as the destination MAC (Media Access Control) address, the outgoing interface, and the IP (Internet Protocol) / port after NAT (Network Address Translation).

[0035] The second GMAC, corresponding to the WAN side, is another Gigabit Ethernet media access controller, serving as the hardware exit point for data packets leaving the device and heading to external networks (such as the Internet).

[0036] The first data packet refers to the first data packet belonging to a certain network connection (or data stream); for this connection, the corresponding forwarding table does not yet exist in the hardware acceleration module; the first data packet needs to enter the kernel protocol stack and be processed by the CPU (Central Processing Unit) software to establish routing, session and other information, thereby providing a basis for the hardware acceleration module to create a forwarding table.

[0037] Non-first-time data packets refer to data packets belonging to an existing network connection, and the corresponding forwarding table for that connection already exists in the hardware acceleration module. They are the main beneficiaries of hardware-accelerated forwarding, and can be directly matched with the existing forwarding table for fast forwarding, completely bypassing the CPU and kernel protocol stack.

[0038] For example, after receiving a data packet, a network device first determines whether it is a Type 1 data packet (i.e., requiring no application processing). If so, regardless of whether it is the first or subsequent data packet, the ultimate goal is to quickly forward it through the second GMAC (WAN side) based on the forwarding table. If the network device confirms that the target data packet is a Type 1 data packet and is the first data packet (i.e., no matching entry is found in the hardware flow table), then the device sends it to the network protocol stack of the operating system kernel. The kernel protocol stack (driven by the CPU) performs complete routing and session processing on this data packet to determine its forwarding path. After processing, the kernel instructs the hardware acceleration module to create a forwarding table for this data flow. After the forwarding table is successfully created, this first data packet itself is usually sent out by the driver through the second GMAC based on this newly created entry, and the entry is stored in the hardware.

[0039] The network device confirms that the target data packet is a Class 1 data packet and determines through hardware lookup that a corresponding forwarding table already exists in the hardware acceleration module, meaning it is a non-first-time data packet. Subsequently, the network device's hardware forwarding engine (such as DMA, PPE) directly modifies and forwards the data packet based on the information in the existing forwarding table, such as the destination MAC and outgoing interface index. This process completely bypasses the CPU and kernel protocol stack, achieving extremely low processing latency and CPU usage. The rapidly processed data packet is finally submitted to the second GMAC. The second GMAC, as the hardware controller on the WAN side, is responsible for assembling the data packet into an Ethernet frame and sending it to the WAN line through the physical port.

[0040] Together, they form a closed loop for efficient processing of ordinary traffic: the first data packet traverses the software path and creates a forwarding table; subsequent data packets take shortcuts using the established forwarding table, achieving fully hardware-accelerated forwarding. The control logic lies in the fact that network devices, through a marking mechanism, precisely exclude packets requiring application processing from this fast path, thus achieving a perfect balance between performance and functionality.

[0041] S203. When the target data packet is a second type data packet, the target data packet is processed by the application program, and then forwarded by the second GMAC.

[0042] The second type of data packet is a data packet that needs to be processed by the application before being forwarded, such as data packets that require user authentication, content filtering, security detection, or specific protocol proxying.

[0043] An application refers to a software program that runs in the user space of a network device's operating system and implements specific business logic; such as a portal authentication server, a DNS filtering service, or a traffic statistics and analysis service.

[0044] Before the application processes the target data packet, it also includes: Based on preset classification rules, the target data packets are classified, and the target data packets are marked according to the classification results to obtain the type label corresponding to the target data packets; based on the type label, the application corresponding to the target data packets is determined.

[0045] Optionally, if the target data packet matches at least two preset classification rules, the classification result of the target data packet is determined based on a preset priority order.

[0046] After the application processes the target data packet, the following is also included: Clear the type tag corresponding to the target data packet, and clear the tag record corresponding to the five-tuple to which the target data packet belongs.

[0047] Among them, the preset classification rules are one or more sets of matching criteria pre-configured in the network device kernel or driver, used to identify and classify data packets in the early stage of entering the system, including five-tuple rules, protocol type rules or port number rules.

[0048] The 5-tuple rule is a network traffic classification rule that defines a network connection or data flow using five key attributes of a data packet; these include source IP address, destination IP address, source port number, destination port number, and transport layer protocol. Transport layer protocols can include, but are not limited to, TCP (Transmission Control Protocol), UDP (User Datagram Protocol), and ICMP (Internet Control Message Protocol).

[0049] Protocol type rules are rules that match based on the characteristics of network protocols; for example, they can be based on Ethernet frame type, protocol number in IP header, or deeper application layer protocol characteristics, such as the specific format of DNS query, URI (Uniform Resource Identifier) ​​of HTTP request, etc.

[0050] Port number rules refer to simplified rules that primarily match based on the destination port number or the source port number; for example, classifying all UDP packets (DNS traffic) destined for port 53.

[0051] A type tag is metadata associated with a data packet. It can be an integer value that is passed in kernel space and is used to store the classification result of the data packet.

[0052] Predefined priority order is a predefined order of rule execution to eliminate ambiguity when multiple classification rules may match the same data packet. It ensures that each data packet has one and only one definite classification result, avoiding duplicate or conflicting processing by multiple applications.

[0053] The 5-tuple includes the source IP address, destination IP address, source port, destination port, and transport protocol.

[0054] A tag record is a persistent state information maintained for a stream of data that has been tagged. It may be stored in a special table structure in the kernel or in a configuration database in user space.

[0055] Type marking is an immediate identifier applied to a single data packet; while marking records are a persistent policy applied to the entire data stream. When a data packet is received, its 5-tuple is checked for a marking record. If it exists, the packet will continue to be directed to the software path even if it does not have a type marking itself. Therefore, clearing the marking record is crucial for completely removing stream markings.

[0056] For example, when a target data packet enters the kernel network protocol stack of a network device, the classification module examines the packet, comparing its various fields (such as IP header and TCP / UDP header) with a series of preset classification rules. If a target data packet matches at least two preset classification rules—for example, if a target data packet is both HTTP (port 80) and originates from a specific IP segment—a unique classification result is determined based on a preset priority order, such as IP address rules taking precedence over port rules. Furthermore, based on the determined classification result, the target data packet is marked, for example, by setting its kernel mark value. This type mark acts like an internal identifier; for example, mark=1 indicates that it needs to be sent to the Portal authentication application, and mark=2 indicates that it needs to be sent to the DNS filtering application. For marked data packets, no hardware forwarding table is created for them, ensuring that all subsequent packets in this data stream continue to enter the kernel and can be captured by the application.

[0057] Applications running in user space (such as portal servers) obtain network data from the kernel through interfaces like sockets or libpcap. These applications typically set filters to capture only packets with specific type tags, allowing them to determine which application should handle the target packet based on the type tag, achieving precise distribution. Upon receiving the target packet, the corresponding application executes its pre-designed business logic, such as parsing HTTP requests and returning an authentication page to the user, analyzing DNS lookups to decide whether to intercept, or parsing custom protocols to execute device configuration commands. Socket is the standard portal used by applications to actively send and receive network data; Lippcap is a tool for passively monitoring and capturing network traffic.

[0058] Once the application has finished processing the data packet (it may have modified the packet content or left it unchanged but with information logged), it will re-inject the data packet into the kernel protocol stack or send it directly via a socket.

[0059] The data packet will then continue through the kernel's routing process. Since this data stream never has a hardware forwarding table, it will be sent out via the kernel path and the second GMAC.

[0060] After the application completes the processing task of the data stream containing the target data packet, the application logic determines that the data stream no longer needs to be specially processed. The application can issue instructions to the kernel or control module through a predefined control interface, such as a local socket, a system call, or a configuration file modification. The content of the instruction can be "clear all tagging information of the data stream identified by the 5-tuple [source IP:source port->destination IP:destination port:protocol]".

[0061] After receiving the clearing command, the system module of the network device will perform two levels of clearing: clearing the type tag corresponding to the target data packet and clearing the tag record corresponding to the five-tuple to which the target data packet belongs; Clearing the type marker corresponding to the target data packet means resetting the mark field value of the data packet in the kernel data structure to 0 (or a value indicating no marker).

[0062] Clearing the tag record corresponding to the five-tuple to which the target data packet belongs involves searching its tag record table (which may be a hash table) using the five-tuple provided in the instruction as the key and deleting the corresponding entry. Once this tag record is cleared, it means that the system "forgot" that this flow needs special handling. Subsequently, when the next data packet belonging to the same five-tuple data flow arrives at the network device, it will be treated by the system as a normal Class 1 data packet.

[0063] If the entry for this flow exists in the hardware forwarding table, it will use hardware acceleration; if it does not exist, it will create an entry in the protocol stack, and subsequent packets will also use hardware acceleration.

[0064] The aforementioned forwarding control method receives target data packets sent by the target terminal through the first Gigabit Ethernet Media Access Controller (GMAC) on the corresponding LAN side. By determining the fixed path of data inflow into the internal network, it lays the foundation for subsequent precise forwarding strategies based on physical ports and logical directions. Furthermore, when the target data packet is a first-type data packet, it is forwarded through the second GMAC on the corresponding WAN side based on the forwarding table. This allows traffic that does not require deep processing to be directly handled by the hardware acceleration engine, greatly reducing transmission latency and improving throughput. Finally, when the target data packet is a second-type data packet, the application processes the target data packet, and then forwards it through the second GMAC. This allows CPU computing resources to focus on second-type data packets that need to be processed, system management, and other value-added services, thereby improving overall processing capacity and stability. This solution, by introducing the first and second GMACs, achieves a fine division of labor between hardware acceleration for ordinary traffic and software processing for important business traffic, ultimately realizing intelligent forwarding control of data packets.

[0065] The above text combined Figures 1 to 2 The forwarding control method provided in the embodiments of this application has been described in detail. The apparatus and device provided in the embodiments of this application will be described below with reference to the accompanying drawings.

[0066] like Figure 3 As shown, this figure is a structural block diagram of a forwarding control device 600 provided in an embodiment of this application. The forwarding control device 600 includes: a receiving module 601, a first forwarding module 602, and a second forwarding module 603, wherein: The receiving module 601 is used to receive target data packets sent by the target terminal through the first Gigabit Ethernet Media Access Controller (GMAC); wherein the first GMAC corresponds to the local area network side. The first forwarding module 602 is used to forward the target data packet through the second GMAC based on the forwarding table when the target data packet is a first type data packet; wherein, the first type data packet is a data packet that does not require application processing and is forwarded based on the basic network protocol; the second GMAC corresponds to the wide area network side; The second forwarding module 603 is used to process the target data packet through the application when the target data packet is a second type of data packet, and then forward the target data packet through the second GMAC; wherein, the second type of data packet is a data packet that needs to be processed by the application before being forwarded.

[0067] In one embodiment, the forwarding control device 600 further includes: The classification module is used to classify target data packets based on preset classification rules, and to mark the target data packets according to the classification results to obtain the type label corresponding to the target data packets. The preset classification rules include five-tuple rules, protocol type rules, or port number rules. Based on the type label, the application corresponding to the target data packet is determined.

[0068] In one embodiment, the forwarding control device 600 further includes: The clearing module is used to clear the type tag corresponding to the target data packet, and to clear the tag record corresponding to the five-tuple to which the target data packet belongs; wherein the five-tuple includes the source IP address, destination IP address, source port, destination port, and transport protocol.

[0069] In one embodiment, the first forwarding module 602 is specifically used for: If the target data packet is the first data packet, a forwarding table is created for the target data packet; based on the forwarding table, the target data packet is forwarded through the second GMAC.

[0070] In one embodiment, the first forwarding module 602 is specifically used for: If the target data packet is not the first data packet, determine the forwarding table corresponding to the target data packet; based on the forwarding table, forward the target data packet through the second GMAC.

[0071] In one embodiment, the classification module is specifically used for: If the target data packet matches at least two preset classification rules, the classification result of the target data packet is determined based on the preset priority order.

[0072] The forwarding control device 600 according to the embodiments of this application can correspondingly execute the method described in the embodiments of this application, and the other operations and / or functions of each module / unit of the forwarding control device 600 are respectively for implementing Figure 2 , Figure 4 For the sake of brevity, the corresponding processes of each method in the illustrated embodiments will not be described in detail here.

[0073] This application also provides a computing device. This computing device can be a local computing device or an application server.

[0074] like Figure 4 As shown in the figure, this is an internal structural diagram of a computing device provided in an embodiment of this application. The computing device 700 includes a bus 701, a processor 702, a communication interface 703, and a memory 704. The processor 702, the memory 704, and the communication interface 703 communicate with each other via the bus 701.

[0075] The 701 bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, Figure 4 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0076] The processor 702 can be any one or more of the following processors: central processing unit (CPU), graphics processing unit (GPU), microprocessor (MP), or digital signal processor (DSP).

[0077] The communication interface 703 is used for communication with external devices.

[0078] Memory 704 may include volatile memory, such as random access memory (RAM). Memory 704 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).

[0079] The memory 704 stores executable code, and the processor 702 executes the executable code to perform the aforementioned forwarding control method.

[0080] Specifically, in achieving Figure 3 In the case of the illustrated embodiment, and Figure 3 When the modules or units of the forwarding control device described in the embodiment are implemented by software, the execution... Figure 3 The software or program code required for the functions of each module / unit can be partially or wholly stored in memory 704. Processor 702 executes the program code corresponding to each unit stored in memory 704 and performs the aforementioned forwarding control method.

[0081] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the aforementioned forwarding control method.

[0082] This application also provides a computer program product comprising one or more computer instructions. When the computer instructions are loaded and executed on a computing device, all or part of the processes or functions described in this application are generated.

[0083] The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, or data center to another website, computer, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0084] When the computer program product is executed by a computer, the computer performs any of the aforementioned forwarding control methods. The computer program product can be a software installation package; when any of the aforementioned forwarding control methods is required, the computer program product can be downloaded and executed on the computer.

[0085] The descriptions of the processes or structures corresponding to the above figures each have their own emphasis. For parts of a process or structure that are not described in detail, please refer to the relevant descriptions of other processes or structures.

[0086] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be covered within the scope of protection of this application.

Claims

1. A forwarding control method, characterized in that, The method includes: The target data packet sent by the target terminal is received through the first Gigabit Ethernet Media Access Controller (GMAC); wherein, the first GMAC corresponds to the local area network side. If the target data packet is a first type of data packet, the target data packet is forwarded through the second GMAC based on the forwarding table; wherein, the first type of data packet is a data packet that does not require application processing and is forwarded based on the basic network protocol; the second GMAC corresponds to the wide area network side; When the target data packet is a second type of data packet, the application processes the target data packet, and then forwards the target data packet through the second GMAC; wherein, the second type of data packet is a data packet that needs to be processed by the application before being forwarded.

2. The method according to claim 1, characterized in that, Before the target data packet is processed by the application, the following is also included: Based on preset classification rules, the target data packets are classified, and the target data packets are marked according to the classification results to obtain the type mark corresponding to the target data packets; wherein, the preset classification rules include five-tuple rules, protocol type rules, or port number rules; The application corresponding to the target data packet is determined based on the type tag.

3. The method according to claim 1, characterized in that, After the target data packet is processed by the application, the following is also included: Clear the type tag corresponding to the target data packet, and clear the tag record corresponding to the five-tuple to which the target data packet belongs; wherein, the five-tuple includes source IP address, destination IP address, source port, destination port, and transport protocol.

4. The method according to claim 1, characterized in that, The first type of data packet includes the initial data packet. When the target data packet is a first type of data packet, forwarding the target data packet via the second GMAC based on the forwarding table includes: If the target data packet is the first data packet, a forwarding table is created for the target data packet; Based on the forwarding table, the target data packet is forwarded through the second GMAC.

5. The method according to claim 1, characterized in that, The first type of data packet includes non-first-time data packets. When the target data packet is a first type of data packet, forwarding the target data packet via the second GMAC based on the forwarding table includes: If the target data packet is not the first data packet, determine the forwarding table corresponding to the target data packet; Based on the forwarding table, the target data packet is forwarded through the second GMAC.

6. The method according to claim 2, characterized in that, The classification of the target data packets based on preset classification rules includes: If the target data packet matches at least two preset classification rules, the classification result of the target data packet is determined based on a preset priority order.

7. A forwarding control device, characterized in that, The device includes: The receiving module is used to receive target data packets sent by the target terminal through a first Gigabit Ethernet Media Access Controller (GMAC); wherein the first GMAC corresponds to the local area network side. The first forwarding module is used to forward the target data packet through the second GMAC based on the forwarding table when the target data packet is a first type of data packet; wherein, the first type of data packet is a data packet that does not require application processing and is forwarded based on the basic network protocol; the second GMAC corresponds to the wide area network side; The second forwarding module is used to process the target data packet through an application program when the target data packet is a second type of data packet, and then forward the target data packet through a second GMAC; wherein, the second type of data packet is a data packet that needs to be processed by the application program before being forwarded.

8. The apparatus according to claim 7, characterized in that, The device further includes: The classification module is used to classify the target data packet based on preset classification rules, and to mark the target data packet according to the classification results to obtain the type mark corresponding to the target data packet; wherein, the preset classification rules include a five-tuple rule, a protocol type rule, or a port number rule; and to determine the application corresponding to the target data packet according to the type mark.

9. A computing device, characterized in that, Including memory and processor; The memory stores one or more computer programs, the one or more computer programs including instructions; when the instructions are executed by the processor, the computing device performs the method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program for performing the method as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Cellular communication high-rate forwarding method, device and system

    CN121418488A