Managing idle mode of operation in network switches

Embodiments include a method for operating a network switch that is coupled to a plurality of devices, the method comprising: determining whether the network switch has, for at least a threshold period of time, (i) not received any data packets from the plurality of devices and (ii) not transmitted any data packets to the plurality of devices; in response to determining that the network switch has, for at least the threshold period of time, (i) not received any data packets from the plurality of devices and (ii) not transmitted any data packets to the plurality of devices, entering, by the network switch, a first mode of operation; while the network switch operates in the first mode of operation, monitoring a plurality of signals; and in response to detecting a change in one of the plurality of signals, exiting, by the network switch, the first mode of operation.

TECHNICAL FIELD

Embodiments of the present disclosure relate to network switches, and in particular to managing an idle mode of operation in network switches.

BACKGROUND

A network switch (e.g., an Ethernet switch) is a computer networking device that is used to connect a plurality of devices together on a computer network, e.g., by performing a form of packet switching. Network switches have become increasingly popular in routing or switching packets in a network.

Network switches are usually powered by the main AC (alternating current) power. Given the huge number of network switches being employed in today's technology driven world, it may be beneficial in the long run to decrease power consumption of network switches.

SUMMARY

In various embodiments, the present disclosure provides a method for operating a network switch that is coupled to a plurality of devices, the method comprising: determining whether the network switch has, for at least a threshold period of time, (i) not received any data packets from the plurality of devices and (ii) not transmitted any data packets to the plurality of devices; in response to determining that the network switch has, for at least the threshold period of time, (i) not received any data packets from the plurality of devices and (ii) not transmitted any data packets to the plurality of devices, entering, by the network switch, a first mode of operation; while the network switch operates in the first mode of operation, monitoring, by the network switch, a plurality of signals; and in response to detecting a change in one of the plurality of signals, exiting, by the network switch, the first mode of operation.

In various embodiments, the present disclosure also provides a network switch coupled to a plurality of devices, the network switch comprising: a monitoring module configured to determine whether the network switch has, for at least a threshold period of time, (i) not received any data packets from the plurality of devices and (ii) not transmitted any data packets to the plurality of devices; a power management module, wherein in response to the monitoring module determining that the network switch has, for at least the threshold period of time, (i) not received any data packets from the plurality of devices and (ii) not transmitted any data packets to the plurality of devices, the power management module is configured to facilitate the network switch to enter a first mode of operation, wherein while the network switch operates in the first mode of operation, the monitoring module is further configured to monitor a plurality of signals, and in response to the monitoring module detecting a change in one of the plurality of signals, the network switch is configured to exit the first mode of operation.

DETAILED DESCRIPTION

Architecture of an Example Network Switch

FIG. 1schematically illustrates a network switch100coupled to a plurality of devices102a, . . . ,102f. Although the network switch (henceforth referred to as “switch”)100is illustrated to be coupled to six devices, the network switch100may be coupled to any number of devices.

In an example, the switch100is an Ethernet switch (e.g., a Gigabit Ethernet switch). In an example, individual ones of the devices102a, . . . ,102fcomprises a network connected device, a physical layer device, a link layer device, a router, a central processing unit (CPU), and/or any appropriate device that may be coupled to a network switch. In an example, the device102fcomprises a CPU or a computing device for configuring the switch100and/or managing various operations of the switch100.

In an embodiment, the switch100comprises a switching module108. In operation, the switch100receives streams of data packets (henceforth referred to as “packets”) from one or more of the devices102a, . . . ,102f, and forwards each packet to an appropriate destination (e.g., forwards each packet to a corresponding one of the devices102a, . . . ,102f). Thus, the switching module108performs switching or routing of the packets among the devices102a, . . . ,102f.

In an embodiment, the switch100is powered by power from a power source140. In an example, the power source140is AC mains power. Although not illustrated inFIG. 1, the switch100, for example, has an internal backup power (e.g., battery operated power), and/or receives backup power from a secondary power source, e.g., in case the power source140fails. The switch100further comprises a clock module116to generate one or more clock signals, for use by various components of the switch100.

