Improve packet class lookup performance by mainaining a inverse map.