TCAM reduction techniques for all-match classifiers