A network switch is applied to transmit data between a plurality of electronic apparatuses. The network switch keeps learning (updating) relations between MAC addresses and pipe line modules (ex. ports), such that the network switch can efficiently transmit data to a required destination. Specifically, the network switch keeps learning relations between MAC addresses and pipe line modules to generate a MAC address table, and the network switch lookups the MAC address table to find the pipe line module corresponding to the required destination.
The MAC address table needs to be continuously updated such that the data transmitting efficiency can be optimized. More specifically, if the MAC address table is requested to be updated, one index of the MAC address table is chosen for learning. After that, the data to be updated (to be learned) arrives the chosen memory address. However, if the memory does not have enough write bandwidth, the learning fails and the whole process repeats again.
Accordingly, one objective of the present application is to provide a network switch that can refer bandwidth information to assign update addresses.
Another objective of the present application is to provide a data base updating method that can refer bandwidth information to assign update addresses.
One embodiment of the present application discloses: a network switch comprising: a first storage unit, configured to store a first data base; a first buffer, configured to buffer data to be updated; and an update managing module, configured to assign a first update address of the first storage unit, which is for the data to be updated, according to first buffer information for the first buffer and a first update request.
Another embodiment of the present application discloses a network switch comprising: a first die; a second die; and an update managing module, configured to assign at least one update address for at least one storage unit according to bandwidth information from the first die and the second die.
Another embodiment of the present application discloses a data base updating method comprising: buffering data to be updated to via a first buffer; and assigning a first update address of the first storage unit, which is for the data to be updated, according to a first update request and first buffer information for the first buffer.
In view of above-mentioned embodiments, the real-time band width information can be acquired thus the update address can be efficiently assigned.
These and other objectives of the present invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
In the following, several embodiments are provided to explain the concept of the present application. Please note, in the following embodiments, the operations for the network switch can be controlled by a control unit or any device that can control the network switch. Further, in the following embodiments, all devices can be implemented by hardware (ex. a circuit) or hardware with software (ex. processing unit executing a specific program).
More specifically, if the first buffer information BI_1 indicates the first buffer B_1 buffers much data, it means the first storage unit SU_1 does not have sufficient band width to process the data to be updated. For example, if the data amount buffered in the first buffer B_1 is over a threshold value or the available space of the first buffer B_1 is lowered than a threshold value, it means much data is waiting to be updated, thus the first storage unit SU_1 may not have sufficient bandwidth. In such case, the update managing module UM does not send data to be updated to the first buffer B_1 according to the first update request R_1. In such case, the update managing module UM re-assigns the first update address and the data to be updated will be sent to another address for updating.
More specifically, in one example, the first update request R_1 requests to update data to one address A (i.e. the above-mentioned first update address), and the first buffer B_1 is configured to buffer data to be updated to the address A. If the first buffer information BI_1 indicates the data amount buffered in the first buffer B_1 is less than a threshold value, it means the path to the address A has sufficient bandwidth, thus the first update request R_1 is accepted and the data to be updated will be transmitted to the first buffer B_1 and waits to be updated. On the contrary, if the first buffer information BI_1 indicates the data amount buffered in the first buffer B_1 is more than the threshold value, it means the path to the address A does not have sufficient bandwidth. In such case, the data to be updated may be assigned to another address B (i.e. the address is re-assigned).
In one embodiment, the storage unit comprises more than one storage sections. The storage sections can be, for example, a memory page or a memory bank if the storage unit is a memory, but not limited. In one embodiment, the above-mentioned address A and the address B belong to the same storage section. In another embodiment, the above-mentioned address A and the address B belong to different storage section.
Further, in one embodiment, the storage unit SU_1 can receive a lookup command to search the relation between a MAC address and a pipe line module. For more detail, the MAC address to be searched is applied as input “key”, then search in the MAC address table, if there is same key stored in the memory, then it fetch the associate date from matched index.
In the embodiment of
In the embodiment of
In one embodiment, the first storage section SS_1 and the second storage section SS_2 belong to a single data transmitting path (ex. a pipe line module or a port).
It will be appreciated that the above-mentioned embodiments can be combined. For example, the embodiment in
In one embodiment, the above-mentioned first data base is a MAC address table, but not limited.
The above-mentioned update managing module UM can be applied to manage devices in different dies. As illustrated in
In the embodiment of
In one embodiment, the first update address and the second update address are assigned to be the same. Also, in one embodiment, the first storage unit SU_1 and the second storage unit SU_2 belong to a single data transmitting path (ex. a pipe line module or a port).
The embodiment illustrated in
Accordingly, the buffer information BI_1, BI_2, BI_3 can control the masking circuit 601 to change the update requests R_1, R_2, R_3 or not. For example, if the buffer information BI_1, BI_2, BI_3 indicates the paths corresponding to addresses required by the update requests R_1, R_2, R_3 have sufficient bandwidth, the update requests R_1, R_2, R_3 directly received by the update managing module UM and the data to be updated are transmitted to the addresses required by the update requests R_1, R_2, R_3. On the contrary, if the buffer information BI_1, BI_2, BI_3 indicates the paths corresponding to addresses required by the update requests R_1, R_2, R_3 do have sufficient bandwidths, the update requests R_1, R_2, R_3 are changed by the buffer information BI_1, BI_2, BI_3 thus the data to be updated are transmitted to other addresses.
It will be appreciated that the update managing module UM is not limited to the embodiment illustrated in
According to above-mentioned embodiments, a data base updating method can be acquired, which comprises following steps: buffering data to be updated to a first data base stored in a first storage unit via a first buffer; and assigning a first update address for the first data base according to a first update request and first buffer information for the first buffer. Other detail steps can be acquired according to above-mentioned embodiments, thus are omitted for brevity here.
For a conventional network switch, if the memory does not have enough write bandwidth, the learning process fails and needs to repeat again. If such problem always occurs, the learning rate, which means the efficiency for learning relations between the MAC addresses and the pipe lines, is decreased. Based upon above-mentioned embodiments, the real-time bandwidth information can be acquired such that the update address can be efficiently assigned to avoid the conventional issue. By this way, the learning rate can be increased.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
This application claims the benefit of U.S. Provisional Application No. 62/170,705, filed on Jun. 4, 2015, the contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
62170705 | Jun 2015 | US |