Method, device and equipment for data processing and readable medium

By rebuilding the BGP process and socket interface in network devices, the problems of numerous components and slow iteration in the prior art are solved, fast and reliable non-interrupted routing switching is achieved, the main and backup switching process is simplified and the brain is avoided.

CN120547121APending Publication Date: 2025-08-26JD DIGITS HAIYI INFORMATION TECHNOLOGY CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510724349.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

The existing border gateway protocol non-interruption routing technology has problems such as numerous components, cumbersome switching of main and backups, prone to brain splits and slow development iteration.

Method used

By responding to BGP process failure in the control plane of the network device, packet transmission and reception are stopped, packet transmission and reception are processed using IO threads, and BGP process and socket interface are reconstructed based on BGP peer information and routing information to restore packet transmission and reception.

Benefits of technology

The non-interrupted routing switching process is simplified, the split brain problem is avoided, rapid development iteration and flexible deployment are achieved, and the reliability and availability of network equipment are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120547121A_ABST
    Figure CN120547121A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method and device, equipment and a readable medium. The method comprises the following steps: in response to a failure of a first BGP process in a control plane of network equipment, enabling the control plane to stop receiving and transmitting a data packet with a forwarding plane of the network equipment; enabling the IO thread in the first BGP process to continuously process the received data packet; in response to completion of processing of the data packet in the IO thread, reconstructing a second BGP process in the control plane based on BGP peer information and BGP routing information associated with the first BGP process; reconstructing a first socket interface of the BGP peer associated with the second BGP process based on the socket information of the BGP peer; and in response to the completion of the reconstruction of the second BGP process and the first socket interface, recovering the transceiving of the data packet between the control plane and the forwarding plane.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Example embodiments of the present disclosure generally relate to the field of computer technology, and more particularly, to methods, apparatuses, devices, and computer-readable storage media for data processing. Background Art

[0002] Border Gateway Protocol (BGP) Non-Stop Routing (NSR) is a technology used to improve the reliability and availability of network routing protocols. It allows the data plane to continue forwarding packets normally when the control plane of the Network Operating System (NOS) fails or restarts, thereby achieving seamless routing protocol switchover. Summary of the Invention

[0003] In a first aspect of the present disclosure, a method for data processing is provided. The method includes: in response to a failure of a first Border Gateway Protocol (BGP) process in a control plane of a network device, causing the control plane to stop sending and receiving data packets with a forwarding plane of the network device; causing an input / output (IO) thread in the first BGP process to continue processing received data packets; in response to completion of data packet processing in the IO thread, reestablishing a second BGP process in the control plane based on BGP peer information and BGP routing information associated with the first BGP process; reestablishing a first socket interface of a BGP peer associated with the second BGP process based on socket information of the BGP peer; and in response to completion of the reestablishment of the second BGP process and the first socket interface, resuming sending and receiving data packets between the control plane and the forwarding plane.

[0004] In a second aspect of the present disclosure, a device for data processing is provided. The device includes: a first processing module configured to, in response to a failure of a first Border Gateway Protocol (BGP) process in a control plane of a network device, stop the control plane from receiving and sending data packets with a forwarding plane of the network device; a second processing module configured to enable an input / output (IO) thread in the first BGP process to continue processing received data packets; a first reconstruction module configured to, in response to completion of processing of data packets in the IO thread, reconstruct a second BGP process in the control plane based on BGP peer information and BGP routing information associated with the first BGP process; a second reconstruction module configured to reconstruct a first socket interface of a BGP peer associated with the second BGP process based on the socket information of the BGP peer; and a third processing module configured to, in response to completion of reconstruction of the second BGP process and the first socket interface, resume receiving and sending data packets between the control plane and the forwarding plane.

[0005] In a third aspect of the present disclosure, an electronic device is provided. The electronic device includes at least one processing unit; and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions, when executed by the at least one processing unit, causing the electronic device to perform the method of the first aspect of the present disclosure.

[0006] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein a computer program is stored on the computer-readable storage medium and can be executed by a processor to perform the method according to the first aspect of the present disclosure.

[0007] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer-executable instructions, wherein the computer-executable instructions can be executed by a processor to perform the method according to the first aspect of the present disclosure.

[0008] It should be understood that the contents described in the Summary of the Invention are not intended to limit the key features or important features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become readily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] The above and other features, advantages and aspects of the various embodiments of the present disclosure will become more apparent hereinafter with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0010] Figure 1 A schematic diagram illustrating an example network device in which embodiments of the present disclosure can be implemented;

