Patent ID: 8194670

Claim:
A non-transitory computer readable medium comprising software instructions for reclaiming transmit descriptors, wherein the software instructions, when executed, perform a method, the method comprising: configuring a media access control (MAC) layer to execute a first MAC layer thread to reclaim a first plurality of transmit descriptors (TDs) from a hardware transmit ring (HTR) using a first reclaim algorithm, wherein the HTR comprises a transmit descriptor ring (TDR) and resides on a physical network interface card (NIC), wherein the first MAC layer thread is executing on a host operatively connected to the physical NIC, and wherein the first reclaim algorithm is associated with a first transmission pattern and a first TDR status; receiving, by a virtual NIC (VNIC) executing within the MAC layer, a first plurality of packets; forwarding the first plurality of packets to a device driver on the host associated with the physical NIC; forwarding the first plurality of packets from the device driver to the physical NIC using the first plurality of TDs, wherein the first plurality of TDs are reclaimed by the first MAC layer thread according to the first reclaim algorithm; obtaining, by the first MAC layer thread, a second transmission pattern associated with the first plurality of packets; obtaining, by the first MAC layer thread, a second TDR status from the device driver; determining, by the MAC layer, that the second transmission pattern and the second TDR status are associated with a second reclaim algorithm; and forwarding a second plurality of packets from the device driver to the physical NIC using a second plurality of TDs, wherein the second plurality of TDs are reclaimed according to the second reclaim algorithm, wherein the second reclaim algorithm is implemented by a worker thread using computer resources associated with a source of the second plurality of packets.