1. A method for assigning threads in a processor, comprising: assigning one or more static threads to each port of a plurality of ports; processing incoming packets with the static threads; storing the port numbers of incoming packets processed by the static threads; counting the number of packets processed by the static threads for each port; calculating an average thread workload for each port; determining a highest average thread workload port by comparing the average thread workload for each port; and assigning a dynamic thread to the highest average thread workload port to process incoming packets.