This application claims the priority benefit of Taiwan Application Serial Number 111143635, filed Nov. 15, 2022, which is herein incorporated by reference.
The disclosure relates to a control method and an electronic apparatus for managing buffers. More particularly, the disclosure relates to a control method and an electronic apparatus capable of managing available pointers of packet buffers.
An electronic apparatus with a communication function usually includes a processor and a communication circuit. The processor is mainly responsible for data calculation tasks on the electronic apparatus, and the communication circuit is responsible for communication tasks with other external devices, such as receiving or transmitting packets from or to these external devices.
Usually, an inward packet received by the communication circuit can be temporarily stored in packet buffer storage, and the processor can read the inward packet at a specific address corresponding to the packet buffer storage. On the other hand, when the processor generates an outward packet to be transmitted to an external device, the processor can temporarily store the outward packet in the packet buffer storage. Then, the communication circuit reads the outward packet from a specific address corresponding to the packet buffer storage and transmits the outward packet to the external device.
Therefore, the electronic apparatus is required to manage allocations and returns of the packet buffer storage effectively. In one approach, a polling communication manner is utilized between the processor and the communication circuit to share a current usage status of the packet buffer storage. However, the polling communication manner will occupy a certain time period on a data bus connected between the processor and the communication circuit.
Another approach is utilizing a ready signal to indicate the current usage status of the packet buffer storage. For example, the ready signal is able to indicate whether the communication circuit finishes a previous packet transmission task or not. The processor has to wait until the ready signal (e.g., PREADY signal) is switched to a completion level, which indicates a finish of the previous packet transmission task. This approach based on the ready signal can be considered as a back-pressure type of flow control, and it is able to indicate the current usage status of the packet buffer storage. However, this approach is not able to predict an on-going flow rate, and it may lead to a head of line blocking problem. If a task takes a long time for a transmission, the ready signal will not be switched to the completion level in this case, and the processor is not able to read and write the packet buffer storage during this time period. It can be harmful to other parallel computations or tacks executed on the processor.
The disclosure provides an electronic apparatus, which includes a processing unit, a buffer memory and a buffer manager. The buffer memory has packet buffer spaces. Each of the packet buffer spaces is aligned to a packet size. The buffer manager includes a register for temporarily storing at least one available pointer. Each of the at least one available pointer is configured to mark a start address corresponding to one packet buffer space in the buffer memory. The buffer manager is configured to monitor an available pointer quantity and assign the at least one available pointer to the processing unit. In response to that the processing unit transmits a first allocation request to the buffer manager and the available pointer quantity is sufficient, the buffer manager is configured to obtain a first available pointer from the register, to update the available pointer quantity, to integrate the first available pointer and the available pointer quantity into a first allocation response, and to transmit the first allocation response to the processing unit.
The disclosure also provides an electronic apparatus, which includes a processing unit, a buffer memory and a buffer manager. The buffer memory has packet buffer spaces. Each of the packet buffer spaces is aligned to a packet size. The buffer manager includes a register for temporarily storing at least one available pointer. Each of the at least one available pointer is configured to mark a start address corresponding to one packet buffer space in the buffer memory. The buffer manager is configured to monitor an available pointer quantity and assign the at least one available pointer to the processing unit. The processing unit is configured to count a pending return pointer quantity, to integrate a first available pointer and the pending return pointer quantity into a return request, and to transmit the return request to the buffer manager. In response to that the buffer manager receives the return request, the buffer manager is configured to push the first available pointer into the register according to the return request and update the available pointer quantity.
The disclosure also provides a control method, include following steps. A first allocation request is sent from a processing unit to a buffer manager. Whether an available pointer quantity in a register is sufficient or not is determined by buffer manager. In response to that the available pointer quantity is sufficient, a first available pointer is obtained from the register by the buffer manager according to the first allocation request. The first available pointer is configured to mark a start address of a packet buffer space. The available pointer quantity within the register by the buffer manager is updated. The first available pointer and the available pointer quantity are integrated by the buffer manager for generating a first allocation response. The first allocation response is sent to the processing unit by the buffer manager.
It is to be understood that both the foregoing general description and the following detailed description are by examples, and are intended to provide further explanation of the invention as claimed.
The disclosure can be more fully understood by reading the following detailed description of the embodiment, with reference made to the accompanying drawings as follows:
Reference will now be made in detail to the present embodiments of the disclosure, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
Reference is made to
In an embodiment, the electronic apparatus 100 can be a computer, a smartphone, a network switch, a network gateway, a router or any equivalent device with communication functions. The electronic apparatus 100 is able to transmit an outward-transmitting packet PTX to an external network 190 through the communication transceiver unit 180. On the other hand, the electronic apparatus 100 is able to receive an inward-transmitting packet PRX from the external network 190 through the communication transceiver unit 180. Accordingly, the electronic apparatus 100 is able to exchange data with other devices over the external network 190 through the communication transceiver unit 180.
In an embodiment, the communication transceiver unit 180 may include an Ethernet transceiver circuit, a WiFi transceiver circuit, a Bluetooth transceiver circuit or any equivalent communication transceiver circuit. In another embodiment, the communication transceiver unit 180 may include a High Definition Multimedia Interface (HDMI) transmission circuit, a Digital Visual Interface (DVI) transmission circuit or any equivalent communication interface for transmitting image/video data.
In some embodiments, the communication transceiver unit 180 can be implemented by hardware circuits of aforesaid transceivers or communication interfaces. In some other embodiments, the communication transceiver unit 180 can be implemented by software instructions or firmware executed by logic circuits in a System on a Chip (SoC) integrated circuit.
The processing unit 160 of the electronic apparatus 100 is responsible for data computation tasks on the electronic apparatus 100. For example, the processing unit 160 can process user's audio input, generate a correspondingly audio packet and transmit the audio packet. On the other hand, the processing unit 160 can decode a received audio packet and play the received audio packet. In an embodiment, the processing unit 160 can be implemented by a processor, a central processing unit (CPU), a graphic processing unit (GPU), a tensor processing unit (TPU), an application-specific integrated circuit (ASIC) or any equivalent processing circuit.
In some embodiments, the processing unit 160 and the communication transceiver unit 180 may have different operating frequencies. The processing unit 160 usually has a relatively higher operating frequency to perform high-speed computations. Due to difference between the operating frequencies, the inward-transmitting packet PRX received by the communication transceiver unit 180 is not suitable to be transmitted directly from the communication transceiver unit 180 to the processing unit 160. Similarly, the outward-transmitting packet PTX generated by the processing unit 160 is not suitable to be transmitted directly from the processing unit 160 to the communication transceiver unit 180. In this embodiment, the outward-transmitting packet PTX and the inward-transmitting packet PRX will be temporarily stored in the buffer memory 120. The processing unit 160 and the communication transceiver unit 180 write or read the outward-transmitting packet PTX and the inward-transmitting packet PRX via the buffer memory 120.
As shown in
In some embodiments, for convenience of data transmission, the outward-transmitting packet PTX and the inward-transmitting packet PRX have a fixed packet size. In this case, each of the packet buffer spaces BUF1-BUF8 in the buffer memory 120 has boundaries aligned with the fixed packet size, so as to elevate a space usage efficiency of the buffer memory 120.
In an embodiment shown in
In an embodiment, the buffer manager 140 is configured to manage the packet buffer spaces BUF1-BUF8 in the buffer memory 120, and assign these spaces to be utilized by the processing unit 160 and the communication transceiver unit 180. In some applications, the buffer manager 140 can be implemented by a free buffer manager (FBM) circuit, an application-specific integrated circuit (ASIC) or a microcontroller. In some other embodiments, the buffer manager 140 can be implemented by software instructions or firmware executed by logic circuits in a SoC integrated circuit.
In an embodiment, the buffer manager 140, the processing unit 160 and the communication transceiver unit 180 can be implemented by software instructions or firmware executed by logic circuits in the same SoC integrated circuit. In another embodiment, the buffer manager 140, the processing unit 160 and the communication transceiver unit 180 can be implemented by different hardware circuits (e.g., a SoC integrated circuit, a central processing unit and a network transceiver circuit).
In some embodiments, the buffer memory 120, the buffer manager 140, the processing unit 160 and the communication transceiver unit 180 are coupled to each other through a data bus BUS. In an embodiment, the data bus BUS includes at least one of an advanced peripheral bus (APB), an advanced extensible interface (AXI) and an advanced high-performance bus (AHB).
As shown in embodiments of
As shown in
In the embodiment shown in
The buffer manager 140 is configured to manage the available pointer quantity (currently equals to 4 in the register 142 in the example shown in
When the processing unit 160 or the communication transceiver unit 180 requests for a packet buffer space, the buffer manager obtains (e.g., pops) an available pointer from the register 142, and assigns it to the processing unit 160 or the communication transceiver unit 180. When the processing unit 160 or the communication transceiver unit 180 finishes operations relative to the packet buffer space, the buffer manager pushes the corresponding available pointer back to the register 142, so as to release the packet buffer space for following usages. Operation details about obtaining or pushing the available pointer will be discussed in following embodiments.
Reference is further made to
As shown in
When the buffer manager 140 receives the first allocation request QPOP1, step S202 is executed by the buffer manager 140 to check whether an available pointer quantity CPN in the register 142 is enough or not. In the example shown in
Afterward, step S206 is executed by the buffer manager 140 to update the available pointer quantity CPN into 3, such that the available pointer quantity CPN is able to reflect the quantity of available/accessible pointers in the register 142 in real time.
Step S208 is executed by the buffer manager 140 to integrate the first available pointer PTR1 and the available pointer quantity CPN into a first allocation response RPOP1.
In embodiments shown in
For example, the first available pointer PTR1 marks the start address, h0000_0000, of the packet buffer space BUF1. The second available pointer PTR2 marks the start address, h0000_1000, of the packet buffer space BUF2. The third available pointer PTR3 marks the start address, h0000_2000, of the packet buffer space BUF3. In this case, even though an overall address length in each available pointer is 32 bits, lower 12 bits near the least significant bit (LSB) are fixed values at h000. In other words, only higher 20 bits near the most significant bit (MSB) in each of different available pointers carry a meaningful address.
In some embodiments, the buffer manager 140 integrates and generates the first allocation response RPOP1 by recording the available pointer quantity CPN in the lower-bits portion (i.e., the lower 12 bits near the least significant bit). Reference is further made to
In the aforesaid example, a boundary between the higher-bits portion PM and the lower-bits portion PL in the first allocation response RPOP1 is located between the 12th bit and the 13th bit, and the disclosure is not limited thereto. The boundary between the higher-bits portion PM and the lower-bits portion PL in the first allocation response RPOP1 is decided according to a packet size of the outward-transmitting packet PTX. When the packet size of the outward-transmitting packet PTX is larger, the size of each of the packet buffer spaces BUF1-BUF8 is larger, and correspondingly a gap between two start addresses of two adjacent available pointers is larger. In this case, the aforesaid boundary will move closer to the most significant bit (MSB). On the other hand, when the packet size of the outward-transmitting packet PTX is smaller, the size of each of the packet buffer space BUF1-BUF8s is smaller, and correspondingly the gap between two start addresses of two adjacent available pointers is smaller. In this case, the aforesaid boundary will move closer to the least significant bit (LSB).
In step S209, the buffer manager 140 transmits the first allocation response RPOP1 to the processing unit 160, in response to the first allocation request QPOP1 sent from the processing unit 160. It is noticed that, in the embodiment, a length of the first allocation response RPOP1 after integration is 32 bits, which is equal to a length of the original first available pointer PTR1.
In other words, while transmitting the first allocation response RPOP1 from the buffer manager 140 to the processing unit 160, it can adopt the same format (i.e., with the same data length of 32 bits) as transmitting only the first available pointer PTR1. Compared with transmitting only the first available pointer PTR1 to the processing unit 160, the first allocation response RPOP1 with the same data length is able to carry two types of information including meaningful digits of the first available pointer PTR1 and also the available pointer quantity CPN.
In step S210, the processing unit 160 is configured to analyze the first allocation response RPOP1 to obtain the first available pointer PTR1 and the available pointer quantity CPN. The analysis operation is roughly opposite to the integration operation shown in
As shown in
In step S214, the communication transceiver unit 180 reads the outward-transmitting packet PTX from the packet buffer space BUF1 of the buffer memory 120, according to the first available pointer PTR1. Afterward, in step S216, the communication transceiver unit 180 transmits the outward-transmitting packet PTX to the external network 190, so as to finish an outward transmission of the outward-transmitting packet PTX.
It is noticed that, during the aforesaid step S210, the processing unit 160 is able to learn (e.g., know) the available pointer quantity CPN currently of the register 142 of the buffer manager 140 and a changing trend of the available pointer quantity CPN. Accordingly, the processing unit 160 and the buffer manager 140 can negotiate about the varying trend of the available pointer quantity CPN in advance. In some applications, if the processing unit 160 learns (e.g., determines) that the available pointer quantity CPN is lower than a threshold value (e.g., there are only two available pointers left), the processing unit 160 temporarily stops transmitting other allocation request(s) or reduces a frequency of transmitting the other allocation request(s). Compared to a back-pressure flow control which prohibits the allocation request from the processing unit 160 when it completely runs out of available pointers, the embodiments in this disclosure is able to transmit the available pointer quantity CPN, such that the processing unit 160 is able to learn a current usage of available pointers in advance. It benefits the processing unit 160 in re-arranging allocation requests in the future. For example, the processing unit 160 can prioritize tasks about releasing memory space over other tasks.
The aforesaid embodiment demonstrates an example when the processing unit 160 transmits the first allocation request QPOP1 and the buffer manager 140 determines that the available pointer quantity CPN is sufficient. In another situation, as the control method 200 shown in
In step S219, the allocation response RNULL is sent to the processing unit 160. According to the allocation response RNULL set to be null (or set to be zero), the processing unit 160 is able to learn that at current stage it is not able to obtain an available pointer (and a corresponding packet buffer space) from the buffer manager 140. The processing unit 160 is able to learn that the outward-transmitting packet PTX cannot be transmitted right now. The processing unit 160 can re-try again immediately or wait for a certain time period before re-submitting the allocation request. In an embodiment, when the processing unit 160 receives the allocation response RNULL, step S220 is executed such that the processing unit 160 temporarily stops transmitting other allocation request(s) or reduces a frequency of transmitting the other allocation request(s).
It is noticed that, in the aforesaid steps, the control method 200 does not adjust a voltage level of a ready signal (e.g., PREADY signal) on the data bus BUS. In this embodiment, the processing unit 160 is able to re-submit another allocation request again right after a previous allocation request is denied. In other words, the control method 200 does not force the processing unit 160 or the communication transceiver unit 180 to stop transmissions and wait until the ready signal (e.g., PREADY signal) resumes to a completion level. In this case, even when a packet takes a longer time for a transmission, the control method 200 can avoid a head of line blocking problem caused by the packet.
Afterward, when the communication transceiver unit 180 completes the transmission task of the outward-transmitting packet PTX, the communication transceiver unit 180 is configured to return the first available pointer PTR1 (which is currently occupied) back to the buffer manager 140. Details of returning the first available pointer PTR1 can be referred to
In practical applications, the processing unit 160 and the communication transceiver unit 180 may adopt parallel processing. During a period of time, the communication transceiver unit 180 may respectively perform multiple transmission/reception tasks, and these transmission/reception tasks may be completed at different times according to their priorities and transmission conditions. The pending return pointer quantity PSH1 is configured to indicate a total amount of pointers which are currently occupied by the communication transceiver unit 180 and to be returned later after packet transmissions. For example, if the communication transceiver unit 180 still has two transmission tasks in progress, the pending return pointer quantity PSH1 is set as 2.
In step S224, the communication transceiver unit 180 integrates the first available pointer PTR1 (corresponding to the completed transmission task) and the pending return pointer quantity PSH1 into a first return request QPUSH1. Reference is further made to
As discussed in the aforesaid embodiments, 12 bits adjacent to the least significant bit (LSB) of the first available pointer PTR1 are fixed values. In this embodiment, the communication transceiver unit 180 records the pending return pointer quantity PSH1 in the lower-bits portion PL of the first return request QPUSH1, and it will not affect the transmission of the first available pointer PTR1. Similar to the aforesaid first allocation response RPOP1, the first return request QPUSH1 in the same data length (e.g., the same as the original length of the whole first available pointer PTR1) is able to carry two types of information including the meaningful digits of the first available pointer PTR1 and also the pending return pointer quantity PSH1. In step S225, the communication transceiver unit 180 transmits the first return request QPUSH1 to the buffer manager 140.
In step S226, the buffer manager 140 obtains (or extracts) the pending return pointer quantity PSH1 according to the lower-bits portion PL of the first return request QPUSH1, and obtains (or extracts) the first available pointer PTR1 according to the higher-bits portion PM of the first return request QPUSH1. Specifically, the buffer manager 140 obtains (or extracts) the higher-bits portion PM of the first available pointer PTR1 according to the higher-bits portion PM of the first return request QPUSH1 and fills “000” into the lower-bits portion PL of the first available pointer PTR1, so as to complete the first available pointer PTR1.
Afterward, the buffer manager 140 executes step S228 to determine whether a sum of the pending return pointer quantity PSH1 and the available pointer quantity CPN is greater than a maximal accommodation volume MAX of the register 142.
In practical applications, in order to reduce costs of implementing the buffer manager 140 and the register 142, the register 142 is usually disposed with a limited storage volume. In this case, the maximal accommodation volume MAX of the register 142 can be less than a total amount of the packet buffer spaces in the buffer memory 120. When the processing unit 160 or the communication transceiver unit 180 returns a lot of available pointers in a short period, these returned available pointers may overflow and exceed the maximal accommodation volume MAX of the register 142. In this case, these overflowed pointers may be lost, and the electronic apparatus 100 is not able to utilize/access some packet buffer spaces in the buffer memory 120 corresponding to these lost pointers.
In this embodiment, the buffer manager 140 is able to detect/predict an overflowing of the pointers in advance based on the sum of the pending return pointer quantity PSH1 and the available pointer quantity CPN during step S228. In response to that the sum is detected to be greater than the maximal accommodation volume MAX, step S230 is executed to generate a warning signal WRN. In step S231, the buffer manager 140 transmits the warning signal WRN to the communication transceiver unit 180. In step S232, the communication transceiver unit 180 temporarily stops or postpones generating other return request(s) according to the warning signal WRN. In this case, the communication transceiver unit 180 will not return available pointers to the buffer manager 140 intensively, and it can prevent the available pointers from overflowing and exceeding the maximal accommodation volume MAX.
On the other hand, if the sum of the pending return pointer quantity PSH1 and the available pointer quantity CPN is not greater than the maximal accommodation volume MAX, step S234 is executed. The buffer manager 140 pushes the first available pointer PTR1 back to the register 142, so as to return the first available pointer PTR1 and release the corresponding packet buffer space BUF1. After the first available pointer PTR1 is returned, the first available pointer PTR1 can be utilized again for processing other task(s).
The aforesaid control method 200 shown in
As shown in
When the buffer manager 140 receives the second allocation request QPOP2, step S304 is executed to check whether the available pointer quantity CPN within the register 142 is enough or not. It is assumed that the first available pointer PTR1 is currently occupied and not returned yet, and the available pointer quantity CPN equals to 2.
In this case, the buffer manager 140 determines that the available pointer quantity CPN is currently enough, and step S306 is executed. The buffer manager 140 is configured to obtain the second available pointer PTR2 from the register 142. Step S308 is executed to update the available pointer quantity CPN.
Afterward, step S310 is executed by the buffer manager 140 to integrate a higher-bits portion PM of the second available pointer PTR2 and the available pointer quantity CPN into a second allocation response RPOP2. In step S310, details of the integration of the higher-bits portion PM of the second available pointer PTR2 and the available pointer quantity CPN into the second allocation response RPOP2 is similar to step S208 in
The buffer manager 140 executes step S311 to transmit the second allocation response RPOP2 to the communication transceiver unit 180. The communication transceiver unit 180 executes step S312 to obtain (or extract) the second available pointer PTR2 and the packet buffer space BUF2 in the buffer memory 120 corresponding to the second available pointer PTR2 according to the higher-bits portion PM of the second allocation response RPOP2. The communication transceiver unit 180 executes step S314 to write the inward-transmitting packet PRX into the packet buffer space BUF2.
The communication transceiver unit 180 executes step S315 to transmit the second available pointer PTR2 to the processing unit 160. In step S316, the processing unit 160 is able to read the inward-transmitting packet PRX from the packet buffer space BUF2 according to the second available pointer PTR2.
In step S312, the communication transceiver unit 180 is able to learn the available pointer quantity CPN currently of the register 142 of the buffer manager 140 and also learn a varying trend of the available pointer quantity CPN. Accordingly, the communication transceiver unit 180 and the buffer manager 140 can negotiate about the changing trend of the available pointer quantity CPN in advance. In some applications, if the communication transceiver unit 180 learns that the available pointer quantity CPN is lower than a threshold value (e.g., there are less than two available pointers left), the communication transceiver unit 180 temporarily stops transmitting other allocation request(s) or reduces a frequency of transmitting the other allocation request(s). Compared to a back-pressure flow control which prohibits the allocation request from the communication transceiver unit 180 when it completely runs out of available pointers, the embodiments in this disclosure is able to transmit the available pointer quantity CPN, such that the communication transceiver unit 180 is able to learn a current usage of available pointers in advance. It benefits the communication transceiver unit 180 in re-arranging allocation requests in the future. For example, the communication transceiver unit 180 can prioritize tasks about releasing memory space over other tasks.
In another situation, if there is no available pointer in the register 142 of the buffer manager 140, the buffer manager 140 determines that the available pointer quantity CPN is insufficient, as shown in the control method 300 in
In step S319, the allocation response RNULL is sent to the communication transceiver unit 180. According to the allocation response RNULL set to be null (or to be zero), the communication transceiver unit 180 is able to learn that at current stage it is not able to obtain an available pointer (and a corresponding packet buffer space) from the buffer manager 140. The communication transceiver unit 180 is able to learn that the inward-transmitting packet PRX cannot be transmitted to the processing unit 160 right now. The communication transceiver unit 180 can re-try again immediately or wait for a certain time period before re-submitting the allocation request. In an embodiment, when the communication transceiver unit 180 receives the allocation response RNULL, step S320 is executed such that the communication transceiver unit 180 temporarily stops transmitting other allocation request(s) or reduces a frequency of transmitting the other allocation request(s).
Afterward, when the processing unit 160 completes a reading task of the inward-transmitting packet PRX, the processing unit 160 is configured to return the second available pointer PTR2 (which is currently occupied) back to the buffer manager 140. Details of returning the second available pointer PTR2 can be referred to
In practical applications, the processing unit 160 and the communication transceiver unit 180 may adopt parallel processing. During a period of time, the processing unit 160 may respectively perform multiple reading/writing tasks, and these reading/writing tasks may be completed at different times according to their priorities and transmission conditions. The pending return pointer quantity PSH2 is configured to indicate a total amount of pointers which are currently occupied by the processing unit 160 for the reading tasks and to be returned later. For example, if the processing unit 160 still has four inward-transmitting packets in progress, the pending return pointer quantity PSH2 is set as 4.
In step S324, the processing unit 160 integrates the second available pointer PTR2 (corresponding to the completed reading task) and the pending return pointer quantity PSH2 into a second return request QPUSH2. Details about how to integrate the second available pointer PTR2 and the pending return pointer quantity PSH2 into the second return request QPUSH2 are similar to manners of integrating the first available pointer PTR1 and the pending return pointer quantity PSH1 into the first return request QPUSH1 as discussed in
The processing unit 160 is configured to duplicate a higher-bits portion PM of the second available pointer PTR2 as a higher-bits portion PM of the second return request QPUSH2, and the processing unit 160 is configured to record the pending return pointer quantity PSH2 currently into a lower-bits portion PL of the second return request QPUSH2, so as to generate (integrate into) the second return request QPUSH2.
In step S326, the buffer manager 140 obtains (or extracts) the pending return pointer quantity PSH2 according to the lower-bits portion PL of the second return request QPUSH2, and obtains (or extracts) the second available pointer PTR2 according to the higher-bits portion PM of the second return request QPUSH2.
Afterward, the buffer manager 140 executes step S328 to determine whether a sum of the pending return pointer quantity PSH2 and the available pointer quantity CPN is greater than the maximal accommodation volume MAX of the register 142. In some embodiments, the control method 200 shown in
In this embodiment, the buffer manager 140 is able to detect/predict an overflowing of the pointers in advance based on the sum of the pending return pointer quantity PSH2 and the available pointer quantity CPN during step S328. In response to that the sum is detected to be greater than the maximal accommodation volume MAX, step S330 is executed to generate the warning signal WRN. In step S331, the buffer manager 140 transmits the warning signal WRN to the processing unit 160 (in some embodiments, the warning signal WRN can be transmitted to the communication transceiver unit 180 as well at the same time). In step S332, the processing unit 160 temporarily stops or postpones generating other return request(s) according to the warning signal WRN. In this case, the processing unit 160 will not return available pointers to the buffer manager 140 intensively, and it can prevent the available pointers from overflowing and exceeding the maximal accommodation volume MAX.
On the other hand, if the sum of the pending return pointer quantity PSH2 and the available pointer quantity CPN is not greater than the maximal accommodation volume MAX, step S334 is executed. The buffer manager 140 pushes the second available pointer PTR2 back to the register 142, so as to return the second available pointer PTR2 and release the corresponding packet buffer space BUF2. After the second available pointer PTR2 is returned, the second available pointer PTR2 can be utilized again for processing other task(s).
Although the present invention has been described in considerable detail with reference to certain embodiments thereof, other embodiments are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the embodiments contained herein.
Number | Date | Country | Kind |
---|---|---|---|
111143635 | Nov 2022 | TW | national |