This invention relates to operation of a computing device in an inactive state and, more particularly, to enabling a computing device to participate in network protocol operations when the computing device is in the inactive state.
It is known to provide an inactive state, commonly known as a “sleep” state, of a computing device. In the sleep state, non-essential components and subsystems of the computing device are powered down, thereby reducing power consumption. Reducing power consumption is important with any computing device, but is particularly important with battery-operated devices, such as laptop computers and mobile devices. Depending on its configuration, the computing device in the sleep state may not respond to received data packets. The sleep state may be initiated automatically in the absence of user inputs for a predetermined time and may be terminated when the user resumes activity. In practice, a computing device may have more than one sleep state, and more or fewer components may be powered down in each sleep state.
Currently, when a PC (personal computer) enters a sleep state S3, it may lose network presence and may no longer participate in standard networking protocols or advertise its presence on the network. Any other PC trying to reach a computing device in the sleep state must know its physical as well as its IP address, since the computing device may be unavailable to serve resolution requests for its addresses.
This limitation has been addressed in prior systems by providing the network interface card (NIC) with fixed network protocol capabilities. When the PC enters the sleep state, the network interface card acts as a proxy on its behalf to participate in network protocol functions. However, providing the NIC with fixed network protocol capabilities has limitations. First, the limited space and processing power available on the NIC allows for only some protocols, which are selected to match the most common environments. For example, if the NIC can only respond to the address resolution protocol (ARP) and the PC happens to be in the IPv6-only environment, which requires neighbor discovery proxy functionality, then the capabilities of the NIC are useless in enabling Wake-On-LAN. Second, hard coding protocol behaviors into the NIC does not allow for flexibility and individual user control For example, one user may want to enable his PC to respond to very specific, uncommon protocols while asleep, but other users may prefer that their PC is not reachable for these protocols.
Accordingly, there is a need for improved methods and apparatus for enabling a computing device to participate in network protocol operations when the computing device is in an inactive or sleep state.
According to a first aspect of the invention, a method is provided to enable a computing device to participate in network protocol operations when the computing device is in an inactive state. The method comprises a main processor of the computing device transferring protocol mode instructions and data corresponding to a selected network protocol to a network interface of the computing device, and the network interface executing the protocol mode instructions on behalf of the main processor when the main processor is in the inactive state. The main processor may enable a protocol mode of the network interface when the main processor enters the inactive state and may disable the protocol mode of the network interface when the main processor exits the inactive state.
In some embodiments, the data transferred from the main processor to the network interface may include a received packet pattern that complies with the selected network protocol. The network interface may compare a received packet to the received packet pattern and may respond to the received packet in accordance with a result of the comparison. In farther embodiments, the data transferred from the main processor to the network interface may include a reply packet pattern that complies with the selected network protocol. A reply packet having the reply packet pattern may be sent by the network interface in response to a received packet. The transfer of protocol mode instructions and data from the main processor to the network interface may include selecting a network protocol from two or more network protocols and downloading protocol mode instructions and data corresponding to the selected network protocol.
In additional embodiments, a computer-readable storage medium is encoded with instructions for execution in a computing device, the instructions when executed performing a method as described above to enable the computing device to participate in network protocol operations when the computing device is in an inactive state.
According to a second aspect of the invention, a computing device having an active state and an inactive state is provided. The computing device comprises a main processor including a main processing device and a system memory, the system memory containing protocol mode instructions and data corresponding to at least one network protocol, and a network interface including a network interface processing device and a network interface memory. The main processor is configured to transfer the protocol mode instructions and the data corresponding to a selected network protocol from the system memory to the network interface memory, and the network interface is configured to execute the protocol mode instructions on behalf of the main processor when the main processor is in the inactive state.
For a better understanding of the present invention, reference is made to the accompanying drawings, which are incorporated herein by reference in and which:
In accordance with embodiments in the invention, a computing device offloads network protocol operations from a main processor of the computing device to a network interface, such as a network interface card (NIC). When the main processor is in a sleep state, the network interface performs network protocol operations on behalf of the main processor. The offloading of network protocol operations to the network interface is programmable under control of the operating system in the main processor. The network interface can be programmed to perform protocol operations for a single network protocol or for two or more network protocols. The selection of network protocols can be controlled by a user or can be controlled automatically in response to the configuration of the system. The network protocol operations performed by the network interface can be changed from time to time, and network protocols can be added or deleted. Thus, network protocol operations during the sleep state of the computing device are flexible and controllable.
Referring to
Referring to
Referring to
The invention is operational with numerous other general purpose or special purpose computing system environments or configurations. Examples of well known computing systems, environments, and/or configurations that may be suitable for use with the invention include, but are not limited to, personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The invention may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
With reference to
Computer 110 typically includes a variety of computer readable media. Computer readable media can be any available media that can be accessed by computer 110 and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer readable media may comprise computer storage media. Computer storage media includes both volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can accessed by computer 110. Combinations of the any of the above should also be included within the scope of computer readable storage media.
The system memory 130 includes computer storage media in the form of volatile and/or nonvolatile memory such as read only memory (ROM) 131 and random access memory (RAM) 132. A basic input/output system 133 (BIOS), containing the basic routines that help to transfer information between elements within computer 110, such as during start-up, is typically stored in ROM 131. RAM 132 typically contains data and/or program modules that are immediately accessible to and/or presently being operated on by processing unit 120. By way of example, and not limitation,
The computer 110 may also include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only,
The drives and their associated computer storage media discussed above and illustrated in
The computer 110 may operate in a networked environment using logical connections to one or more remote computers, such as a remote computer 180. The remote computer 180 may be a personal computer, a server, a router, a network PC, a peer device or other common network node, and typically includes many or all of the elements described above relative to the computer 110, although only a memory storage device 181 has been illustrated in
When used in a LAN networking environment, the computer 110 is connected to the LAN 171 through a network interface or adapter 170. When used in a WAN networking environment, the computer 110 typically includes a modem 172 or other means for establishing communications over the WAN 173, such as the Internet. The modem 172, which may be internal or external, may be connected to the system bus 121 via the user input interface 160, or other appropriate mechanism. In a networked environment, program modules depicted relative to the computer 110, or portions thereof, may be stored in the remote memory storage device. By way of example, and not limitation,
Embodiments of the invention are described with reference to
Main processor 500 and network interface 170 are components of the computing device. As indicated above, main processor 500 has an inactive, or sleep, state where non-essential components of main processor of 500 are powered down. In practice, main processor 500 may have more than one sleep state, triggered by different levels of activity or lack of activity. In the sleep state of main processor 500, network interface 170 remains active, at least to the extent required to perform network protocol operations as described below. As shown, main processor 500 and network interface 170 communicate on system bus 121, and network interface 170 may communicate on local area network 171.
A flow chart of operations performed by main processor 500 in accordance with embodiments of the invention is shown in
The database of protocol information can be built by the user or can be supplied as part of the initial configuration of the computing device. The database can be updated to add or delete network protocol information. Protocol information for newly-developed network protocols can be added. The data of the protocol information can be updated from time to time to reflect current conditions. Typically, the database may include protocol information corresponding to a number of network protocols that are likely to be used in a particular application.
In act 602, a network protocol is selected for operation. The network protocol is selected from the database of protocol information that was built in act 600. In act 604, protocol information relating to the selected network protocol is downloaded from main processor 500 to network interface 170. In particular, the protocol instructions and data are downloaded from system memory 130 to NIC memory 512. The downloading of protocol information to network interface 170 establishes a protocol mode that can be enabled when main processor 500 enters the sleep state. It will be understood that the selection of a network protocol and downloading of the protocol instructions and data corresponding to the selected network protocol can be repeated for any desired number of network protocols, within the capacity of NIC memory 512. Furthermore, protocol information corresponding to any network protocols that are no longer needed can be deleted from network interface 170 in act 606.
The acts of building a database of protocol information, selecting a network protocol for operation, downloading the selected network protocol to the network interface and deleting any undesired network protocol from the network interface can be performed at any time when the main processor 500 is active. These acts may be performed during initial configuration of the computing device or following any configuration change. In any event, these acts are performed before the computing device enters the sleep state.
Referring again to
A flow chart of operations performed by network interface 170 in accordance with embodiments of the invention as shown in
By way of example, the response to the received packet may include sending one or more reply packets to the sender of the received packet, or sending no reply. In some embodiments, the reply packet is a fixed reply packet that is specified as a response to the received packet. In other embodiments, the content of the reply packet is constructed in accordance with the protocol instructions. For example, the address of the sender of the received packet may be inserted into the reply packet. The response may include a single reply packet or two or more reply packets. The number of reply packets and the content of each reply packet may vary according to the content of the received packet. In further embodiments, network interface 170 may respond to a received packet by sending a wakeup message to the main processor 500. It will be understood that the responses described above are given by way of example only and are not limiting as to the scope of the present invention. Furthermore, the network protocol may specify any combination of responses, such as sending a reply packet to the sender of the received packet and sending a wakeup message to the main processor 500. In further embodiments, network interface 170 may send a pre-programmed packet at programmed intervals.
It should be apparent from the above description that the present invention provides generic offloading of network protocol operations from the main processor to the network interface. The operating system of the main processor programs the network interface to respond to specific requests in specific ways at different times. The network interface can be programmed to recognize an entire incoming packet or only specific fields in the packet. For example, by pattern matching the entire packet, an ARP offload can be implemented. In this case, the operating system sends two buffers to the network interface when the main processor enters the sleep state. A first buffer contains an ARP request packet, and the second buffer contains an ARP reply packet. When the network interface receives a packet that matches the first buffer, it responds with the packet in the second buffer. Similarly, recognizing only specific fields of the packet can be used to implement IPv6 related protocols. Since IPv6 packets may contain variable size fields that would prohibit matching entire packets, matching only the sender, the receiver, the protocol, and the next header fields, stored in buffers downloaded by the operating system, allows implementation, for example, of Neighbor Solicitation as part of Neighbor Discovery for IPv6, where a positive match with specific fields of the Neighbor Solicitation triggers in return a buffer containing a Neighbor Advertisement packet.
Generic protocol offload allows the operating system to maintain control over which network protocols the network interface supports at any given time and takes the burden of insuring protocol compliance off the network interface. By offloading the protocol operations in a simplified manner, for example, for every packet A matching a certain set of criteria, reply with packet B, the operating system reduces processing by the network interface. Since the main processor has much more processing power then the network interface, insuring protocol compliance, programming the appropriate packets and maintaining the intelligence in the operating system helps to decrease power consumption by the network interface. The network interface is “agnostic” in the sense that it does not have any hard coded knowledge of network protocols. Instead, appropriate network protocol instructions and data are downloaded from the main processor to the network interface for execution when the main processor is in the sleep state.
Having thus described several aspects of at least one embodiment of this invention, it is to be appreciated various alterations, modifications, and improvements will readily occur to those skilled in the art. Such alterations, modifications, and improvements are intended to be part of this disclosure, and are intended to be within the spirit and scope of the invention. Accordingly, the foregoing description and drawings are by way of example only.