nat: perf improvement - replace branchy code
[vpp.git] / src / plugins / nat / dslite / dslite_ce_encap.c
index 74b5bc3..d8d0e40 100644 (file)
@@ -67,7 +67,7 @@ VLIB_NODE_FN (dslite_ce_encap_node) (vlib_main_t * vm,
          ip40 = vlib_buffer_get_current (b0);
          proto0 = ip_proto_to_nat_proto (ip40->protocol);
 
-         if (PREDICT_FALSE (proto0 == ~0))
+         if (PREDICT_FALSE (proto0 == NAT_PROTOCOL_OTHER))
            {
              error0 = DSLITE_ERROR_UNSUPPORTED_PROTOCOL;
              next0 = DSLITE_CE_ENCAP_NEXT_DROP;