The present invention is directed to a method and computer program product
for offloading specific processing tasks that would otherwise be performed
in a computer system's processor and memory, to a peripheral device, or
devices, that are connected to the computer. The computing task is then
performed by the peripheral, thereby saving computer system resources for
other computing tasks and increasing the overall computing efficiency of
the computer system. In one preferred embodiment, the disclosed method is
utilized in a layered network model, wherein computing tasks that are
typically performed in network applications are instead offloaded to the
network interface card (NIC) peripheral. An application executing on the
computer system first queries the processing, or task offload capabilities
of the NIC, and then selectively enables those capabilities that may be
subsequently needed by the application. The specific processing
capabilities of a NIC are made available by creating a task offload buffer
data structure, which contains data indicative of the processing
capabilities of the corresponding NIC. Once an application has discerned
the capabilities of a particular NIC, it will selectively utilize any of
the enabled task offload capabilities of the NIC by appending packet
extension data to the network data packet that is forwarded to the NIC.
The device driver of the NIC will review the data contained in the packet
extension, and then cause the NIC to perform the specified operating
task(s). This offloading of computing tasks on a per-packet basis allows
an application to selectively offload tasks on a dynamic, as-needed basis.
As such, applications executing on the computer system processor are able
to offload tasks in instances where it is busy processing other computing
tasks and processor overhead is high. Multiple tasks can also be offloaded
in batches to a particular peripheral.