Sliding Buffer Window Synchronization via Double Compare and Swap

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing IPsec protocols face challenges in synchronizing a sliding buffer window in multi-processing environments, leading to inefficiencies in preventing packet re-injection due to limitations in compare-and-swap operations and handling out-of-order packets, which can result in performance disadvantages and unnecessary packet discarding.

Innovation Solution

The method involves initializing a replay counter and circular buffer window, shifting the window as needed, and using Double Compare and Swap (DCS) or Compare and Swap and Store (CSST) operations to efficiently update counters and accept or discard packets, ensuring synchronization without relying on slower synchronization methods like latches or spin-locks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a sliding window bitmap is used to track sequence numbers for replay protection, then packet re-injection is prevented, but the window size is limited by compare-and-swap operation capabilities

Engineering Contradiction:
Improvereplay protectionVSAvoidwindow size limitation
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent divides the replay window into multiple banks (e.g., 32 banks of 32 bits each) instead of using a single large bitmap. This segmentation allows the system to manage larger window sizes by organizing the bitmap across multiple smaller, manageable units that can be processed independently through compare-and-swap operations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a bank index dimension to the traditional single-dimension bitmap. Instead of a flat bitmap where bit position directly maps to sequence number, the system now uses a two-dimensional structure: bank index and bit position within bank. This dimensional change allows the window size to exceed the limitations of single compare-and-swap operations.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If a lock mechanism is used to synchronize updates to the highest-seen sequence number and window bitmap in a multi-processing environment, then synchronization is achieved, but performance deteriorates

Engineering Contradiction:
ImprovesynchronizationVSAvoidprocessing performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements self-service synchronization where each processor independently manages its own compare-and-swap operations on the shared replay window structure. The Double Compare and Swap operation allows processors to atomically update both the highest-seen sequence number and the window bitmap without requiring external locking mechanisms, enabling each processing unit to service itself.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent merges the update of the highest-seen sequence number counter and the window bitmap into a single atomic Double Compare and Swap operation. This consolidation eliminates the need for separate lock acquisitions for each update, reducing synchronization overhead and improving performance in multi-processing environments.

Inventive Principle:
Principle #5Merging (Combining)

3Adaptability or versatility

If the replay window size is increased to accommodate out-of-order packets, then packet acceptance improves, but synchronization speed decreases due to exceeding compare-and-swap capabilities

Engineering Contradiction:
Improveout-of-order packet handlingVSAvoidsynchronization speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

By segmenting the large replay window into multiple smaller banks, the system can accommodate a large total window size (e.g., 1024 bits across 32 banks) while keeping individual bank sizes (32 bits) within the capabilities of standard compare-and-swap operations. This segmentation allows the system to handle out-of-order packets with larger gaps without sacrificing synchronization speed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic bank selection where the system can choose which bank to update based on the sequence number being processed. This dynamic approach allows the replay window to adaptively handle varying packet arrival patterns and out-of-order scenarios while maintaining efficient synchronization through targeted compare-and-swap operations on only the relevant banks.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS7953120B2Efficient synchronization of a sliding buffer window to prevent packet re-injection in an internet protocol (IP) network
Publication Date: 2011.05.31 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US7953120B2 patent drawing
  • US7953120B2 patent drawing
  • US7953120B2 patent drawing

AI summary

An apparatus, system, and method are disclosed for efficient synchronization of a sliding buffer window to prevent packet re-injection in an IP network. The steps of the method include receiving a data packet which comprises a packet sequence number. The method initializes a replay counter, an update counter, and a circular buffer window. The circular buffer window may comprise at least one window bank and the circular buffer window may also comprise a current window bank. Furthermore, the method may include determining that the packet sequence number is greater than a maximum current bank value. In response, the method may define shifting the circular buffer window such that a current window bank position is incremented. The method may then include determining that the packet sequence number is inside the current window bank and accepting the data packet. Furthermore, a Double Compare and Swap (DCS) operation may update the bit indicator and increment the update counter and replay counter. Also, a Compare and Swap and Store (CSST) operation may increment the update counter and replay counter and set a shifted window bank. Therefore, DCS and CSST operation may still be used without having to resort to traditional locks with higher overhead. In addition, the buffer window may be an arbitrary size and is not limited to the machine architecture limit for compare and swap operations.