Communication equipment, table item updating method and storage medium

文档序号:19980 发布日期:2021-09-21 浏览:26次 中文

阅读说明:本技术 一种通信设备、表项更新方法及存储介质 (Communication equipment, table item updating method and storage medium ) 是由 张树坤 于 2021-06-23 设计创作,主要内容包括:本申请实施例提供了一种通信设备、表项更新方法及存储介质。在本申请中,通信设备中的处理器向通信设备中的转发芯片发送用于表项刷新的报文,转发芯片中的收发模块在接收到报文后,将用于表项刷新的报文透传给转发芯片中的刷表模块,刷表模块根据该报文对相应的转发表项进行更新操作,从而实现了利用转发芯片完成自身内存中转发表项的更新,相比于现有技术中利用处理器直接更新转发芯片内存中的转发表项,能够降低转发芯片中的转发表项的更新延时。(The embodiment of the application provides communication equipment, an item updating method and a storage medium. In the application, a processor in the communication device sends a message for table item refreshing to a forwarding chip in the communication device, a transceiver module in the forwarding chip receives the message and then transmits the message for table item refreshing to a table refreshing module in the forwarding chip, and the table refreshing module performs an updating operation on a corresponding forwarding table item according to the message, so that the forwarding table item in a memory of the forwarding chip is updated by the forwarding chip.)

1. A communication device, comprising:

the system comprises a processor and at least one forwarding chip, wherein each forwarding chip comprises a table refreshing module and a transceiver module, and a plurality of forwarding table entries are stored in each forwarding chip;

the processor is configured to generate a message carrying a target forwarding table entry when the target forwarding table entry on the target forwarding chip needs to be updated, and send the message to a transceiver module in the target forwarding chip, where the message also carries table entry update indication information, attribute information of the target forwarding table entry, and an update operation type;

the receiving and sending module is used for sending the message to a table refreshing module in the target forwarding chip according to the table updating indication information in the message after receiving the message;

the table-flushing module is configured to determine, after receiving the message, a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and perform, on the basis of the target memory address, a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message.

2. The communications device of claim 1, wherein the attribute information includes a table number, a table type, and a Key of the target forwarding table entry;

the table refreshing module is specifically configured to calculate the table number and the Key according to a calculation manner of calculating a memory address corresponding to the table type, so as to obtain a target memory address corresponding to the target forwarding table entry.

3. The communication device of claim 2, wherein the update operation type is a new addition operation;

the table-flushing module is specifically configured to write the target forwarding table entry in the message into the target memory address; alternatively, the first and second electrodes may be,

the updating operation type is a modifying operation;

the table flushing module is specifically configured to replace a forwarding table entry stored in the target memory address with the target forwarding table entry in the message; alternatively, the first and second electrodes may be,

the updating operation type is deleting operation;

the table flushing module is specifically configured to delete the target forwarding table entry in the message stored in the target memory address.

4. The communication device according to claim 1, wherein the table-flushing module is further configured to add a mutex lock to the target memory address before the target update operation is performed; and releasing the mutual exclusion lock of the target memory address after the target updating operation is executed.

5. An entry updating method is applied to a communication device, the communication device includes a processor and at least one forwarding chip, each forwarding chip includes a table-flushing module and a transceiver module, and each forwarding chip stores a plurality of forwarding entries, the method includes:

when a target forwarding table entry on a target forwarding chip needs to be updated, the processor generates a message carrying the target forwarding table entry and sends the message to a transceiver module in the target forwarding chip, wherein the message also carries table entry updating indication information, attribute information of the target forwarding table entry and an updating operation type;

after receiving the message, a transceiver module in the target forwarding chip updates the indication information according to the table entry in the message and sends the message to a table refreshing module in the target forwarding chip;

after receiving the message, the table-flushing module in the target forwarding chip determines a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and executes a target updating operation corresponding to the updating operation type in the message on the target forwarding table entry in the message based on the target memory address.

6. The method of claim 5, wherein the attribute information comprises a table number, a table type, and a Key of the target forwarding table entry;

the table-flushing module in the target forwarding chip determines a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and specifically includes:

