Patent ID: 7515596

Claim:
A method for processing packets using a virtual network interface card (VNIC), comprising: associating a first token with a hardware receive ring, wherein the first token identifies a virtual serialization queue in a virtual network stack; receiving a packet destined for the virtual serialization queue; sending the packet to the hardware receive ring; if the VNIC is operating in bypass mode, then perform: associating a first function with the hardware receive ring, wherein the first function associated with the virtual network stack is executing on a host; calling the first function, wherein calling the first function comprises sending the packet directly to the virtual network stack; and receiving the packet by the virtual serialization queue; if the VNIC is not operating in bypass mode, then perform: associating a second function with the hardware receive ring, wherein the second function is associated with the VNIC; calling the second function, wherein calling the second function comprises sending the packet to the VNIC; receiving the packet by the VNIC; processing the packet by the VNIC to obtain a processed packet; sending the processed packet to the virtual serialization queue; and receiving the packet by the virtual serialization queue.