[0011] Figure 2 A schematic diagram illustrating a process for data processing according to some embodiments of the present disclosure is shown;

[0012] Figure 3 A block diagram showing an apparatus for data processing according to some embodiments of the present disclosure; and

[0013] Figure 4 A block diagram of an electronic device is shown in which one or more embodiments of the present disclosure may be implemented. DETAILED DESCRIPTION

[0014] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0015] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, i.e., "including but not limited to." The term "based on" should be understood as "based at least in part on." The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment." The term "some embodiments" should be understood as "at least some embodiments." Other explicit and implicit definitions may be included below.

[0016] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0017] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0018] For example, in response to receiving a user's active request, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information, so that the user can independently choose whether to provide personal information to the electronic device, application, server or storage medium and other software or hardware that performs the operation of the technical solution of the present disclosure based on the prompt message.

[0019] As an optional but non-limiting implementation, in response to receiving a user's active request, a prompt message may be sent to the user, for example, in the form of a pop-up window, in which the prompt message may be presented in text form. Furthermore, the pop-up window may also include a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0020] For the convenience of description, some concepts and terms are first defined here.

[0021] Border Gateway Protocol (BGP) is a protocol used to exchange routing information between different autonomous systems (AS). It is the core routing protocol of the Internet and is responsible for determining the path of data packets between different networks.

[0022] Non-Stop Routing (NSR) is a reliability technology that ensures that when a device's primary control plane (such as the active mainboard or active route processor) fails and a primary-backup switchover (for example, active mainboard / standby mainboard switchover or route processor switchover) occurs, routing information and neighbor relationships are preserved, thereby ensuring uninterrupted packet transmission.

[0023] Iptables / netfilter is a subsystem in the Linux kernel that is used to filter and process network packets.

[0024] TCP-Repair is a technology used for Transmission Control Protocol (TCP) connections. It is mainly used to migrate or restore TCP connections without interrupting the connection.

[0025] The Remote Dictionary Server (Redis) database (DB) is an open-source in-memory data structure store that serves as a database, cache, and message broker. It supports a variety of data structures, such as strings, hashes, lists, sets, sorted sets, bitmaps, HyperLogLogs, and geospatial index radius queries.

[0026] BGP peer, also called BGP neighbor, is a logical connection relationship established between routers running BGP.

[0027] A socket is an endpoint for inter-process communication (IPC) in computer networks, used to transfer data between different devices or between different processes on the same device. It is an abstract software structure that provides a mechanism for sending and receiving data packets and is the foundation of network programming.

[0028] The socket interface is a set of programming interfaces provided by the operating system to implement network communication.

[0029] A split-brain situation occurs when, due to a network partition or communication failure, the nodes in a cluster are divided into multiple isolated subsets, each of which believes that it is the only primary cluster.

[0030] Hereinafter, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

[0031] Figure 1 1 shows a schematic diagram of an example network device 100 in which embodiments of the present disclosure can be implemented. Figure 1 As shown, in some embodiments, the example network device 100 may include a control plane 110, a forwarding plane 120, and a database 130. In other embodiments, the example network device 100 may include the control plane 110 and the forwarding plane 120, and the database 130 may be implemented in another device. In some embodiments, the network device 100 may be a router device, a switch device, a firewall device, etc.

[0032] In network device 100, control plane 110 is configured to manage the device's operating status, specify data forwarding policies, and communicate with other network devices to maintain network topology and routing information. Forwarding plane 120 is configured to forward or process traffic entering and exiting the device according to the rules issued by control plane 110. Database 130 is configured to store and manage various data required for the operation of network device 100.

[0033] The control plane 110 may include a user space 111 and a kernel space 112. The user space 111 is an area in the memory space where applications run, while the kernel space 112 is an area where the system kernel and device drivers run.

[0034] User space 111 may include a command line configuration process 1111, a BGP process 1112, and a routing processing module 1113. Command line configuration process 1111 is configured to configure iptables / netfilter operation rules. For example, iptables / netfilter operation rules may include rules for forwarding and filtering packets. The BGP process is configured to exchange routing information between different autonomous systems to achieve cross-internet reachability and traffic forwarding. Routing processing module 1113 is configured to store, manage, and maintain routing information for network device 100 and provide a basis for decision-making regarding packet forwarding.

