Abstract:
A transmission device includes a plurality of devices through which a plurality of paths in the transmission device passes; and a processor included in a device among the plurality of devices, the processor configured to receive a first packet, measure a first transmission rate of the received first packet, generate a second packet such that a total of the first transmission rate of the first packet and a second transmission rate of the second packet becomes a predetermined value, and output the generated second packet to a path through which the received first packet has been transmitted, from among the plurality of paths.

Description:
CROSS-REFERENCE TO RELATED APPLICATION 
       [0001]    This application is based upon and claims the benefit of priority of the prior Japanese Patent Application 2016-084765, filed on Apr. 20, 2016, the entire contents of which are incorporated herein by reference. 
       FIELD 
       [0002]    The embodiments discussed herein are related to a transmission device and a traffic control method. 
       BACKGROUND 
       [0003]    In a transmission device such as a layer  2  switch, for example, a field programmable gate array (FPGA) is widely used to execute transfer processing of packets. Along with the miniaturization of the process of the FPGA, a permissible value for a temporary reduction in power source voltage, that is, a permissible value of a voltage dip becomes small. For example, a permissible value of a voltage dip in a certain FPGA is 60 (mV) in the process of 45 (nm). However, the permissible value becomes 50 (mV) in the process of 40 (nm), and the permissible value becomes 28 (mV) in the process of 20 (nm). 
         [0004]    The consumption current of the FPGA is changed depending on a packet rate. When the consumption current of the FPGA increases due to an increase in the packet rate, there is a case in which the power source voltage is reduced, and the voltage dip that exceeds the permissible value occurs. 
         [0005]    In addition, for example, Japanese Laid-open Patent Publication No. 2008-72164 discusses that output of dummy data having a small difference with a variation of data in a time period in which there exists data is performed, in a time period in which there is no data, in order to suppress a fluctuation in the consumption current. Japanese Laid-open Patent Publication No. 2011-142567 discusses that a power source controls output voltage depending on a variation in current based on a traffic amount in order to maintain stable power source voltage. 
         [0006]    However, in a technology discussed in Japanese Laid-open Patent Publication No. 2008-72164, output of dummy data is performed so as to simply track the variation of data, and an amount of the dummy data sharply increases due to a sharp increase of the variation, so that it is difficult to suppress a reduction in the power source voltage effectively. In addition, in the technology discussed in Japanese Laid-open Patent Publication No. 2011-142567, the power source controls the output voltage depending on a traffic amount, so that an operation of another device that receives power supply from the same power source may be adversely affected. Such a problem also occurs in another type of device that executes transfer processing of packets in addition to the FPGA. In view of the problems, it is desirable that a fluctuation in the power source voltage is suppressed effectively. 
       SUMMARY 
       [0007]    According to an aspect of the invention, a transmission device includes a plurality of devices through which a plurality of paths in the transmission device passes; and a processor included in a device among the plurality of devices, the processor configured to receive a first packet, measure a first transmission rate of the received packet, generate a second packet such that a total of the first transmission rate of the first packet and a second transmission rate of the second packet becomes a predetermined value, and output the generated second packet to a path through which the received packet has been transmitted, from among the plurality of paths. 
         [0008]    The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims. 
         [0009]    It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention, as claimed. 
     
    
     
       BRIEF DESCRIPTION OF DRAWINGS 
         [0010]      FIG. 1  is a configuration diagram illustrating an example of a layer  2  switch; 
           [0011]      FIG. 2  is a diagram illustrating an example of a change in consumption current of each FPGA, which corresponds to each transmission rate in a comparative example; 
           [0012]      FIG. 3  is a diagram illustrating an example of a change in power source voltage of the FPGA, which corresponds to each of the transmission rates in the comparative example; 
           [0013]      FIG. 4  is a configuration diagram illustrating an example of an insertion unit; 
           [0014]      FIG. 5  is a diagram illustrating an example of formats of a user packet and a current adjustment packet; 
           [0015]      FIG. 6  is a diagram illustrating a change in consumption current of the FPGA in each of the comparative example and an embodiment; 
           [0016]      FIG. 7  is a diagram illustrating a change in consumption current of the FPGA when transmission rates of an input path and an output path are increased at the same time; 
           [0017]      FIG. 8  is a diagram illustrating an example of a relationship between a slew rate and a variation a transmission rate of user packets; 
           [0018]      FIG. 9  is a diagram illustrating an example of a change for a total time of the transmission rate of user packets and the transmission rate of current adjustment packets; 
           [0019]      FIG. 10  is a configuration diagram illustrating an example of a discard unit; 
           [0020]      FIG. 11  is a configuration diagram illustrating another example of the layer  2  switch; 
           [0021]      FIG. 12  is a configuration diagram illustrating another example of the layer  2  switch; 
           [0022]      FIG. 13  is a configuration diagram illustrating another example of the layer  2  switch; and 
           [0023]      FIG. 14  is a flowchart illustrating an example of a traffic control method. 
       
    
    
     DESCRIPTION OF EMBODIMENTS 
       [0024]      FIG. 1  is a configuration diagram illustrating an example of a layer  2  switch. The layer  2  switch is an example of a transmission device. The layer  2  switch includes a plurality of line interface units (line INF units)  1  and a switch unit (SW)  4 . The transmission device is not limited to the layer  2  switch. For example, a router, a wavelength multiplexing transmission device, or the like is also an example of the transmission device. 
         [0025]    The line INF unit  1  transmits and receives user packets that are main signals to and from another device through a communication line, and inputs and outputs user packets to and from the switch unit  4 . The plurality of line INF units  1  exchanges user packets with the switch unit  4 . That is, the switch unit  4  outputs a user packet that has been input from the line INF unit  1 , to another line INF unit  1  corresponding to the destination. The user packet is an example of a packet transmitted to another device or a packet received from another device. The user packet has, for example, an Ethernet (registered trademark) frame. However, the user packet is not limited to the Ethernet frame. 
         [0026]    The line INF units  1  and the switch unit  4  are accommodated in a slot provided on the front surface of a shelf that is housing. Each of the line INF units  1  and the switch unit  4  is a circuit board on which a plurality of electronic components is mounted. The line INF unit  1  and the switch unit  4  are electrically coupled to each other, for example, through a wiring board provided on the back surface of the shelf and connectors. The line INF unit  1  and the switch unit  4  communicate with each other through the wiring board. 
         [0027]    The line INF unit  1  includes FPGAs  10   a  to  10   c  that are coupled to each other and a power source  11  are coupled to the FPGAs  10   a  to  10   c . The power source  11  is, for example, an onboard power source, and supplies electric power used to drive each of the FPGAs  10   a  to  10   c . That is, each of the FPGAs  10   a  to  10   c  is driven by the common power source  11 . In the embodiment, as devices provided in the line INF unit  1 , the FPGAs  10   a  to  10   c  are described. However, instead of the FPGAs  10   a  to  10   c , another type of device such as a programmable logic device (PLD) may be used. 
         [0028]    The line INF unit  1  receives a user packet from another device, and executes certain processing related to transfer of the user packet through the FPGAs  10   a  to  10   c  and outputs the user packet to the switch unit  4 . The received user packet is transmitted through an input path Ra that passes through the FPGAs  10   a  to  10   c  in such order, and is output to the switch unit  4 . 
         [0029]    In the line INF unit  1 , a user packet is input from the switching unit  4 , is subject to certain processing related to transfer of the user packet through the FPGAs  10   a  to  10   c , and is transmitted to another device. The input user packet is transmitted along an output path Rb that passes through the FPGAs  10   c ,  10   b , and  10   a  in such order and is output to another device. The input path Ra is an example of a first path. The output path Rb is an example of a second path. 
         [0030]    The consumption current of each of the FPGAs  10   a  to  10   c  is changed depending on a transmission rate of user packets. When the consumption current of each of the FPGAs  10   a  to  10   c  increases with an increase of the transmission rate of the user packets, there is a case in which the voltage of the power source  11  drops, and a voltage dip occurs that exceeds a permissible value. 
         [0031]      FIG. 2  is a diagram illustrating an example of a change in consumption current of each of the FPGAs  10   a  to  10   c , which corresponds to each transmission rate in a comparative example.  FIG. 2  illustrates a change in the consumption current and the number of user packets to time in a case in which the transmission rate of the user packets is low (see “low transmission rate”) and a change in the consumption current and the number of user packets to a time in a case in which the transmission rate of the user packets is high (see “high transmission rate”). 
         [0032]    In  FIG. 2 , a time t 0  indicates a time at which a user packet starts to be input to the FPGAs  10   a  to  10   c . A time period T indicates a taken time period in which the user packet passes through the FPGAs  10   a  to  10   c , that is, a delay time (latency) due the FPGAs  10   a  to  10   c . A slew rate “SR” indicates a change amount of the consumption current in a unit of time (1 (μs) in this example), that is, an increase rate to time. 
         [0033]    In this example, an increase in the consumption current of each of the FPGAs  10   a  to  10   c  when the state in which transmission of user packets is yet to be performed transitions to the state in transmission of user packets is performed is described. However, in the following description, a case is also applied in which the consumption current changes when the transmission rate has increased during transmission of user packets. 
         [0034]    The consumption current of each of the FPGAs  10   a  to  10   b  starts to increase when the user packet starts to be input. In addition, the consumption current of each of the FPGAs  10   a  to  10   b  becomes a fixed value when the first initial user packet is output from the FPGAs  10   a  to  10   c . When the transmission rate of the user packets is high, the number of user packets that pass through the FPGAs  10   a  to  10   b  is larger than that of a case in which the transmission rate of the user packets is low. Therefore, when the transmission rate of the user packets is high, the slew rate has a larger than that of the case in which the transmission rate of the user packets is low. 
         [0035]    In this example, when the transmission rate is low, the slew rate is 4.41 (A/μs), but when the transmission rate is high, the slew rate is 10 (A/μs). Here, each of the FPGAs  10   a  to  10   c  is a device that has been manufactured in accordance with a rule of a wiring width of 20 (nm). Due to an increase in the consumption current, large voltage is drawn from the power source  11  to each of the FPGAs  10   a  to  10   c , so that the voltage of the power source  11  is reduced. 
         [0036]      FIG. 3  is a diagram illustrating an example of a change in power source voltage of each of the FPGAs  10   a  to  10   c , which correspond to each of the transmission rates in the comparative example. Correspondingly to  FIG. 2 ,  FIG. 3  illustrates the voltage of the power source  11  when the transmission rate of the user packets is low (see “low transmission rate”) and the voltage of the power source  11  when the transmission rate of the user packets is high (see “high transmission rate”). 
         [0037]    In  FIG. 3 , a symbol P 1  represents a voltage dip due to an increase in the consumption current. A symbol P 2  represents a temporary increase of voltage due to stop of the increase in the consumption current (hereinafter referred to as “voltage increase”). The voltage dip P 1  occurs at the time of the increase start of the consumption current, that is, at the time t 0  of  FIG. 2 . The voltage increase P 2  occurs at the time of the increase stop of the consumption current, that is, at the time t 0 +T of  FIG. 2 . Each of the voltage dip P 1  and the voltage increase P 2  becomes larger as the slew rate of the consumption current increases. 
         [0038]    The permissible value of the voltage dip P 1  is defined as a recommended operation condition of each of the FPGAs  10   a  to  10   c . In a case of the FPGAs  10   a  to  10   c  in the process of 20 (nm), the permissible value of the voltage dip P 1  becomes 28 (mV). Therefore, when the permissible value of the voltage dip P 1  exceeds 28 (mV), a failure may occur in the operation of the FPGAs  10   a  to  10   c.    
         [0039]    A value of the voltage dip P 1  in the case of the low transmission rate (SR=4.41 (A/μs)) is 23.5 (mV), and becomes smaller than 28 (mV) that is the permissible value. Therefore, a failure does not occur in the operation of the FPGAs  10   a  to  10   c . However, a value of the voltage dip P 1  in the case of the high transmission rate (SR=10 (A/μs)) is 35 (mV), and larger than 28 (mV) that is the permissible value. Therefore, a failure may occur in the operation of the FPGAs  10   a  to  10   c . Similar to the voltage dip P 1 , in the voltage increase P 2 , when an increase amount in the power source voltage is large, a failure may occur in the operation of the FPGAs  10   a  to  10   c.    
         [0040]    Therefore, in the embodiment, in order to reduce a fluctuation in the voltage of the power source  11 , a current adjustment packet is transmitted to each of the FPGAs  10   a  to  10   c  so that the slew rate of the consumption current is reduced. Even when the transmission rate of the user packets is low, the consumption current is raised as long as a total of the transmission rate of the user packets and the transmission rate of the current adjustment packets is kept at a certain value by the current adjustment packets. Therefore, even when the transmission rate of the user packets increases, an increase amount of the consumption current of each of the FPGAs  10   a  to  10   c  may be limited. As a result, the slew rate of the consumption current is reduced, so that a fluctuation in the voltage of the power source  11  is reduced. 
         [0041]    Returning to  FIG. 1 , the line INF unit  1  includes a pair of an insertion unit  2  and a discard unit  3  that execute processing of current adjustment packets in each of the input path Ra and the output path Rb. In the FPGA  10   a , the insertion unit  2  is provided that inserts a current adjustment packet into the input path Ra. In the FPGA  10   c , the discard unit  3  is provided that detects and discards a current adjustment packet on the input path Ra. In the FPGA  10   c , the insertion unit  2  is provided that inserts a current adjustment packet into the output path Rb. In the FPGA  10   a , the discard unit  3  is provided that detects and discards a current adjustment packet on the output path Rb. 
         [0042]    Therefore, a current adjustment packet is transmitted and received between the insertion unit  2  and the discard unit  3  in each of the input path Ra and the output path Rb. As a result, the consumption current of each of the FPGAs  10   a  to  10   c  is adjusted so that the slew rate is reduced. 
         [0043]      FIG. 4  is a configuration diagram illustrating an example of the insertion unit  2 . The insertion unit  2  includes header generation units  20  and  25 , a rate measurement unit  21 , first-in first-out (FIFO)  22  and  26 , a rate control unit  23 , a packet generation unit  24 , a multiplexer  27 , and a memory  28 . 
         [0044]    A user packet passes through the header generation unit  20 , the rate measurement unit  21 , and the FIFO  22  in such order. A current adjustment packet passes through the packet generation unit  24 , the header generation unit  25 , and the FIFO  26  in such order. 
         [0045]    The header generation unit  20  generates an in-device header, and assigns the header to the user packet. The in-device header of the user packet includes, for example, information such as an identifier and a destination of the user packet. The header generation unit  20  outputs the user packet to which the in-device header has been assigned, to the rate measurement unit  21 . 
         [0046]    The rate measurement unit  21  is an example of a measurement unit, and measures the transmission rate of the user packets. More specifically, the rate measurement unit  21  measures the flow rate of the user packets, that is, the effective number of bytes of the user packets that have passed per unit of the time. 
         [0047]    The transmission rate that has been measured by the rate measurement unit  21  is different depending on a transmission direction. In the case of the insertion unit  2  on the input path Ra, the rate measurement unit  21  measures the transmission rate of user packets received from another device. In the case of the insertion unit  2  on the output path Rb, the rate measurement unit  21  measures the transmission rate of user packets transmitted to another device. 
         [0048]    The user packets that pass through the rate measurement unit  21  are input to the FIFO  22 . The FIFO  22  stores the plurality of user packets. The FIFO  22  outputs the user packets to the multiplexer  27 , in accordance with the storage order. 
         [0049]    The packet generation unit  24  is an example of a generation unit, and generates a current adjustment packet. The current adjustment packet is an example of a dummy packet. The generated current adjustment packet is output to the packet generation unit  24 . The header generation unit  25  generates an in-device header and assigns the header to the current adjustment packet. The in-device header of the current adjustment packet includes, for example, information such as an identifier of the current adjustment packet. 
         [0050]      FIG. 5  is a diagram illustrating an example of formats of a user packet and a current adjustment packet. The user packet includes an in-device header, a destination address (DA) indicating the destination, a source address (SA) indicating the transmission source, data, and a frame check sequence (FCS) that is an error correction symbol. The current adjustment packet includes, an in-device header, padding data having, for example, a certain pattern, and an FCS. 
         [0051]    The in-device header includes a packet ID that is an identifier of the packet. The packets ID of the user packet and the current adjustment packet are respectively set at different values. As an example, the packet ID of the current adjustment packet is set at 0xAF (0x indicates a hexadecimal). The packet ID of the user packet is set at 0xF5. Therefore, the user packet and the current adjustment packet may be distinguished by the respective packet IDs. 
         [0052]    Returning to  FIG. 4 , the packet generation unit  24  outputs the current adjustment packet to which the in-device header has been assigned, to the FIFO  26 . The FIFO  26  stores the plurality of current adjustment packets. The FIFO  26  outputs the current adjustment packets, to the multiplexer  27  in accordance with the storage order. 
         [0053]    The multiplexer  27  is an example of an output unit, and outputs the current adjustment packet to the path common with the user packet. More specifically, the multiplexer  27  reads the user packet from the FIFO  22  that is one of the FIFO and reads the current adjustment packet from the FIFO  26  that is the other FIFO. At this time, the multiplexer  27  may read the user packet and the current adjustment packet in accordance with a round robin scheme so as to be fair for the two FIFOs  22  and  26 . Alternatively, the multiplexer  27  may read the user packet in preference to the current adjustment packet, in accordance with a certain algorithm. 
         [0054]    The multiplexer  27  multiplies the read user packet and the read current adjustment packet and outputs the multiplied packets. As a result, the multiplexer  27  outputs the current adjustment packet to the path common with the user packet in the line INF unit  1 . 
         [0055]    For example, in the FPGA  10   a , the multiplexer  27  outputs the current adjustment packet to the input path Ra. Here, the path from the header generation unit  25  to the FIFO  26  is a part of the input path Ra. In the FPGA  10   c , the multiplexer  27  outputs the current adjustment packet to the output path Rb. Here, the path from the header generation unit  25  to the FIFO  26  is a part of the output path Rb. 
         [0056]    As described above, the current adjustment packet is transmitted along the same path as the user packet in the line INF unit  1 . 
         [0057]    The rate measurement unit  21  notifies the rate control unit  23  of a measurement value of the transmission rate of the user packets. The rate control unit  23  is an example of a control unit. The rate control unit  23  controls the packet generation unit  24  so that a total of the transmission rate that has been measured by the rate measurement unit  21  and the transmission rate of the current adjustment packets becomes a certain setting value K. The setting value K is stored, for example, in the memory  28 . The rate control unit  23  reads the setting value K from the memory  28 . 
         [0058]    More specifically, the rate control unit  23  controls the data length of the current adjustment packet generated by the packet generation unit  24  (for example, the length of padding data) so that the transmission rate of the current adjustment packets in the line INF unit  1  becomes a value that has been obtained by subtracting the measurement value of the rate measurement unit  21  from the setting value K. In the following description, the transmission rate is represented by a percentage (%) of the maximum value of the transmission rate of the line INF unit  1  (hereinafter referred to as “full rate”), and an example of the transmission rate is described. 
         [0059]    For example, when it is assumed that the measurement value of the rate measurement unit  21  is 40(%), and the setting value K is 60(%), the rate control unit  23  calculates the transmission rate of the current adjustment packets as 20(%) (=60-40). At this time, the packet generation unit  24  generates current adjustment packets so that the transmission rate of the current adjustment packets becomes 20(%). 
         [0060]    For example, when it is assumed that the measurement value of the rate measurement unit  21  is 10(%), and the setting value K is 60(%), the rate control unit  23  calculates the transmission rate of the current adjustment packet as 50(%) (=60-10). At this time, the packet generation unit  24  generates current adjustment packets so that the transmission rate of the current adjustment packets becomes 10(%). 
         [0061]    As described above, the rate control unit  23  controls generation of current adjustment packets so that the transmission rate of the user packets and the transmission rate of the current adjustment packets become the certain setting value K. The current adjustment packet is output to the input path Ra or the output path Rb common with the user packet by the multiplexer  27 . 
         [0062]    Therefore, when the transmission rate of the user packets is smaller than the setting value K, the consumption current of each of the FPGAs  10   a  to  10   c  increases due to transmission processing of current adjustment packets, and is maintained to be fixed based on the setting value K. 
         [0063]      FIG. 6  is a diagram illustrating a change in consumption current of each of the FPGAs  10   a  to  10   c  each of in the comparative example and the embodiment. In  FIG. 6 , the same symbol is assigned to a parameter common with  FIG. 2 , and the description is omitted herein. In this example, an increase in the consumption current of each of the FPGAs  10   a  to  10   c  when the state in which transmission of the user packet is yet to be performed transitions to the state in which transmission of the user packet is performed is described as an example. However, in the following description, a case is also applied in which the consumption current changes when the transmission rate has increased during transmission of the user packet. 
         [0064]    Here, AI′ indicates an increase amount of consumption current in the time period T in the comparative example. In addition, AI indicates an increase amount of consumption current in the time period T in the embodiment. In addition, “Io” indicates the consumption current in a time period from the time  0  to a time t 0  in the comparative example. In addition, “Ip” indicates an increase portion from the consumption current of Io due to the transmission of the current adjustment packets in the time period from the time  0  to the time t 0  in the embodiment. On the graph of the consumption current in the embodiment, the consumption current in the comparative example is represented by the dotted line. 
         [0065]    In the comparative example, transmission of user packets is not performed in the time period from the time  0  to the time t 0 , so that the consumption current Io of each of the FPGAs  10   a  to  10   c  becomes small. Therefore, the increase amount AI′ of the consumption current in the time period T becomes large, and the slew rate becomes high. At this time, when it is assumed that the transmission rate of the user packets in the time period t 0  or later is the full rate, the slew rate becomes, for example, 9.95 (A/μs). 
         [0066]    On the other hand, in the embodiment, transmission of current adjustment packets is performed at the transmission rate based on the setting value K in the time period from the time  0  to the time t 0 , so that the consumption current of each of the FPGAs  10   a  to  10   c  becomes large by “Ip” as compared with the comparative example. That is, the consumption current becomes “Io+Ip”. Therefore, the increase amount AI of the consumption current in the time period T is small as compared with the comparative example, and the slew rate is also reduced as compared with the comparative example. At this time, when it is assumed that the transmission rate of the user packets in the time period t 0  or later is the full rate, the slew rate becomes, for example, 4 (A/μs). 
         [0067]    As described above, in the embodiment, the consumption current of each of the FPGAs  10   a  to  10   c  increases due to the transmission of the current adjustment packets, and is maintained at an approximately fixed value. Thus, even when the transmission rate of the user packets increases, as described below, an increase amount of the transmission rate of the user packets is limited at a certain value or less when an appropriate setting value K is set, and an increase amount of the consumption current may be suppressed so that the voltage dip does not exceed the permissible value. 
         [0068]    The setting value K is determined, for example, when a range of the slew rate in which the voltage dip becomes the permissible value or less is measured based on the permissible value of the voltage dip, which has been defined as a recommended operation condition of each of the FPGAs  10   a  to  10   c , and a transmission rate range corresponding to such a range is identified. In this example, on the premise that the FPGAs  10   a  to  10   c  are manufactured in accordance with the process rule of 20 (nm), it is assumed that the permissible value of the voltage dip is 28 (mV), and the slew rate range in which the voltage dip becomes 28 (mV) or less is 4 (A/μs) or less. 
         [0069]    The transmission rate range in which the slew rate becomes 4 (A/μs) or less is identified when a change in the slew rate of the consumption current for the increase amount of the transmission rate is measured. At this time, the slew rate is measured from the change in the consumption current of each of the FPGAs  10   a  to  10   c  when the transmission rate of the input path Ra and the transmission rate of the output path Rb are increased at the same time. 
         [0070]      FIG. 7  is a diagram illustrating a change in the consumption current of each of the FPGAs  10   a  to  10   c  when the transmission rate of the input path Ra and the transmission rate of the output path Rb are increased at the same time. In  FIG. 7 , the horizontal axis indicates an elapsed time (μs) from the start of input of user packets to the FPGAs  10   a  to  10   c  in both of the directions of the input path Ra and the output path Rb at the same time. The vertical axis indicates a change in the consumption current of each of the FPGAs  10   a  to  10   c.    
         [0071]    A time period Ta indicates a time period (delay time) taken when the user packets pass through the FPGAs  10   a  to  10   c  along the input path Ra. A time period Tb indicates a time taken when the user packets pass through the FPGAs  10   a  to  10   c  along the output path Rb. A time period Tc indicates a time after the time period Tb has elapsed, during the time period Ta. In addition, “SRa” indicates the slew rate in the time period Ta. In addition, “SRb” indicates the slew rate in the time period Tc. 
         [0000]      SR a =( Ia−Ib )/ Tc =( Ia−Ib )/( Ta−Tb )  (1)
 
         [0000]      SR b=Ib/Tb   (2)
 
         [0072]    When it is assumed that the consumption current after the time period Ta has elapsed is “Ia”, and the consumption current after the time period Tb has elapsed is “Ib”, the slew rate SRa of the time period Tc is calculated by the above-described formula (1). In addition, the slew rate SRb of the time period Tb is calculated by the above-described formula (2). In the time period Tb, user packets are transmitted in both of the directions of the input path Ra and the output path Rb. In the time period Tc, user packets are transmitted merely in the direction of the input path Ra. Therefore, the slew rate SRb of the time period Tb is larger than the slew rate SRa of the time period Tc. 
         [0073]    Thus, the transmission rate range in which the slew rate becomes 4 (A/μs) or less is identified when a change in the slew rate SRb of the consumption current for an increase amount of the transmission rate is measured. The time period T illustrated in  FIGS. 2 and 6  matches the above-described time period Tb. 
         [0074]      FIG. 8  is a diagram illustrating an example of a relationship between a slew rate SRb and a variation of the transmission rate of user packets. In  FIG. 8 , the horizontal axis indicates a variation (%) of the transmission rate of the input path Ra and the output path Rb when it is assumed that the full rate is 100(%). The vertical axis indicates the slew rate (A/μs) of the consumption current of each of the FPGAs  10   a  to  10   c.    
         [0075]    That is,  FIG. 8  illustrates the slew rate SRb for an increase portion of the transmission rate. For example, when the transmission rate increases by 20(%) of the full rate, the slew rate SRb becomes 1.99 (A/μs). When the transmission rate increases by 100(%) of the full rate, that is, when the state in which transmission of user packets is not performed transitions to the state in which transmission of user packets is performed at the full rate, as illustrated in the example of  FIG. 6 , the slew rate SRb becomes 9.95 (A/μs). 
         [0076]    Based on the measurement result illustrated in  FIG. 8 , the transmission rate range L in which the slew rate SRb becomes 4 (A/μs) or less is determined to be 0 to 40(%). Thus, the setting value K is determined to be 60(%) that has been obtained by subtracting 40(%) that is the maximum value of the range L from the full rate (100(%)). 
         [0077]    When the setting value K that has been determined as described above is set to the memory  28 , an increase amount of the transmission rate of the user packets may be limited to a certain value or less. The setting value K in the memory  28  may be changed, for example, through an external device such as a network management device. 
         [0078]      FIG. 9  is a diagram illustrating an example of a change for a total time of the transmission rate of user packets and the transmission rate of current adjustment packets. In  FIG. 9 , the horizontal axis indicates a time (μs). The vertical axis indicates a total of the transmission rate of the user packets and the transmission rate of the current adjustment packets (see the polyline). In  FIG. 9 , a breakdown of the transmission rate of the user packets and the transmission rate of the current adjustment packets in the unit of time (t 1  to t 17 ) is indicated by different hatching areas. 
         [0079]    In this example, it is assumed that the setting value K is set at 60(%). Therefore, the rate control unit  23  illustrated in  FIG. 2  controls the packet generation unit  24  so that the total of the transmission rate of the user packets and the transmission rate of the current adjustment packets becomes 60(%). 
         [0080]    For example, at times t 1 , t 2 , t 5 , and t 16 , the transmission rate of the user packet is 20(%). Therefore, the rate control unit  23  controls the packet generation unit  24  so that the transmission rate of the current adjustment packets becomes 40(%) (=60−20), based on the measurement value 20(%) of the rate measurement unit  21 . 
         [0081]    At times t 3 , t 4 , t 6 , t 7 , t 9 , t 11 , t 12 , t 14 , t 15 , and t 17 , the transmission rate of the user packets is 0(%). Therefore, the rate control unit  23  controls the packet generation unit  24  so that the transmission rate of the current adjustment packets becomes 60(%) (=60−0), based on the measurement value 0(%) of the rate measurement unit  21 . 
         [0082]    As described above, the rate control unit  23  maintains the total of the transmission rate of the user packets and the transmission rate of the current adjustment packets at 60(%). Therefore, at times t 8 , t 10 , and t 13 , even when the transmission rate of the user packets increases, the maximum value of the increase amount is limited to 40(%) (=100−60). 
         [0083]    Thus, a fluctuation in the power source voltage is reduced effectively because the slew rate of the consumption current is reduced so that the voltage dip does not exceed the permissible value. As a result, in addition to the voltage dip P 1  of  FIG. 3 , the voltage increase P 2  is also reduced. 
         [0084]    When the transmission rate that has been measured by the rate measurement unit  21  is a certain value or more, the rate control unit  23  controls the packet generation unit  24  so that generation of current adjustment packets is suspended. More specifically, at the times t 8 , t 10 , and t 13 , the measurement value of the rate measurement unit  21  is 100(%) that exceeds the setting value K (=60(%)). Therefore, the rate control unit  23  instructs the packet generation unit  24  to suspend the generation of a current adjustment packet. As a result, for example, it is avoided that a user packet is discarded by the multiplexer  27  due to excess of the transmission rate. 
         [0085]    As described above, a current adjustment packet is discarded by the discard unit  3  of  FIG. 1 . Therefore, it is avoided that a current adjustment packet is transmitted to another device through the communication line. 
         [0086]      FIG. 10  is a configuration diagram illustrating an example of the discard unit  3 . The discard unit  3  includes a header determination unit  30  and a mask processing unit  31 . 
         [0087]    The header determination unit  30  determines contents of the in-device headers of a user packet and a current adjustment packet. More specifically, the header determination unit  30  detects the user packet and the current adjustment packet, based on packet IDs of the in-device headers. When the current adjustment packet has been detected, the header determination unit  30  notifies the mask processing unit  31  of the information indicating that the current adjustment packet has been detected. 
         [0088]    The mask processing unit  31  executes mask processing of the current adjustment packet, in accordance with the notification from the header determination unit  30 . As a result, the current adjustment packet is discarded so as not to be output from the mask processing unit  31  to the subsequent stage. 
         [0089]    In the embodiment, the insertion unit  2  is provided in each of the FPGA  10   a  through which the input path Ra passes first and the FPGA  10   c  through which the output path Rb passes first. The discard unit  3  is provided in each of the FPGA  10   c  through which the input path Ra eventually passes and the FPGA  10   a  through which the output path Rb passes last. 
         [0090]    Thus, the slew rate of the consumption current may be reduced over all of the FPGAs  10   a  to  10   c  through which the input path Ra and the output path Rb pass. The embodiment is not limited to such installation examples of the insertion unit  2  and the discard unit  3 . 
         [0091]      FIG. 11  is a configuration diagram illustrating another example of the layer  2  switch. In  FIG. 11 , the same symbol is assigned to a common configuration with  FIG. 1 , and the description is omitted herein. 
         [0092]    In a line INF unit  1 , FPGAs  10   d  to  10   f  and a power source  11  that supplies electric power to the FPGAs  10   d  to  10   f  are provided. A user packet that has been received from another device to the line INF unit  1  is transmitted along an input path Ra that passes through the FPGAs  10   d  to  10   f  in such order and is output to a switch unit  4 . A user packet input from the switch unit  4  to the line INF unit  1  is transmitted along an output path Rb that passes through FPGAs  10   f ,  10   e , and  10   d  in such order. 
         [0093]    In each of the FPGAs  10   d  to  10   f , an insertion unit  2  and a discard unit  3  are provided along each of the input path Ra and the output path Rb. Therefore, for example, even when the transmission rate is different for each of the FPGAs  10   d  to  10   f  due to discard processing, duplication processing, and the like, of the user packet, the slew rate of the consumption current may be reduced appropriately based on the setting value K for each of the FPGAs  10   d  to  10   f.    
         [0094]      FIG. 12  is a configuration diagram illustrating another example of the layer  2  switch. In  FIG. 12 , the same symbol is assigned to a common configuration with  FIG. 1 , and the description is omitted herein. 
         [0095]    In a line INF unit  1 , FPGAs  10   g  to  10   i  and a power source  11  that supplies electric power to the FPGAs  10   g  to  10   i  are provided. A user packet that has been received from another device to the line INF unit  1  is transmitted along an input path Ra that passes through the FPGAs  10   g  to  10   i  in such order and is output to a switch unit  4 . A user packet that has been input from the switch unit  4  to the line INF unit  1  is transmitted along an output path Rb that passes through the FPGAs  10   i ,  10   h , and  10   g  in such order. 
         [0096]    In the FPGA  10   g  corresponding to one end of each of the input path Ra and the output path Rb, an insertion unit  2  and a discard unit  3  are provided. More specifically, in the FPGA  10   g , the insertion unit  2  is provided on the input path Ra. In addition, the discard unit  3  is provided on the output path Rb. 
         [0097]    In the FPGA  10   i  corresponding to the other end of each of the input path Ra and the output path Rb, a loopback unit  12  that loops back a current adjustment packet from the input path Ra to the output path Rb. The loopback unit  12  detects a current adjustment packet on the input path Ra using a packet ID of the in-device header, and outputs the current adjustment packet to the output path Rb. 
         [0098]    Therefore, after the current adjustment packet has been inserted into the input path Ra at the FPGA  10   g , the current adjustment packet is input to the FPGA  10   i  through the FPGA  10   h . In addition, the current adjustment packet is input to the FPGA  10   g  through the FPGA  10   h  again and discarded. 
         [0099]    In this example, the insertion unit  2  and the discard unit  3  are provided merely in the FPGA  10   g . Therefore, as compared with the embodiment of  FIG. 1 , the circuit scale is reduced. The loopback unit  12  may be provided in the switch unit  4 . 
         [0100]      FIG. 13  is a configuration diagram illustrating another example of the layer  2  switch. In  FIG. 13 , the same symbol is assigned to a common configuration with  FIG. 12 , and the description is omitted herein. 
         [0101]    In a line INF unit  1 , FPGAs  10   g ,  10   h , and  10   j  and a power source  11  that supplies electric power to the FPGAs  10   g ,  10   h , and  10   j . A user packet that has been received from another device to the line INF unit  1  is transmitted along an input path Ra that passes through the FPGAs  10   g ,  10   h , and  10   j  in such order and is output to a switch unit  4 . A user packet that has been input from the switch unit  4  to the line INF unit  1  is transmitted along an output path Rb that passes through the FPGAs  10   j ,  10   h , and  10   g  in such order. 
         [0102]    In the switch unit  4 , a loopback unit  40  that loops back a current adjustment packet from the input path Ra to the output path Rb is provided. Therefore, after the current adjustment packet has been inserted into the input path Ra at the FPGA  10   g , the current adjustment packet is input to the switch unit  4  through the FPGAs  10   h  and  10   j . In addition, the current adjustment packet is input to the FPGA  10   g  through the FPGAs  10   h  and  10   j  again and discarded. Thus, even in this example, the circuit scale may be reduced similar to the example of  FIG. 12 . 
         [0103]    A traffic control method executed by the above-described layer  2  switches is described below. 
         [0104]      FIG. 14  is a flowchart illustrating an example of the traffic control method. The traffic control method is executed, for example, at certain intervals. 
         [0105]    The rate measurement unit  21  measures a transmission rate RT of user packets (St 1 ). Next, the rate control unit  23  compares the transmission rate RT with the setting value K that has been read from the memory  28  (St 2 ). 
         [0106]    When “RT≧K” is satisfied (Yes in St 2 ), the rate control unit  23  controls the packet generation unit  24  so as to suspend generation of a current adjustment packet (St 9 ). That is, the packet generation unit  24  suspends the generation of a current adjustment packet when the transmission rate RT that has been measured by the rate measurement unit  21  is the setting value K or more. 
         [0107]    When “RT&lt;K” is satisfied (No in St 2 ), the rate control unit  23  calculates a transmission rate RT′ of current adjustment packets (St 3 ). The transmission rate RT′ of the current adjustment packets is calculated by subtracting the transmission rate RT of the user packets from the setting value K. 
         [0108]    Next, the rate control unit  23  sets the transmission rate RT′ of the current adjustment packets to the packet generation unit  24  (St 4 ). Next, the packet generation unit  24  generates a current adjustment packet in accordance with the transmission rate RT′ of the current adjustment packets (St 5 ). 
         [0109]    As described above, the rate control unit  23  controls generation of a current adjustment packet so that a total of the transmission rate RT that has been measured by the rate measurement unit  21  and the transmission rate RT′ of the current adjustment packets becomes the certain setting value K. 
         [0110]    Next, the multiplexer  27  outputs the current adjustment packet to a path common with the user packet, that is, the input path Ra or the output path Rb (St 6 ). As a result, the current adjustment packet is transmitted through the input path Ra or the output path Rb with the user packet. 
         [0111]    Next, the header determination unit  30  detects the current adjustment packet on the input path Ra or the output path Rb using the packet ID of the in-device header (St 7 ). Next, the mask processing unit  31  discards the current adjustment packet by mask processing (St 8 ). As described above, the traffic control method is executed. 
         [0112]    In the traffic control method in the example, as described above, a fluctuation in the power source voltage is reduced effectively because the slew rate of the consumption current is reduced so that the voltage dip does not exceed the permissible value. 
         [0113]    All examples and conditional language recited herein are intended for pedagogical purposes to aid the reader in understanding the invention and the concepts contributed by the inventor to furthering the art, and are to be construed as being without limitation to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.