Patent attributes
A CPU implements a virtual network function (VNF) associated with flow processing and can offload at least some of the flow processing to a hardware accelerator. A module (e.g., TOR switch), external to the software-based processor and the hardware accelerator, examines packet flows and determines (e.g., using a top-K elephant-flow-detection algorithm) which ones are more suitable for offloading from the software-based processor to the hardware accelerator than others. The external module communicates the relative suitability for offloading to the CPU using packet tags or out-of-band messaging, and the CPU uses the relative suitability to determine which flows to offload or onload. In some implementations, the CPU can instruct the external module to change the value of K used in the algorithm.