[0035] The BGP process 1112 may include an input / output (IO) thread 1114, a main thread 1115, and a transmission control protocol (TCP) queue 1116. The IO thread may be configured to receive data packets from the kernel space 112, send data packets to the kernel space 112, and process received data packets. The main thread 1115 may be configured to schedule threads in the BGP process 1112. The TCP queue 1116 may be configured to process data packets (e.g., acknowledgment (ACK) messages) replied by the kernel space 112 in a first-in, first-out (FIFO) manner, and send the data packet after the BGP process 1112 has processed the received data packet. The kernel space 112 may be configured to send and receive data packets with the forwarding plane 120 and perform iptables / netfilter operations.

[0036] It should be understood that the structure and functionality of environment 100 are described for exemplary purposes only and do not imply any limitation on the scope of the present disclosure.

[0037] As briefly mentioned above, in Border Gateway Protocol (BGP) non-interruptible routing technology, when the control plane in a network device fails or restarts, the forwarding plane continues to forward data packets normally, thereby achieving seamless routing protocol switching. For example, BGP non-interruptible routing technology can synchronize BGP session status, routing information, and other related data between the active and standby main control boards (both the active and standby main control boards are components that carry the relevant processes of the control plane in the network device), thereby ensuring that the standby main control board can immediately take over when the active main control board fails. That is, when the active main control board fails, the standby main control board can seamlessly take over the BGP session, avoiding BGP session interruption and routing oscillation, and ensuring network stability and continuity. Therefore, BGP non-interruptible routing technology can ensure that the forwarding plane is not affected when the control plane fails or is upgraded, and continues to forward data packets according to the existing routing information. In addition, using BGP non-interruptible routing technology can significantly improve network reliability and availability, and reduce network interruption time caused by router failures.

[0038] However, the BGP non-disruptive routing technology has the following shortcomings:

[0039] 1) Network equipment has many components, and active and standby control boards are required to implement active / standby switching.

[0040] 2) The heartbeat linkage between the active and standby main control boards needs to be maintained, which is a cumbersome process and prone to split-brain problems; and

[0041] 3) The network equipment system is huge, the development cycle is long, and it cannot be updated quickly.

[0042] In order to at least partially solve the above-mentioned problems and other potential problems that may exist in traditional solutions, the present disclosure provides a solution for data processing. According to various embodiments of the present disclosure, in response to a failure of the first BGP process in the control plane of a network device, the control plane stops sending and receiving data packets with the forwarding plane of the network device, and the IO thread in the first BGP process continues to process the received data packets. In response to the completion of the processing of the data packets in the IO thread, based on the BGP peer information and BGP routing information associated with the first BGP process, a second BGP process is rebuilt in the control plane, and based on the socket information of the BGP peer, the first socket interface of the BGP peer associated with the second BGP process is rebuilt. In response to the completion of the reconstruction of the second BGP process and the first socket interface, the sending and receiving of data packets between the control plane and the forwarding plane is resumed.

[0043] In this way, if the active main control board fails, a new BGP process can be started, eliminating the backup main control board and simplifying the non-disruptive routing switchover process for network devices. Furthermore, by starting a new BGP process to complete the non-disruptive routing process, split-brain issues can be avoided. This also ensures uninterrupted connectivity between BGP peers. Furthermore, this allows for rapid development and iteration of network devices, enabling flexible deployment.

[0044] Figure 2 FIG2 shows a schematic diagram of a process 200 for data processing according to some embodiments of the present disclosure. The process 200 may be implemented in the network device 110. Figure 1 The process 200 is described in detail.

[0045] At block 210, in response to a failure of the BGP process 1112 in the control plane 110, the network device 110 stops sending and receiving packets between the control plane 110 and the forwarding plane 120 of the network device 100. For discussion purposes, the BGP process herein may be referred to as a "first BGP process."

[0046] In some embodiments, the data packet may be a routing message, which transmits routing information (e.g., network topology, reachability, path attributes, etc.) between network devices (e.g., routers) to establish, update, and maintain routing tables.

[0047] First BGP process 1112 refers to the process currently established in control plane 110 of network device 110. A failure of first BGP process 1112 may be caused by a variety of factors. These factors may include, for example, configuration errors, network issues, resource exhaustion, software / hardware failures, etc. It should be understood that these factors are merely exemplary and not intended to be limiting. Network device 110 may use any suitable method to determine whether the first BGP process has failed.

