Networks enable computers and other devices to communicate. For example, networks can carry data representing video, audio, e-mail, and so forth. Typically, data sent across a network is divided into smaller messages known as packets. By analogy, a packet is much like an envelope you drop in a mailbox. A packet typically includes “payload” and a “header”. The packet's “payload” is analogous to the letter inside the envelope. The packet's “header” is much like the information written on the envelope itself. The header can include information to help network devices handle the packet appropriately. For example, the header can include an address that identifies the packet's destination.
A given packet may “hop” across many different intermediate network devices (e.g., “routers”, “bridges” and/or “switches”) before reaching its destination. These intermediate devices often perform a variety of packet processing operations. For example, intermediate devices often perform packet classification to determine how to forward a packet further toward its destination or to determine the quality of service to provide.
These intermediate devices are carefully designed to keep apace the increasing deluge of traffic traveling across networks. Some architectures implement packet processing using “hard-wired” logic such as Application Specific Integrated Circuits (ASICs). While ASICs can operate at high speeds, changing ASIC operation, for example, to adapt to a change in a network protocol can prove difficult.
Other architectures use programmable devices known as network processors. Network processors enable software programmers to quickly reprogram network processor operations. Some network processors feature multiple processing engines to share packet processing duties. For instance, while one engine determines how to forward one packet further toward its destination, a different engine determines how to forward another. This enables the network processors to achieve speeds rivaling ASICs while remaining programmable.
Another scheme to control engine power consumption is shown in
Changes in the set of engines 102b-102n operating will likely necessitate changes in packet processing operations. For example, the assignment of packets or packet processing operations to engines may be dynamically altered to reflect the changing set of operating engines.
The process may be implemented in a variety of ways. For example, a given packet processing design may assign different traffic flows to different engines. For instance, a packet may be classified as belonging to a particular Quality of Service (QoS) flow or a particular Transmission Control Protocol (TCP)/Internet Protocol (IP) flow (e.g., a flow based on IP source and destination addresses and TCP source and destination ports). Based on the flow, the packet may be assigned for processing by a particular engine. The flow/engine assignments may be made to concentrate the number of engines used to service the flows. For example, the flow or packet processing capacity of an engine may need to reach some level before an additional engine is powered up. Additionally, when the last flow currently assigned to an engine terminates, the engine may be powered down until again needed. Potentially, the traffic load of different flows may be individually measured, for example, to determine how many flows can be assigned to an engine.
The techniques used to manage power consumption of the different engines may be done in a wide variety of ways. For example,
The engines selected for a given level of traffic may be preset. For example, the power control circuitry may always power engines “1” and “2” when a given traffic level is detected. Alternately, the engines may be selected for powering based on a variety of factors such as existing load or flows.
As shown, the network processor 200 also features at least one interface 202 that can carry packets between the processor 200 and other network components. For example, the processor 200 can feature a switch fabric interface 202 (e.g., a Common Switch Interface (CSIX)) that enables the processor 200 to transmit a packet to other processor(s) or circuitry connected to the fabric. The processor 200 can also feature an interface 202 (e.g., a System Packet Interface (SPI) interface) that enables the processor 200 to communicate with physical layer (PHY) and/or link layer devices (e.g., MAC or framer devices). The processor 200 also includes an interface 208 (e.g., a Peripheral Component Interconnect (PCI) bus interface) for communicating, for example, with a host or other network processors. As shown, the processor 200 also includes other components shared by the engines 102 such as memory controllers 206, 212, a hash engine, and internal scratchpad memory.
The packet processing techniques described above may be implemented on a network processor, such as the IXP, in a wide variety of ways. For example, traffic metering and instructions to manage power consumption of the engines may be executed as one or more engine 102 threads. The metering and control operations may operate on the same engine 102 to minimize the “footprint” of the scheme and permit powering down of all but one of the engines 102 at times. An alternate scheme (e.g.,
The engine 102 may communicate with other network processor components (e.g., shared memory) via transfer registers 192a, 192b that buffer data to send to/received from the other components. The engine 102 may also communicate with other engines 102 via neighbor registers 194a, 194b wired to adjacent engine(s).
The sample engine 102 shown provides multiple threads of execution. To support the multiple threads, the engine 102 stores program counters 182 for each thread. A thread arbiter 182 selects the program counter for a thread to execute. This program counter is fed to an instruction store 184 that outputs the instruction identified by the program counter to an instruction decode 186 unit. The instruction decode 186 unit may feed the instruction to an execution unit (e.g., an Arithmetic Logic Unit (ALU)) 190 for processing or may initiate a request to another network processor component (e.g., a memory controller) via command queue 188. The decoder 186 and execution unit 190 may implement an instruction processing pipeline. That is, an instruction may be output from the instruction store 184 in a first cycle, decoded 186 in the second, instruction operands loaded (e.g., from general purpose registers 196, next neighbor registers 194a, transfer registers 192a, and/or local memory 198) in the third, and executed by the execution data path 190 in the fourth. Finally, the results of the operation may be written (e.g., to general purpose registers 196, local memory 198, next neighbor registers 194b, or transfer registers 192b) in the fifth cycle. Many instructions may be in the pipeline at the same time. That is, while one is being decoded 186 another is being loaded from the instruction store 104. The engine 102 components may be clocked by a common clock input.
The engine 102 can implement engine power management in a variety of ways. For example, a thread operating on the engine 102 may maintain and alter values of an array of power control data. For example, each bit of a register may represent whether a particular engine should be powered up (bit=1) or down (bit=0). The values of the register may be sent to the engines via power control lines (e.g., as shown in
Individual line cards (e.g., 300a) may include one or more physical layer (PHY) devices 302 (e.g., optic, wire, and wireless PHYs) that handle communication over network connections. The PHYs translate between the physical signals carried by different network mediums and the bits (e.g., “0”-s and “1”-s) used by digital systems. The line cards 300 may also include framer devices (e.g., Ethernet, Synchronous Optic Network (SONET), High-Level Data Link (HDLC) framers or other “layer 2” devices) 304 that can perform operations on frames such as error detection and/or correction. The line cards 300 shown may also include one or more network processors 306 that perform packet processing operations for packets received via the PHY(s) 302 and direct the packets, via the switch fabric 310, to a line card providing an egress interface to forward the packet. Potentially, the network processor(s) 306 may perform “layer 2” duties instead of the framer devices 304.
While
The term packet was sometimes used in the above description to refer to an IP packet encapsulating a TCP segment. However, the term packet also encompasses a frame, TCP segment, fragment, Asynchronous Transfer Mode (ATM) cell, and so forth, depending on the network technology being used.
The term circuitry as used herein includes hardwired circuitry, digital circuitry, analog circuitry, programmable circuitry, and so forth. The programmable circuitry may operate on computer programs. Such computer programs may be coded in a high level procedural or object oriented programming language. However, the program(s) can be implemented in assembly or machine language if desired. The language may be compiled or interpreted. Additionally, these techniques may be used in a wide variety of networking environments.
Other embodiments are within the scope of the following claim.