In an embodiment, the switch100comprises a power management module112configured to manage power supplied to various components of the switch100. In general, packets may arrive from one or more devices102to the switch100continuously, or intermittently. For example, there may be brief (or long) intermittent periods during which no packets are being received by the switch100. As will be discussed in more detail herein later, the power management module112facilitates the switch100to enter a low power mode or idle mode while no packets are being processed (e.g., received, switched, and/or transmitted) by the switch100, thereby decreasing an amount of power consumed by the switch100. As the switch100has a relatively high switching speed, the power management module112also facilitates the switch100from exiting the low power mode with no or minimal latency, when packets arrive at the switch100for switching (e.g., thereby ensuring that no packets being received from one of the devices102are dropped by the switch100).

In an embodiment, the switch100comprises an address translation table (ATT) module120. The ATT module120is configured to, for example, maintain and map addresses of various devices102connected to the switch100. When a packet arrives at the switch100, an appropriate destination of the packet is determined based on, for example, information included in the packet and information included in the ATT module120. The ATT module120, for example, comprises a table that is stored in a memory (not illustrated inFIG. 1) of the switch100.

In an embodiment, contents of the ATT module120need to be dynamically updated or refreshed. For example, an entry in the ATT module120ages out after being included in the ATT module120for a predetermined time period. For example, after the entry is entered in the ATT module120for the pre-determined time period (e.g., 5 minutes), the entry ages out. At the end of the pre-determined time period, the entry gets deleted from the ATT module120, or is refreshed (e.g., it is determined that the entry is to be stored for another 5 minutes). That is, at regular intervals, a determination is made as to whether to keep the entry in the ATT module120, or delete the entry from the ATT module120. In an embodiment, an address translation table timer (ATT timer)124keeps track of time, i.e., keeps track of when individual entries of the ATT module120ages out (i.e., keeps track of when individual entries of the ATT module120are to be deleted or refreshed).

In an example, the switch100transmits a stream of packets to one of the devices102, e.g., the device102a. The device102amay not be capable or fast enough to process, in real time, all the packets received from the switch100(e.g., because of a receive buffer of the device102a, for buffering packets received from the switch100, having limited storage space, and/or the device102ahaving slower processing speed). Accordingly, in an example, the device102amay request the switch100to halt or temporarily pause transmission of packets for some time period. During such a time period, packets destined for the device102aare stored in a transmit buffer (not illustrated inFIG. 1) of the switch100. At an end of the time period (e.g., once the device102aprocesses at least some of the packets it previously received from the switch100), the switch100resumes transmission of packets to the device102a. In an embodiment, the switch100comprises a pause timer128configured to keep track of a time period for which transmission of packets to the device102a(or to any other device102) is to be paused or halted.

In an embodiment, the switch100comprises a monitoring module132configured to monitor various activities of the switch100. The monitoring module132, for example, monitors various activities of the switch100, selectively instructs the power management module112to enable the switch100to enter a low power or idle mode, and selectively instructs the power management module112to enable the switch100to exit the low power or idle mode, as will be discussed in more detail herein later.

Although the switch100generally includes several other components (e.g., a processor, a memory, various input/output ports, interfaces, etc.), these components are generally known and thus not discussed herein for purposes of simplicity and clarity.

FIG. 1illustrates example signals communicated between the device102aand the switch100. In an embodiment, the device102aselectively transmits a receive data valid (Rxdv) signal160a, and a receive data (Rxd) signal162ato the switch100; and the device102aselectively receives a transmit enable (TxEn) signal164a, and a transmit data (Txd) signal166afrom the switch100. Transmission of similar signals (e.g., Rxdv signal160b, Rxd signal162b, TxEn signal164b, and Txd signal166b) between the device102band the switch100is also illustrated inFIG. 1. Although the switch100also communicates similar signals with one or more of the devices102c, . . . ,102f, such signals are not illustrated inFIG. 1for purposes of illustrative clarity.