and the table refreshing module in the target forwarding chip calculates the table number and the Key according to the calculation mode of calculating the memory address corresponding to the table type to obtain the target memory address corresponding to the target forwarding table item.

7. The method of claim 5, wherein the update operation type is a new add operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

a table-flushing module in the target forwarding chip writes the target forwarding table entry in the message into the target memory address; alternatively, the first and second electrodes may be,

the updating operation type is a modifying operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

a table-flushing module in the target forwarding chip replaces forwarding table entries stored in the target memory address with the target forwarding table entries in the message; alternatively, the first and second electrodes may be,

the updating operation type is deleting operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

and deleting the target forwarding table entry in the message stored in the target memory address by a table refreshing module in the target forwarding chip.

8. The method of claim 7, wherein before the table flushing module in the target forwarding chip performs a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, the method further comprises:

a table-refreshing module in the target forwarding chip adds a mutual exclusion lock to the target memory address;

after the table-flushing module in the target forwarding chip executes the target updating operation corresponding to the updating operation type in the message on the target forwarding table entry in the message based on the target memory address, the method further includes;

and the table-refreshing module in the target forwarding chip relieves the mutual exclusion lock of the target memory address.

9. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any of the claims 5-8.

Technical Field

The present application relates to the field of communications technologies, and in particular, to a communication device, a table entry updating method, and a storage medium.

Background

In the communication device based on the network forwarding chip, the updating rate of the forwarding table entry is very critical, and the delay of the table entry taking effect, the on-line rate of the user, the response speed of the protection switching, and the like are often determined. Taking the protection switching as an example, in order to "fool" the user's vision and hearing so as to achieve the user's imperceptibility, the protection switching needs to be completed within 50 milliseconds.

In the prior art, in the process of updating the forwarding table entry, the CPU directly updates the forwarding table entry in the memory of the forwarding chip through a PCIE (Peripheral Component Interconnect Express, high speed serial computer extended bus standard) interface. However, the above method may result in a higher update delay of the forwarding table entry in the forwarding chip.

Disclosure of Invention

An object of the embodiments of the present application is to provide a communication device, a table entry updating method, and a storage medium, so as to reduce an update delay of a forwarding table entry in a forwarding chip. The specific technical scheme is as follows:

in a first aspect, an embodiment of the present application provides a communication device, including:

the system comprises a processor and at least one forwarding chip, wherein each forwarding chip comprises a table refreshing module and a transceiver module, and a plurality of forwarding table entries are stored in each forwarding chip;

the processor is configured to generate a message carrying a target forwarding table entry when the target forwarding table entry on the target forwarding chip needs to be updated, and send the message to a transceiver module in the target forwarding chip, where the message also carries table entry update indication information, attribute information of the target forwarding table entry, and an update operation type;

the receiving and sending module is used for sending the message to a table refreshing module in the target forwarding chip according to the table updating indication information in the message after receiving the message;

the table-flushing module is configured to determine, after receiving the message, a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and perform, on the basis of the target memory address, a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message.

In a possible implementation manner, the attribute information includes a table number, a table type, and a Key of the target forwarding table entry;

the table refreshing module is specifically configured to calculate the table number and the Key according to a calculation manner of calculating a memory address corresponding to the table type, so as to obtain a target memory address corresponding to the target forwarding table entry.

In a possible implementation, the update operation type is a new addition operation;

the table-flushing module is specifically configured to write the target forwarding table entry in the message into the target memory address; alternatively, the first and second electrodes may be,

the updating operation type is a modifying operation;

the table flushing module is specifically configured to replace a forwarding table entry stored in the target memory address with the target forwarding table entry in the message; alternatively, the first and second electrodes may be,

the updating operation type is deleting operation;

the table flushing module is specifically configured to delete the target forwarding table entry in the message stored in the target memory address.

In a possible implementation manner, the table-flushing module is further configured to add a mutual exclusion lock to the target memory address before the target update operation is performed; and releasing the mutual exclusion lock of the target memory address after the target updating operation is executed.

