Fast Regular Expression Matching Using Small TCAM

  • Authors:
  • Chad R. Meiners;Jignesh Patel;Eric Norige;Alex X. Liu;Eric Torng

  • Affiliations:
  • MIT Lincoln Laboratory, Lexington,;Department of Computer Science and Engineering, Michigan State University, East Lansing,;Department of Computer Science and Engineering, Michigan State University, East Lansing,;Department of Computer Science and Engineering, Michigan State University, East Lansing,;Department of Computer Science and Engineering, Michigan State University, East Lansing,

  • Venue:
  • IEEE/ACM Transactions on Networking (TON)
  • Year:
  • 2014

Quantified Score

Hi-index 0.00

Visualization

Abstract

Regular expression (RE) matching is a core component of deep packet inspection in modern networking and security devices. In this paper, we propose the first hardware-based RE matching approach that uses ternary content addressable memory (TCAM), which is available as off-the-shelf chips and has been widely deployed in modern networking devices for tasks such as packet classification. We propose three novel techniques to reduce TCAM space and improve RE matching speed: transition sharing, table consolidation, and variable striding. We tested our techniques on eight real-world RE sets, and our results show that small TCAMs can be used to store large deterministic finite automata (DFAs) and achieve potentially high RE matching throughput. For space, we can store each of the corresponding eight DFAs with 25$\,$000 states in a 0.59-Mb TCAM chip. Using a different TCAM encoding scheme that facilitates processing multiple characters per transition, we can achieve potential RE matching throughput of 10–19 Gb/s for each of the eight DFAs using only a single 2.36-Mb TCAM chip.