Communications device
Patent Information
- Application Number
- PCT/JP2025/011872
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2026-10-01
Smart Images

Figure JP2025011872_01102026_PF_FP_ABST
Abstract
Description
Communication Device
[0001] The present invention relates to a communication device.
[0002] Conventionally, a communication device performs priority control using a buffer including a plurality of queues. FIG. 11 is a diagram showing a flow of priority control in a communication device. As shown in FIG. 11, the description is given on the assumption that the buffer of the communication device includes four queues. When a plurality of types of traffics F1 to F4 are input to the communication device, a classification unit 1 provided inside the communication device distributes the input traffics to queues corresponding to respective priority classes. In FIG. 11, four queues, namely an EF (Expedited Forwarding) class, an AF (Assured Forwarding) 4 class, an AF1 class, and a BE (Best Effort) class, are shown as the plurality of queues. The EF class has the highest priority, and the BE class has the lowest priority.
[0003] When the communication device performs priority control based on the SPQ (Strict Priority Queueing) scheme, an output unit 2 provided inside the communication device outputs traffics to a transmission queue in order starting from the queue of the class with higher priority. Therefore, the output unit 2 outputs the traffics in the BE class queue to the transmission queue after the traffics in the high-priority EF class, AF4 class, and AF1 class are output. Traffic becomes burst traffic due to aggregation, delay, fluctuation, or the like. Burst traffic refers to a block of frames generated due to delay, fluctuation, or the like. When a plurality of burst traffics overlap, the input rate becomes higher than the output rate, so the burst traffic is buffered.
[0004] As a result, frames that cannot be stored in the buffer (that cause buffer overflow) are discarded, resulting in frame loss. For traffic of priority classes, particularly traffic without retransmission such as UDP (User Datagram Protocol), frame loss affects quality of service. Therefore, it is important to design the buffer for priority classes such that no frame loss occurs based on the estimated traffic volume and burst volume.
[0005] Figure 12 shows the relationship between burstiness and frame discarding. The upper part of Figure 12 shows traffic with low burstiness, and the lower part shows traffic with high burstiness. Traffic with low burstiness is buffered and retrieved immediately, as shown in Figure 12, so no frames are discarded. On the other hand, with traffic with high burstiness, as shown in Figure 12, frames are partially discarded when the buffer capacity is exceeded.
[0006] Conventionally, two methods have been proposed for calculating buffer size: one using statistical methods and another using cumulative methods. The method using statistical methods employs the M / D / 1 queuing model. In the M / D / 1 model, "M" represents the arrival interval, "D" represents the processing time, and "1" represents the number of queues. Figure 13 shows the relationship between the ratio of input traffic to output link speed (utilization rate) and the number of burst traffic requiring buffering in the M / D / 1 model.
[0007] Figure 13(A) shows the relationship between the ratio of input traffic to output link speed (utilization rate) and the number of burst traffic requiring buffering in the M / D / 1 model, and Figure 13(B) is an enlarged view of a part of Figure 13(A). The number of burst traffic requiring buffering changes depending on the discard rate. The smaller the discard rate, the less frame loss there is, and therefore the larger the buffer required. For example, if the input traffic is 2 Gbps and the output link speed is 10 Gbps, the utilization rate is 0.2 (= 2 Gbps / 10 Gbps). Therefore, the discard rate calculated from the M / D / 1 model is 10 -5 The number of bursts requiring buffering in the following scenario is 5. Assuming the input traffic burst size is 10KB, then 10KB x 5 = 50KB is the required buffer size.
[0008] Next, we will explain how to calculate the buffer size using the cumulative method. In the method of calculating the buffer size using the cumulative method, the expected burst traffic size (burst size) is calculated based on the required bandwidth of stream j (j is an integer of 1 or more) of service i.i,j [byte]. Assuming the worst-case scenario, the buffer size is calculated based on the following formula (1) to ensure that there is no frame loss even if all services i and all streams j arrive at the frame buffer simultaneously.
[0009] ΣB i,j [byte] (i=1,2,...,n,j=1,2,...,m)...Formula (1)
[0010] For example, if the expected traffic of the communication device is streams 1 to 3 as shown in Figure 14, and the expected burst sizes of each stream 1 to 3 are 10KB, 20KB, and 30KB respectively, then the required buffer size will be a sum of 60KB.
[0011] Japanese Patent Publication No. 2012-049746 Japanese Patent Publication No. 2012-105086
[0012] Communication devices have finite buffers, and the smaller the buffer size, the lower the power consumption of the communication device. However, conventionally, the buffer size is calculated using a predetermined method regardless of the traffic type, resulting in a buffer size larger than necessary. Thus, there is room for improvement in reducing the power consumption of communication devices.
[0013] In view of the above circumstances, the present invention aims to provide a technology that can suppress the power consumption of communication devices.
[0014] One aspect of the present invention is a communication device that performs priority control using queues for each class, comprising: an evaluation unit that updates the buffer amount of a queue corresponding to a class that satisfies the conditions for updating the buffer amount based on the result of evaluating the state of a buffer having queues for each class; and a buffer setting unit that sets the buffer amount updated by the evaluation unit to the queue corresponding to the class that satisfies the conditions.
[0015] This invention makes it possible to reduce the power consumption of communication devices.
[0016] This figure shows an example of the configuration of a communication system in the first embodiment. This figure shows the internal configuration of the transfer processing unit in the first embodiment. This figure shows an example of a user registration DB, service type information table, and service information table stored in the storage unit in the first embodiment. This flowchart shows the flow of the buffer amount calculation process performed by the terminal device in the first embodiment. This flowchart shows the flow of the first threshold determination process performed by the terminal device in the first embodiment. This schematic diagram explains the first threshold determination process in the first embodiment. This flowchart shows the flow of the second threshold determination process performed by the terminal device in the first embodiment. This schematic diagram explains the second threshold determination process in the first embodiment. This schematic diagram explains the optimization of buffer amounts by class in the first embodiment. This schematic diagram explains the first threshold determination process in the second embodiment. This figure shows the flow of priority control in a communication device. This figure shows the relationship between burstiness and frame discarding. This is an explanatory diagram of the conventional M / D / 1 model. This is an explanatory diagram of the conventional stacking method.
[0017] One embodiment of the present invention will be described below with reference to the drawings.
[0018] (Overview) Before describing the specific details of the present invention, an overview of the present invention will be provided. The terminal device in the present invention performs priority control using a buffer with multiple queues, similar to the conventional invention. The difference in the present invention from the conventional invention is that it monitors information related to the buffer state, such as the number of frame losses (or frame loss rate) and the buffer's memory usage rate, and identifies trends. Based on the obtained trends, the minimum required buffer value is set in the fixed buffer, and the absolute value of fluctuation or deviation is set in the shared buffer. This makes it possible to set the minimum required buffer amount according to the operating state. As a result, it becomes possible to design a buffer with the minimum required buffer amount, and the power consumption of the terminal device can be reduced. The specific configuration for realizing the above process will be described below.
[0019] (First Embodiment) Figure 1 shows an example of the configuration of a communication system 100 in the first embodiment. The communication system 100 comprises a lower-level device 10, a terminal device 20, and a higher-level device 30. The lower-level device 10 and the higher-level device 30 are connected via the terminal device 20. Note that two or more lower-level devices 10 may be connected to the terminal device 20.
[0020] The lower-level device 10 communicates with the higher-level device 30. For example, the lower-level device 10 transmits an uplink signal to the higher-level device 30 with a different priority. The lower-level device 10 is, for example, a subscriber device installed in a subscriber's home.
[0021] The terminal device 20 is a communication device that performs priority control between the lower device 10 and the upper device 30 using multiple queues. The terminal device 20 has the function of setting the buffers of the transfer processing unit that performs priority control between the lower device 10 and the upper device 30. The buffers consist of a fixed area (also called a fixed buffer) and a shared area (also called a shared buffer). The buffer settings involve setting the buffer amount for each queue.
[0022] The higher-level device 30 communicates with the lower-level device 10. For example, the higher-level device 30 receives the uplink signal transferred from the terminal device 20.
[0023] (Device Configuration) Next, the configuration of the terminal device 20 will be described. The terminal device 20 includes a storage unit 21, a buffer amount calculation method determination unit 22, a first buffer calculation unit 23, a second buffer calculation unit 24, a buffer setting unit 25, a transfer processing unit 26, an evaluation unit 27, and a buffer amount DB 28.
[0024] The storage unit 21 stores various types of information. Specifically, the storage unit 21 stores a user registration database, a service type information table, and a service information table. The user registration database is a database in which information about users who use the service is registered. The service type information table is a table in which information about service types is registered. The service information table is a table in which information about services is registered. Details of the information stored in the storage unit 21 will be described later.
[0025] The buffer amount calculation method determination unit 22 determines the method to be used to calculate the buffer amount of the queues corresponding to each class provided by the transfer processing unit 26, based on various information stored in the storage unit 21. For example, the buffer amount calculation method determination unit 22 may refer to the user registration DB and determine the method to be used to calculate the buffer amount of the queues corresponding to each class based on the number of registered users. Since the statistical method is the optimal method when there are many users, the buffer amount calculation method determination unit 22 may determine to use the statistical method when the number of registered users is above a threshold, and to use the cumulative method when the number of registered users is below the threshold. Note that the method used by the buffer amount calculation method determination unit 22 to determine the method to be used to calculate the buffer amount of the queues corresponding to each class is just one example, and other methods (for example, a method that takes into account the service type information table or the service information table) may also be used for determination. The buffer amount calculation method determination unit 22 instructs the function unit that performs the determined method (first buffer calculation unit 23 or second buffer calculation unit 24) to calculate the buffer amount of the queues corresponding to each class provided by the transfer processing unit 26.
[0026] The first buffer calculation unit 23 calculates the buffer amount for each queue using the first buffer calculation method based on various information stored in the storage unit 21, in response to instructions from the buffer amount calculation method determination unit 22. Specifically, the first buffer calculation unit 23 calculates the buffer amount for each queue using an existing statistical method as the first buffer calculation method. The buffer amount for each queue calculated by the first buffer calculation unit 23 is the buffer amount for each queue that is expected to be necessary according to the current traffic situation.
[0027] The second buffer calculation unit 24 calculates the buffer amount using the second buffer calculation method based on various information stored in the storage unit 21, in response to instructions from the buffer amount calculation method determination unit 22. Specifically, the second buffer calculation unit 24 calculates the buffer amount for each queue using an existing stacking method as the second buffer calculation method. The buffer amount for each queue calculated by the second buffer calculation unit 24 is the buffer amount for each queue that is expected to be necessary according to the current traffic situation.
[0028] The buffer setting unit 25 sets the buffer amount for each queue provided by the transfer processing unit 26. For example, the buffer setting unit 25 sets the buffer amount for each queue calculated by the first buffer calculation unit 23 or the second buffer calculation unit 24 to each queue in the buffer provided by the transfer processing unit 26. Also, for example, if the evaluation unit 27 issues an instruction to update the buffer amount, the buffer setting unit 25 sets the instructed buffer amount to the queue in the buffer provided by the transfer processing unit 26.
[0029] The transfer processing unit 26 transfers signals between the lower-level device 10 and the upper-level device 30. The transfer processing unit 26 has multiple queues for holding traffic with different priorities. It performs transfer processing based on the buffer amount set for each queue by the buffer setting unit 25.
[0030] The evaluation unit 27 monitors the buffer status in the transfer processing unit 26 to check the degree of buffer depletion. The buffer status includes the number of frame losses and the utilization rate of physical memory. Based on the monitoring results, the evaluation unit 27 updates the buffer amount of the queue corresponding to the class that meets the conditions for requiring a buffer amount update.
[0031] The buffer size DB28 stores the buffer size of each queue for an extended period of time. The buffer size DB28 contains:
[0032] Figure 2 shows the internal configuration of the transfer processing unit 26 in the first embodiment. As shown in Figure 2, the buffer has a fixed area and a shared area. If a fixed buffer is set for each port, its physical memory can be used "fixedly". The shared buffer is shared by each port, and the buffer of the port into which traffic flows is used preferentially. If there is a priority class, the priority class will be used preferentially. In terms of total physical memory, the fixed buffer is equal to the sum of the fixed buffers of each port, but the shared buffer does not match the sum of the shared buffers of each port. By setting a shared buffer when physical memory is insufficient, buffers can be dynamically allocated to the necessary ports and classes.
[0033] (Database) Figure 3 shows an example of the user registration DB, service type information table, and service information table stored in the storage unit 21 in the first embodiment. Figure 2(A) shows an example of the user registration DB, Figure 2(B) shows an example of the service type information table, and Figure 2(C) shows the service information table.
[0034] The user registration database contains multiple records representing information about users who use the service. Each record has values for User ID, VLAN, and Service Type. The User ID represents identification information used to identify a user who uses the service. The VLAN represents the identification information (VLAN ID) of the VLAN (Virtual Local Area Network) set for the traffic sent by the user using the service. The Service Type represents the type of service used by the user.
[0035] The service type information table contains multiple records representing information about service types. Each record has values for service type, service A, service B, and service C. The service type represents the type of service. Service A, service B, and service C represent the details of the service. As shown in Figure 2, the available services are shown for each service type. For example, "Available" in Figure 2(B) indicates that the service is available, and "Not Available" in Figure 2(B) indicates that the service is not available. Therefore, for service type "1", it is shown that service A is available, while services B and C are not available.
[0036] The service information table contains multiple records representing information about a service. Each record has values for service, bandwidth, number of streams, and expected burst size. The service field represents the details of the service. Bandwidth represents the bandwidth available to the service. Number of streams represents the number of streams available to the service. Expected burst size represents the size of the burst traffic.
[0037] (Operation) Figure 4 is a flowchart showing the buffer amount calculation process performed by the terminal device 20 in the first embodiment. In Figure 4, we will explain the process of optimizing the buffer amount for one class (Class 1 (for example, AF1)). By performing the process shown in Figure 4 for all classes, the buffer can be optimized according to the operating state.
[0038] The buffer amount calculation method determination unit 22 determines, based on various information stored in the storage unit 21, the method to be used to calculate the buffer amount of the queue corresponding to class 1 (for example, AF1) among the classes provided by the transfer processing unit 26 (step S101). That is, the buffer amount calculation method determination unit 22 determines whether to use a statistical method or an accumulation method as the method to be used to calculate the buffer amount of the queue corresponding to class 1 (for example, AF1).
[0039] If the buffer amount calculation method determination unit 22 determines that a statistical method should be used to calculate the buffer amount of a queue corresponding to class 1 (for example, AF1), the buffer amount calculation method determination unit 22 instructs the first buffer calculation unit 23 to calculate the buffer amount. If the buffer amount calculation method determination unit 22 determines that an accumulation method should be used to calculate the buffer amount of a queue corresponding to class 1 (for example, AF1), the buffer amount calculation method determination unit 22 instructs the second buffer calculation unit 24 to calculate the buffer amount. Here, we assume that it has been determined that a statistical method should be used.
[0040] The first buffer calculation unit 23 calculates the buffer amount of the queue corresponding to class 1 (e.g., AF1) using the first buffer calculation method, based on various information stored in the storage unit 21, in response to instructions from the buffer amount calculation method determination unit 22. For example, the first buffer calculation unit 23 classifies each user based on their VLAN ID, based on the user registration DB 27 stored in the storage unit 21. Next, the first buffer calculation unit 23 refers to the service type information table to identify the service type for each class. Then, the first buffer calculation unit 23 refers to the service information table to obtain information on each service included in the identified service type for each class (bandwidth, number of streams, expected burst size). The first buffer calculation unit 23 can then use a statistical method to calculate the buffer amount of the queue corresponding to class 1 (e.g., AF1) based on the obtained information on each service included in the service type for each class and the number of users for each class. The first buffer calculation unit 23 outputs information indicating the calculated buffer amount of the queue corresponding to class 1 (e.g., AF1) to the buffer setting unit 25.
[0041] When the second buffer calculation unit 24 calculates the buffer amount for the queue corresponding to class 1 (for example, AF1), the second buffer calculation unit 24 classifies each user based on their VLAN ID, using the user registration DB 27 stored in the storage unit 21. Next, the second buffer calculation unit 24 refers to the service type information table to identify the service type for each class. Then, the second buffer calculation unit 24 refers to the service information table to obtain information on each service included in the identified service type for each class (bandwidth, number of streams, expected burst size). The second buffer calculation unit 24 can then use an accumulation method to calculate the buffer amount for the queue corresponding to class 1 (for example, AF1) based on the obtained information on each service included in the service type for each class and the number of users for each class.
[0042] The buffer setting unit 25 sets the buffer amount of the queue corresponding to class 1 (for example, AF1) in the transfer processing unit 26 based on information indicating the buffer amount of the queue corresponding to class 1 (for example, AF1) output from the first buffer calculation unit 23 (step S102). The buffer amount of the queue corresponding to class 1 (for example, AF1) set herein is defined as buffer value A.
[0043] The terminal station device 20 waits for a predetermined time (step S103). Since communication is performed between the lower-level device 10 and the upper-level device 30 even during the waiting period of the predetermined time, the terminal station device 20 relays communication between the lower-level device 10 and the upper-level device 30. After the predetermined time has elapsed, the evaluation unit 27 evaluates the state of the transfer processing unit 26 (step S104). Specifically, the evaluation unit 27 monitors the operation of the transfer processing unit 26 and acquires the number of frame losses and the utilization rate of physical memory in class 1 (for example, AF1). The evaluation unit 27 evaluates whether the buffer of the transfer processing unit 26 is excessive or insufficient according to the acquired number of frame losses and the utilization rate of physical memory. Note that the evaluation unit 27 may use a frame loss ratio instead of the number of frame losses.
[0044] The evaluation unit 27 determines a process to be executed according to the monitoring result (step S105). The processes executed by the evaluation unit 27 herein include a first threshold determination process and a second threshold determination process. The first threshold determination process is a process executed when the buffer amount of the queue corresponding to the class for which the current buffer amount is being calculated is insufficient (when the buffer amount is insufficient). The second threshold determination process is a process executed when the buffer amount of the queue corresponding to the class for which the current buffer amount is being calculated is sufficient (when the buffer amount is satisfied). In the terminal station device 20, by performing the first threshold determination process or the second threshold determination process, the threshold of a buffer value (buffer amount) at which frame loss becomes zero is determined, and an appropriate buffer amount is set.
[0045] When the evaluation unit 27 determines, as a result of monitoring, that at least one of the following conditions is satisfied: there is a frame loss in class 1 (for example, AF1), or the buffer memory utilization is 100% (the memory utilization reaches the upper limit) (step S105: there is a frame loss or the memory utilization is 100%), the evaluation unit 27 executes a first threshold determination process (step S106). Details of the first threshold determination process will be described later.
[0046] When the evaluation unit 27 determines, as a result of monitoring, that at least one of the following conditions is satisfied: there is no frame loss in class 1 (for example, AF1), or the buffer memory utilization is less than 100% (step S105: there is no frame loss or the memory utilization is less than 100%), the evaluation unit 27 executes a second threshold determination process (step S107). Details of the second threshold determination process will be described later. After the first threshold determination process or the second threshold determination process, the terminal station device 20 ends the process shown in Fig. 4.
[0047] Fig. 5 is a flowchart showing the flow of the first threshold determination process performed by the terminal station device 20 according to the first embodiment. The evaluation unit 27 updates the buffer amount (buffer value A) of the queue corresponding to class 1 (for example, AF1) set in the process of step S102 (step S201). Specifically, the evaluation unit 27 updates the buffer value A by adding a predetermined value ΔA to the buffer value A (buffer value A = A + ΔA). The predetermined value ΔA is a preset value.
[0048] The evaluation unit 27 outputs information indicating the updated buffer value A to the buffer setting unit 25. Note that the evaluation unit 27 may store information indicating the updated buffer value A in the buffer amount DB 28. The buffer setting unit 25 sets the updated buffer value A in the transfer processing unit 26 based on the information indicating the updated buffer value A output from the evaluation unit 27 (step S202). The terminal station device 20 waits for a predetermined time (step S203). After the predetermined time elapses, the evaluation unit 27 evaluates the state of the transfer processing unit 26 (step S204).
[0049] The evaluation unit 27 determines, based on the monitoring results, whether at least one of the following conditions is met: there is no frame loss, or the buffer memory utilization rate is less than 100% (step S205). If the evaluation unit 27 determines that there is frame loss and the buffer memory utilization rate is 100% (step S205-NO), the evaluation unit 27 updates the buffer value A again (step S206). For example, the evaluation unit 27 updates the buffer value A by adding a predetermined value ΔA to the buffer amount (buffer value A) of the queue corresponding to class 1 (e.g., AF1) set in the transfer processing unit 26 in step S202. After that, the terminal device 20 executes the processing from step S202 onward. In this way, the terminal device 20 continues to update the buffer value A until the frame loss is zero or the buffer memory utilization rate is less than 100%.
[0050] On the other hand, if the evaluation unit 27 determines that there is no frame loss or that at least one of the following conditions is met (step S205-YES), the evaluation unit 27 determines the buffer threshold (step S207). In the first embodiment, the buffer threshold is the threshold at which frame loss becomes zero. Specifically, the evaluation unit 27 determines the buffer value A at which there is no frame loss or the buffer memory utilization becomes less than 100% as the buffer threshold.
[0051] Subsequently, the evaluation unit 27 determines the buffer amount (buffer value A) of the queue corresponding to the final class 1 (e.g., AF1). For example, the evaluation unit 27 determines a value greater than or equal to the buffer threshold determined in step S207 as the buffer amount (buffer value A) of the queue corresponding to the final class 1 (e.g., AF1). It is desirable to determine a value somewhat larger than the buffer threshold as the buffer amount (buffer value A) of the queue corresponding to the final class 1 (e.g., AF1). The evaluation unit 27 outputs information indicating the determined buffer value A to the buffer setting unit 25. The evaluation unit 27 stores the information indicating the determined buffer value A in the buffer amount DB 28.
[0052] The buffer setting unit 25 sets the buffer value A in the transfer processing unit 26 based on the information indicating the buffer value A output from the evaluation unit 27 (step S208). Here, the buffer setting unit 25 sets the buffer value A as the buffer amount of the fixed buffer of the queue corresponding to class 1 (for example, AF1) in the transfer processing unit 26.
[0053] If the buffer amount DB 28 stores information indicating a buffer value A for a predetermined time (a predetermined time that can be considered a long period of time), the evaluation unit 27 calculates the fluctuation (absolute value of the deviation) using the buffer value A for the predetermined time stored in the buffer amount DB 28. For example, the evaluation unit 27 may calculate the fluctuation or absolute value of the deviation using the buffer value A for a predetermined time of the same class. The buffer setting unit 25 sets the absolute value of the fluctuation or deviation calculated by the evaluation unit 27 as the buffer amount of the shared buffer of the queue corresponding to class 1 (for example, AF1) in the transfer processing unit 26. This allows data that overflows the fixed buffer when a burst frame occurs to be stored in the shared buffer.
[0054] Figure 6 is a schematic diagram illustrating the first threshold determination process in the first embodiment. The upper part of Figure 6 shows the relationship between the number of buffer value updates and the set buffer value A, the middle part shows the relationship between the number of buffer value updates and the number of frame losses, and the lower part shows the relationship between the number of buffer value updates and the memory usage rate. As shown in Figure 6, each time the number of buffer value updates due to the first threshold determination process increases, the set buffer value increases by ΔA. As a result, as shown in the middle part of Figure 6, the number of frames discarded decreases and eventually the frame loss becomes zero, or as shown in the lower part of Figure 6, the memory usage rate decreases to less than 100%. The evaluation unit 27 determines the buffer value A when the number of frame losses is zero or the memory usage rate is less than 100% as the buffer threshold, and determines a value greater than or equal to the buffer threshold as the optimal buffer value A. The determined optimal buffer value A is the minimum amount of buffer required as the buffer amount (buffer value A) for a queue corresponding to a certain class.
[0055] It is expected that the buffer threshold will fluctuate over long periods of time (for example, due to the influx of burst traffic). In this case, the buffer setting unit 25 may set the average value of the buffer threshold to the fixed buffer. Alternatively, the buffer setting unit 25 may set the fluctuation value to the shared buffer, or it may set the value obtained by subtracting the average value of the buffer threshold from the maximum value of the buffer threshold to the shared buffer.
[0056] Figure 7 is a flowchart showing the flow of the second threshold determination process performed by the terminal device 20 in the first embodiment. The evaluation unit 27 updates the buffer amount (buffer value A) of the queue corresponding to class 1 (for example, AF1) set in the process of step S102 (step S301). Specifically, the evaluation unit 27 updates the buffer value A by subtracting a predetermined value ΔA from the buffer value A (buffer value A = A - ΔA). The predetermined value ΔA is a value that has been set in advance.
[0057] The evaluation unit 27 outputs information indicating the updated buffer value A to the buffer setting unit 25. Based on the information indicating the updated buffer value A output from the evaluation unit 27, the buffer setting unit 25 sets the updated buffer value A in the transfer processing unit 26 (step S302). The terminal device 20 waits for a predetermined time (step S303). After the predetermined time has elapsed, the evaluation unit 27 evaluates the state of the transfer processing unit 26 (step S304).
[0058] The evaluation unit 27 determines, based on the monitoring results, whether there is frame loss or whether at least one of the following conditions is met: that there is frame loss or that the buffer memory utilization rate is 100% (step S305). If the evaluation unit 27 determines that there is no frame loss and the buffer memory utilization rate is less than 100% (step S305-NO), the evaluation unit 27 updates the buffer value A again (step S306). For example, the evaluation unit 27 updates the buffer value A by subtracting a predetermined value ΔA from the buffer amount (buffer value A) of the queue corresponding to class 1 (e.g., AF1) set in the transfer processing unit 26 in step S202. After that, the terminal device 20 executes the processing from step S302 onward. In this way, the terminal device 20 continues to update the buffer value A until frame loss occurs or the buffer memory utilization rate reaches 100%.
[0059] On the other hand, if the evaluation unit 27 determines that there is frame loss or that at least one of the following conditions is met (step S305-YES), the evaluation unit 27 determines the buffer threshold (step S207). Specifically, the evaluation unit 27 determines the latest buffer value A when there is no frame loss or the buffer memory utilization is less than 100% as the buffer threshold.
[0060] Subsequently, the evaluation unit 27 determines the buffer amount (buffer value A) of the queue corresponding to the final class 1 (e.g., AF1). For example, the evaluation unit 27 determines a value greater than or equal to the buffer threshold determined in step S307 as the buffer amount (buffer value A) of the queue corresponding to the final class 1 (e.g., AF1). It is desirable to determine a value somewhat larger than the buffer threshold as the buffer amount (buffer value A) of the queue corresponding to the final class 1 (e.g., AF1). The evaluation unit 27 outputs information indicating the determined buffer value A to the buffer setting unit 25. The evaluation unit 27 stores the information indicating the determined buffer value A in the buffer amount DB 28.
[0061] The buffer setting unit 25 sets the buffer value A in the transfer processing unit 26 based on the information indicating the buffer value A output from the evaluation unit 27 (step S208). Here, the buffer setting unit 25 sets the buffer value A as the buffer amount of the fixed buffer of the queue corresponding to class 1 (for example, AF1) in the transfer processing unit 26.
[0062] If the buffer amount DB 28 stores information indicating a buffer value A for a predetermined time (a predetermined time that can be considered a long period of time), the evaluation unit 27 calculates the fluctuation (absolute value of the deviation) using the buffer value A for the predetermined time stored in the buffer amount DB 28. For example, the evaluation unit 27 may calculate the fluctuation or absolute value of the deviation using the buffer value A for a predetermined time of the same class. The buffer setting unit 25 sets the absolute value of the fluctuation or deviation calculated by the evaluation unit 27 as the buffer amount of the shared buffer of the queue corresponding to class 1 (for example, AF1) in the transfer processing unit 26. This allows data that overflows the fixed buffer when a burst frame occurs to be stored in the shared buffer.
[0063] Figure 8 is a schematic diagram illustrating the second threshold determination process in the first embodiment. The upper part of Figure 8 shows the relationship between the number of buffer value updates and the set buffer value A, the middle part shows the relationship between the number of buffer value updates and the number of frame losses, and the lower part shows the relationship between the number of buffer value updates and the memory usage rate. As shown in Figure 8, each time the number of buffer value updates due to the second threshold determination process increases, the set buffer value decreases by ΔA. As a result, it is possible that frame discarding occurs (frame loss occurs) as shown in the middle part of Figure 8, or that the memory usage rate increases to 100% as shown in the lower part of Figure 8. The evaluation unit 27 determines the buffer value A when a frame loss occurs or the memory usage rate reaches 100% as the buffer threshold, and determines a value greater than or equal to the buffer threshold as the optimal buffer value A. The determined optimal buffer value A is the minimum amount of buffer required as the buffer amount (buffer value A) for the corresponding queue.
[0064] It is expected that the buffer threshold will fluctuate over long periods of time (for example, due to the influx of burst traffic). In this case, the buffer setting unit 25 may set the average value of the buffer threshold to the fixed buffer. Alternatively, the buffer setting unit 25 may set the fluctuation value to the shared buffer, or it may set the value obtained by subtracting the average value of the buffer threshold from the maximum value of the buffer threshold to the shared buffer.
[0065] Figure 9 is a schematic diagram illustrating the optimization of buffer amounts by class in the first embodiment. As shown in the upper part of Figure 9, the initial settings for the buffers of the transfer processing unit 26 are as follows: EF class is a fixed buffer, AF1 class is a shared buffer (shared 1), and the other AF classes and BE classes are shared buffers (shared 2 and later). The EF class is set in the worst case. By applying the processes shown in Figures 4, 5, and 7 to the shared buffer (shared 1), the state shown in the middle part of Figure 9 is achieved.
[0066] As shown in the middle of Figure 9, since the buffer size of the shared buffer (shared 1) has decreased, the buffer sizes of other buffers can be increased. Repeat this process to determine the required buffer size for other classes. Alternatively, as shown in the lower part of Figure 9, the minimum required buffer size for AF1 can be fixed and allocated. Minimize the buffer size for the priority class and allocate the remainder to the BE class (effectively maximizing the buffer size for BE).
[0067] If there are multiple shared buffers, you can assign one service class to each and find the optimal value in parallel. By performing the above flow for each port, you can allocate the minimum necessary buffer to each port according to the number of services and users.
[0068] The terminal device 20 configured as described above includes an evaluation unit 27 that updates the buffer amount of the queue corresponding to the class that satisfies the conditions for updating the buffer amount based on the results of evaluating the state of the buffers equipped with queues for each class, and a buffer setting unit 25 that sets the updated buffer amount to the queue corresponding to the class that satisfies the conditions.
[0069] This configuration allows for setting the minimum necessary buffer size according to the operating conditions. Therefore, the overall buffer size can be reduced, lowering the device's power consumption. Furthermore, costs can also be reduced.
[0070] (Second Embodiment) In the first embodiment, a configuration was described in which the buffer amount of each corresponding queue is set so that frame loss is zero (no frame loss). In the second embodiment, a configuration in which frame loss is permitted will be described. The system configuration and device configuration in the second embodiment are the same as in the first embodiment. The differences from the first embodiment will be described below.
[0071] If the buffer memory is small, the initial buffer setting based on the calculation of the buffer size using statistical or cumulative methods may exceed the total memory size. In this case, the EF class will have a buffer setting that eliminates frame loss, while the other priority classes and BE class will be allowed to some extent to converge to the minimum necessary buffer value. In other words, the highest priority class will have the minimum necessary buffer size set to be above the buffer threshold, while the other classes will have their buffer sizes set assuming that some frame loss is tolerable.
[0072] Therefore, the terminal device 20 determines the buffer threshold shown in the first embodiment by weighting the frame loss rate to allow for the priority of each priority glass. For example, the ratio of the allowable frame loss rates is weighted with values such as AF1:AF2:AF3:AF4:BE = 1:2:3:10. Note that these weighting values are just examples and may be set as appropriate. The classes to be weighted may also be set in advance. Note that, as in the second embodiment, when frame loss is allowed, the memory usage rate of the weighted classes is always 100%.
[0073] Figure 10 is a schematic diagram illustrating the first threshold determination process in the second embodiment. Figure 10(A) shows an example of the first threshold determination process being performed in the AF1 class, Figure 10(B) shows an example of the first threshold determination process being performed in the AF4 class, and Figure 10(C) shows an example of the first threshold determination process being performed in the BE class.
[0074] As shown in Figure 10, each time the number of buffer value updates due to the first threshold determination process increases, the set buffer value increases by ΔA. As a result, as shown in the middle of Figure 10, the number of times frames are discarded decreases, and eventually, frame loss decreases. As mentioned above, if frame loss is tolerable, the memory usage rate of the weighted class will always be 100%. Therefore, when the evaluation unit 27 performs processing decisions such as those shown in step S104 (and also the processing in steps S106 and S107) for the weighted class, the decision will be made based only on the information of the number of frame losses. In other words, the evaluation unit 27 does not use memory usage information to make decisions for the weighted class. In the AF class and BE class, instantaneous frame loss due to bursts is excluded. Alternatively, the effect of bursts is mitigated by taking a long-term time average of the frame loss.
[0075] As shown in Figure 10, the evaluation unit 27 sets a frame threshold A for the AF1 class (Figure 10 (A)), a frame threshold B for the AF4 class (Figure 10 (B)), and a frame threshold C for the BE class (Figure 10 (C)) based on the weighting results. The frame thresholds A, B, and C have the relationship A < B < C%. The evaluation unit 27 then sets the buffer value A that satisfies the set frame threshold as the buffer threshold. For example, the evaluation unit 27 obtains the frame loss rate for the AF1 class, determines the buffer value A when the obtained frame loss rate reaches the frame threshold (A%) as the buffer threshold, and determines a value greater than or equal to the buffer threshold as the optimal buffer value A for the AF1 class. The determined optimal buffer value A is the minimum amount of buffer required as the buffer amount (buffer value A) for the corresponding queue in the AF1 class.
[0076] Similarly, the evaluation unit 27 acquires the frame loss rate in the AF4 class, determines the buffer value A when the acquired frame loss rate reaches the frame threshold (B%) as the buffer threshold, and determines a value greater than or equal to the buffer threshold as the optimal buffer value A in the AF4 class. The determined optimal buffer value A is the minimum amount of buffer required as the buffer amount (buffer value A) of the corresponding queue in the AF4 class.
[0077] Similarly, the evaluation unit 27 acquires the frame loss rate in the BE class, determines the buffer value A when the acquired frame loss rate reaches the frame threshold (C%) as the buffer threshold, and determines a value greater than or equal to the buffer threshold as the optimal buffer value A in the BE class. The determined optimal buffer value A is the minimum amount of buffer required as the buffer amount (buffer value A) of the corresponding queue in the BE class.
[0078] On the other hand, when the evaluation unit 27 performs the processing determination shown in step S104 (including the processing in steps S106 and S107) for classes that are not weighted (for example, the EF class, etc.), it performs the same processing as in the first embodiment.
[0079] In the example above, the first threshold determination process was used as an example, but the same applies to the second threshold determination process.
[0080] (Operation) Next, the buffer amount calculation process performed by the terminal device 20 in the second embodiment will be described. Here, the process for optimizing the buffer amount of the weighted class (for example, the BE class) will be described. The buffer amount calculation method determination unit 22 determines, based on various information stored in the storage unit 21, the method to be used to calculate the buffer amount of the queue corresponding to the BE class among the classes provided by the transfer processing unit 26.
[0081] If the buffer amount calculation method determination unit 22 determines that a statistical method should be used to calculate the buffer amount of the queue corresponding to the BE class, the buffer amount calculation method determination unit 22 instructs the first buffer calculation unit 23 to calculate the buffer amount. If the buffer amount calculation method determination unit 22 determines that an accumulation method should be used to calculate the buffer amount of the queue corresponding to the BE class, the buffer amount calculation method determination unit 22 instructs the second buffer calculation unit 24 to calculate the buffer amount. Here, we assume that it has been determined that a statistical method should be used.
[0082] The first buffer calculation unit 23 calculates the buffer amount of the queue corresponding to the BE class using the first buffer calculation method, based on various information stored in the storage unit 21, in response to instructions from the buffer amount calculation method determination unit 22. The first buffer calculation unit 23 outputs information indicating the calculated buffer amount of the queue corresponding to the BE class to the buffer setting unit 25.
[0083] The buffer setting unit 25 sets the buffer amount of the queue corresponding to the BE class in the transfer processing unit 26 based on the information indicating the buffer amount of the queue corresponding to the BE class output from the first buffer calculation unit 23. The buffer amount of the queue corresponding to the BE class set here is defined as buffer value A1.
[0084] The terminal device 20 waits for a predetermined time. After the predetermined time has elapsed, the evaluation unit 27 evaluates the state of the transfer processing unit 26. Specifically, the evaluation unit 27 monitors the operation of the transfer processing unit 26 and obtains the number of frame losses in the BE class and the utilization rate of physical memory. The evaluation unit 27 evaluates the surplus or deficit of the buffer of the transfer processing unit 26 according to the obtained number of frame losses and the utilization rate of physical memory. The evaluation unit 27 may use the percentage of frame losses instead of the number of frame losses.
[0085] The evaluation unit 27 determines which process to execute based on the monitoring results. The processes executed by the evaluation unit 27 include a first threshold determination process and a second threshold determination process. If the evaluation unit 27 finds that there is frame loss in the BE class as a result of monitoring, the evaluation unit 27 executes the first threshold determination process. Details of the first threshold determination process in the first embodiment will be described later. If the evaluation unit 27 finds that there is no frame loss in the BE class as a result of monitoring, the evaluation unit 27 executes the second threshold determination process. Details of the second threshold determination process in the first embodiment will be described later.
[0086] Next, the flow of the first threshold determination process performed by the terminal device 20 in the second embodiment will be described. The evaluation unit 27 updates the buffer amount (buffer value A1) of the queue corresponding to the BE class set in the above-described process. Specifically, the evaluation unit 27 updates the buffer value A by adding a predetermined value ΔA1 to the buffer value A1 (buffer value A1 = A1 + ΔA1). The predetermined value ΔA1 is a value that has been set in advance.
[0087] The evaluation unit 27 outputs information indicating the updated buffer value A1 to the buffer setting unit 25. The evaluation unit 27 may also store the information indicating the updated buffer value A1 in the buffer amount DB 28. Based on the information indicating the updated buffer value A1 output from the evaluation unit 27, the buffer setting unit 25 sets the updated buffer value A1 in the transfer processing unit 26. The terminal device 20 waits for a predetermined time. After the predetermined time has elapsed, the evaluation unit 27 evaluates the state of the transfer processing unit 26.
[0088] The evaluation unit 27 determines, based on the monitoring results, whether the frame loss rate exceeds a predetermined threshold. If the evaluation unit 27 determines that the frame loss rate exceeds the predetermined threshold, the evaluation unit 27 updates the buffer value A1 again. After that, the terminal device 20 waits for a predetermined time and then evaluates the state of the transfer processing unit 26. In this way, the terminal device 20 continues to update the buffer value A1 until the frame loss rate falls below the predetermined threshold.
[0089] On the other hand, if the evaluation unit 27 determines that the frame loss rate is below a predetermined threshold, the evaluation unit 27 determines the buffer threshold. The buffer threshold in the second embodiment is a threshold that keeps the frame loss rate within an acceptable range. Specifically, the evaluation unit 27 determines the buffer value A1 when the frame loss rate is below a predetermined threshold as the buffer threshold. After that, the evaluation unit 27 determines the buffer amount (buffer value A1) of the queue corresponding to the final BE class. For example, the evaluation unit 27 determines a value greater than or equal to the buffer threshold as the buffer amount (buffer value A1) of the queue corresponding to the final BE class. It is desirable to determine a value somewhat larger than the buffer threshold as the buffer amount (buffer value A1) of the queue corresponding to the final BE class. The evaluation unit 27 outputs information indicating the determined buffer value A1 to the buffer setting unit 25. The evaluation unit 27 stores the information indicating the determined buffer value A1 in the buffer amount DB 28.
[0090] The buffer setting unit 25 sets the buffer value A1 in the transfer processing unit 26 based on the information indicating the buffer value A1 output from the evaluation unit 27. Here, the buffer setting unit 25 sets the buffer value A1 as the buffer amount of the fixed buffer of the queue corresponding to the BE class in the transfer processing unit 26.
[0091] If the buffer amount DB 28 stores information indicating a buffer value A1 for a predetermined time (a predetermined time that can be considered a long period of time), the evaluation unit 27 calculates the fluctuation (absolute value of the deviation) using the buffer value A1 for the predetermined time stored in the buffer amount DB 28. For example, the evaluation unit 27 may calculate the fluctuation or absolute value of the deviation using the buffer value A1 for a predetermined time of the same class (for example, the BE class). The buffer setting unit 25 sets the absolute value of the fluctuation or deviation calculated by the evaluation unit 27 as the buffer amount of the shared buffer of the queue corresponding to the BE class in the transfer processing unit 26. This allows data that overflows the fixed buffer when a burst frame occurs to be stored in the shared buffer.
[0092] Next, the flow of the second threshold determination process performed by the terminal device 20 in the second embodiment will be described. The evaluation unit 27 updates the buffer amount (buffer value A1) of the queue corresponding to the BE class set in the above-described process. Specifically, the evaluation unit 27 updates the buffer value A by subtracting a predetermined value ΔA1 from the buffer value A1 (buffer value A1 = A1 - ΔA1). The predetermined value ΔA1 is a value that has been set in advance.
[0093] The evaluation unit 27 outputs information indicating the updated buffer value A1 to the buffer setting unit 25. Based on the information indicating the updated buffer value A1 output from the evaluation unit 27, the buffer setting unit 25 sets the updated buffer value A1 to the transfer processing unit 26. The terminal device 20 waits for a predetermined time. After the predetermined time has elapsed, the evaluation unit 27 evaluates the state of the transfer processing unit 26.
[0094] The evaluation unit 27 determines, based on the monitoring results, whether the frame loss rate is below a predetermined threshold. If the evaluation unit 27 determines that the frame loss rate is below the predetermined threshold, the evaluation unit 27 updates the buffer value A1 again. After that, the terminal device 20 waits for a predetermined time and then evaluates the state of the transfer processing unit 26. In this way, the terminal device 20 continues to update the buffer value A1 until the frame loss rate exceeds the predetermined threshold.
[0095] On the other hand, if the evaluation unit 27 determines that the frame loss rate exceeds a predetermined threshold, the evaluation unit 27 determines the buffer threshold. Specifically, the evaluation unit 27 determines the buffer value A1 when the frame loss rate falls below the predetermined threshold as the buffer threshold. Subsequently, the evaluation unit 27 determines the buffer amount (buffer value A1) of the queue corresponding to the final BE class. For example, the evaluation unit 27 determines a value greater than or equal to the buffer threshold as the buffer amount (buffer value A1) of the queue corresponding to the final BE class. It is desirable to determine a value somewhat larger than the buffer threshold as the buffer amount (buffer value A1) of the queue corresponding to the final BE class. The evaluation unit 27 outputs information indicating the determined buffer value A1 to the buffer setting unit 25. The evaluation unit 27 stores the information indicating the determined buffer value A1 in the buffer amount DB 28.
[0096] The buffer setting unit 25 sets the buffer value A1 in the transfer processing unit 26 based on the information indicating the buffer value A1 output from the evaluation unit 27. Here, the buffer setting unit 25 sets the buffer value A1 as the buffer amount of the fixed buffer of the queue corresponding to the BE class in the transfer processing unit 26.
[0097] If the buffer amount DB 28 stores information indicating a buffer value A1 for a predetermined time (a predetermined time that can be considered a long period of time), the evaluation unit 27 calculates the fluctuation (absolute value of the deviation) using the buffer value A1 for the predetermined time stored in the buffer amount DB 28. For example, the evaluation unit 27 may calculate the fluctuation or absolute value of the deviation using the buffer value A1 for a predetermined time of the same class (for example, the BE class). The buffer setting unit 25 sets the absolute value of the fluctuation or deviation calculated by the evaluation unit 27 as the buffer amount of the shared buffer of the queue corresponding to the BE class in the transfer processing unit 26. This allows data that overflows the fixed buffer when a burst frame occurs to be stored in the shared buffer.
[0098] According to the terminal device 20 in the second embodiment configured as described above, even when the buffer memory size is small, it is possible to set the optimal buffer size to the extent possible by tolerating frame loss in some classes. Therefore, it becomes possible to suppress the power consumption of the communication device.
[0099] (Modifications common to the first and second embodiments) In the embodiments described above, the evaluation unit 27 was shown to acquire values based on frame loss in each class (for example, the number of frame losses and the amount of frame loss) and the utilization rate of physical memory. That is, the example described was when the values based on frame loss (for example, the number of frame losses and the amount of frame loss) and the utilization rate of physical memory acquired by the evaluation unit 27 are different values for each class (values corresponding to each class). In contrast, the evaluation unit 27 may acquire values based on frame loss (for example, the number of frame losses and the amount of frame loss) and the utilization rate of physical memory not for each class, but for multiple classes (for example, AF1 and BE, etc.) or for each port.
[0100] Some or all of the functional units of the terminal device 20 are implemented as software by a processor such as a CPU executing a program stored in a storage device and a memory unit having a non-volatile recording medium (non-temporary recording medium). The program may be recorded on a computer-readable non-temporary recording medium. A computer-readable non-temporary recording medium is, for example, a portable medium such as a flexible disk, magneto-optical disk, ROM, CD-ROM (Compact Disc Read Only Memory), or a storage device such as a hard disk built into a computer system.
[0101] Some or all of the functional units of the terminal device 20 may be implemented using hardware including electronic circuits (or circuits) such as LSI (Large Scale Integrated Circuit), ASIC (Application Specific Integrated Circuit), PLD (Programmable Logic Device), or FPGA (Field Programmable Gate Array).
[0102] While embodiments of this invention have been described in detail above with reference to the drawings, the specific configuration is not limited to these embodiments and includes designs and the like that do not depart from the spirit of this invention.
[0103] This invention can be applied to techniques for priority control using multiple queues.
[0104] 10...Lower-level device, 20...Terminal device, 21...Storage unit, 22...Buffer amount calculation method determination unit, 23...First buffer calculation unit, 24...Second buffer calculation unit, 25...Buffer setting unit, 26...Transfer processing unit, 27...Evaluation unit, 28...Buffer amount DB, 30...Higher-level device
Claims
1. A communication device that performs priority control using queues for each class, comprising: an evaluation unit that updates the buffer amount of the queue corresponding to a class that satisfies the conditions for updating the buffer amount based on the result of evaluating the state of a buffer having queues for each class; and a buffer setting unit that sets the buffer amount updated by the evaluation unit to the queue corresponding to the class that satisfies the conditions.
2. The class that satisfies the above conditions is a class that has frame loss or whose memory usage is at its upper limit, the evaluation unit increases the buffer amount of the class that satisfies the above conditions until the value based on frame loss in the class that satisfies the above conditions falls below a threshold or the memory usage falls below the upper limit, and the buffer setting unit sets the value based on the buffer amount when the value based on frame loss in the class that satisfies the above conditions falls below a threshold or the memory usage falls below the upper limit into the queue corresponding to the class that satisfies the above conditions, the communication device according to claim 1.
3. A class that satisfies the above conditions is a class in which the frame loss is below a threshold or the memory usage rate is below an upper limit, the evaluation unit reduces the buffer amount of the class that satisfies the above conditions until the value based on the frame loss in that class exceeds a threshold or the memory usage rate reaches an upper limit, and the buffer setting unit sets the value based on the buffer amount when the value based on the frame loss in that class exceeds a threshold or the memory usage rate reaches an upper limit in the queue corresponding to the class that satisfies the above conditions, the communication device according to claim 1.
4. The communication device according to any one of claims 1 to 3, wherein the buffer comprises a fixed buffer and a shared buffer, and the buffer setting unit sets the buffer amount updated by the evaluation unit in the fixed buffer and sets the absolute value of fluctuation or deviation obtained based on past trends of the buffer state in the shared buffer.