In a second aspect, an embodiment of the present application provides a method for updating forwarding entries in forwarding chips, which is applied to a communication device, where the communication device includes a processor and at least one forwarding chip, each forwarding chip includes a table flushing module and a transceiver module, and multiple forwarding entries are stored in each forwarding chip, and the method includes:

when a target forwarding table entry on a target forwarding chip needs to be updated, the processor generates a message carrying the target forwarding table entry and sends the message to a transceiver module in the target forwarding chip, wherein the message also carries table entry updating indication information, attribute information of the target forwarding table entry and an updating operation type;

after receiving the message, a transceiver module in the target forwarding chip updates the indication information according to the table entry in the message and sends the message to a table refreshing module in the target forwarding chip;

after receiving the message, the table-flushing module in the target forwarding chip determines a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and executes a target updating operation corresponding to the updating operation type in the message on the target forwarding table entry in the message based on the target memory address.

In a possible implementation manner, the attribute information includes a table number, a table type, and a Key of the target forwarding table entry;

the table-flushing module in the target forwarding chip determines a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and specifically includes:

and the table refreshing module in the target forwarding chip calculates the table number and the Key according to the calculation mode of calculating the memory address corresponding to the table type to obtain the target memory address corresponding to the target forwarding table item.

In a possible implementation, the update operation type is a new addition operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

a table-flushing module in the target forwarding chip writes the target forwarding table entry in the message into the target memory address; alternatively, the first and second electrodes may be,

the updating operation type is a modifying operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

a table-flushing module in the target forwarding chip replaces forwarding table entries stored in the target memory address with the target forwarding table entries in the message; alternatively, the first and second electrodes may be,

the updating operation type is deleting operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

and deleting the target forwarding table entry in the message stored in the target memory address by a table refreshing module in the target forwarding chip.

In a possible implementation manner, before the table flushing module in the target forwarding chip executes, based on the target memory address, a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message, the method further includes:

a table-refreshing module in the target forwarding chip adds a mutual exclusion lock to the target memory address;

after the table-flushing module in the target forwarding chip executes the target updating operation corresponding to the updating operation type in the message on the target forwarding table entry in the message based on the target memory address, the method further includes;

and the table-refreshing module in the target forwarding chip relieves the mutual exclusion lock of the target memory address.

In a third aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements an entry updating method described in any of the present application.

The embodiment of the application has the following beneficial effects:

the communication equipment provided by the embodiment of the application comprises a processor and at least one forwarding chip, wherein each forwarding chip comprises a table refreshing module and a receiving and sending module, and a plurality of forwarding table entries are stored in each forwarding chip; the processor is used for generating a message carrying a target forwarding table item when the target forwarding table item on the target forwarding chip needs to be updated, and sending the message to a transceiver module in the target forwarding chip, wherein the message also carries table item updating indication information, attribute information of the target forwarding table item and an updating operation type; the receiving and sending module is used for updating the indication information according to the table entry in the message after receiving the message and sending the message to a table refreshing module in the target forwarding chip; and the table refreshing module is used for determining a target memory address corresponding to a target forwarding table item in the message according to the attribute information in the message after receiving the message, and executing target updating operation corresponding to the updating operation type in the message on the target forwarding table item in the message based on the target memory address. In the process, the processor sends the message for table item refreshing to the forwarding chip, the transceiver module in the forwarding chip transmits the message for table item refreshing to the table refreshing module in the forwarding chip after receiving the message, and the table refreshing module performs updating operation on the forwarding table item according to the message, so that the forwarding table item in the memory of the forwarding chip is updated by using the forwarding chip. Of course, not all advantages described above need to be achieved at the same time in the practice of any one product or method of the present application.

Drawings

In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art according to the drawings.

Fig. 1 is a schematic diagram of a communication device according to an embodiment of the present application;

fig. 2 is a schematic diagram illustrating a communication device updating a forwarding table entry according to an embodiment of the present application;

fig. 3 is a schematic diagram illustrating a refresh module updating a forwarding table entry according to an embodiment of the present application;

fig. 4 is a schematic diagram of an entry updating method according to an embodiment of the present application.

Detailed Description

The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments that can be derived by one of ordinary skill in the art from the description herein are intended to be within the scope of the present disclosure.

