Patent ID: 8316151

Claim:
A network device comprising: one or more processors to: identify a merge graph that includes one or more nodes, a particular node, of the one or more nodes, including a plurality of merge-points, and a particular merge-point, of the plurality of merge-points, being defined as a filter associated with an interface in the network device, assign values to the plurality of merge-points; determine a sum of the values; determine a ranking of the one or more nodes based on the sum of the values; program a ternary content-addressable memory (TCAM) based on the ranking of the one or more nodes in the merge graph, the particular node being represented in the TCAM by one or more entries programmed into the TCAM, and the one or more entries having a priority order that is based on the ranking of the one or more nodes; and process traffic based on the priority order of the one or more entries in the TCAM.