1. A method comprising: accessing a primary lookup table defining packet classification rules, each classification rule having multiple fields; and generating multiple secondary lookup tables from the primary lookup table by extracting, for each secondary lookup table, a selection of classification rules and a selection of fields from the multiple fields, based on a rule set identifying predefined entries.