US 11,929,837 B2
Rule compilation schemes for fast packet classification
Gil Levy, Hod Hasharon (IL); Roni Bar Yanai, Even Yehuda (IL); and Avi Urman, Yokneam Illit (IL)
Assigned to MELLANOX TECHNOLOGIES, LTD., Yokneam (IL)
Filed by MELLANOX TECHNOLOGIES, LTD., Yokneam (IL)
Filed on Feb. 23, 2022, as Appl. No. 17/678,074.
Prior Publication US 2023/0269037 A1, Aug. 24, 2023
Int. Cl. G06F 16/22 (2019.01); G06F 16/28 (2019.01); H04L 1/20 (2006.01)
CPC H04L 1/201 (2013.01) [G06F 16/2255 (2019.01); G06F 16/285 (2019.01)] 21 Claims
OG exemplary drawing
 
1. Classification apparatus, comprising:
a memory, configured to store rules corresponding to a corpus of rules in respective rule entries, wherein each rule comprising a respective set of unmasked bits having corresponding bit values, and at least some of the rules comprising masked bits, and wherein the rules in the corpus conform to respective Rule Patterns (RPs), each RP defining a respective sequence of masked and unmasked bits;
a processor, configured to:
cluster the RPs, using a clustering criterion, into extended Rule Patterns (eRPs) associated with respective hash tables comprising buckets for storing rule entries, wherein the clustering criterion aims to minimize an overall number of the eRPs while meeting a collision condition that depends on a specified maximal number of rule entries per bucket;
define a collision event indicating that a number of rule entries contained in a bucket exceeds a specified maximal number of rule entries per bucket; and
evaluate the collision condition by comparing between a number of collision events occurring in constructing a temporary eRP and a predefined limit number;
a port, configured to receive a packet from a communication network; and
a decision logic pipeline, configured to classify the received packet using the eRPs.