In an embodiment, when the device102adesires to transmit packets to the switch100(e.g., so that the switch100can switch the packets to one or more of the other devices), the device102aprovides an indication of transmission of the packets via the Rxdv signal160a. For example, a toggling of the Rxdv signal160a(e.g., a change of state of the Rxdv signal160afrom low to high) indicates that packets are now to be transmitted from the device102ato the switch100. The actual packets are transmitted from the device102ato the switch100via the Rxd signal162a. Subsequent to an end of transmission of the packets from the device102ato the switch100, the Rxdv signal160atoggles back from (e.g., a change of state of the Rxdv signal160afrom high to low).

In an embodiment, when the switch100desires to transmit packets to the device102a, the switch100provides an indication of transmission of the packets via the TxEn signal164a. For example, a toggling of the TxEn signal164a(e.g., a change of state of the TxEn signal164afrom low to high) indicates that packets are now to be transmitted from the switch100to the device102a. The actual packets are transmitted from the switch100to the device102avia the Txd signal166a. Subsequent to an end of transmission of the packets from the switch100to the device102a, the TxEn signal164atoggles back from (e.g., a change of state from high to low).

As previously discussed, in an example, the device102fcomprises a computing device (e.g., a CPU) configured to manage various operations of the switch100. In an embodiment, in addition to communicating the corresponding Rxdv signal, the Rxd signal, the TxEn signal, and the Txd signal, the device102falso selectively transmits management signal170fto the switch100. The management signal170f, for example, is to manage various operations and/or configurations of the switch100. For example, a user can configure the switch100, via the device102f, using the management signal170f. In an example, the management signal170fcomprises Management Data Input/Output (MDIO) signal and/or Management Data (MD) clock signal.

In an embodiment, one or more devices102ofFIG. 1may adhere to the Institute of Electrical and Electronics Engineers (IEEE) 802.3az standard. These devices are, for example, Energy-Efficient Ethernet (EEE) compliant devices (henceforth referred to as “EEE devices”), adhering to the IEEE 802.3az standard, thereby allowing for less power consumption during periods of low data activity. In the example ofFIG. 1, the device102bis an EEE device. In an embodiment, the device102bcommunicates with another EEE compliant device180.

In an embodiment, pursuant to the IEEE 802.3az standard, the EEE device102bnegotiates with the EEE device180to enter in a low power mode. For example, while the EEE devices102band180are idle (e.g., not processing data packets), the device102band the EEE device180negotiate, pursuant to the IEEE 802.3az standard, and enter the low power mode. While the device102band the EEE device180enter the low power mode, in accordance with the IEEE 802.3az standard, the device102btransmits an EEE enable signal170bto the switch100. For example, a change of state of the EEE enable signal170bindicates, to the switch100, that the device102b(and also the EEE device180) has entered a low power mode, in accordance with the IEEE 802.3az standard.

As previously discussed, each of the devices102a, . . . ,102fcommunicates corresponding Rxdv signal, Rxd signal, TxEn signal, and Txd signal with the switch100. In addition, the device102b, being an EEE device, transmits the EEE enable signal170bto the switch100, and receives a low-power-idle (LPI) indication signal172bfrom the switch100. The switch100transmits the LPI indication signal172b, to indicate or inform the device102bthat the switch100has entered the idle mode. In an embodiment, the device102butilizes the LPI indication signal172bfrom the switch100, to negotiate and enter the low power mode, in accordance with the IEEE 802.3az standard.

AlthoughFIG. 1illustrates the device102band EEE device180to be EEE devices, any other device (for example, one or more of devices102a,102c, . . . ,102f) illustrated inFIG. 1can also be an EEE device, adhering to the IEEE 802.3az standard. In an embodiment, the switch100communicates a corresponding EEE enable signal and a corresponding LPI indication signal to each EEE device coupled to the switch100.

Entering an Idle Mode

In an embodiment, the switch100enters a low power or idle mode, for example, when the switch100is not receiving from, processing and/or transmitting data packets to the devices102a, . . . ,102f. In an example, the power management module112facilitates such entrance to the idle mode. In the idle mode, one or more components (but not all) of the switch100are powered down (e.g., shut off), thereby resulting in a low power consumption of the switch100.

