Packet Stream Dispatch Using Binary Search for High Stream Counts
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing network products and processing devices face scalability issues in managing a large number of data streams, leading to increased resource consumption, latency, and unsolvable timing issues due to the need for multiple matchers, which become unfeasible for more than 128 streams.
Innovation Solution
A method and network product that employs a raw packet buffer, look-ahead evaluator, and binary search mechanism to evaluate and dispatch data packets, allowing for efficient filtering and processing of up to 1000 data streams by buffering packets, extracting the first n words for binary search, and parallelizing the search across multiple evaluator units.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If a dedicated matcher is used for each data stream, then the filtering logic is simple and easy to implement, but the solution becomes unscalable for more than 128 streams due to FPGA resource consumption and timing issues
Solution Approach 1:
The patent divides the filtering task into two independent segments: a lookup stage that identifies which streams are subscribed using a binary tree structure, and a matching stage that performs the actual stream identification. This segmentation allows the system to handle hundreds of streams by separating the complexity of stream management from the simplicity of individual stream matching.
Solution Approach 2:
The patent performs preliminary action by pre-building a binary tree structure that contains all subscribed stream identifiers before packets arrive. This pre-computed structure enables O(log n) lookup time, eliminating the need for linear search through all streams and allowing the system to scale to hundreds of streams without increasing per-packet processing complexity.
2Quantity of substance
If a linear search is performed through a list of subscribed streams, then the resource consumption is low, but the performance becomes very bad with a high number of streams due to O(n) complexity
Solution Approach 1:
The patent transitions from a one-dimensional linear search approach to a two-dimensional structure by organizing streams in a binary tree. This dimensional change allows the system to achieve O(log n) search complexity while maintaining low resource consumption, as the tree structure can be implemented using simple pointer arithmetic and bitwise operations rather than complex data structures.
Solution Approach 2:
The patent changes the search parameter from linear iteration (incrementing by 1) to logarithmic division (halving the search space at each step). This parameter change in the search algorithm transforms the time complexity from O(n) to O(log n), dramatically improving performance for large numbers of streams while keeping the implementation simple.
3Productivity
If direct matching of search properties to list items is performed, then the performance corresponds to O(1) complexity, but the approach only works with constrained packet properties which limits its suitability for a large number of streams
Solution Approach 1:
The patent creates a universal matching system that can handle diverse packet properties (IP addresses, port numbers, protocol types) through a single binary tree structure. The tree nodes store generic stream identifiers that can represent any packet property combination, making the system universally applicable to different packet types and properties while maintaining O(log n) performance.
Solution Approach 2:
The patent introduces an intermediary binary tree structure that mediates between the incoming packet properties and the subscribed stream list. This intermediary structure translates diverse packet properties into a unified search key that can be efficiently processed by the binary tree, enabling flexible matching of various packet types while maintaining high performance.
Data Source
Figure 1
Figure 2
Figure 3
AI summary
The present disclosure relates a method for evaluating packets of subscribed data streams comprising receiving incoming data packets belonging to a plurality of data streams; buffering the incoming data packets in a raw packet buffer; extracting the first words of the incoming data packets and forwarding the extracted first words to a packet header buffer; evaluating the first words in the packet header buffer, wherein the evaluation comprises extracting information identifying a data stream, performing a binary search on the extracted information to determine whether the incoming data packet from which the information was extracted belongs to one of the subscribed data streams, storing the result in a packet evaluation result buffer; determining based on the result whether a data belongs a subscribed stream; reading, in case the data packet in the raw packet buffer belongs to one of the subscribed streams, the data packet from the raw packet buffer.