In order to reduce the update delay of the forwarding table entry in the forwarding chip, an embodiment of the present application provides a communication device, which is shown in fig. 1 and includes:

the system comprises a processor 11 and at least one forwarding chip 12, wherein each forwarding chip 12 comprises a table refreshing module 121 and a transceiver module 122, and a plurality of forwarding table entries are stored in each forwarding chip;

the processor 11 is configured to generate a message carrying a target forwarding table entry when the target forwarding table entry on the target forwarding chip needs to be updated, and send the message to a transceiver module in the target forwarding chip, where the message also carries table entry update indication information, attribute information of the target forwarding table entry, and an update operation type;

the transceiver module 122 is configured to, after receiving the packet, send the packet to a table-flushing module in the target forwarding chip according to the table entry update indication information in the packet;

the table flushing module 121 is configured to, after receiving the message, determine a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and execute a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address.

The target forwarding table entry is a forwarding table entry needing to be updated. The processor calculates to obtain a target forwarding table according to the requirement of table updating, and carries the target forwarding table in a message for sending, wherein the message can also comprise table updating indication information, attribute information of the target forwarding table and an updating operation type besides the target forwarding table. Here, the update operation type may be a new addition operation, a modification operation, or a deletion operation, and both the new addition operation and the modification operation may be regarded as a write operation. In one example, the attribute information may include a table number, a table type, and a Key (Key) of the target forwarding table entry; in the case that the update operation type is a new addition operation, the attribute information may further include an entry size and the like. In one example, the processor may send the message to the transceiver module in the target forwarding chip through an interface different from the other interface other than the PCIE interface.

When a receiving and sending module in the forwarding chip receives a message and the message includes the table item updating indication information, the receiving and sending module transmits the message to a table refreshing module in the forwarding chip where the receiving and sending module is located. The table refreshing module determines a target memory address and a target updating operation corresponding to the target forwarding table item according to the attribute information and the updating operation type of the target forwarding table item in the message, and executes the target updating operation on the target forwarding table item based on the target memory address.

In one example, as shown in fig. 2, the update of the forwarding table entry is realized by a table-flushing module in the forwarding chip, where CPU represents a processor, NP represents a network processor, PP represents a message processor, and NP and PP are specific types of the forwarding chip. The table-refreshing module may be a software module based on hardware resources of the forwarding chip, or an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or other Programmable logic device may be added to the forwarding chip to implement the table-refreshing module; in one example, the table-flushing module may be implemented based on an IP core (intellectual property core).

In the embodiment of the application, the processor sends the message for table entry refreshing to the forwarding chip, the transceiver module in the forwarding chip receives the message and then transmits the message for table entry refreshing to the table refreshing module in the forwarding chip, and the table refreshing module performs updating operation on the corresponding forwarding table entry according to the message, so that the forwarding table entry in the memory of the forwarding chip is updated by the forwarding chip.

In a possible implementation manner, the attribute information includes a table number, a table type, and a Key of the target forwarding table entry; the table refreshing module is specifically configured to calculate the table number and the Key according to a calculation manner of calculating a memory address corresponding to the table type, so as to obtain a target memory address corresponding to the target forwarding table entry; and the table refreshing module is further configured to determine a target updating operation according to the target forwarding table entry in the message and the updating operation type.

In one example, the table-flushing module may use the table number as a base memory address and the Key as an offset address, and sum the two to obtain the target memory address.

In an example, as shown in fig. 3, after the table-flushing module obtains a message, the table-flushing module analyzes the message, so as to obtain attribute information and an update operation type; the table refreshing module calculates a target memory address corresponding to the table item to be updated according to the table number, the table type and the Key of the table item to be updated in the attribute information, and determines target updating operation according to the updating operation type; and then the table refreshing module executes target updating operation on the table entry to be updated based on the target memory address.

In a possible implementation, the update operation type is a new addition operation;

the table-flushing module is specifically configured to write the target forwarding table entry in the message into the target memory address; alternatively, the first and second electrodes may be,

the updating operation type is a modifying operation;