In an embodiment, the switch100can enter the idle mode after the switch100has been fully initialized and operational (e.g., after the switch has been switched on from an off state); a physical layer (PHY) polling unit initialization phase has been completed; and various transmit queues of the switch100(e.g., queues that queue packets for transmission from the switch100to one or more devices102) are empty (e.g., the TxEn signals transmitted by the switch100to various devices are not asserted, indicating that no packets are being transmitted by the switch100to the devices102).

In an embodiment, the switch100can enter the idle mode when the switch100is not receiving any new packets from any of the devices102; and an ingress pipeline (e.g., configured to store and process various incoming packets to the switch100) has processed all incoming packets. For example, whenever new packets arrive from a device102(e.g., device102a), the corresponding Rxdv signal (e.g., Rxdv signal160a) indicates arrival of such data packets. In an embodiment, the switch100can enter the idle mode when the Rxdv signals received from the devices102a, . . . ,102findicates non-transmission of data packets from these devices102.

As previously discussed, one or more of the devices102(e.g., device102b) coupled to the switch100may be an EEE device. If the switch100is coupled to an EEE device, the switch100can enter the idle mode when the corresponding EEE device also enters a low power mode (e.g., in accordance with the IEEE 802.3az standard). For example, the switch100monitors the EEE enable signal170b. Based on monitoring the EEE enable signal170b, once the switch determines that the device102bhas entered the low power mode, the switch100can enter the idle mode.

As previously discussed, the device102fperiodically transmits management signal170f. In an embodiment, the switch100can enter the idle mode when the device102fis not transmitting any management and/or configuration information via the management signal170f.

In an embodiment, individual components of the switch100have a corresponding flag that indicates whether the corresponding component is busy (e.g., performing an operation). For example, a virtual address translation table (not illustrated inFIG. 1) included the switch100has a corresponding flag that indicates when the virtual address translation table is busy (e.g., when the virtual address translation table is being updated, or is otherwise used to access information stored in the virtual address translation table). The ATT module120similarly has a corresponding flag that indicates whether the ATT module120is busy. In another example, a management information base (MIB) module (not illustrated inFIG. 1) included in the switch100has a corresponding flag that indicates when the MIB module is busy. In another example, an ingress rate limiting (IRL) module (not illustrated inFIG. 1) included in the switch100has a corresponding flag that indicates when the IRL module is busy. In another example, one or more interfaces (not illustrated inFIG. 1) included in the switch100has corresponding flags that indicates when the interface is busy. In an embodiment, the switch100can enter the idle mode if the flags associated with various components of the switch100indicate that these components are not busy (e.g., not performing a corresponding operation).

Thus, as discussed, in an embodiment, the switch100enters a low power or idle mode, for example, (i) after the switch100has been fully initialized and operational (e.g., after the switch has been switched on from an off state); (ii) a physical layer (PHY) polling unit initialization phase has been completed; (iii) various transmit queues of the switch100(e.g., queues that queue packets for transmission from the switch100to one or more devices102) are empty; (iv) when the switch100is not receiving any new packets from any of the devices102; (v) an ingress pipeline has processed all incoming packets (and/or an egress pipeline has completed sending out packets queued in the egress pipeline); (vi) when the switch100is not receiving any management and/or configuration information via the management signal170f; (vii) if the flags associated with various components of the switch100indicate that these components are not busy; (viii) any EEE device coupled to the switch100has entered a low power mode (e.g., in accordance with the IEEE 802.3az standard), as indicated by a corresponding EEE enable signal received by the switch100from the corresponding EEE device, and/or various other conditions are fulfilled. In an embodiment, if one or more (e.g., all) of these conditions are fulfilled for at least a threshold period of time, the switch100enters the idle mode.

Operating in the Idle Mode and Exiting the Idle Mode

