Systems and methods for assigning threads in a processor are disclosed.
The method generally includes assigning one or more static threads to
each port of a plurality of ports and processing incoming packets with
the static threads. The port numbers of incoming packets processed by the
static threads are stored and the number of packets processed by the
static threads for each port is counted. An average thread workload for
each port is calculated by dividing the number of packets processed by
the number of static threads assigned to the port. A dynamic thread is
assigned to the highest average thread workload port.