Forwarding entry keep-alive method, computer equipment, storage medium and product
Through the cooperation of primary and secondary NP chips, keep-alive marks are added and keep-alive processing is performed on the secondary NP chips, which solves the problem of insufficient space for keep-alive marks of hardware, and improves the message forwarding effect in large-scale message forwarding scenarios.
Patent Information
- Application Number
- CN202510291604.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2045-03-12
AI Technical Summary
In large-scale message forwarding scenarios, the hardware keep-alive marking space is insufficient, which makes it difficult to effectively maintain the keep-alive mechanism of forwarding items, affecting the packet forwarding performance.
Through cooperation between the main and auxiliary NP chips, after receiving the target message, the main NP chip matches the target forwarding entry in the main gateway accelerator table, and adds a keep-alive flag to the corresponding messages of the matched forwarding entry, and forwards it to the auxiliary NP chip. The auxiliary NP chip performs keep-alive processing in the first keep-alive mark table based on the keep-alive mark.
The keep-alive processing of forwarding entries exceeding the limit on the number of local aging acceleration table entries is realized, avoiding the impact of insufficient hardware keep-alive marking space on message forwarding, and improving the message forwarding effect in large-scale message forwarding scenarios.
Smart Images

Figure CN119815220A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a forwarding entry keep-alive method, computer equipment, storage medium and product. Background Art
[0002] In actual applications, as the number of users accessing the main network (such as the main gateway of Fiber to the Room - Business Edition FTTR-B networking) increases, the demand for NAT (Network Address Translation) session capacity increases, and the soft / hard forwarding entries increase significantly, resulting in insufficient hardware keep-alive tag space, making it difficult to effectively maintain the keep-alive mechanism of the hard forwarding entries. Summary of the invention
[0003] The embodiment of the present application provides a forwarding entry keep-alive method, a computer device, a storage medium and a product, which can solve the technical problem of insufficient hardware keep-alive tag space. The technical solution is as follows.
[0004] On the one hand, a forwarding entry keep-alive method is provided, the method being executed by a main network processor NP chip, the method comprising: Receive target message; In response to matching a target forwarding entry of the target message in a non-local aging acceleration table, adding a keep-alive flag in a first forwarding message corresponding to the target message to obtain a first keep-alive message; the first forwarding message is a message obtained by modifying the target message based on the target forwarding entry; a first keep-alive marking table corresponding to the forwarding entry in the non-local aging acceleration table is managed by the auxiliary NP chip, and the non-local aging acceleration table stores forwarding entries exceeding the entry quantity limit of the local aging acceleration table; a second keep-alive marking table corresponding to the forwarding entry in the local aging acceleration table is managed by the main NP chip; The first keep-alive message is forwarded to the auxiliary NP chip, where the first keep-alive message is used to instruct the auxiliary NP chip to perform keep-alive processing on the target forwarding entry in the first keep-alive marking table based on the keep-alive flag.
[0005] On the other hand, a forwarding entry keep-alive method is provided, the method being executed by a secondary NP chip, the method comprising: In response to receiving a first keep-alive message sent by the main NP chip, keep-alive processing is performed on a target forwarding entry corresponding to the first keep-alive message in a first keep-alive marking table based on a keep-alive flag in the first keep-alive message; the first keep-alive message is a message obtained after the main NP chip adds a keep-alive flag in the first forwarding message; the first forwarding message is a message obtained after the main NP chip modifies the target message based on the forwarding entry matched in the non-local aging acceleration table; the first keep-alive marking table corresponding to the forwarding entry in the non-local aging acceleration table is managed by the auxiliary NP chip, and the non-local aging acceleration table stores forwarding entries that exceed the entry number limit of the local aging acceleration table; the second keep-alive marking table corresponding to the forwarding entry in the local aging acceleration table is managed by the main NP chip as a local aging acceleration table.
[0006] On the other hand, a computer device is provided. The computer device includes a processor and a memory. The memory stores at least one computer program. The at least one computer program is loaded and executed by the processor to implement the above forwarding entry keep-alive method.
[0007] On the other hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the above forwarding entry keep-alive method.
[0008] On the other hand, a computer program product is provided, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions, which, when executed by a computer, cause the computer to execute to implement the forwarding entry keepalive method provided in the various optional implementations described above.
[0009] In the forwarding entry keep-alive method provided by the embodiment of the present application, the main NP chip divides the main gateway acceleration table into a local aging acceleration table and a non-local aging acceleration table, so as to store forwarding entries exceeding the entry quantity limit of the local aging acceleration table through the non-local aging acceleration table, the main NP chip manages a second keep-alive mark table corresponding to the local aging acceleration table, and the auxiliary NP chip manages a first keep-alive mark table corresponding to the non-local aging acceleration table; in this case, after receiving a target message, the main NP chip matches a target forwarding entry of the target message in the main gateway acceleration table, and when the target forwarding entry of the target message is matched in the non-local aging acceleration table, a keep-alive flag is added to a first forwarding message corresponding to the target message that is modified by the matched target forwarding entry, and the first keep-alive message added with the keep-alive flag is forwarded to the auxiliary NP chip, and the first keep-alive message is used to instruct the auxiliary NP chip to perform keep-alive processing on the target forwarding entry in the first keep-alive mark table based on the keep-alive flag. Through the collaboration between the primary and secondary NP chips, the forwarding entries that exceed the limit of the number of entries in the local aging acceleration table can be kept alive, avoiding the impact of insufficient hardware keep-alive tag space on message forwarding, and improving the message forwarding effect in large-scale message forwarding scenarios.
[0010] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0012] Figure 1 A schematic diagram of FTTR-B networking provided by an exemplary embodiment of the present application is shown; Figure 2 A flow chart of a forwarding entry keep-alive method provided by an exemplary embodiment of the present application is shown; Figure 3 A flow chart of a forwarding entry keep-alive method provided by another exemplary embodiment of the present application is shown; Figure 4 A schematic diagram of a network architecture provided by an exemplary embodiment of the present application is shown; Figure 5 An interactive schematic diagram of a forwarding entry keep-alive method provided in an embodiment of the present application is shown; Figure 6 A schematic diagram of a message header provided by an exemplary embodiment of the present application is shown; Figure 7 A schematic diagram of a main NP chip provided by an exemplary embodiment of the present application is shown; Figure 8A logical schematic diagram of a forwarding entry keep-alive method provided by an exemplary embodiment of the present application is shown; Fig. 9 A flowchart of a maintenance process for a non-local aging acceleration table provided by an exemplary embodiment of the present application is shown; Fig.10 A schematic diagram showing a maintenance process of an aging acceleration table provided by an exemplary embodiment of the present application is shown; Fig.11 A structural block diagram of a computer device shown in an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0013] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of methods consistent with some aspects of the present application as detailed in the appended claims.
[0014] In large-scale message forwarding scenarios, such as FTTR-B (Fiber To The Room – Business) networking scenarios, the main gateway device needs to access more users and provide greater NAT session capabilities. Therefore, the number of soft / hard forwarding entries will increase significantly, resulting in insufficient hardware keep-alive tag space. Figure 1 FIG. 1 shows a schematic diagram of FTTR-B networking provided by an exemplary embodiment of the present application. Figure 1 As shown, the FTTR-B network includes a main gateway device 110 (hereinafter referred to as the main gateway) and multiple slave gateway devices 120. In the FTTB-B deployment application, the main gateway device serves as an egress gateway and implements address conversion from private IP to public IP through NAT, thereby solving the problem of insufficient IPv4 addresses and effectively avoiding external network tools to ensure the security of internal network computers.
[0015] In message forwarding technology, in order to improve the forwarding capability of the gateway, the message is first forwarded through the slow path of the protocol stack and the acceleration table is learned. Subsequent messages search the acceleration table according to the five-tuple. If a hit is found, it is directly forwarded. If a hit is not found, it is processed by the protocol stack. The acceleration table is divided into a soft acceleration table and a hard acceleration table. The soft acceleration table is responsible for generating and other functions, and then creating hardware forwarding entries to achieve line-speed forwarding. The hard forwarding entries in the hard acceleration table are stored in the NP chip in a hash manner, and the hash table is kept alive through the hardware keep-alive solution. However, the hardware keep-alive of the hard acceleration table is limited by the wide keep-alive index of the fixed chip design, resulting in insufficient hardware keep-alive tag space, and the forwarding entries may age prematurely, thereby affecting the fast forwarding of messages and reducing the overall forwarding performance of the gateway device.
[0016] In order to adapt to large-scale message forwarding scenarios and avoid the impact of insufficient hardware keep-alive tag space on message forwarding, the embodiment of the present application provides a forwarding entry keep-alive method, which can achieve the keep-alive of more hardware forwarding entries through the collaboration between NP chips, and solve the problem of insufficient keep-alive tag space for forwarding entries of a single NP chip; Figure 2 A flow chart of a forwarding entry keep-alive method provided by an exemplary embodiment of the present application is shown. The method can be executed by a main NP chip, which serves as an uplink interface module of a main gateway device and provides an egress gateway function; Figure 2 As shown, the method may include the following steps.
[0017] Step 210: Receive the target message.
[0018] In an embodiment of the present application, a main NP (Network Processor Chip) chip and an auxiliary NP chip may be integrated in the main gateway, and each NP chip has a message receiving capability, wherein the target message received by the main NP chip may be a downlink message transmitted upstream, or an uplink message received and forwarded by the auxiliary NP chip.
[0019] Step 220, in response to matching a target forwarding entry of a target message in a non-local aging acceleration table, adding a keep-alive flag in a first forwarding message corresponding to the target message to obtain a first keep-alive message; the first forwarding message is a message obtained after modifying the target message based on the target forwarding entry; the first keep-alive mark table corresponding to the forwarding entry in the non-local aging acceleration table is managed by the auxiliary NP chip, and the non-local aging acceleration table stores forwarding entries that exceed the entry number limit of the local aging acceleration table; the second keep-alive mark table corresponding to the forwarding entry in the local aging acceleration table is managed by the main NP chip.
[0020] A main gateway acceleration table is maintained in the main NP chip, and the main gateway acceleration table is divided into a local aging acceleration table and a non-local aging acceleration table, wherein the non-local aging acceleration table is a table for storing forwarding entries, and is used to store forwarding entries that exceed the entry quantity limit of the local aging acceleration table, wherein the entry quantity limit of the local aging acceleration table is consistent with the entry quantity limit of the first keep-alive mark table; that is, the main NP chip preferentially stores forwarding entries in the local aging acceleration table, and when the storage capacity of the local aging acceleration table reaches the upper limit, new forwarding entries will be stored in the non-local aging acceleration table, and the forwarding entries in the table will age over time, that is, according to certain time rules, old forwarding entries will be deleted or updated to ensure that the forwarding entries in the table are relatively new and valid.
[0021] When matching forwarding entries, the main NP chip can match forwarding entries in the aging acceleration table based on the forwarding information of the message, wherein the forwarding information of the message is information used to indicate that the message is forwarded to the target address, and the forwarding information can be a five-tuple information of the message, namely, the source IP address, the destination IP address, the source port, the target port and the protocol number. The main NP chip can determine the transmission direction of the message based on the forwarding information of the message to ensure that the message can reach the destination correctly.
[0022] A forwarding entry, also called an acceleration entry, is rule information for fast forwarding of messages stored in each aging acceleration table of the main gateway device. In a possible implementation, in order to improve the efficiency of subsequent matching, the NP chip can store the forwarding entries in a hash manner, that is, a hash value is calculated based on the forwarding information of the message, and the forwarding information of the message corresponding to the same hash value is taken as a forwarding information set, and a corresponding relationship between each forwarding information and the forwarding entry is established; in this case, when matching the forwarding information of the target message in each aging acceleration table (including a non-local aging acceleration table and a local aging acceleration table), the main NP chip can first perform a hash calculation based on the forwarding information of the target message to obtain a corresponding target hash value, perform hash value matching in the aging acceleration table based on the target hash value, and after matching the corresponding hash value, perform forwarding information matching in the forwarding information set corresponding to the hash. If the corresponding forwarding information is matched, a target forwarding entry matching the target message in the aging acceleration table is determined, and the target message is modified based on the target forwarding entry to obtain a forwarding message corresponding to the target message. In the aging acceleration table position non-local aging acceleration table, the main NP chip adds a keep-alive flag in a first forwarding message corresponding to the target message to obtain a first keep-alive message; wherein the first forwarding message is a message obtained after modification based on a forwarding entry (i.e., a target forwarding entry) matched in the non-local aging acceleration table, and the first keep-alive message is a message to which a keep-alive flag is added on the basis of the first forwarding message, and the keep-alive flag is a flag added to the message for indicating that relevant information of the message needs to be kept alive.
[0023] The second keep-alive mark table corresponding to the forwarding entries in the local aging acceleration table is maintained by the main NP chip, and the second keep-alive mark table corresponding to the forwarding entries in the non-local aging acceleration table is maintained by the auxiliary NP chip. By storing the keep-alive mark table in different NP chips, a large number of forwarding entries can be kept alive through the collaboration between the main and auxiliary NP chips, so as to solve the problem in the related technology that the forwarding entry keep-alive mechanism is difficult to maintain due to the limitation of the hardware keep-alive mark space.
[0024] Step 230: forward a first keep-alive message to the auxiliary NP chip, where the first keep-alive message is used to instruct the auxiliary NP chip to perform keep-alive processing on the target forwarding entry in the first keep-alive marking table based on the keep-alive flag.
[0025] The main NP chip sends the first keep-alive message to the auxiliary NP chip. After receiving the first keep-alive message, the auxiliary NP chip can parse the keep-alive flag in the first keep-alive message, and perform corresponding operations in the first keep-alive marking table according to the keep-alive flag, such as updating the keep-alive entry information related to the target message in the first keep-alive marking table to mark it as active, thereby extending the survival time of the forwarding entry of the entry in the non-local aging acceleration table to prevent it from being deleted due to aging, thereby realizing the keep-alive processing of the target forwarding entry.
[0026] In summary, in the forwarding entry keep-alive method provided in the embodiment of the present application, the main NP chip divides the main gateway acceleration table into a local aging acceleration table and a non-local aging acceleration table, so as to store forwarding entries that exceed the entry quantity limit of the local aging acceleration table through the non-local aging acceleration table, the main NP chip manages the second keep-alive mark table corresponding to the local aging acceleration table, and the auxiliary NP chip manages the first keep-alive mark table corresponding to the non-local aging acceleration table; in this case, after receiving the target message, the main NP chip matches the target forwarding entry of the target message in the main gateway acceleration table, and when the target forwarding entry of the target message is matched in the non-local aging acceleration table, a keep-alive flag is added to the first forwarding message corresponding to the target message that is modified by the matched target forwarding entry, and the first keep-alive message added with the keep-alive flag is forwarded to the auxiliary NP chip, and the first keep-alive message is used to instruct the auxiliary NP chip to perform keep-alive processing on the target forwarding entry in the first keep-alive mark table based on the keep-alive flag. Through the collaboration between the primary and secondary NP chips, the forwarding entries that exceed the limit of the number of entries in the local aging acceleration table can be kept alive, avoiding the impact of insufficient hardware keep-alive tag space on message forwarding, and improving the message forwarding effect in large-scale message forwarding scenarios.
[0027] and Figure 2 Corresponding to the embodiment shown, Figure 3 A flowchart of a forwarding entry keep-alive method provided by another exemplary embodiment of the present application is shown. The method can be executed by an auxiliary NP chip, which serves as an internal switching chip of a main gateway device and is used to expand an AN (Local Area Network) side PON (Passive Optical Network) port to access more users; Figure 3 As shown, the method may include the following steps.
[0028] Step 310, in response to receiving a first keep-alive message sent by the main NP chip, perform keep-alive processing on the target forwarding entry corresponding to the first keep-alive message in the first keep-alive mark table based on the keep-alive flag in the first keep-alive message; the first keep-alive message is a message obtained after the main NP chip adds a keep-alive flag in the first forwarding message; the first forwarding message is a message obtained after the main NP chip modifies the target message based on the target forwarding entry matched in the non-local aging acceleration table; the first keep-alive mark table corresponding to the forwarding entry in the non-local aging acceleration table is managed by the auxiliary NP chip, and the non-local aging acceleration table stores forwarding entries that exceed the entry number limit of the local aging acceleration table; the second keep-alive mark table corresponding to the forwarding entry in the local aging acceleration table is managed by the main NP chip.
[0029] Among them, based on the keep-alive flag in the first keep-alive message, the keep-alive processing of the target forwarding entry corresponding to the first keep-alive message in the first keep-alive mark table may refer to updating the timestamp of the keep-alive mark in the first keep-alive mark table corresponding to the target forwarding entry, marking it as the most recent active time; or, updating the keep-alive mark in the first keep-alive mark table corresponding to the target forwarding entry to a mark indicating that it is in a keep-alive state, etc., and the present application does not impose any restrictions on this.
[0030] In addition, the relevant contents of the main NP chip in the above steps can be referred to as Figure 1 The relevant steps of the illustrated embodiment will not be repeated here.
[0031] In summary, in the forwarding entry keep-alive method provided in the embodiment of the present application, the auxiliary NP chip, in response to receiving the first keep-alive message sent by the main NP chip, performs keep-alive processing on the target forwarding entry corresponding to the first keep-alive message in the first keep-alive mark table based on the keep-alive flag in the first keep-alive message; the first keep-alive message is a message obtained after the main NP chip adds a keep-alive flag in the first forwarding message corresponding to the target message; the first forwarding message is a message obtained after the main NP chip modifies the target message based on the target forwarding entry matched in the non-local aging acceleration table; the first keep-alive mark table corresponding to the forwarding entry in the non-local aging acceleration table is managed by the auxiliary NP chip, and the non-local aging acceleration table stores forwarding entries that exceed the number limit of entries in the local aging acceleration table; the second keep-alive mark table corresponding to the local aging acceleration table is managed by the main NP chip; through the collaboration between the main and auxiliary NP chips, the keep-alive processing of the forwarding entries that exceed the number limit of entries in the local aging acceleration table can be achieved, avoiding the impact of insufficient hardware keep-alive mark space on message forwarding, and improving the message forwarding effect in large-scale message forwarding scenarios.
[0032] Figure 4 A schematic diagram of a network architecture provided by an exemplary embodiment of the present application is shown. Figure 4As shown, the network architecture includes a main NP chip: NP1 and an auxiliary NP chip: NP2, wherein NP1 is used as an uplink interface module to provide an egress gateway function, and NP2 is used as an internal switching chip to expand the PON interface on the LAN side to access more users; optionally, each NP chip is a SOC (System-on-Chip), and each NP chip includes a built-in control plane CPU (Central Processing Unit) and a forwarding plane, the control plane of the main NP chip is external, and the control plane of the auxiliary NP chip is internal, and in a possible implementation, the two control planes can be merged into one control plane. Through the cooperation between the main and auxiliary NP chips, the keep-alive mark table can be expanded, and then the forwarding entries can be expanded.
[0033] Among them, the main control plane includes a soft acceleration module for forwarding entry learning, forwarding entry aging, traffic statistics, etc. A main gateway acceleration table can be maintained in the main forwarding plane, and hard forwarding entries are stored in the main gateway acceleration table. The main NP chip supports hash entries and hash keep-alive mark space as needed to divide the main gateway acceleration table into a local aging acceleration table and a non-local aging acceleration table, wherein the second keep-alive acceleration table corresponding to the forwarding entry in the local aging acceleration table is maintained in the main forwarding plane, that is, the local aging acceleration table is kept alive by hardware hash in the main NP chip, and the first keep-alive acceleration table corresponding to the forwarding entry in the non-local aging acceleration table is maintained in the auxiliary forwarding plane, that is, the non-local aging acceleration table is kept alive by the auxiliary NP chip, and each keep-alive acceleration table is used to store the keep-alive mark of the forwarding entry in the corresponding aging acceleration table.
[0034] When the main NP chip drives and configures hard forwarding entries, it can first configure a local aging acceleration table, and for entries that exceed the entry quantity limit of the local aging acceleration table, configure a non-local aging acceleration table; wherein the entry quantity limit of the local aging acceleration table is determined by the hash keep-alive space in the main NP chip, that is, the maximum value of the hard forwarding entries that can be maintained in the local aging acceleration table is consistent with the maximum value of the keep-alive tag that can be maintained in the first keep-alive acceleration table.
[0035] The main NP chip includes a main NP microcode module and a main NP driver module, and the auxiliary NP chip includes an auxiliary NP microcode module and an auxiliary NP driver module, wherein the main NP microcode module is used to implement NAT of the message through the acceleration table, search the acceleration table, modify the message based on the table search result and forward the message; when the forwarding information of the message is matched in the non-local aging acceleration table, private information is added to the forwarding message, and the keep-alive message (i.e., the forwarding message with private information added) is sent to the auxiliary NP chip to notify the auxiliary NP chip to keep alive the forwarding entry corresponding to the message. The main NP driver module is used to configure hard forwarding entries in the main gateway acceleration table; the auxiliary NP microcode module is used to keep alive the forwarding entry corresponding to the message according to the received keep-alive message, and the auxiliary NP driver chip is used to periodically read the keep-alive mark information, and synchronize the keep-alive mark information to the control plane of the main NP chip, so that the soft acceleration module in the control plane of the main NP chip ages the acceleration table.
[0036] based on Figure 4 The network architecture shown, Figure 5 FIG. 4 shows an interactive schematic diagram of a forwarding entry keep-alive method provided by an embodiment of the present application. The method can be interactively executed by a primary NP chip and a secondary NP chip, such as Figure 5 As shown, the forwarding entry keep-alive method may include the following steps.
[0037] Step 510: The master NP chip receives the target message.
[0038] In a possible implementation, after receiving the target message, the main NP chip can parse the target message to obtain the forwarding information of the target message, that is, the five-tuple information of the target message, so as to match the forwarding entry in the main gateway acceleration table based on the forwarding information of the target message. The process of the main NP chip matching the forwarding entry in the main gateway acceleration table based on the forwarding information of the target message can refer to the following. Figure 1 The relevant contents of the illustrated embodiment will not be repeated here.
[0039] When matching forwarding entries, in a possible implementation, the main NP chip may first match in the local aging acceleration table. If the target forwarding entry of the target message is matched in the local aging acceleration table, step 550 is executed; if the target forwarding entry of the target message is not matched in the local aging acceleration table, a match is performed in the non-local aging acceleration table. If the target forwarding entry of the target message is matched in the non-local aging acceleration table, step 520 is executed; if the forwarding entry of the target message is not matched in the main gateway acceleration table, step 570 is executed. That is, the main NP chip matches the forwarding entry based on the forwarding information of the target message. When the local aging acceleration table is matched, the matching priority of the local aging acceleration table is higher than that of the non-local aging acceleration table; or, in another possible implementation, the main NP chip matches the forwarding entries in the local aging acceleration table and the non-local aging acceleration table in parallel, and determines the subsequent execution process according to the type of the aging acceleration table of the target forwarding entry that matches the target message, that is, when the target forwarding entry of the target message is matched in the non-local aging acceleration table, step 520 is executed, when the target forwarding entry of the target message is matched in the local aging acceleration table, step 550 is executed, and when no forwarding entry of the target message is matched in the main gateway acceleration table, step 570 is executed.
[0040] Step 520 , in response to matching a target forwarding entry of the target message in the non-local aging acceleration table, the master NP chip adds a keep-alive flag to a first forwarding message corresponding to the target message, thereby obtaining a first keep-alive message.
[0041] In one possible implementation, the keep-alive flag can be added to a specified field of the first forwarded message, such as a message header, an extended header of the message, a specific field of an application layer protocol data unit, or other optional specified fields, etc. Taking adding a keep-alive flag to the message header as an example, the keep-alive flag age_flag can be 1 bit of information.
[0042] In a possible implementation, the main NP chip responds to a target forwarding entry matching a target message in a non-local aging acceleration table, and can also determine a keep-alive index according to the target forwarding entry, wherein the keep-alive index is used to indicate a keep-alive mark position corresponding to the target forwarding entry in the first keep-alive mark table; a direction flag and the keep-alive index are added to the first keep-alive message; the direction flag is used to indicate a message flow direction of the target message; that is, the first keep-alive message also includes a direction flag and a keep-alive index; wherein the direction flag is used to indicate a message flow direction of the target message, that is, The direction flag can indicate that the target message is an uplink message or a downlink message. The uplink message is received by the auxiliary NP chip and forwarded from the auxiliary NP chip to the main NP chip. In this case, the target message is forwarded from the auxiliary NP chip to the main NP chip; the downlink message is received by the main NP chip and needs to be forwarded from the main NP chip to the auxiliary NP chip. In this case, the target message is a message sent from an upstream node and received by the main NP chip; the keep-alive index is determined based on the target forwarding entry, and the keep-alive index is used to indicate the keep-alive mark position corresponding to the target forwarding entry in the first keep-alive mark table.
[0043] Taking adding information to the message header of the first forwarded message as an example, Figure 6 A schematic diagram of a message header provided by an exemplary embodiment of the present application is shown in FIG. Figure 6 As shown, the message header includes a keep-alive flag: age_flag, a direction flag: dir, and a keep-alive index: age_index, wherein the keep-alive flag and the direction flag may be 1-bit information, the keep-alive index may be 30-bit information, and the keep-alive index may be associated with soft acceleration, hard acceleration, and aging flags. By adding 5 bytes of private information to the message header, a first keep-alive message is obtained. After the first keep-alive message is sent to the auxiliary NP chip, the auxiliary NP chip may be notified to perform keep-alive processing on the target forwarding entry of the target message. In the case where the target forwarding entry of the target message is matched in the non-local aging acceleration table, the message header includes a keep-alive flag set to 1, indicating that the auxiliary NP chip needs to perform keep-alive processing on the target forwarding entry. In the case where the target forwarding entry of the target message is matched in the local aging acceleration table, the message header includes a keep-alive flag set to 0, indicating that the auxiliary NP chip does not need to perform keep-alive processing on the target forwarding entry.
[0044] Step 530: The primary NP chip forwards the first keep-alive message to the secondary NP chip. Correspondingly, the secondary NP chip receives the first keep-alive message forwarded by the primary NP chip.
[0045] Further, the primary NP chip forwards the first forwarded message in response to the message flow direction of the target message flowing from the secondary NP chip to the primary NP chip, that is, the target message is an uplink message.
[0046] That is to say, when the target message is an uplink message and the target forwarding entry of the target message is matched in the non-local aging acceleration table, the main NP chip modifies the target message based on the target forwarding entry matched in the non-local aging acceleration table, and after obtaining the first forwarding message, the first forwarding message is forwarded to the upstream node. In addition, a keep-alive flag is added to the first forwarding message to obtain the first keep-alive message, and the first keep-alive message is forwarded to the auxiliary NP chip. Furthermore, a keep-alive flag, a direction flag and a keep-alive index can also be added to the first forwarding message to obtain the first keep-alive message, and the first keep-alive message is forwarded to the auxiliary NP chip.
[0047] When the target message flows from the primary NP chip to the secondary NP chip, that is, the target message is a downlink message, and a target forwarding entry of the target message is matched in the non-local aging acceleration table, the primary NP chip sends the first keep-alive message to the secondary NP chip.
[0048] Step 540: The auxiliary NP chip performs keep-alive processing on the target forwarding entry in the first keep-alive marking table based on the keep-alive flag in the first keep-alive message.
[0049] The auxiliary NP chip obtains a keep-alive flag by parsing the received first keep-alive message, and determines based on the keep-alive flag that the target forwarding entry needs to be kept alive. In this case, the auxiliary NP chip can search the first keep-alive mark table for the keep-alive mark corresponding to the target forwarding entry, and update the keep-alive information at the target position corresponding to the keep-alive mark of the target forwarding entry, thereby realizing the keep-alive of the target forwarding entry.
[0050] In a possible implementation, when the first keep-alive message includes a keep-alive index, the process in which the auxiliary NP chip performs keep-alive processing on the target forwarding entry corresponding to the first keep-alive message in the first keep-alive marking table based on the keep-alive flag in the first keep-alive message can be implemented as follows: Determine, based on the keep-alive index in the first keep-alive message, a target position corresponding to the keep-alive mark of the target message of the target forwarding entry in the first keep-alive mark table; Update keepalive information at the target location.
[0051] The keep-alive index can simplify the process of the auxiliary NP chip locating the keep-alive tag of the target forwarding entry in the first keep-alive tag table, thereby improving the keep-alive processing efficiency. The keep-alive information can be a specific number or character, for example, placing 1 at the target position corresponding to the keep-alive tag of the target forwarding entry.
[0052] In addition, after the target location updates the keep-alive information, the auxiliary NP chip may also process the first keep-alive message based on the direction flag in the first keep-alive message. This process may be implemented as follows: In response to the direction flag in the first keep-alive message indicating uplink transmission, the first keep-alive message is discarded; the uplink transmission is flowing from the auxiliary NP chip to the main NP chip; In response to the direction flag in the first keep-alive message indicating downlink transmission, the first forwarding message in the first keep-alive message is forwarded; the downlink transmission flows from the primary NP chip to the secondary NP chip.
[0053] That is to say, when the direction flag of the first keep-alive message indicates that the target message is an uplink message, the first forwarding message of the target message is forwarded by the main NP chip to the upstream node, and the auxiliary NP chip does not need to perform a forwarding operation. Therefore, after completing the keep-alive processing of the target forwarding entry, the auxiliary NP chip discards the first keep-alive message; and when the direction flag of the first keep-alive message indicates that the target message is a downlink message, the first forwarding message carried in the first keep-alive message is forwarded by the auxiliary NP chip to the downstream node.
[0054] Step 550 : The master NP chip determines a message flow direction of the target message in response to matching a target forwarding entry of the target message in the local aging acceleration table.
[0055] The message flow direction of the target message is used to indicate whether the target message is an uplink message or a downlink message. After receiving the target message, the main NP chip can determine the message flow direction of the target message based on the message information of the target message, that is, based on the source IP address and the destination IP address in the target message.
[0056] Step 560: The master NP chip forwards the second forwarding message corresponding to the target message based on the message flow direction of the target message. The second forwarding message is a message obtained by modifying the target message based on the target forwarding entry.
[0057] In response to the message flow direction of the target message being from the auxiliary NP chip to the main NP chip, that is, the target message is an uplink message, the second forwarding message is forwarded; In response to the message flow direction of the target message being from the primary NP chip to the secondary NP chip, that is, the target message is a downlink message, a second keep-alive message obtained by modifying the second forwarding message is sent to the secondary NP chip, and the second keep-alive message is used to instruct the secondary NP chip to skip the keep-alive operation on the target forwarding entry and forward the second forwarding message in the second keep-alive message; the second keep-alive message includes a non-keep-alive flag or does not include a keep-alive flag.
[0058] That is to say, when the main NP chip matches the target forwarding entry of the target message in the local aging acceleration table, the main NP chip performs keep-alive processing on the target forwarding entry in the second keep-alive marking table it maintains. Therefore, if the target message is a downlink message, the auxiliary NP chip only needs to forward the second forwarding message without performing a keep-alive operation.
[0059] In a possible implementation, in order to ensure the uniformity of the processing flow of the auxiliary NP chip, when the target forwarding entry of the target message is matched in the local aging acceleration table, the main NP chip can add a keep-alive flag set to 0 in the message header of the second forwarding message, indicating the direction flag of the downlink transmission and the keep-alive index set to 0, to obtain a second keep-alive message.
[0060] In another possible implementation, when a target forwarding entry of a target message is matched in the local aging acceleration table, the main NP chip may not add a keep-alive flag and a keep-alive index to the message header of the second forwarding message, but only add a direction flag indicating downlink transmission to obtain a second keep-alive message.
[0061] Correspondingly, on the auxiliary NP chip side, the auxiliary NP chip skips the keep-alive operation on the target forwarding entry in response to receiving the second keep-alive message sent by the main NP chip, and forwards the second forwarding message in the second keep-alive message; the second forwarding message is a message obtained by the main NP chip after modifying the target message based on the target forwarding entry matched in the local aging acceleration table; the second keep-alive message contains a non-keep-alive flag or does not contain a keep-alive flag.
[0062] After receiving and parsing the second keep-alive message, the auxiliary NP chip obtains a direction flag indicating downlink transmission but does not obtain a keep-alive flag indicating a keep-alive operation (for example, a keep-alive flag set to 0 or no keep-alive flag), determines that there is no need to perform keep-alive processing on the target forwarding entry corresponding to the second keep-alive message, skips the keep-alive operation, and forwards the second forwarding message in the second keep-alive message to the downstream node.
[0063] Step 570 : In response to not finding a forwarding entry matching the target message in the non-local aging acceleration table and the local aging acceleration table, the master NP chip sends the target message to the protocol stack for forwarding entry learning.
[0064] When the main NP chip does not match the forwarding message of the target message in the main gateway acceleration table, it means that the target message has not yet been learned in the acceleration table. Therefore, the target message is first forwarded through the slow path of the protocol stack of the main NP chip to ensure that the message can be transmitted in time and avoid long waiting. The forwarding entry is learned at the exit (i.e., the soft acceleration module), and the target entry and its corresponding forwarding entry are configured in the main gateway acceleration table. After receiving the target message again, the main gateway acceleration table can be queried and forwarded through the forwarding entry matched in the table. Figure 7 FIG. 4 shows a schematic diagram of a main NP chip provided by an exemplary embodiment of the present application, as shown in FIG. Figure 7As shown, the control plane of the main NP chip includes a protocol stack 710 and a soft acceleration module 720. If the message information of the target message is not matched in the main gateway acceleration table in the forwarding plane, the target message is sent to the protocol stack for slow path forwarding, and the forwarding entry learning is performed in the soft acceleration module.
[0065] In summary, in the forwarding entry keep-alive method provided in the embodiment of the present application, the main NP chip divides the main gateway accelerator table into a local aging acceleration table and a non-local aging acceleration table, so as to store forwarding entries that exceed the entry quantity limit of the local aging acceleration table through the non-local aging acceleration table, the main NP chip manages the second keep-alive mark table corresponding to the local aging acceleration table, and the auxiliary NP chip manages the first keep-alive mark table corresponding to the non-local aging acceleration table; in this case, after receiving the target message, the main NP chip matches the forwarding information of the target message in the main gateway accelerator table, and when the target forwarding entry of the target message is matched in the non-local aging acceleration table, a keep-alive flag is added to the first forwarding message corresponding to the target message that is modified by the matched target forwarding entry, and the first keep-alive message added with the keep-alive flag is forwarded to the auxiliary NP chip, and the first keep-alive message is used to instruct the auxiliary NP chip to perform keep-alive processing on the target forwarding entry in the first keep-alive mark table based on the keep-alive flag. Through the collaboration between the primary and secondary NP chips, the forwarding entries that exceed the limit of the number of entries in the local aging acceleration table can be kept alive, avoiding the impact of insufficient hardware keep-alive tag space on message forwarding, and improving the message forwarding effect in large-scale message forwarding scenarios.
[0066] For example, the main NP chip matches the forwarding entry of the target message in the order of first querying the local aging acceleration table and then querying the non-local aging acceleration table. Figure 8 FIG. 4 shows a logic diagram of a forwarding entry keep-alive method provided by an exemplary embodiment of the present application. Figure 8As shown in the figure, after receiving the target message, the main NP chip queries the local aging acceleration table. If the target forwarding entry of the target message is matched in the local aging acceleration table, the message flow direction of the target message is determined. When the target message is determined to be an uplink message, the main NP chip modifies the target message based on the table query result and directly forwards it, that is, forwards the second forwarding message; when the target message is determined to be a downlink message, the second keep-alive message corresponding to the second forwarding message is sent to the auxiliary NP chip, and the second keep-alive message contains a keep-alive flag set to 0 or does not contain a keep-alive flag, indicating a direction flag of downlink transmission and a keep-alive index set to 0; if the forwarding entry of the target message is not matched in the local aging acceleration table, the non-local aging acceleration table is queried. If the non-local aging acceleration table is matched, the second keep-alive message corresponding to the second forwarding message is sent to the auxiliary NP chip. The target forwarding entry of the target message is matched in the table, and the message flow direction of the target message is determined. When the target message is determined to be an uplink message, the target message is modified and forwarded based on the table lookup result, that is, the first forwarding message is forwarded. At the same time, a copy of the message is copied, and a keep-alive flag set to 1, a direction flag indicating uplink transmission, and a keep-alive index obtained from the table lookup result are added to the message header of the copied message to obtain the first keep-alive message, and the first keep-alive message is forwarded to the auxiliary NP chip; when the target message is determined to be a downlink message, the target message is modified based on the table lookup result and a keep-alive flag set to 1, a direction flag indicating downlink transmission, and a keep-alive index obtained from the table lookup result are added to the message header to obtain the first keep-alive message, and the first keep-alive message is forwarded to the auxiliary NP chip. If the forwarding entry of the target message is not matched in the non-local aging acceleration table, the target message is processed through the protocol stack, and the forwarding entry is learned.
[0067] The primary and secondary NP chips not only keep the forwarding entries alive, but also coordinate the maintenance of the non-local aging acceleration table. Fig. 9 FIG. 4 shows a flow chart of a maintenance process for a non-local aging acceleration table provided by an exemplary embodiment of the present application, such as Fig. 9 As shown, the process can be implemented as the following steps.
[0068] Step 901: The auxiliary NP chip reads a first keep-alive mark table to obtain keep-alive mark information.
[0069] The control plane of the auxiliary NP chip can read the first keep-alive mark table according to a specified period to obtain keep-alive mark information, which includes information at the keep-alive mark position of each forwarding entry recorded in the second keep-alive mark table; further, the keep-alive mark information can also include the update frequency and update time point of the information at the keep-alive mark position, etc. The keep-alive mark information is used to instruct the main NP chip to manage the forwarding entries in the non-local aging acceleration table.
[0070] The auxiliary NP chip is also used to traverse each keep-alive mark in the first keep-alive mark table; The keep-alive markers that meet the clearing condition are deleted from the first keep-alive marker table.
[0071] Among them, the clearing condition may be that the time duration of the keep-alive mark position being set to 0 exceeds a time threshold, or the forwarding entry corresponding to the keep-alive mark has been deleted or changed, etc. By maintaining the first keep-alive mark table, the validity of the first keep-alive mark table can be guaranteed, thereby improving the maintenance effect of the non-local aging acceleration table.
[0072] Step 902: The auxiliary NP chip sends keep-alive mark information to the main NP chip. Correspondingly, the main NP chip receives the keep-alive mark information sent by the auxiliary NP chip.
[0073] Step 903: The master NP chip manages forwarding entries in the non-local aging acceleration table based on the keep-alive mark information.
[0074] The main NP chip manages the forwarding entries in the non-local aging acceleration table based on the keep-alive mark information as follows: Determine a valid forwarding entry and an invalid forwarding entry in a non-local aging acceleration table based on the keep-alive mark information; The valid forwarding entries are updated, and the invalid forwarding entries are deleted from the non-local aging acceleration table.
[0075] Among them, a valid forwarding entry may be a forwarding entry whose corresponding keep-alive mark position is keep-alive information, and an invalid forwarding entry may be a forwarding entry whose corresponding keep-alive mark position is not keep-alive information. For example, a forwarding entry with the keep-alive mark position set to 1 is a valid forwarding entry, and a forwarding entry with the keep-alive mark position set to 0 or without parameters is an invalid forwarding entry.
[0076] For valid forwarding entries, the main NP chip can update the corresponding valid forwarding entries in the non-local aging acceleration table according to the keep-alive mark information. For example, the soft acceleration module of the main NP chip can maintain the correspondence between the update frequency of the information at the keep-alive mark position and the keep-alive duration modification value. If the activity of the current forwarding entry is determined to be high according to the keep-alive mark information (i.e., the update frequency of the information at the keep-alive mark position is high), the keep-alive duration of the forwarding entry is extended. If the activity of the current forwarding entry is determined to be low according to the keep-alive mark information (i.e., the update frequency of the information at the keep-alive mark position is low), the keep-alive duration of the forwarding entry is reduced. It should be noted that the above-mentioned method of updating the forwarding entry is only illustrative, and different update rules can be set based on different actual needs, and this application does not limit this.
[0077] For invalid forwarding entries, the soft acceleration module of the main NP chip can delete the invalid forwarding entries.
[0078] In addition, the soft acceleration module in the main NP chip also maintains the local aging acceleration table: reads the keep-alive mark information in the second keep-alive mark table according to the specified period, and manages the local aging acceleration table according to the read keep-alive mark information.
[0079] Fig.10 FIG. 1 is a schematic diagram showing a maintenance process of an aging acceleration table provided by an exemplary embodiment of the present application. Fig.10 As shown, the main NP chip processes separately according to the type of aging acceleration table. For the local aging acceleration table, after the timing duration is reached, the main NP chip reads the keep-alive mark information of each forwarding entry in the second keep-alive mark table, and updates the corresponding valid forwarding entry when the keep-alive mark is set to 1, and deletes the corresponding invalid forwarding entry when the keep-alive mark is set to 0; for the non-local aging acceleration table, the main NP chip receives the keep-alive mark information of the first keep-alive table mark table synchronized by the auxiliary NP chip, and searches for the corresponding keep-alive mark in the keep-alive mark information according to the keep-alive index in the non-local aging acceleration table, and updates the corresponding valid forwarding entry when the keep-alive mark is set to 1, and deletes the corresponding invalid forwarding entry when the keep-alive mark is set to 0.
[0080] Fig.11 A structural block diagram of a computer device 1100 shown in an exemplary embodiment of the present application is shown. The computer device 1100 can be implemented as the above-mentioned master gateway device and slave gateway device. For example, the computer device can be an Android terminal device; generally, the computer device 1100 includes: a processor 1101 and a memory 1102. The memory 1102 may include one or more computer-readable storage media, and the computer-readable storage medium is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1101 to implement all or part of the steps in the forwarding entry keep-alive method shown in the method embodiment of the present application.
[0081] In some embodiments, the computer device 1100 may also optionally include: a peripheral device interface 1103 and at least one peripheral device. The processor 1101, the memory 1102 and the peripheral device interface 1103 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1103 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1104, a display screen 1105, a camera assembly 1106, an audio circuit 1107 and a power supply 1108. In some embodiments, the computer device 1100 also includes one or more sensors 1109. The one or more sensors 1109 include, but are not limited to, an acceleration sensor 1110, a gyroscope sensor 1111, a pressure sensor 1112, an optical sensor 1113 and a proximity sensor 1114. Those skilled in the art will appreciate that Fig.11The structure shown in the figure does not constitute a limitation on the computer device 1100, and the computer device 1100 may include more or less components than shown in the figure, or combine some components, or adopt a different component arrangement.
[0082] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one computer program is stored, and the computer program is loaded and executed by a processor to implement all or part of the steps in the above forwarding entry keep-alive method. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0083] In an exemplary embodiment, a computer program product is also provided, the computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer, the computer is executed to implement the above Figure 2 , Figure 3 or Figure 5 All or part of the steps of the embodiments shown in any embodiment.
[0084] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0085] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A forwarding entry keep-alive method, characterized in that: The method is executed by a main network processor NP chip, and the method includes: Receive target message; In response to matching a target forwarding entry of the target message in a non-local aging acceleration table, adding a keep-alive flag in a first forwarding message corresponding to the target message to obtain a first keep-alive message; the first forwarding message is a message obtained by modifying the target message based on the target forwarding entry; a first keep-alive marking table corresponding to the forwarding entry in the non-local aging acceleration table is managed by the auxiliary NP chip, and the non-local aging acceleration table stores forwarding entries exceeding the entry quantity limit of the local aging acceleration table; a second keep-alive marking table corresponding to the forwarding entry in the local aging acceleration table is managed by the main NP chip; The first keep-alive message is forwarded to the auxiliary NP chip, where the first keep-alive message is used to instruct the auxiliary NP chip to perform keep-alive processing on the target forwarding entry in the first keep-alive marking table based on the keep-alive flag.
2. The method according to claim 1, characterized in that Before forwarding the first keep-alive message to the auxiliary NP chip, the method further includes: Determine a keep-alive index according to the target forwarding entry, where the keep-alive index is used to indicate a keep-alive mark position corresponding to the target forwarding entry in the first keep-alive mark table; A direction flag and the keep-alive index are added to the first keep-alive message; the direction flag is used to indicate the message flow direction of the target message.
3. The method according to claim 1 or 2, characterized in that: Before adding a keep-alive flag to the first forwarding message corresponding to the target message and obtaining the first keep-alive message, the method further includes: In response to the message flow direction of the target message being from the auxiliary NP chip to the primary NP chip, the first forwarding message is forwarded.
4. The method according to claim 1, characterized in that: After receiving the target message, the method further includes: In response to matching the target forwarding entry of the target message in the local aging acceleration table, determining a message flow direction of the target message; A second forwarding message corresponding to the target message is forwarded based on the message flow direction of the target message, and the second forwarding message is a message obtained by modifying the target message based on the target forwarding entry.
5. The method according to claim 4, characterized in that The forwarding processing of the second forwarding message corresponding to the target message based on the message flow direction of the target message includes: In response to the message flow direction of the target message being from the primary NP chip to the secondary NP chip, a second keep-alive message obtained by modifying the second forwarding message is sent to the secondary NP chip, wherein the second keep-alive message is used to instruct the secondary NP chip to skip the keep-alive operation on the target forwarding entry and forward the second forwarding message in the second keep-alive message; the second keep-alive message includes a non-keep-alive flag or does not include the keep-alive flag.
6. The method according to claim 1, characterized in that The method further comprises: In response to the fact that no forwarding entry of the target message is matched in the non-local aging acceleration table and the local aging acceleration table, the target message is sent to a protocol stack for forwarding entry learning.
7. The method according to claim 1, characterized in that The method further comprises: receiving keep-alive mark information sent by the auxiliary NP chip; the keep-alive mark information is information obtained by the auxiliary NP chip reading the first keep-alive mark table; The forwarding entries in the non-local aging acceleration table are managed based on the keep-alive mark information.
8. The method according to claim 7, characterized in that The managing the forwarding entries in the non-local aging acceleration table based on the keep-alive mark information includes: Determine a valid forwarding entry and an invalid forwarding entry in the non-local aging acceleration table based on the keep-alive mark information; The valid forwarding entry is updated, and the invalid forwarding entry is deleted from the non-local aging acceleration table.
9. A forwarding entry keep-alive method, characterized in that: The method is performed by the auxiliary NP chip, and the method includes: In response to receiving a first keep-alive message sent by the main NP chip, keep-alive processing is performed on the target forwarding entry corresponding to the first keep-alive message in the first keep-alive mark table based on the keep-alive flag in the first keep-alive message; the first keep-alive message is a message obtained after the main NP chip adds a keep-alive flag in the first forwarding message; the first forwarding message is a message obtained after the main NP chip modifies the target message based on the target forwarding entry matched in the non-local aging acceleration table; the first keep-alive mark table corresponding to the forwarding entry in the non-local aging acceleration table is managed by the auxiliary NP chip, and the non-local aging acceleration table stores forwarding entries that exceed the entry number limit of the local aging acceleration table; the second keep-alive mark table corresponding to the forwarding entry in the local aging acceleration table is managed by the main NP chip.
10. The method according to claim 9, characterized in that The first keep-alive message also includes a direction flag and a keep-alive index; the direction flag is used to indicate the message flow direction of the target message, the keep-alive index is determined based on the target forwarding entry, and the keep-alive index is used to indicate the keep-alive mark position corresponding to the target forwarding entry in the first keep-alive mark table.
11. The method according to claim 10, characterized in that The performing keep-alive processing on a target forwarding entry corresponding to the first keep-alive message in the first keep-alive marking table based on the keep-alive flag in the first keep-alive message includes: Determine, based on the keep-alive index, a target position in the first keep-alive mark table corresponding to the keep-alive mark of the target forwarding entry; The keep-alive information is updated at the target location.
12. The method according to claim 11, characterized in that After updating the keep-alive information at the target location, the method further includes: In response to the direction flag in the first keep-alive message indicating uplink transmission, discarding the first keep-alive message; the uplink transmission is flowing from the auxiliary NP chip to the main NP chip; In response to the direction flag in the first keep-alive message indicating downlink transmission, the first forwarding message in the first keep-alive message is forwarded; the downlink transmission flows from the primary NP chip to the secondary NP chip.
13. The method according to claim 9, characterized in that The method further comprises: In response to receiving a second keep-alive message sent by the main NP chip, skipping the keep-alive operation on the target forwarding entry, and forwarding the second forwarding message in the second keep-alive message; the second forwarding message is a message obtained by the main NP chip after modifying the target message based on the target forwarding entry matched in the local aging acceleration table; the second keep-alive message contains a non-keep-alive flag or does not contain the keep-alive flag.
14. The method according to claim 9, characterized in that The method comprises: Reading the first keep-alive mark table to obtain keep-alive mark information; The keep-alive mark information is sent to the master NP chip, where the keep-alive mark information is used to instruct the master NP chip to manage the forwarding entries in the non-local aging acceleration table.
15. The method according to claim 14, characterized in that The method further comprises: Traversing each keep-alive marker in the first keep-alive marker table; The keep-alive markers that meet the clearing condition are deleted from the first keep-alive marker table.
16. A computer device, characterized in that: The computer device comprises a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the forwarding entry keep-alive method according to any one of claims 1 to 15.
17. A computer-readable storage medium, characterized in that: At least one computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by the processor to implement the forwarding entry keep-alive method according to any one of claims 1 to 15.
18. A computer program product, characterized in that The computer program product comprises a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer is caused to execute to implement the forwarding entry keep-alive method as claimed in any one of claims 1 to 15.
Citation Information
Patent Citations
Safe keep-alive method, device and system
CN108632306A
Method and system for realizing 4in6 DS Lite data flow forwarding
CN111371909A
Mechanism for efficiently transmitting tunnel keep-alive messages
US20140056203A1
Packet forwarding method and apparatus
US20160269284A1