While the switch100is in the idle mode, various components of the switch100are turned off, or are operated in a low power mode, while various other components of the switch100are not powered down. For example, the clock module116generates one or more clock signals. In an embodiment, while the switch100is in the idle mode, the clock module116stops generating a first one or more clock signals, but continues generating a second one or more clock signals in order to continue operating various essential components of the switch100. Thus, in such an embodiment, a part of the clock module116is powered down. For example, while the switch100operates in the idle mode, the clock module116stops generating a system clock signal, a memory clock signal (e.g., which is supplied to a memory of the switch100), one or more clock signals supplied to one or more interfaces of the switch100, and/or the like.

In an embodiment, while the switch100is operating in the idle mode, the monitoring module132monitors the Rxdv signals (e.g., Rxdv signal160a) received from various devices102(e.g., device102a). The monitoring module132monitors the Rxdv signals to determine if a device102is to transmit packets to the switch100. Based on monitoring the Rxdv signals, if the monitoring module132determines that a device102is transmitting packets to the switch100, the switch100exits the idle mode, and enters the regular power mode. In an embodiment, while the switch100is operating in the idle mode, the clock module116continues generating one or more clock signals used by the monitoring module132to monitor the Rxdv signals from the devices102a, . . . ,102f.

In an embodiment, for the EEE device102b, instead of monitoring the Rxdv signal160b, the switch100(e.g., the monitoring module132) monitors the EEE enable signal170b. For example, when the device102bis not transmitting any packet to the switch100(and also receiving any packet from the switch100), the device102bmay negotiate with the EEE device180to enter a low power mode (e.g., in accordance with the IEEE 802.3az standard). The device102bindicates such entrance of the low power mode via the EEE enable signal170b. Whenever the device102bis to transmit a packet to the switch100, the device102bhas to exit the low power mode. Such an exit from the low power mode will be indicated by the EEE enable signal170b. Accordingly, in an embodiment, while the switch100operates in the idle mode, instead of (or in addition to) monitoring the Rxdv signal160b, the switch100monitors the EEE enable signal170bto determine when the device102bsends a packet to the switch100. In response to monitoring the EEE enable signal170band in response to the EEE enable signal170bindicating that the device102bhas exited the low power mode, the switch100also exits the idle mode, anticipating arrival of packets from the device102b. In an embodiment, while the switch100is operating in the idle mode, the clock module116continues generating one or more clock signals used by the monitoring module132to monitor EEE enable signals from one or more EEE devices (e.g., from EEE device102b).

As previously discussed, the ATT timer124keeps track of time, i.e., keeps track of when individual entries of the ATT module120ages out (i.e., keeps track of when individual entries of the ATT module120are to be deleted or refreshed). In an embodiment, while the switch100is operating in the idle mode, the ATT module120enters a low power mode (e.g., does not consume any power, or is powered down). In an embodiment, while the switch100is operating in the idle mode, the ATT timer124is operational (e.g., continues keeping track of time, and keeping track of when individual entries of the ATT module120are to be deleted or refreshed). For example, while the switch100is operating in the idle mode, the clock module116continues generating a clock signal used by the ATT timer124, to keep track of time.

In an embodiment, when an entry of the ATT module120is to be deleted (e.g., while the switch100is operating in the idle mode), the switch120briefly exits from the idle mode (e.g., enters the regular power mode) to update the ATT table (e.g., delete the entry from the ATT table in the ATT module120), and re-enters the idle mode upon updating the ATT table in the ATT module120.

As previously discussed, the switch100also receives management signals from one or more connected devices102. In the example ofFIG. 1, the switch100receives the management signal170ffrom device102f. The management signal170f, for example, facilitates management of various operations and/or configurations of the switch100. For example, a user can configure the switch100, via the device102f, using the management signal170f. In an example, the management signal170fcomprises Management Data Input/Output (MDIO) signal and/or Management Data (MD) clock signal. In an embodiment, while the switch100is in the idle mode, the switch100(e.g., the monitoring module132) continues monitoring the management signal170f. In response to the device102ftransmitting information via the management signal170fto the switch100, the switch100exits the idle mode, and enters the regular power mode (e.g., to respond to, and appropriately process, the information included in the management signal170f). In an embodiment, while the switch100is operating in the idle mode, the clock module116continues generating one or more clock signals used by the monitoring module132to monitor the management signal1701.