the table flushing module is specifically configured to replace a forwarding table entry stored in the target memory address with the target forwarding table entry in the message; alternatively, the first and second electrodes may be,

the updating operation type is deleting operation;

the table flushing module is specifically configured to delete the target forwarding table entry in the message stored in the target memory address.

In order to prevent an error caused by the operation of the forwarding table by another thread in the updating process of the forwarding table, in a possible implementation manner, the table flushing module is further configured to add a mutual exclusion lock to the target memory address before the target updating operation is performed; and releasing the mutual exclusion lock of the target memory address after the target updating operation is executed.

In a possible implementation manner, for the case of deleting a forwarding entry, the table-flushing module is specifically configured to add a mutual exclusion lock to the target memory address when the update operation type is a delete operation; deleting the target forwarding table entry in the message stored in the target memory address; releasing the target memory address; and releasing the mutual exclusion lock of the target memory address.

And the table refreshing module adds a mutual exclusion lock to the target memory address, then executes the target updating operation aiming at the target memory address after the mutual exclusion lock is added, and then removes the mutual exclusion lock of the target memory address. In one example, the table-flushing module adds a mutual exclusion lock to a target memory address, and the target memory address after the mutual exclusion lock is added only allows the table-flushing module to perform read-write operation, but does not allow other threads to perform read-write operation. The table refreshing module executes target updating operation aiming at the target memory address, and after the target updating operation is executed, the table refreshing module releases the mutual exclusion lock of the target memory address.

In the embodiment of the application, the table-flushing module adds the mutual exclusion lock to the target memory address, so that the error caused by reading and writing the target memory address by other threads can be reduced. The mutual exclusion lock of the target memory address does not influence the reading and writing of the data of other memory addresses. And under the condition that a plurality of forwarding table entries need to be updated in the forwarding chip, a mutual exclusion lock can be added respectively for the memory address corresponding to each forwarding table entry, and the plurality of forwarding table entries can be updated simultaneously in a parallel execution mode, so that the update delay of the forwarding table entries is further shortened.

The following takes the newly added forwarding table entry as an example to illustrate:

1. when a target forwarding table entry on a target forwarding chip needs to be updated, a processor generates a message carrying the target forwarding table entry and sends the message to a transceiver module in the target forwarding chip, wherein the message carries table entry update indication information, attribute information of the target forwarding table entry and an update operation type.

The processor does not directly operate the memory of the forwarding chip, and does not need to perform additional data consistency protection such as locking.

2. And the receiving and sending module in the target forwarding chip analyzes the message, identifies whether the message has the table item updating indication information, and if the message has the table item updating indication information, transmits the message to the table refreshing module in the forwarding chip where the message is located.

3. The table-refreshing module analyzes the received message, and acquires attribute information, a target forwarding table entry and an updating operation type, wherein the attribute information comprises a table number, a table type, a table entry size, a Key and the like.

4. And the table refreshing module calculates the target memory address required to be refreshed according to the table number, the table type and the Key.

5. And locking the target memory address to be refreshed by the table refreshing module.

The parallel refreshing of other table entries in other addresses is not influenced by the process, and the table concurrent refreshing performance is improved.

6. And the table refreshing module applies for the memory block for the target forwarding table entry according to the size of the table entry and writes the target forwarding table entry into the applied memory address.

7. And the table refreshing module unlocks the refreshed memory address.

8. The flush table module returns a message to the processor indicating that the update is complete.

In the process of updating the forwarding table entry by the target forwarding chip, the processor can process other tasks without waiting. The process of deleting and modifying forwarding entries is similar, except that the actions are different.

In the prior art, for the situation that the CPU manages multiple forwarding entries of multiple forwarding chips simultaneously, when the forwarding entries to be updated are located in different forwarding chips, the CPU needs to map the memory addresses of the forwarding chips, which may cause a high delay.

When a plurality of target forwarding table entries in a plurality of target forwarding chips need to be updated, the processor generates a message carrying the target forwarding table entry for each target forwarding table entry, and sends the message to a transceiver module in the target forwarding chip where the target forwarding table entry is located. The processor can send corresponding messages to each target forwarding chip in parallel; aiming at each target forwarding chip, after a message is received, corresponding table item updating operation is executed according to the received message, the operations among the forwarding chips are not affected mutually and can be executed in parallel, and therefore the updating delay of the forwarding table items can be greatly shortened.

