Patent ID: 9674087
Date: 2017-06-06
CPC Classifications: H04L

Claim:
1. A method for a forwarding element that forwards packets, the method comprising: receiving a packet; defining a wildcard mask comprising a plurality of bits, each bit in the wildcard mask (i) corresponding to a bit in a header of the packet and (ii) initially set as a wildcard bit; performing a first stage lookup, of a hash table comprising a set of rules, for a first hash of a first set of fields of the header of the packet and un-wildcarding a first set of bits of the wildcard mask that corresponds to the first set of fields; if a matching hash is found in the first stage lookup, performing a second stage lookup of the hash table for a second hash of a second set of fields of the header of the packet and un-wildcarding a second set of bits of the wildcard mask that corresponds to the second set of fields; identifying a matching rule for the packet based on the first stage lookup of the hash table and the second stage lookup of the hash table; and generating a flow entry comprising a set of un-wildcarded bits based on the matching rule and the un-wildcarded first and second sets of bits of the wildcard mask, wherein the flow entry is used to process other packets that match each un-wildcarded bit of the flow entry.