Patent ID: 8462791

Claim:
A method, comprising: analyzing traffic composition information derived from packets in at least one packet data stream and computational complexity information pertaining to packet processing modules that process the packets of the at least one packet data stream; determining an ordering of packet processing modules based on the analyzing, wherein a packet of the packets in at least one packet data stream passes through the packet processing modules until the packet meets a criteria associated with a packet processing module or the packet has been passed through all of the packet processing modules; and dynamically rearranging the ordering of the packet processing modules into the determined ordering, wherein the analyzing comprises determining an average cost (C) of analyzing the packets in the packet data stream, and wherein D T is a vector denoting the order of the packet processing modules, W is an estimated execution length vector, P is a probability vector denoting respective probabilities that a packet meets the criteria associated with a respective packet processing module and L is a vector denoting an execution length for each packet processing module, and D T denotes that element d i =j ,( i,j ε[0 ,n )) indicates that the i-th packet processing module is scheduled at the j-th position, and the C is determined by the equation Min ⁢ ⁢ C = ∑ i ⁢ ⁢ { D T · W ⁡ ( P , L ) } .