[0048] In some embodiments, when the first BGP process 1112 exits due to a fault, the network device 100 may prevent the routing processing module 1113 from recording the exit status of the first BGP process 1112, thereby not performing any update operations on the routing table in the forwarding plane 120. In one example, the routing processing module 1113 may be implemented by a Routing Information Base (RIB) process. In other words, the network device 100 may make the RIB process unaware of the exit of the first BGP process 1112, thereby preventing the RIB process from performing any update operations on the routing table in the forwarding plane 120.

[0049] In some embodiments, the network device 100 may cause the IO thread 1115 to stop receiving packets sent by the kernel space 112 in the control plane 110 , and cause the kernel space 112 to stop sending packets to the forwarding plane 120 .

[0050] For example, the network device 100 may enable the TCP queue 1116 to use the TCP-repair technology of the kernel space 112 to set the socket information of the BGP peer to a fault recovery enabled state (e.g., a repair-on state), thereby enabling the IO thread 1115 to stop receiving data packets sent by the kernel space 112 in the control plane 110. The repair-on state indicates that the BGP fault recovery function is enabled.

[0051] For example, the network device 100 can use the iptables / netfilter of the kernel space 112 to lock the data packets in the input 1121 and output 1125 directions of the kernel space 112, that is, Figure 1 The transmission paths represented by arrows 140 and 150 are locked, so that the kernel space 112 stops sending data packets to the forwarding plane 120 .

[0052] At block 220 , the network device 100 causes the IO thread 1114 in the first BGP process 1112 to continue processing the received data packet.

[0053] In some embodiments, the received data packet indicates a data packet sent by kernel space 112 to IO thread 1114 via input 1121 before the first BGP process 1112 fails.

[0054] In block 230, in response to the completion of processing of the packet in IO thread 1114, network device 100 reestablishes a BGP process in the control plane based on the BGP peer information and BGP routing information associated with first BGP process 1112. For purposes of discussion, this BGP process may be referred to as a "second BGP process."

[0055] BGP peer information may include configuration parameters, operational status, and statistical data between the first BGP process and its BGP neighbors. BGP routing information is routing data used in the Border Gateway Protocol for exchange between different autonomous systems. For example, it may include destination network addresses, path attributes, and reachability information.

[0056] In some embodiments, the network device 100 may store BGP peer information, BGP routing information, and socket information in the database 130, thereby ensuring the subsequent recovery of the BGP peer information, BGP routing information, and socket information. For example, the network device 100 may store the BGP peer information, BGP routing information, and socket information in the database 130 when the first BGP process 1112 fails. For another example, the network device 100 may also store the BGP peer information, BGP routing information, and socket information in the database 130 when the first BGP process 1112 does not fail. In some embodiments, the database 130 may be a remote dictionary service database. In some embodiments, the network device 100 may store the BGP peer information and BGP routing information in the remote dictionary service database in the form of a snapshot. In some embodiments, the network device 100 may also store the socket information in the remote dictionary service database in any appropriate manner.

[0057] When it is necessary to reestablish the second BGP process, network device 100 can obtain BGP peer information and BGP routing information from database 130. In some embodiments, when reestablishing the second BGP process, network device 100 can first initiate the second BGP process. Network device 100 obtains BGP peer information and BGP routing information from database 130 and, based on the BGP peer information and BGP routing information, restores the initiated second BGP process to the state it was in before the failure of first BGP process 1112. Because the BGP peer information and BGP routing information are collected and stored specifically for first BGP process 1112, based on this pre-stored information, the newly created second BGP process can be restored to the state it was in before the failure of the first BGP process. It should be understood that when network device 100 utilizes BGP peer information and BGP routing information to restore the second BGP process, it can adopt any method known in the relevant art, and the embodiments of the present disclosure are not intended to be limiting in this regard.

[0058] At block 240, network device 100 reestablishes the socket interface of the BGP peer associated with the second BGP process based on the socket information of the BGP peer. For discussion purposes, the socket interface herein may be referred to as a "first socket interface."

[0059] In some embodiments, network device 100 may shut down a socket interface of a BGP peer associated with first BGP process 1112 in response to cessation of data packet transmission and reception between control plane 110 and forwarding plane 120, i.e., in response to a failure of first BGP process 1112. For example, the socket interface may be shut down upon exit of first BGP process 1112. For purposes of discussion, the socket interface herein may be referred to as a "second socket interface."

