Rule Compilation for Fast Packet Classification

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

High-speed packet classification in data networks faces challenges due to the need for flexible and sophisticated rule matching, which is inefficient with existing methods that rely on costly Ternary Content-Addressable Memory (TCAM) and results in performance degradation as the number of hash tables and rule entries increases.

Innovation Solution

The approach clusters Rule Patterns (RPs) into extended Rule Patterns (eRPs) using a processor, minimizing the number of hash tables and rule entries while meeting a collision condition, allowing for efficient packet classification using hash tables in RAM, thereby reducing latency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If TCAM is used for packet classification, then classification flexibility is improved, but device cost and complexity increase

Engineering Contradiction:
Improveclassification flexibilityVSAvoiddevice cost
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent replaces expensive TCAM hardware with software-based rule compilation and hashing algorithms running on standard processors. Rule patterns are extracted from TCAM-style rules and compiled into hash tables that can be efficiently queried using standard CPU instructions, achieving TCAM-like functionality through software copying rather than hardware implementation

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent substitutes the mechanical/electrical TCAM hardware system with a software-based processing system using standard CPUs and RAM. The classification function is migrated from dedicated hardware (TCAM) to general-purpose computing (processor + memory), reducing hardware complexity and cost while maintaining classification capabilities

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Measurement precision

If the number of hash tables and rule entries increases, then classification precision is improved, but processing speed deteriorates

Engineering Contradiction:
Improveclassification precisionVSAvoidprocessing speed
Core Design Contradiction:
Measurement precisionVSSpeed

Solution Approach 1:

The patent merges multiple rule patterns into extended rule patterns (eRPs) that can be represented by fewer hash tables. By clustering similar rule patterns and using bitwise operations to represent multiple patterns simultaneously, the system reduces the total number of hash table lookups required while maintaining comprehensive classification coverage

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent transforms the classification approach by changing parameters from individual rule-based hashing to extended rule pattern hashing with bitwise operations. This parameter change enables processing multiple classification rules in parallel through bit manipulation, significantly improving processing speed while maintaining precision

Inventive Principle:
Principle #35Parameter changes

3Reliability

If more rule entries are stored, then classification completeness is improved, but lookup time increases

Engineering Contradiction:
Improveclassification completenessVSAvoidlookup time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary compilation of rule patterns into extended rule patterns and pre-computes hash values before actual packet classification. Rule patterns are analyzed, clustered, and transformed into optimized hash table structures in advance, so that during runtime, only fast hash lookups and bitwise comparisons are needed, minimizing lookup time while maintaining completeness

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11929837B2Rule compilation schemes for fast packet classification
Publication Date: 2024.03.12 MELLANOX TECHNOLOGIES LTD(IL)
  • US11929837B2 patent drawing
  • US11929837B2 patent drawing
  • US11929837B2 patent drawing

AI summary

A classification apparatus includes a memory and a processor. The memory is configured to store rules corresponding to a corpus of rules in respective rule entries, each rule includes a respective set of unmasked bits having corresponding bit values, and at least some of the rules include masked bits. The rules in the corpus conform to respective Rule Patterns (RPs), each RP defining a respective sequence of masked and unmasked bits. The processor is configured to cluster the RPs, using a clustering criterion, into extended Rule Patterns (eRPs) associated with respective hash tables including buckets for storing rule entries. 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.