In the embodiment of the application, a table-flushing module is added in the forwarding chip, so that updating of a plurality of forwarding table entries can be executed in parallel, the processor is only responsible for encapsulating the table entries into messages and sending the messages to the forwarding chip, and is not responsible for real operations of adding, deleting and modifying, the table-flushing module calculates the memory address to be refreshed according to the messages, only the memory address to be operated needs to be locked, other table entries of other addresses are not influenced, and the concurrent operations can be guaranteed not to be blocked; when the forwarding table entry is operated, the transceiver module in the forwarding chip is responsible for primary analysis, the table-flushing module is responsible for deep analysis, and the table-flushing module calculates the memory address and executes corresponding operation according to the analyzed update operation type, table number, table type, Key, target forwarding table entry and the like, so that the update delay of the forwarding table entry in the forwarding chip is shortened.

An embodiment of the present application further provides a table entry updating method, which is applied to a communication device, where the communication device includes a processor and at least one forwarding chip, each forwarding chip includes a table updating module and a transceiver module, and each forwarding chip stores multiple forwarding table entries, referring to fig. 4, where the method includes:

s101, when a target forwarding table entry on a target forwarding chip needs to be updated, the processor generates a message carrying the target forwarding table entry and sends the message to a transceiver module in the target forwarding chip, wherein the message also carries table entry updating indication information, attribute information of the target forwarding table entry and an updating operation type;

s102, after receiving the message, the transceiver module in the target forwarding chip sends the message to a table refreshing module in the target forwarding chip according to the table updating indication information in the message;

s103, after receiving the message, the table-flushing module in the target forwarding chip determines a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and performs a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address.

In a possible implementation manner, the attribute information includes a table number, a table type, and a Key of the target forwarding table entry;

the table-flushing module in the target forwarding chip determines a target memory address corresponding to the target forwarding table entry in the message according to the attribute information in the message, and specifically includes:

and the table refreshing module in the target forwarding chip calculates the table number and the Key according to the calculation mode of calculating the memory address corresponding to the table type to obtain the target memory address corresponding to the target forwarding table item.

In a possible implementation, the update operation type is a new addition operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

a table-flushing module in the target forwarding chip writes the target forwarding table entry in the message into the target memory address; alternatively, the first and second electrodes may be,

the updating operation type is a modifying operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

a table-flushing module in the target forwarding chip replaces forwarding table entries stored in the target memory address with the target forwarding table entries in the message; alternatively, the first and second electrodes may be,

the updating operation type is deleting operation;

the table flushing module in the target forwarding chip executes a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message based on the target memory address, and specifically includes:

and deleting the target forwarding table entry in the message stored in the target memory address by a table refreshing module in the target forwarding chip.

In a possible implementation manner, before the table flushing module in the target forwarding chip executes, based on the target memory address, a target update operation corresponding to the update operation type in the message on the target forwarding table entry in the message, the method further includes:

a table-refreshing module in the target forwarding chip adds a mutual exclusion lock to the target memory address;

after the table-flushing module in the target forwarding chip executes the target updating operation corresponding to the updating operation type in the message on the target forwarding table entry in the message based on the target memory address, the method further includes;

and the table-refreshing module in the target forwarding chip relieves the mutual exclusion lock of the target memory address.

An embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for updating a forwarding table entry in a forwarding chip in any of the present application is implemented.

In yet another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for updating forwarding table entries in a forwarding chip described in any of the present application.

In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the application to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.

It should be noted that, in this document, the technical features in the various alternatives can be combined to form the scheme as long as the technical features are not contradictory, and the scheme is within the scope of the disclosure of the present application. Relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.

All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the embodiments of the method, the computer program product and the storage medium, since they are substantially similar to the embodiments of the communication device, the description is relatively simple, and in relation to the description, reference may be made to part of the description of the embodiments of the communication device.

The above description is only for the preferred embodiment of the present application and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种USB多媒体集线器控制芯片

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!