[0060] In some embodiments, when the network device 100 rebuilds the first socket interface, it may first establish the first socket interface. The network device 110 may obtain socket information from the database 130 and update the first socket interface based on the socket information. It should be understood that when the network device 100 uses the socket information to update the first socket interface, it may adopt any method in the relevant technology, and the embodiments of the present disclosure are not intended to limit this. Since the socket information obtained from the database is collected and stored for the BGP peer associated with the first BGP process 1112, based on the pre-stored socket information, the newly created socket interface can be updated to the state before the failure of the first BGP process.

[0061] In block 250 , in response to the completion of the reestablishment of the second BGP process and the first socket interface, the network device 100 resumes the sending and receiving of data packets between the control plane 110 and the forwarding plane 120 .

[0062] In some embodiments, when the second BGP process and the first socket interface are reestablished, the network device 100 may cause the IO thread 1114 to resume receiving data packets sent by the kernel space 112 in the control plane 110, and cause the kernel space 112 to resume sending data packets to the forwarding plane 120. In this way, the state of the BGP peer can be restored to a state where the connection has been successfully established and is in a stable communication phase.

[0063] For example, the network device 100 can use the TCP-repair technology to set the socket information of the kernel space 112 to the repair-off state, so that the IO thread 1115 can resume receiving data packets sent by the kernel space 112 in the control plane 110. The repair-off state refers to the state in which the BGP fault recovery function is disabled.

[0064] For example, the network device 100 can use the TCP queue 1116 to delete the locks of iptables / netfilter in the INPUT 1121 and OUTPUT 1125 directions, that is, Figure 1 The lock on the transmission path represented by arrows 140 and 150 in FIG. 1 can enable the kernel space 112 to resume sending data packets to the forwarding plane 120 .

[0065] In some embodiments, the network device 100 may cause the routing information base (RIB) process to determine whether the second BGP process has been updated based on the BGP routing information. If it is determined that the second BGP process has been updated, the RIB process may be caused to update the routing table of the forwarding plane; if it is determined that the second BGP process has not been updated, the RIB process may be prevented from updating the routing table.

[0066] For example, when the second BGP process is started and sends a data packet to the RIB process, the RIB process can determine whether the BGP routing information has been updated. For example, the RIB process can determine whether the BGP routing information has changed. If the BGP routing information has not changed, the RIB process can determine that the second BGP process has not been updated. Conversely, if the BGP routing information has changed, the RIB process can determine that the second BGP process has been updated. If the second BGP process has not been updated, the RIB process does not update the routing table in the forwarding plane 120, so that the forwarding plane 120 will not perceive the above-mentioned operation of the control plane 110 (i.e., rebuilding the BGP process and socket interface), thereby ensuring that traffic forwarding is not affected.

[0067] In summary, if the active MPU fails, a new BGP process can be started, eliminating the standby MPU and simplifying the non-disruptive routing switchover process for network devices. Furthermore, starting a new BGP process to complete the non-disruptive routing process avoids split-brain issues and ensures uninterrupted connectivity between BGP peers. Furthermore, this allows for rapid development and iteration of network devices, enabling flexible deployment.

[0068] Figure 3 FIG2 is a block diagram of an apparatus 300 for data processing according to some embodiments of the present disclosure. The apparatus 300 may be implemented in the network device 100. Each module / component in the apparatus 300 may be implemented by hardware, software, firmware, or any combination thereof.

[0069] The apparatus 300 includes a first processing module 310 configured to, in response to a failure of a first Border Gateway Protocol (BGP) process in the control plane of a network device, cause the control plane to stop sending and receiving packets with the forwarding plane of the network device. The apparatus 300 also includes a second processing module 320 configured to cause an input / output (IO) thread in the first BGP process to continue processing received packets. The apparatus 300 also includes a first reconstruction module 330 configured to, in response to completion of packet processing in the IO thread, reestablish a second BGP process in the control plane based on BGP peer information and BGP routing information associated with the first BGP process. The apparatus 300 also includes a second reconstruction module 340 configured to reestablish a first socket interface of a BGP peer associated with the second BGP process based on the BGP peer's socket information. The apparatus 300 also includes a third processing module 350 configured to, in response to completion of reestablishment of the second BGP process and the first socket interface, resume sending and receiving packets between the control plane and the forwarding plane.

[0070] In some embodiments, the first processing module 310 is further configured to stop the IO thread from receiving data packets sent by the kernel space in the control plane; and stop the kernel space from sending data packets to the forwarding plane.

