floodlight/ivs — pull request #155 by rlane (2014-05-14 18:59:49+00:00)
Title: Replace flowtable module with new tcam module

Reviewer: @poolakiran

This module is a rewrite of the flowtable module. The main reason for the
rewrite is to support arbitrary key sizes. Please see the comments in tcam.h
and tcam.c for more details.

Major differences from flowtable:
- Arbitrary key sizes
- Shared copies of masks
- Automatic resizing of buckets
- Early-out during matching by comparing hashes
- Hoisted masking out of bucket iteration

I also dropped some old optimizations that didn't affect the benchmark.

When using 112 byte keys, same as the old flowtable, the new tcam
consumes 56% less CPU time in the benchmark. Of course, the reason for
supporting arbitrary key sizes is to use the minimal key necessary. When
using a 32 byte key, which is sufficient for an IPv4 5-tuple and then some,
the new tcam consumes 80% less CPU time in the benchmark.

This pull request also converts users of flowtable to tcam, and removes the flowtable module.