As previously discussed, in an embodiment, the switch100comprises the pause timer128configured to keep track of a time period for which transmission to a connected device102(e.g., device102a) is to be paused or halted. In an embodiment, while the switch100operates in the idle mode, the pause timer128continues to operate, and continues to keep track of the time period for which transmission to the connected device102is to be paused or halted. In response to an expiration of the time in the pause timer128, the switch100exits the idle mode, and transmits the packets to the connected device102. In an embodiment, while the switch100is operating in the idle mode, the clock module116continues generating one or more clock signals used by the pause timer128.

In an embodiment, the switch100periodically performs a polling of the devices102(e.g., devices102a, . . . ,102f) that are connected to the switch100. While polling a device102, the switch100, for example, checks various parameters associated with the corresponding device. For example, the switch100polls a device102to determine a speed with which the device102communicates with the switch100, a type of link connecting the device102and the switch100, and/or the like. In another example, while polling the devices102, the switch100can also discover any device102that is newly connected to the switch100(or discover that a device102, which was previously connected to the switch100, is newly disconnected from the switch100). In an embodiment, the switch100periodically polls the connected devices102, even while the switch100is in the idle mode. In an embodiment, while the switch100is in the idle mode and if the switch100determines any change in one or more devices102(e.g., determines that a speed of a device has changed, a new device is now connected to the switch100, and/or the like) based on polling the devices102, the switch100exist the idle mode, and enters the regular power mode (e.g., in order to process the information associated with the change in the devices102).

FIG. 2is a flow diagram of a method200to operate a network switch (e.g., the switch100ofFIG. 1). At204, the network switch (e.g., the monitoring module132ofFIG. 1) determines that the network switch has, for at least a threshold period of time, (i) not received any data packets from a plurality of devices (e.g., devices102a, . . . ,102f) connected to the network switch and (ii) not transmitted any data packets to the plurality of devices. At208, in response to determining that the network switch has, for at least the threshold period of time, (i) not received any data packets from the plurality of devices and (ii) not transmitted any data packets to the plurality of devices, the network switch enters an idle mode of operation.

At212, while the network switch operates in the idle mode of operation, the network switch (e.g., the monitoring module132) monitors a plurality of signals. In an embodiment, the plurality of signals comprises (i) a first subset of the plurality of signals (e.g., the Rxdv signals, the EEE enable signals, the management signal170f, and/or the like) that are generated by one or more of the plurality of devices, and (ii) a second subset of the plurality of signals (e.g., signals generated by the ATT timer124, pause timer128, and/or the like) that are generated internally by the network switch. At216, in response to detecting a change in one of the plurality of signals, the network switch exits the idle mode of operation.

The description may use the phrases “in an embodiment,” or “in embodiments,” which may each refer to one or more of the same or different embodiments. The phrase “in some embodiments” is used repeatedly. The phrase generally does not refer to the same embodiments; however, it may. The terms “comprising,” “having,” and “including” are synonymous, unless the context dictates otherwise. The phrase “A and/or B” means (A), (B), or (A and B). The phrase “A/B” means (A), (B), or (A and B), similar to the phrase “A and/or B.” The phrase “at least one of A, B and C” means (A), (B), (C), (A and B), (A and C), (B and C) or (A, B and C). The phrase “(A) B” means (B) or (A and B), that is, A is optional.

Although certain embodiments have been illustrated and described herein, a wide variety of alternate and/or equivalent embodiments or implementations calculated to achieve the same purposes may be substituted for the embodiments illustrated and described without departing from the scope of the present invention. This application is intended to cover any adaptations or variations of the embodiments discussed herein. Therefore, it is manifestly intended that embodiments in accordance with the present invention be limited only by the claims and the equivalents thereof.