[0071] In some embodiments, the third processing module 350 is further configured to enable the IO thread to resume receiving data packets sent by the kernel space in the control plane; and enable the kernel space to resume sending data packets to the forwarding plane.

[0072] In some embodiments, the apparatus 300 further includes a storage module configured to store BGP peer information, BGP routing information, and socket information in a database.

[0073] In some embodiments, the first reconstruction module 330 is further configured to start a second BGP process; obtain BGP peer information and BGP routing information from the database; and restore the started second BGP process to the state before the failure of the first BGP process based on the BGP peer information and BGP routing information.

[0074] In some embodiments, the second reconstruction module 340 is further configured to establish a first socket interface; obtain socket information from a database; and update the first socket interface based on the socket information.

[0075] In some embodiments, the apparatus 300 further includes a fourth processing module configured to prevent the routing information base (RIB) process from recording the exit status of the first BGP process.

[0076] In some embodiments, the device 300 also includes a fifth processing module, which is configured to enable the routing information base RIB process to determine whether the second BGP process is updated based on the BGP routing information; if it is determined that the second BGP process is updated, enable the RIB process to update the routing table of the forwarding plane; and if it is determined that the second BGP process is not updated, prevent the RIB process from updating the routing table.

[0077] In some embodiments, the apparatus 300 further includes a sixth processing module configured to close a second socket interface of a BGP peer associated with the first BGP process in response to cessation of sending and receiving data packets between the control plane and the forwarding plane.

[0078] The units included in the device 300 can be implemented in various ways, including software, hardware, firmware, or any combination thereof. In some embodiments, one or more units can be implemented using software and / or firmware, such as machine executable instructions stored on a storage medium. In addition to or as an alternative to machine executable instructions, some or all of the units in the device 300 can be implemented at least in part by one or more hardware logic components. By way of example and not limitation, exemplary types of hardware logic components that can be used include field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0079] Figure 4 4 shows a block diagram of an electronic device 400 in which one or more embodiments of the present disclosure may be implemented. Figure 4 The illustrated electronic device 400 is merely exemplary and should not be construed as limiting the functionality and scope of the embodiments described herein. Figure 4 The electronic device 400 shown can be used to implement Figure 1 network device 100.

[0080] like Figure 4 As shown, electronic device 400 is in the form of a general electronic device. Components of electronic device 400 may include, but are not limited to, one or more processors or processing units 410, memory 420, storage device 430, one or more communication units 440, one or more input devices 450, and one or more output devices 460. Processing unit 410 may be a real or virtual processor and is capable of performing various processes according to programs stored in memory 420. In a multi-processor system, multiple processing units execute computer-executable instructions in parallel to increase the parallel processing capabilities of electronic device 400.

[0081] The electronic device 400 typically includes a plurality of computer storage media. Such media can be any available media accessible to the electronic device 400, including but not limited to volatile and non-volatile media, removable and non-removable media. The memory 420 can be a volatile memory (e.g., registers, cache, random access memory (RAM)), a non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. The storage device 430 can be a removable or non-removable medium and can include a machine-readable medium, such as a flash drive, a disk, or any other medium that can be used to store information and / or data (e.g., training data for training) and can be accessed within the electronic device 400.

[0082] The electronic device 400 may further include additional removable / non-removable, volatile / non-volatile storage media. Figure 4 As shown in FIG, a magnetic disk drive for reading from or writing to a removable, non-volatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, non-volatile optical disk may be provided. In these cases, each drive may be connected to a bus (not shown) by one or more data media interfaces. Memory 420 may include a computer program product 425 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.

[0083] The communication unit 440 enables communication with other electronic devices via a communication medium. Additionally, the functions of the components of the electronic device 400 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Thus, the electronic device 400 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.

[0084] Input device 450 may be one or more input devices, such as a mouse, keyboard, or trackball. Output device 460 may be one or more output devices, such as a display, a speaker, or a printer. Electronic device 400 may also communicate with one or more external devices (not shown) via communication unit 440 as needed, such as a storage device, a display device, or the like, with one or more devices that allow a user to interact with electronic device 400, or with any device that allows electronic device 400 to communicate with one or more other electronic devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface (not shown).

[0085] According to an exemplary implementation of the present disclosure, a computer-readable storage medium is provided, on which one or more computer instructions are stored, wherein the one or more computer instructions are executed by a processor to implement the method described above. According to an exemplary implementation of the present disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.

