CN113037630B - Table entry issuing method and device and table entry processing method and device - Google Patents

Table entry issuing method and device and table entry processing method and device Download PDF

Info

Publication number
CN113037630B
CN113037630B CN201911349825.3A CN201911349825A CN113037630B CN 113037630 B CN113037630 B CN 113037630B CN 201911349825 A CN201911349825 A CN 201911349825A CN 113037630 B CN113037630 B CN 113037630B
Authority
CN
China
Prior art keywords
service
modules
entry
service modules
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911349825.3A
Other languages
Chinese (zh)
Other versions
CN113037630A (en
Inventor
孙其瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN201911349825.3A priority Critical patent/CN113037630B/en
Priority to PCT/CN2020/133128 priority patent/WO2021129327A1/en
Publication of CN113037630A publication Critical patent/CN113037630A/en
Application granted granted Critical
Publication of CN113037630B publication Critical patent/CN113037630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7453Address table lookup; Address filtering using hashing

Abstract

The invention provides a method and a device for issuing an item, and a method and a device for processing the item, wherein the method for issuing the item comprises the following steps: acquiring a corresponding relation between a first table item and one or more second service modules, wherein the second service modules are service modules which need to use the first table item; issuing the first table entry to a first service module so that the first service module carries out logic processing according to the first table entry; and calling callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules. The invention can solve the problem of low efficiency of issuing the table item caused by unnecessary notification processing in the process of issuing the table item in the related technology, thereby improving the efficiency of issuing the table item and further realizing the effect of rapidly issuing the table item.

Description

Table entry issuing method and device and table entry processing method and device
Technical Field
The present invention relates to the field of communications, and in particular, to a method and apparatus for issuing an entry, and a method and apparatus for processing an entry.
Background
The data center rack exchanger needs to issue various table items such as ARP, route and the like in the service operation stage, the table items are issued to the service bottom layer processing logic, namely the service module, and then the service bottom layer processing logic writes the table item configuration into the hardware forwarding chip. In the related art, in the process of issuing an item to a service bottom layer processing logic of a service surface, if a certain item is associated with more than one service module, the control surface needs to issue the item to the current service module and also needs to notify the service module associated with the item; and the control plane writes the next table entry after completing notification of all the associated service modules by adopting serial writing of the table entry in the service bottom layer processing logic process of issuing the table entry to the service plane.
In the above-mentioned list item issuing process, there may be a phenomenon that a part of service modules are not started, or a part of service modules do not need the list item, so that unnecessary operations exist in notifying all associated service modules of the list item. When the table item scale is larger or the number of service modules is larger, the efficiency of issuing the table item is low, and even performance restriction is formed.
Aiming at the problem of low efficiency of issuing the table entry caused by unnecessary notification processing in the process of issuing the table entry in the related art, no effective solution has been proposed in the related art.
Disclosure of Invention
The embodiment of the invention provides a method and a device for issuing an item and a method and a device for processing the item, which at least solve the problem of low efficiency of issuing the item caused by unnecessary notification processing in the process of issuing the item in the related technology.
According to an embodiment of the present invention, there is provided an entry issuing method applied to a control plane, the method including:
acquiring a corresponding relation between a first table item and one or more second service modules, wherein the second service modules are service modules which need to use the first table item;
issuing the first table entry to a first service module so that the first service module carries out logic processing according to the first table entry; and calling callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules.
According to another embodiment of the present invention, there is also provided an entry issuing method applied to a control plane, the method including:
Establishing a notification queue, and adding the corresponding relation between the first table item and one or more fourth service modules into the notification queue; wherein the one or more fourth service modules are service modules associated with the first table entry;
issuing the first table entry to a first service module so that the first service module carries out logic processing according to the first table entry; and calling callback functions of the one or more fourth business modules through the notification queue.
According to another embodiment of the present invention, there is also provided an entry processing method applied to a service plane, the method including:
the first business module receives a first table entry issued by the control surface and carries out logic processing according to the first table entry;
and the one or more second service modules respond to call events of callback functions of the one or more second service modules by the control surface according to the corresponding relation between the first table item and the one or more second service modules, which are acquired in advance.
According to another embodiment of the present invention, there is also provided an entry processing method applied to a service plane, the method including:
the first business module receives a first table entry issued by the control surface and carries out logic processing according to the first table entry;
One or more fourth service modules respond to call events of callback functions of the one or more fourth service modules through a pre-established notification queue by the control surface; the notification queue is added with a corresponding relation between the first table item and the one or more fourth service modules, wherein the one or more fourth service modules are service modules associated with the first table item.
According to another embodiment of the present invention, there is also provided an entry issuing apparatus applied to a control plane, the apparatus including:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring the corresponding relation between a first table item and one or more second service modules, wherein the second service modules are service modules which need to use the first table item;
the first issuing module is used for issuing the first table item to a first service module so that the first service module can perform logic processing according to the first table item; and calling callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules.
According to another embodiment of the present invention, there is also provided an entry issuing apparatus applied to a control plane, the apparatus including:
The building module is used for building a notification queue and adding the corresponding relation between the first table item and one or more fourth service modules into the notification queue; wherein the one or more fourth service modules are service modules associated with the first table entry;
the second issuing module is used for issuing the first table item to the first service module so that the first service module can perform logic processing according to the first table item; and calling callback functions of the one or more fourth business modules through the notification queue.
According to another embodiment of the present invention, there is also provided an entry processing apparatus applied to a service plane, including:
the first processing module is used for receiving a first table entry issued by the control surface by the first service module and carrying out logic processing according to the first table entry;
the first response module is used for responding to call events of callback functions of the one or more second service modules by the control surface according to the corresponding relation between the first table item and the one or more second service modules, which are acquired in advance.
According to another embodiment of the present invention, there is also provided an entry processing apparatus applied to a service plane, including:
The second processing module is used for receiving a first table entry issued by the control surface by the first service module and carrying out logic processing according to the first table entry;
the second response module is used for responding to call events of callback functions of one or more fourth service modules by the control plane through a pre-established notification queue; the notification queue is added with a corresponding relation between the first table item and the one or more fourth service modules, wherein the one or more fourth service modules are service modules associated with the first table item.
According to another embodiment of the invention, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to another embodiment of the invention there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, the control surface can acquire the corresponding relation between the first table item and one or more second service modules, wherein the second service modules are service modules which need to use the first table item; therefore, the control plane can call callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules in the process of issuing the first table item to the first service module so that the first service module carries out logic processing according to the first table item. Therefore, the invention can solve the problem of low efficiency of issuing the table entry caused by unnecessary notification processing in the process of issuing the table entry in the related technology, and achieves the effects of improving the efficiency of issuing the table entry and further realizing the rapid issuing of the table entry.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flowchart (I) of a method for issuing an entry according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of the operation of different threads in the issuing of an entry according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating the operation of ARP entry delivery according to an embodiment of the present invention;
FIG. 4 is a flowchart (II) of a method for issuing an entry according to an embodiment of the present invention;
FIG. 5 is a flowchart (I) of a method for processing an entry according to an embodiment of the present invention;
FIG. 6 is a flowchart (II) of a method for processing an entry according to an embodiment of the present invention;
FIG. 7 is a block diagram (I) of a table entry issuing apparatus according to an embodiment of the present invention;
FIG. 8 is a block diagram (II) of a table entry issuing apparatus according to an embodiment of the present invention;
FIG. 9 is a block diagram (I) of an entry processing apparatus according to an embodiment of the present invention;
fig. 10 is a block diagram (ii) of a table entry processing apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
Example 1
The embodiment provides a table entry issuing method which is applied to a control plane; fig. 1 is a flowchart (one) of an entry issuing method according to an embodiment of the present invention, as shown in fig. 1, where the entry issuing method in this embodiment includes:
s102, obtaining a corresponding relation between a first table item and one or more second service modules, wherein the second service modules are service modules needing to use the first table item;
s104, issuing a first table item to a first service module so that the first service module can perform logic processing according to the first table item; and calling callback functions of one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules.
It should be further noted that, in the step S102, a correspondence between the first table entry and one or more second service modules is obtained, that is, the service module that explicitly needs to use the first table entry is determined, so that the service module is selected from the service modules associated with the first table entry and is used as the second service module, and further is used as the notification object in the process of issuing the table entry.
In step S102, the corresponding relationship between the first entry and one or more second service modules may be recorded, stored or queried in a database, a lookup table, or the like, which is not limited in the present invention.
It should be further noted that, in step S104, the callback function of the one or more second service modules is called, that is, the notification of the one or more second service modules by the control is implemented. In step S104, the first service module performs logic processing according to the first entry, which may specifically be a write operation of the first entry.
In step S104, according to the correspondence between the first table entry and the one or more second service modules, the operation of calling the callback function of the one or more second service modules may be performed while the first table entry is issued to the first service module, or may be performed after the first table entry is issued to the first service module, after the first service module performs logic processing according to the first table entry, the notification processing of the second service module is performed. The invention is not limited in this regard.
It should be further noted that, in the step S102, the operation of obtaining the correspondence between the first entry and the one or more second service modules may be performed before the step S104 is performed, or the step S102 may be performed again after the step S104 is performed or the correspondence between the first entry and the one or more second service modules is supplemented or updated.
By the method for issuing the table entries in the embodiment, the control plane can acquire the corresponding relation between the first table entry and one or more second service modules, wherein the second service modules are service modules which need to use the first table entry; therefore, the control plane can call callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules in the process of issuing the first table item to the first service module so that the first service module carries out logic processing according to the first table item. Therefore, the method for issuing the table entry in the embodiment can solve the problem of low efficiency of issuing the table entry caused by unnecessary notification processing in the process of issuing the table entry in the related technology, thereby improving the efficiency of issuing the table entry and further realizing the effect of rapidly issuing the table entry.
Specifically, before the first table entry is issued, the second service module needing to use the first table entry is obtained in advance, so that the service module which is not started or does not need to use the table entry in the service modules associated with the first table entry is screened, and further, the service module needing to be notified is limited in the second service module in the notification process of the control plane. By avoiding unnecessary notification operation, the efficiency of the list item issuing process can be obviously improved.
In an optional embodiment, the obtaining the correspondence between the first entry and the one or more second service modules includes:
and establishing a lookup table, wherein the lookup table is configured to store the corresponding relation between the first table item and one or more second service modules.
In an optional embodiment, the obtaining the correspondence between the first entry and the one or more second service modules further includes:
a third service module needing to use the first table entry is used as a second service module, so that the corresponding relation between the first table entry and one or more second service modules in the lookup table is updated; the third service module is a service module configured by the control plane at any time.
It should be further noted that, in the above-mentioned alternative embodiment, the third service module is configured to instruct the control plane to perform the service configuration processing at any time as the service module to be configured, where the control plane may need to use a plurality of entries in the process of configuring the third service module, and when the third service module needs to use the first entry, the third service module may be marked as the second service module, so as to update the correspondence between the first entry and one or more second service modules in the lookup table, that is, increase the number and objects of the second service modules corresponding to the first entry.
In an alternative embodiment, the lookup table is configured to store index information of the first entry and identification information of one or more second service modules.
It should be further noted that, in the above lookup table, the corresponding relationship between the first table entry and the second service module may be indicated by storing the index information of the first table entry and the identification information of one or more second service modules. The index information of the first table entry may be an index field of the first table entry, such as an internet protocol (Internet Protocol, IP) field, (Virtual Private Network Routing and Forwarding, VRF) virtual private network routing and forwarding table field, and so on.
In an alternative embodiment, the lookup table is further configured to store status indication information of one or more second service modules, where the status indication information is used to indicate whether the one or more second service modules are turned on in the switch.
It should be further noted that in the above alternative embodiment, the status indication information may indicate whether the second service module is turned on in the switch, and the second service module that is not turned on may not be notified.
In an optional embodiment, the calling the callback function of the one or more second service modules according to the correspondence between the first entry and the one or more second service modules further includes:
Inquiring in a lookup table according to the index information of the first table item to determine the identification information of one or more second service modules corresponding to the first table item, and calling callback functions of the one or more second service modules according to the identification information.
It should be further noted that in the above alternative embodiment, that is, in the process of issuing the first table entry by the control plane, index information of the first table entry, such as an IP field, a VRF field, etc., is obtained, and identification information of the second service module corresponding to the first table entry is determined in the above lookup table by adopting a search or searching manner according to the index field, so that the control plane can call callback functions of one or more second service modules according to the identification information.
In an alternative embodiment, the lookup table is a hash table.
In an alternative embodiment, the callback function of the one or more second service modules is a callback function that the one or more second service modules perform static registration in the initialization stage.
In an optional embodiment, the calling the callback function of the one or more second service modules according to the correspondence between the first entry and the one or more second service modules includes:
Establishing a notification queue, and adding the corresponding relation between the first table item and one or more second service modules to the notification queue;
and calling callback functions of one or more second service modules through the notification queue according to the corresponding relation between the first table item and the one or more second service modules.
It should be further noted that in the above alternative embodiment, in the notification process of the second service module, the control plane is not caused to directly call the callback function of one or more second service modules according to the serial writing manner of the table entry, and a notification queue is pre-established. The notification queue is independent of the issuing of the table entries, specifically, the corresponding relation between the first table entry and one or more second service modules is added into the notification queue, namely, the second service module corresponding to the first table entry needing to be notified is determined in the notification queue, so that callback functions of one or more second service modules are further called through the notification queue, and notification operation can be realized while the control plane continues to issue the subsequent table entries.
Compared with the prior art in which serial writing of the table entries is adopted to cause that the control plane needs to notify all service modules one by one and then issue the subsequent table entries, in the above alternative embodiment, the control plane completes the issue of the first table entry based on the notification of the service modules implemented by the notification queue, and then issues the subsequent table entries, so that the issue time of the whole table entries is further shortened. According to the technical scheme described in the above optional embodiment, the notification mechanism is further improved on the basis that the corresponding relation between the first table entry and one or more second service modules is obtained in advance in the embodiment so as to notify the second service modules, so that the issuing efficiency of the table entry is further improved.
In an optional embodiment, after the foregoing issuing the first entry to the first service module for the first service module to perform logic processing according to the first entry, the method further includes:
in a preset first processing thread, a second table item is issued to a first service module; the method comprises the steps of,
and calling callback functions of one or more second business modules through the notification queue in the newly-built second processing thread.
It should be further noted that, the first processing thread and the second processing thread are different threads, that is, after the control plane completes the issuing of the first table entry, the issuing of the second table entry and the notification processing of the second service module are respectively performed in different threads, where the first processing thread is an original thread for the control plane to issue the table entry, and the second processing thread is a new thread for the notification queue; by adopting the technical scheme described in the above optional embodiment, in the case of further ensuring that the notification processing of the notification queue is independent of the entry issuing processing, the coupling between the notification operation in the notification queue and the rest of the services of the control plane is reduced, so as to avoid possible mutual influence. Fig. 2 is a schematic working diagram of different threads in the table entry issuing according to an embodiment of the present invention, and a process of performing the table entry issuing and notification processing of the notification queue in the different threads is shown in fig. 2.
In an optional embodiment, the adding the correspondence between the first entry and the one or more second service modules to the notification queue includes:
and adding the index information of the first table item and the identification information of one or more second service modules into a notification queue.
In an optional embodiment, the notification queue is further configured to combine, according to the index information of the first entry, identification information of one or more second service modules in the notification queue.
It should be further noted that, in the above optional embodiment, the merging process indicates the notification queue to merge different second service modules corresponding to the first table entry into one operation to perform notification, specifically, when different second service module corresponding identification information exists in different processing orders in the notification queue, the notification queue needs to notify the second service modules according to the identification information in the corresponding processing order according to a preset manner, and through the technical scheme described in the above optional embodiment, the identification information of the second service modules in the different processing orders can be merged to perform notification in one process in the same processing order, so as to further improve notification efficiency of the notification queue.
In an alternative embodiment, the notification queue is a circular (First Input First Output, FIFO) first-in-first-out queue.
In order to further explain the table entry issuing method in this embodiment, the table entry issuing method is described in detail below by way of a specific embodiment.
In this embodiment, an address resolution protocol (Address Resolution Protocol, ARP) entry is taken as an example, i.e., an ARP entry is taken as the first entry in the above embodiment. Fig. 3 is a schematic diagram of an operation of ARP entry issuing according to an embodiment of the present invention, and a process of ARP entry issuing in this embodiment is shown in fig. 3.
In the system initialization stage, each service module statically registers a callback function. The system creates a hash table, where the hash table is used to store a correspondence between an entry and a service module that needs to use the entry, that is, a correspondence between a first entry and a second service module that needs to use a first expression in the foregoing embodiment. Specifically, the hash table stores index fields of the table entry, such as an IP field and a VRF field, and a flag of a service module that needs to use the table entry. Meanwhile, the system also needs to establish a ring FIFO queue for notification.
In the running process of the system, after the control plane configures a corresponding service module, if the service needs to use a certain table item in the hash table, if the service needs to use an ARP module of an ARP table item, the corresponding relationship between the service module and the table item is added to the hash table, and specifically, the number and the objects of the service modules corresponding to the original table item may be updated, or a table item and a corresponding service module may be newly added.
When the control plane learns the ARP table entry, the control plane issues the ARP table entry to an ARP module, the ARP module writes the ARP table entry into a hardware table, and then queries in a hash table by utilizing the index field, and if the hash table is found that other service modules needing to use the ARP table entry exist, the index information of the ARP table entry and the identification information of the corresponding service module are added into an annular FIFO queue. After the ARP module completes writing of the ARP list item, the list item issuing processing of the next-hop ARP list item is exited.
The system establishes a processing thread of the annular FIFO queue, in the processing thread, firstly, merging the service modules corresponding to ARP table items in the annular FIFO queue, specifically traversing all the contents to be processed in the annular FIFO queue, inquiring whether the service modules corresponding to the same ARP table item exist in different operations, if so, merging the service modules corresponding to the same ARP table item in different operations according to a merging rule, and executing according to the latest operation record by adding, updating the operation record and the like; further, if the above-mentioned combined service modules are the same, only the operation of the service modules is combined; if the combined service modules are different, a joining order notification is also required.
After the merging processing is completed, processing the service modules needing to be notified in the annular FIFO queue, and particularly calling callback functions of the service modules needing to be notified in sequence.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 2
In this embodiment, a method for issuing an entry is provided and applied to a control plane, and fig. 4 is a flowchart (second) of the method for issuing an entry provided according to an embodiment of the present invention, as shown in fig. 4, where the method for issuing an entry in this embodiment includes:
S202, a notification queue is established, and the corresponding relation between the first table item and one or more fourth service modules is added into the notification queue; wherein the one or more fourth service modules are service modules associated with the first table entry;
s204, a first table item is issued to a first service module, so that the first service module carries out logic processing according to the first table item; and invoking callback functions of one or more fourth business modules through the notification queue.
It should be further noted that in step S202, the fourth service module is all the service modules associated with the first table entry.
It should be further noted that, in the above step S204, during the notification process of the third service module, the control plane is not caused to directly call the callback function of one or more third service modules according to the serial writing manner of the table entry, but a notification queue is pre-established in step S202. The notification queue is independent of the issuing of the entries, specifically, the correspondence between the first entry and one or more third service modules is added to the notification queue established in step S202, that is, the third service module corresponding to the first entry to be notified is determined in the notification queue, so that the callback function of one or more third service modules is further invoked through the notification queue, that is, the control plane can continue issuing the subsequent entries while implementing the notification operation.
By the method for issuing the table entries in the embodiment, a notification queue can be pre-established, and the corresponding relation between the first table entry and one or more fourth service modules is added into the notification queue; wherein the one or more fourth service modules are service modules associated with the first table entry; furthermore, the control plane may issue a first table entry to the first service module, so that the first service module performs logic processing according to the first table entry; and invoking callback functions of one or more fourth business modules through the notification queue. Therefore, the method for issuing the table entry in the embodiment can solve the problem of low efficiency of issuing the table entry caused by unnecessary notification processing in the process of issuing the table entry in the related technology, thereby improving the efficiency of issuing the table entry and further realizing the effect of rapidly issuing the table entry.
Specifically, compared with the prior art in which serial writing of the table entries is adopted to cause that the control plane needs to notify all service modules one by one and then issue the subsequent table entries, in the above alternative embodiment, after the control plane completes issuing the first table entry based on notification of the service modules implemented by the notification queue, the control plane can issue the subsequent table entries, so that the time for issuing the whole table entry is further shortened, and further, the issuing efficiency of the table entries is improved.
In an optional embodiment, the sending the first entry to the first service module, after the first service module performs logic processing according to the first entry, includes:
in a preset first processing thread, a second table item is issued to a first service module; the method comprises the steps of,
and calling callback functions of one or more fourth business modules in the newly-built second processing thread through the notification queue.
It should be further noted that, the first processing thread and the second processing thread are different threads, that is, after the control plane completes the issuing of the first entry, the second entry is issued further, and the notification processing for the fourth service module is performed in different threads, where the first processing thread is an original thread for the control plane to issue the entry, and the second processing thread is a new thread for the notification queue; by adopting the technical scheme described in the above optional embodiment, in the case of further ensuring that the notification processing of the notification queue is independent of the entry issuing processing, the coupling between the notification operation in the notification queue and the rest of the services of the control plane is reduced, so as to avoid possible mutual influence.
In an optional embodiment, the adding the correspondence between the first entry and the one or more fourth service modules to the notification queue includes:
And adding the index information of the first table item and the identification information of one or more fourth service modules into a notification queue.
It should be further noted that, the index information of the first table entry may be an index field of the first table entry, such as an IP field, a VRF field, and so on.
In an optional embodiment, the notification queue is further configured to combine, according to the index information of the first entry, identification information of one or more fourth service modules in the notification queue.
It should be further noted that, in the foregoing optional embodiment, the merging process instructs the notification queue to merge different fourth service modules corresponding to the first table entry into one operation to perform notification, specifically, when different identifier information corresponding to the fourth service modules exists in different processing orders in the notification queue, the notification queue needs to notify the fourth service modules according to the identifier information in the corresponding processing order according to a preset manner, and through the technical scheme described in the foregoing optional embodiment, the identifier information of the fourth service modules in the different processing orders may be merged to perform notification in one process in the same processing order, so as to further improve notification efficiency of the notification queue.
In an optional embodiment, the fourth service module includes a second service module, where the second service module is a service module that needs to use the first table entry.
In an alternative embodiment, the notification queue is a circular first-in first-out FIFO queue.
In an optional embodiment, the callback function of the one or more fourth service modules is a callback function that the one or more fourth service modules performs static registration in the initialization stage.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 3
In this embodiment, an entry processing method is provided and applied to a service plane, and fig. 5 is a flowchart (a) of the entry processing method provided according to an embodiment of the present invention, as shown in fig. 5, where the entry processing method in this embodiment includes:
s302, a first service module receives a first table entry issued by a control surface and carries out logic processing according to the first table entry;
s304, the one or more second service modules respond to call events of callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules, which are acquired in advance by the control surface.
It should be further noted that, the other optional embodiments and the corresponding technical effects of the table entry processing method in the foregoing embodiments correspond to the table entry issuing method in embodiment 1, so that details are not repeated herein.
In an optional embodiment, the event of calling the callback function of the one or more second service modules by the response control surface according to the pre-acquired correspondence between the first table entry and the one or more second service modules includes:
the one or more second service modules respond to call events of callback functions of the one or more second service modules by the control surface according to a pre-established lookup table; the lookup table is configured to store correspondence between the first entry and one or more second service modules.
In an alternative embodiment, the lookup table is configured to store index information of the first entry and identification information of one or more second service modules.
In an alternative embodiment, the lookup table is further configured to store status indication information of one or more second service modules, where the status indication information is used to indicate whether the one or more second service modules are turned on in the switch.
In an optional embodiment, the one or more second service modules respond to call events of callback functions of the one or more second service modules by the control plane according to a pre-established lookup table, and further include:
the one or more second service modules respond to call events of callback functions of the one or more second service modules by the control plane according to the identification information;
the identification information is identification information of one or more second service modules corresponding to the first table item, which is determined by the control plane by inquiring in the inquiry table according to the index information of the first table item.
In an alternative embodiment, the lookup table is a hash table.
In an optional embodiment, the callback function of the one or more second service modules is a callback function that the one or more second service modules perform static registration in the initialization stage.
In an optional embodiment, the event of calling the callback function of the one or more second service modules by the response control surface according to the pre-acquired correspondence between the first table entry and the one or more second service modules includes:
the one or more second service modules respond to call events of callback functions of the one or more second service modules through a pre-established notification queue by the control plane;
the notification queue is added with a corresponding relation between the first table item and one or more second service modules.
In an alternative embodiment, the method further comprises:
the first business module receives a second table entry issued by the control surface in a preset first processing thread; the method comprises the steps of,
and the one or more second business modules respond to call events of callback functions of the one or more second business modules in the newly-built second processing thread through a pre-established notification queue by the control surface.
In an optional embodiment, index information of the first table entry and identification information of one or more second service modules are added in the notification queue.
In an optional embodiment, the notification queue is further configured to combine, according to the index information of the first entry, identification information of one or more second service modules in the notification queue.
In an alternative embodiment, the notification queue is a circular first-in first-out FIFO queue.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 4
In this embodiment, a method for processing an entry is provided and applied to a service plane, and fig. 6 is a flowchart (second) of the method for processing an entry provided according to an embodiment of the present invention, as shown in fig. 6, where the method for processing an entry in this embodiment includes:
s402, a first service module receives a first table entry issued by a control surface and carries out logic processing according to the first table entry;
S404, one or more fourth service modules respond to call events of callback functions of the one or more fourth service modules through a pre-established notification queue by the control plane; the notification queue is added with a corresponding relation between the first table item and one or more fourth service modules, wherein the one or more fourth service modules are service modules associated with the first table item.
It should be further noted that, the other optional embodiments and the corresponding technical effects of the table entry processing method in the foregoing embodiments correspond to the table entry issuing method in embodiment 2, so that details are not repeated herein.
In an alternative embodiment, the method further comprises:
the first business module receives a second table entry issued by the control surface in a preset first processing thread; the method comprises the steps of,
and the one or more fourth business modules respond to call events of callback functions of the one or more fourth business modules in the newly-built second processing thread through a pre-established notification queue by the control surface.
In an optional embodiment, index information of the first table entry and identification information of one or more fourth service modules are added in the notification queue.
In an optional embodiment, the notification queue is further configured to combine, according to the index information of the first entry, identification information of one or more fourth service modules in the notification queue.
In an optional embodiment, the fourth service module includes a fourth service module, where the fourth service module is a service module that needs to use the first table entry.
In an alternative embodiment, the notification queue is a circular first-in first-out FIFO queue.
In an alternative embodiment, the callback function of the one or more fourth service modules is a callback function that the one or more fourth service modules are statically registered in the initialization stage.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 5
The embodiment provides a table entry issuing device, which is applied to a control plane, and the device is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 7 is a block diagram (a) of a table entry issuing apparatus according to an embodiment of the present invention, where, as shown in fig. 7, the apparatus includes:
the obtaining module 502 is configured to obtain a correspondence between the first entry and one or more second service modules, where the second service module is a service module that needs to use the first entry;
the first issuing module 504 is configured to issue a first entry to the first service module, so that the first service module performs logic processing according to the first entry; and calling callback functions of one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules.
It should be further noted that, the other optional embodiments and the corresponding technical effects of the table entry issuing device in the foregoing embodiments correspond to the table entry issuing method in embodiment 1, so that details are not repeated herein.
In an optional embodiment, the obtaining the correspondence between the first entry and the one or more second service modules includes:
and establishing a lookup table, wherein the lookup table is configured to store the corresponding relation between the first table item and one or more second service modules.
In an optional embodiment, the obtaining the correspondence between the first entry and the one or more second service modules further includes:
a third service module needing to use the first table entry is used as a second service module, so that the corresponding relation between the first table entry and one or more second service modules in the lookup table is updated; the third service module is a service module configured by the control plane at any time.
In an alternative embodiment, the lookup table is configured to store index information of the first entry and identification information of one or more second service modules.
In an alternative embodiment, the lookup table is further configured to store status indication information of one or more second service modules, where the status indication information is used to indicate whether the one or more second service modules are turned on in the switch.
In an optional embodiment, the calling the callback function of the one or more second service modules according to the correspondence between the first entry and the one or more second service modules further includes:
Inquiring in a lookup table according to the index information of the first table item to determine the identification information of one or more second service modules corresponding to the first table item, and calling callback functions of the one or more second service modules according to the identification information.
In an alternative embodiment, the lookup table is a hash table.
In an optional embodiment, the callback function of the one or more second service modules is a callback function that the one or more second service modules perform static registration in the initialization stage.
In an optional embodiment, the calling the callback function of the one or more second service modules according to the correspondence between the first entry and the one or more second service modules includes:
establishing a notification queue, and adding the corresponding relation between the first table item and one or more second service modules to the notification queue;
and calling callback functions of one or more second service modules through the notification queue according to the corresponding relation between the first table item and the one or more second service modules.
In an optional embodiment, after the foregoing issuing the first entry to the first service module for the first service module to perform logic processing according to the first entry, the method further includes:
In a preset first processing thread, a second table item is issued to a first service module; the method comprises the steps of,
and calling callback functions of one or more second business modules through the notification queue in the newly-built second processing thread.
In an optional embodiment, the adding the correspondence between the first entry and the one or more second service modules to the notification queue includes:
and adding the index information of the first table item and the identification information of one or more second service modules into a notification queue.
In an optional embodiment, the notification queue is further configured to combine, according to the index information of the first entry, identification information of one or more second service modules in the notification queue.
In an alternative embodiment, the notification queue is a circular first-in first-out FIFO queue.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 6
The embodiment also provides a table entry issuing device, which is applied to the control plane, and the device is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 8 is a block diagram (two) of a table entry issuing device according to an embodiment of the present invention, where, as shown in fig. 8, the device includes:
the establishing module 602 is configured to establish a notification queue, and add a correspondence between the first entry and one or more fourth service modules to the notification queue; wherein the one or more fourth service modules are service modules associated with the first table entry;
the second issuing module 604 is configured to issue the first table entry to the first service module, so that the first service module performs logic processing according to the first table entry; and invoking callback functions of one or more fourth business modules through the notification queue.
It should be further noted that, the other optional embodiments and the corresponding technical effects of the table entry issuing device in the foregoing embodiments correspond to the table entry issuing method in embodiment 2, so that details are not repeated herein.
In an optional embodiment, the sending the first entry to the first service module, after the first service module performs logic processing according to the first entry, includes:
in a preset first processing thread, a second table item is issued to a first service module; the method comprises the steps of,
and calling callback functions of one or more fourth business modules in the newly-built second processing thread through the notification queue.
In an optional embodiment, the adding the correspondence between the first entry and the one or more fourth service modules to the notification queue includes:
and adding the index information of the first table item and the identification information of one or more fourth service modules into a notification queue.
In an optional embodiment, the notification queue is further configured to combine, according to the index information of the first entry, identification information of one or more fourth service modules in the notification queue.
In an optional embodiment, the fourth service module includes a fourth service module, where the fourth service module is a service module that needs to use the first table entry.
In an alternative embodiment, the notification queue is a circular first-in first-out FIFO queue.
In an optional embodiment, the callback function of the one or more fourth service modules is a callback function that the one or more fourth service modules performs static registration in the initialization stage.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 7
The embodiment also provides an entry processing device, which is applied to the service plane, and the device is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 9 is a block diagram (a) of an entry processing apparatus according to an embodiment of the present invention, as shown in fig. 9, where the apparatus includes:
the first processing module 702 is configured to receive a first entry issued by the control plane by using the first service module, and perform logic processing according to the first entry;
the first response module 704 is configured to respond to an event of calling a callback function of the one or more second service modules by the control plane according to a corresponding relationship between the first table entry and the one or more second service modules, where the call event is acquired in advance.
It should be further noted that, the other optional embodiments of the table entry processing apparatus in the foregoing embodiments and the corresponding technical effects correspond to the table entry processing method in embodiment 3, so that the description thereof is omitted herein.
In an optional embodiment, the event of calling the callback function of the one or more second service modules by the response control surface according to the pre-acquired correspondence between the first table entry and the one or more second service modules includes:
the one or more second service modules respond to call events of callback functions of the one or more second service modules by the control surface according to a pre-established lookup table; the lookup table is configured to store correspondence between the first entry and one or more second service modules.
In an alternative embodiment, the lookup table is configured to store index information of the first entry and identification information of one or more second service modules.
In an alternative embodiment, the lookup table is further configured to store status indication information of one or more second service modules, where the status indication information is used to indicate whether the one or more second service modules are turned on in the switch.
In an optional embodiment, the one or more second service modules respond to call events of callback functions of the one or more second service modules by the control plane according to a pre-established lookup table, and further include:
The one or more second service modules respond to call events of callback functions of the one or more second service modules by the control plane according to the identification information;
the identification information is identification information of one or more second service modules corresponding to the first table item, which is determined by the control plane by inquiring in the inquiry table according to the index information of the first table item.
In an alternative embodiment, the lookup table is a hash table.
In an optional embodiment, the callback function of the one or more second service modules is a callback function that the one or more second service modules perform static registration in the initialization stage.
In an optional embodiment, the event of calling the callback function of the one or more second service modules by the response control surface according to the pre-acquired correspondence between the first table entry and the one or more second service modules includes:
the one or more second service modules respond to call events of callback functions of the one or more second service modules through a pre-established notification queue by the control plane;
the notification queue is added with a corresponding relation between the first table item and one or more second service modules.
In an alternative embodiment, the apparatus further comprises:
the first business module receives a second table entry issued by the control surface in a preset first processing thread; the method comprises the steps of,
and the one or more second business modules respond to call events of callback functions of the one or more second business modules in the newly-built second processing thread through a pre-established notification queue by the control surface.
In an optional embodiment, index information of the first table entry and identification information of one or more second service modules are added in the notification queue.
In an optional embodiment, the notification queue is further configured to combine, according to the index information of the first entry, identification information of one or more second service modules in the notification queue.
In an alternative embodiment, the notification queue is a circular first-in first-out FIFO queue.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 8
The embodiment also provides an entry processing device, which is applied to the service plane, and the device is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 10 is a block diagram (two) of a table entry processing apparatus according to an embodiment of the present invention, as shown in fig. 10, where the apparatus includes:
the second processing module 802 is configured to receive a first entry issued by the control plane by using the first service module, and perform logic processing according to the first entry;
a second response module 804, configured to respond to a call event of the control plane to a callback function of the one or more fourth service modules through a pre-established notification queue by using the one or more fourth service modules; the notification queue is added with a corresponding relation between the first table item and one or more fourth service modules, wherein the one or more fourth service modules are service modules associated with the first table item.
It should be further noted that, the other optional embodiments of the table entry processing apparatus in the foregoing embodiments and the corresponding technical effects correspond to the table entry processing method in embodiment 3, so that the description thereof is omitted herein.
In an alternative embodiment, the apparatus further comprises:
the first business module receives a second table entry issued by the control surface in a preset first processing thread; the method comprises the steps of,
and the one or more fourth business modules respond to call events of callback functions of the one or more fourth business modules in the newly-built second processing thread through a pre-established notification queue by the control surface.
In an optional embodiment, index information of the first table entry and identification information of one or more fourth service modules are added in the notification queue.
In an optional embodiment, the notification queue is further configured to combine, according to the index information of the first entry, identification information of one or more fourth service modules in the notification queue.
In an optional embodiment, the fourth service module includes a fourth service module, where the fourth service module is a service module that needs to use the first table entry.
In an alternative embodiment, the notification queue is a circular first-in first-out FIFO queue.
In an alternative embodiment, the callback function of the one or more fourth service modules is a callback function that the one or more fourth service modules are statically registered in the initialization stage.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 9
Embodiments of the present invention also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps described in embodiments 1 to 4 described above:
alternatively, in the present embodiment, the above-described computer-readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Example 10
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the steps described in the above-described embodiments 1 to 4 by a computer program.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (45)

1. A method for issuing an entry, applied to a control plane, the method comprising:
acquiring a corresponding relation between a first table item and one or more second service modules, wherein the second service modules are service modules which need to use the first table item;
issuing the first table entry to a first service module so that the first service module carries out logic processing according to the first table entry; and calling callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules.
2. The method of claim 1, wherein the obtaining the correspondence between the first entry and the one or more second service modules comprises:
and establishing a lookup table, wherein the lookup table is configured to store the corresponding relation between the first table item and the one or more second service modules.
3. The method of claim 2, wherein the obtaining the correspondence between the first entry and the one or more second service modules further comprises:
a third service module needing to use the first table entry is used as the second service module, so that the corresponding relation between the first table entry and the one or more second service modules in the lookup table is updated; the third service module is a service module configured by the control plane at any time.
4. The method of claim 2, wherein the lookup table is configured to store index information for the first entry and identification information for the one or more second traffic modules.
5. The method of claim 4, wherein the lookup table is further configured to store status indication information for the one or more second traffic modules, wherein the status indication information is used to indicate whether the one or more second traffic modules are on in a switch.
6. The method of claim 4, wherein invoking the callback function of the one or more second business modules according to the correspondence between the first entry and the one or more second business modules further comprises:
And inquiring in the lookup table according to the index information of the first table item to determine the identification information of the one or more second service modules corresponding to the first table item, and calling the callback function of the one or more second service modules according to the identification information.
7. The method according to any one of claims 2 to 6, wherein the look-up table is a hash table.
8. The method according to any one of claims 1 to 6, wherein the callback function of the one or more second service modules is a callback function that the one or more second service modules perform static registration during an initialization phase.
9. The method according to any one of claims 1 to 6, wherein the calling a callback function of the one or more second service modules according to the correspondence between the first entry and the one or more second service modules comprises:
establishing a notification queue, and adding the corresponding relation between the first table item and the one or more second service modules to the notification queue;
and calling the callback function of the one or more second service modules through the notification queue according to the corresponding relation between the first table item and the one or more second service modules.
10. The method of claim 9, wherein the issuing the first entry to a first service module for the first service module to logically process according to the first entry further comprises:
in a preset first processing thread, a second table item is issued to the first service module; the method comprises the steps of,
and in the newly-built second processing thread, calling the callback functions of the one or more second business modules through the notification queue.
11. The method of claim 9, wherein the adding the correspondence between the first entry and the one or more second traffic modules to the notification queue comprises:
and adding the index information of the first table item and the identification information of the one or more second service modules into the notification queue.
12. The method of claim 11, wherein the notification queue is further configured to merge the identification information of the one or more second traffic modules in the notification queue according to the index information of the first entry.
13. The method of claim 9, wherein the notification queue is a circular first-in-first-out FIFO queue.
14. A method for issuing an entry, applied to a control plane, the method comprising:
establishing a notification queue, and adding the corresponding relation between the first table item and one or more fourth service modules into the notification queue; wherein the one or more fourth service modules are service modules associated with the first table entry;
issuing the first table entry to a first service module so that the first service module carries out logic processing according to the first table entry; and calling callback functions of the one or more fourth business modules through the notification queue.
15. The method of claim 14, wherein the issuing the first entry to a first service module for the first service module to logically process according to the first entry comprises:
in a preset first processing thread, a second table item is issued to the first service module; the method comprises the steps of,
and in the newly-built second processing thread, calling the callback functions of the one or more fourth business modules through the notification queue.
16. The method of claim 14, wherein adding the correspondence between the first entry and the one or more fourth traffic modules to the notification queue comprises:
And adding the index information of the first table item and the identification information of the one or more fourth service modules into the notification queue.
17. The method of claim 16, wherein the notification queue is further configured to merge the identification information of the one or more fourth traffic modules in the notification queue according to the index information of the first entry.
18. The method according to any of claims 14 to 17, wherein the fourth traffic module comprises a second traffic module, wherein the second traffic module is a traffic module requiring use of the first table entry.
19. A method as claimed in any one of claims 14 to 17, wherein the notification queue is a circular first-in first-out FIFO queue.
20. The method according to any one of claims 14 to 17, wherein the callback function of the one or more fourth traffic modules is a callback function that the one or more fourth traffic modules perform a static registration during an initialization phase.
21. A method for processing an entry, applied to a service plane, the method comprising:
The first business module receives a first table entry issued by the control surface and carries out logic processing according to the first table entry;
and the one or more second service modules respond to call events of callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules, wherein the second service modules are service modules needing to use the first table item.
22. The method of claim 21, wherein the one or more second service modules responding to the call event of the control plane to the callback function of the one or more second service modules according to the pre-acquired correspondence between the first entry and the one or more second service modules comprises:
the one or more second service modules respond to call events of callback functions of the one or more second service modules according to a pre-established lookup table by the control surface; wherein the lookup table is configured to store correspondence between the first entry and the one or more second service modules.
23. The method of claim 22, wherein the lookup table is configured to store index information for the first entry and identification information for the one or more second traffic modules.
24. The method of claim 23, wherein the lookup table is further configured to store status indication information for the one or more second traffic modules, wherein the status indication information is used to indicate whether the one or more second traffic modules are on in a switch.
25. The method of claim 23, wherein the one or more second business modules are responsive to call events of the callback function of the one or more second business modules by the control plane according to a pre-established lookup table, further comprising:
the one or more second service modules respond to the call event of the callback function of the one or more second service modules by the control surface according to the identification information;
the identification information is identification information of the one or more second service modules corresponding to the first table item, wherein the control plane queries in the query table according to the index information of the first table item to determine the identification information of the one or more second service modules corresponding to the first table item.
26. A method as claimed in any one of claims 22 to 25, wherein the look-up table is a hash table.
27. The method according to any one of claims 21 to 25, wherein the callback function of the one or more second service modules is a callback function that the one or more second service modules perform static registration during an initialization phase.
28. The method according to any one of claims 21 to 25, wherein the one or more second service modules respond to call events of callback functions of the one or more second service modules by the control plane according to the pre-acquired correspondence between the first entry and the one or more second service modules, including:
the one or more second service modules respond to call events of callback functions of the one or more second service modules through a pre-established notification queue by the control surface;
and the notification queue is added with the corresponding relation between the first table item and the one or more second service modules.
29. The method of claim 28, wherein the method further comprises:
The first service module receives a second table entry issued by the control surface in a preset first processing thread; the method comprises the steps of,
and the one or more second service modules respond to call events of the callback functions of the one or more second service modules in the newly-built second processing thread through a pre-established notification queue by the control surface.
30. The method of claim 28, wherein index information of the first entry and identification information of the one or more second service modules are added to the notification queue.
31. The method of claim 28, wherein the notification queue is further configured to merge the identification information of the one or more second traffic modules in the notification queue according to the index information of the first entry.
32. The method of claim 28, wherein the notification queue is a circular first-in-first-out FIFO queue.
33. A method for processing an entry, applied to a service plane, the method comprising:
the first business module receives a first table entry issued by the control surface and carries out logic processing according to the first table entry;
One or more fourth service modules respond to call events of callback functions of the one or more fourth service modules through a pre-established notification queue by the control surface; the notification queue is added with a corresponding relation between the first table item and the one or more fourth service modules, wherein the one or more fourth service modules are service modules associated with the first table item.
34. The method of claim 33, wherein the method further comprises:
the first service module receives a second table entry issued by the control surface in a preset first processing thread; the method comprises the steps of,
and the one or more fourth business modules respond to call events of callback functions of the one or more fourth business modules in the newly-built second processing thread through a pre-established notification queue by the control surface.
35. The method of claim 33, wherein index information of the first entry and identification information of the one or more second service modules are added to the notification queue.
36. The method of claim 33, wherein the notification queue is further configured to merge identification information of the one or more second service modules in the notification queue according to index information of the first entry.
37. The method according to any of claims 33 to 36, wherein the fourth traffic module comprises the second traffic module, wherein the second traffic module is a traffic module requiring use of the first entry.
38. A method as claimed in any one of claims 33 to 36, wherein the notification queue is a circular first-in first-out FIFO queue.
39. The method of any one of claims 33 to 36, wherein the callback function of the one or more fourth traffic modules is a callback function that the one or more fourth traffic modules statically registered during an initialization phase.
40. An entry issuing device applied to a control plane, the device comprising:
the system comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring the corresponding relation between a first table item and one or more second service modules, wherein the second service modules are service modules which need to use the first table item;
the first issuing module is used for issuing the first table item to a first service module so that the first service module can perform logic processing according to the first table item; and calling callback functions of the one or more second service modules according to the corresponding relation between the first table item and the one or more second service modules.
41. An entry issuing device applied to a control plane, the device comprising:
the building module is used for building a notification queue and adding the corresponding relation between the first table item and one or more fourth service modules into the notification queue; wherein the one or more fourth service modules are service modules associated with the first table entry;
the second issuing module is used for issuing the first table item to the first service module so that the first service module can perform logic processing according to the first table item; and calling callback functions of the one or more fourth business modules through the notification queue.
42. An entry processing apparatus, applied to a service plane, the apparatus comprising:
the first processing module is used for receiving a first table entry issued by the control surface by the first service module and carrying out logic processing according to the first table entry;
the first response module is used for responding to call events of callback functions of one or more second service modules by the control plane according to the corresponding relation between the first table item and the one or more second service modules, wherein the second service modules are service modules needing to use the first table item.
43. An entry processing apparatus, applied to a service plane, the apparatus comprising:
the second processing module is used for receiving a first table entry issued by the control surface by the first service module and carrying out logic processing according to the first table entry;
the second response module is used for responding to call events of callback functions of one or more fourth service modules by the control plane through a pre-established notification queue; the notification queue is added with a corresponding relation between the first table item and the one or more fourth service modules, wherein the one or more fourth service modules are service modules associated with the first table item.
44. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein a computer program, wherein the computer program is arranged to execute the method of any of the claims 1 to 13, 14 to 20, 21 to 32, 33 to 39 when run.
45. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 13, 14 to 20, 21 to 32, 33 to 39.
CN201911349825.3A 2019-12-24 2019-12-24 Table entry issuing method and device and table entry processing method and device Active CN113037630B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911349825.3A CN113037630B (en) 2019-12-24 2019-12-24 Table entry issuing method and device and table entry processing method and device
PCT/CN2020/133128 WO2021129327A1 (en) 2019-12-24 2020-12-01 Entry issuing method and apparatus, and entry processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911349825.3A CN113037630B (en) 2019-12-24 2019-12-24 Table entry issuing method and device and table entry processing method and device

Publications (2)

Publication Number Publication Date
CN113037630A CN113037630A (en) 2021-06-25
CN113037630B true CN113037630B (en) 2023-07-07

Family

ID=76452170

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911349825.3A Active CN113037630B (en) 2019-12-24 2019-12-24 Table entry issuing method and device and table entry processing method and device

Country Status (2)

Country Link
CN (1) CN113037630B (en)
WO (1) WO2021129327A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116483872B (en) * 2023-06-20 2023-09-12 合肥青谷信息科技有限公司 Complex data processing method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219150A (en) * 2014-09-03 2014-12-17 杭州华三通信技术有限公司 Method and device for issuing flow tables
CN105959220A (en) * 2016-06-28 2016-09-21 杭州迪普科技有限公司 Routing table issuing method and device
CN108833280A (en) * 2018-03-19 2018-11-16 新华三信息安全技术有限公司 A kind of user management list item delivery method, device and control plane equipment
CN108880917A (en) * 2018-08-23 2018-11-23 华为技术有限公司 Switching method, device and turn control separation system of control plane equipment
CN109361607A (en) * 2018-10-15 2019-02-19 迈普通信技术股份有限公司 List item data capture method, device and communication equipment

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102291320B (en) * 2011-09-29 2015-03-18 杭州华三通信技术有限公司 MAC (media access control) address learning method and edge device
CN105991342B (en) * 2015-03-23 2019-09-06 杭州迪普科技股份有限公司 Method for processing business, device and the distributed apparatus of distributed apparatus
CN106888282B (en) * 2017-04-28 2021-01-01 新华三技术有限公司 Address Resolution Protocol (ARP) table updating method, board card and distributed equipment
CN109218065B (en) * 2017-07-07 2022-11-08 中兴通讯股份有限公司 Service single board management method, device, equipment and storage medium
US20190130365A1 (en) * 2017-10-28 2019-05-02 Facebook, Inc. Generating notifications in a room management system
CN108809837A (en) * 2018-06-11 2018-11-13 深圳市风云实业有限公司 ARL list items manage optimization system concentratedly
CN110061992B (en) * 2019-04-22 2021-12-24 杭州迪普科技股份有限公司 Method for dynamically configuring FPGA and network security equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104219150A (en) * 2014-09-03 2014-12-17 杭州华三通信技术有限公司 Method and device for issuing flow tables
CN105959220A (en) * 2016-06-28 2016-09-21 杭州迪普科技有限公司 Routing table issuing method and device
CN108833280A (en) * 2018-03-19 2018-11-16 新华三信息安全技术有限公司 A kind of user management list item delivery method, device and control plane equipment
CN108880917A (en) * 2018-08-23 2018-11-23 华为技术有限公司 Switching method, device and turn control separation system of control plane equipment
CN109361607A (en) * 2018-10-15 2019-02-19 迈普通信技术股份有限公司 List item data capture method, device and communication equipment

Also Published As

Publication number Publication date
WO2021129327A1 (en) 2021-07-01
CN113037630A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
TWI733647B (en) Method and device for processing call request
CN108259346B (en) Equivalent routing table item establishing method and device
US10459729B2 (en) Map tables for hardware tables
CN110620727A (en) Gateway automatic routing method and related equipment in multi-environment
TW201812657A (en) Pickup method, and logistics information processing method, device and system
CN110413845B (en) Resource storage method and device based on Internet of things operating system
CN108566291A (en) A kind of method of event handling, server and system
EP3174318B1 (en) Method for realizing resource attribute notification, and common service entity
US20180131605A1 (en) Floating internet protocol for private networks
CN105447092A (en) Caching method and apparatus
CN108039968B (en) Network optimization method, device and computer readable storage medium
CN110169019B (en) Network switch and database system with database function definition
CN113037630B (en) Table entry issuing method and device and table entry processing method and device
JPWO2014065115A1 (en) Rule distribution server, event processing system, method and program
CN105025458A (en) Resource notification method, equipment and system
CN111147534B (en) Communication method and system under micro-service architecture
WO2018068655A1 (en) License management method and system
CN111600833B (en) Network operating system and message forwarding method
CN111309474B (en) Communication method, communication device and distributed service registration center
CN105245428A (en) Method and device for configuring message processing rule
CN114257545B (en) Message forwarding method and device
CN109120692B (en) Method and apparatus for processing requests
CN107770265B (en) A kind of method of data synchronization, data synchronization unit and mobile terminal
CN114827016B (en) Method, device, equipment and storage medium for switching link aggregation scheme
CN115242733B (en) Message multicast method, multicast gateway, electronic device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant