Patent attributes
Some embodiments provide a method for a network controller that manages a flow-based managed forwarding element (MFE). The method receives multiple sets of service rules for implementation by the MFE. The sets of service rules have a priority order and the rules in each set of service rules have separate priority orders. The method organizes the service rules in all of the sets of service rules into a single ordered list of service rules. The method assigns priority values within a space-constrained set of priority values to the service rules in the list in a manner designed to minimize re-assignment when changes to the sets of service rules are received. The method uses the assigned priority values to generate flow entries for the MFE to use to implement the service rules.