[0086] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products implemented according to the present disclosure. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0087] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, such that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.

[0088] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.

[0089] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple implementations of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a part for a module, program segment or instruction, and a part for a module, program segment or instruction comprises one or more executable instructions for realizing the logical function of the specification. In some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

[0090] While various implementations of the present disclosure have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is selected to best explain the principles of the implementations, their practical applications, or improvements to existing technologies, or to enable others skilled in the art to understand the implementations disclosed herein.

Claims

1. A data processing method, comprising: In response to a failure of a first Border Gateway Protocol (BGP) process in a control plane of a network device, causing the control plane to stop sending and receiving data packets with a forwarding plane of the network device; Enable the input / output (IO) thread in the first BGP process to continue processing the received data packets; In response to completion of processing of the data packet in the IO thread, reestablishing a second BGP process in the control plane based on BGP peer information and BGP routing information associated with the first BGP process; Rebuilding a first socket interface of the BGP peer associated with the second BGP process based on the socket information of the BGP peer; as well as In response to the completion of the reestablishment of the second BGP process and the first socket interface, the sending and receiving of data packets between the control plane and the forwarding plane is resumed.

2. The method according to claim 1, wherein causing the control plane to stop sending and receiving data packets with the forwarding plane comprises: Stop the IO thread from receiving data packets sent by the kernel space in the control plane; as well as The kernel space is caused to stop sending data packets to the forwarding plane.

3. The method according to claim 1, wherein resuming the transmission and reception of data packets between the control plane and the forwarding plane comprises: Enable the IO thread to resume receiving data packets sent by the kernel space in the control plane; as well as The kernel space is caused to resume sending the data packet to the forwarding plane.

4. The method according to claim 1, further comprising: The BGP peer information, the BGP routing information, and the socket information are stored in a database.

5. The method according to claim 4, wherein reestablishing the second BGP process comprises: Starting the second BGP process; Acquire the BGP peer information and the BGP routing information from the database; as well as Based on the BGP peer information and the BGP routing information, the started second BGP process is restored to a state before the first BGP process fails.

6. The method of claim 4, wherein rebuilding the first socket interface comprises: Establishing the first socket interface; Obtaining the socket information from the database; Based on the socket information, the first socket interface is updated.

7. The method according to claim 1, further comprising: Prevent the routing information base (RIB) process from recording the exit status of the first BGP process.

8. The method according to claim 1, further comprising: Enable the routing information base (RIB) process to determine whether the second BGP process is updated based on the BGP routing information; If it is determined that the second BGP process is updated, causing the RIB process to update the routing table of the forwarding plane; as well as If it is determined that the second BGP process has not been updated, preventing the RIB process from updating the routing table.

9. The method according to claim 1, further comprising: In response to cessation of sending and receiving data packets between the control plane and the forwarding plane, closing a second socket interface of the BGP peer associated with the first BGP process.

10. A device for data processing, comprising: a first processing module configured to, in response to a failure of a first Border Gateway Protocol (BGP) process in a control plane of a network device, cause the control plane to stop sending and receiving data packets with a forwarding plane of the network device; A second processing module is configured to enable the input and output (IO) thread in the first BGP process to continue processing the received data packets; a first reconstruction module configured to, in response to completion of processing of the data packet in the IO thread, reconstruct a second BGP process in the control plane based on BGP peer information and BGP routing information associated with the first BGP process; a second reconstruction module configured to reconstruct a first socket interface of the BGP peer associated with the second BGP process based on the socket information of the BGP peer; as well as The third processing module is configured to resume the sending and receiving of data packets between the control plane and the forwarding plane in response to the completion of the reconstruction of the second BGP process and the first socket interface.

11. An electronic device comprising: at least one processing unit; as well as At least one memory, the at least one memory being coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, the instructions causing the electronic device to perform the method according to any one of claims 1 to 9 when executed by the at least one processing unit.

12. A computer-readable storage medium having a computer program stored thereon, wherein the computer program can be executed by a processor to implement the method according to any one of claims 1 to 9.

13. A computer program product comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Border gateway protocol smooth restart method and routing equipment

    CN103986649A

  • Master-slave control method for BGP

    CN106209612A

  • Method and system for realizing protocol NSR by single CPU

    CN113114641A

  • Techniques for graceful restart in a multi-process operating system

    US20080031239A1