api: ip - Mark old message versions as deprecated
[vpp.git] / src / vnet / ip / ip_in_out_acl.c
index 9fc0717..11e3873 100644 (file)
@@ -130,7 +130,7 @@ ip_in_out_acl_inline_trace (
   u32 sw_if_index[4];
   u32 table_index[4];
   vnet_classify_table_t *t[4] = { 0, 0 };
-  u64 hash[4];
+  u32 hash[4];
 
   /* calculate hashes for b[0] & b[1] */
   if (n_left >= 2)
@@ -162,16 +162,16 @@ ip_in_out_acl_inline_trace (
       if (is_output)
        {
          /* Save the rewrite length, since we are using the l2_classify struct */
-         vnet_buffer (b[0])->l2_classify.pad.l2_len =
+         vnet_buffer (b[0])->l2.l2_len =
            vnet_buffer (b[0])->ip.save_rewrite_length;
          /* advance the match pointer so the matching happens on IP header */
-         h[2] += vnet_buffer (b[0])->l2_classify.pad.l2_len;
+         h[2] += vnet_buffer (b[0])->l2.l2_len;
 
          /* Save the rewrite length, since we are using the l2_classify struct */
-         vnet_buffer (b[1])->l2_classify.pad.l2_len =
+         vnet_buffer (b[1])->l2.l2_len =
            vnet_buffer (b[1])->ip.save_rewrite_length;
          /* advance the match pointer so the matching happens on IP header */
-         h[3] += vnet_buffer (b[1])->l2_classify.pad.l2_len;
+         h[3] += vnet_buffer (b[1])->l2.l2_len;
        }
 
       hash[2] = vnet_classify_hash_packet_inline (t[2], (u8 *) h[2]);
@@ -252,16 +252,16 @@ ip_in_out_acl_inline_trace (
          if (is_output)
            {
              /* Save the rewrite length, since we are using the l2_classify struct */
-             vnet_buffer (b[2])->l2_classify.pad.l2_len =
+             vnet_buffer (b[2])->l2.l2_len =
                vnet_buffer (b[2])->ip.save_rewrite_length;
              /* advance the match pointer so the matching happens on IP header */
-             h[2] += vnet_buffer (b[2])->l2_classify.pad.l2_len;
+             h[2] += vnet_buffer (b[2])->l2.l2_len;
 
              /* Save the rewrite length, since we are using the l2_classify struct */
-             vnet_buffer (b[3])->l2_classify.pad.l2_len =
+             vnet_buffer (b[3])->l2.l2_len =
                vnet_buffer (b[3])->ip.save_rewrite_length;
              /* advance the match pointer so the matching happens on IP header */
-             h[3] += vnet_buffer (b[3])->l2_classify.pad.l2_len;
+             h[3] += vnet_buffer (b[3])->l2.l2_len;
            }
 
          hash[2] = vnet_classify_hash_packet_inline (t[2], (u8 *) h[2]);
@@ -327,8 +327,9 @@ ip_in_out_acl_inline_trace (
            {
              while (1)
                {
-                 if (PREDICT_TRUE (t[0]->next_table_index != ~0))
-                   t[0] = pool_elt_at_index (tables, t[0]->next_table_index);
+                 table_index[0] = t[0]->next_table_index;
+                 if (PREDICT_TRUE (table_index[0] != ~0))
+                   t[0] = pool_elt_at_index (tables, table_index[0]);
                  else
                    {
                      _next[0] = (t[0]->miss_next_index < n_next_nodes) ?
@@ -351,7 +352,7 @@ ip_in_out_acl_inline_trace (
 
                  /* advance the match pointer so the matching happens on IP header */
                  if (is_output)
-                   h[0] += vnet_buffer (b[0])->l2_classify.pad.l2_len;
+                   h[0] += vnet_buffer (b[0])->l2.l2_len;
 
                  hash[0] =
                    vnet_classify_hash_packet_inline (t[0], (u8 *) h[0]);
@@ -434,8 +435,9 @@ ip_in_out_acl_inline_trace (
            {
              while (1)
                {
-                 if (PREDICT_TRUE (t[1]->next_table_index != ~0))
-                   t[1] = pool_elt_at_index (tables, t[1]->next_table_index);
+                 table_index[1] = t[1]->next_table_index;
+                 if (PREDICT_TRUE (table_index[1] != ~0))
+                   t[1] = pool_elt_at_index (tables, table_index[1]);
                  else
                    {
                      _next[1] = (t[1]->miss_next_index < n_next_nodes) ?
@@ -458,7 +460,7 @@ ip_in_out_acl_inline_trace (
 
                  /* advance the match pointer so the matching happens on IP header */
                  if (is_output)
-                   h[1] += vnet_buffer (b[1])->l2_classify.pad.l2_len;
+                   h[1] += vnet_buffer (b[1])->l2.l2_len;
 
                  hash[1] =
                    vnet_classify_hash_packet_inline (t[1], (u8 *) h[1]);
@@ -557,7 +559,7 @@ ip_in_out_acl_inline_trace (
       vnet_classify_table_t *t0 = 0;
       vnet_classify_entry_t *e0 = 0;
       u32 next0 = ACL_NEXT_INDEX_DENY;
-      u64 hash0;
+      u32 hash0;
 
       sw_if_index0 = ~0 == way ? 0 : vnet_buffer (b[0])->sw_if_index[way];
       table_index0 = table_index_by_sw_if_index[sw_if_index0];
@@ -573,10 +575,10 @@ ip_in_out_acl_inline_trace (
       if (is_output)
        {
          /* Save the rewrite length, since we are using the l2_classify struct */
-         vnet_buffer (b[0])->l2_classify.pad.l2_len =
+         vnet_buffer (b[0])->l2.l2_len =
            vnet_buffer (b[0])->ip.save_rewrite_length;
          /* advance the match pointer so the matching happens on IP header */
-         h0 += vnet_buffer (b[0])->l2_classify.pad.l2_len;
+         h0 += vnet_buffer (b[0])->l2.l2_len;
        }
 
       vnet_buffer (b[0])->l2_classify.hash =
@@ -602,7 +604,7 @@ ip_in_out_acl_inline_trace (
 
          /* advance the match pointer so the matching happens on IP header */
          if (is_output)
-           h0 += vnet_buffer (b[0])->l2_classify.pad.l2_len;
+           h0 += vnet_buffer (b[0])->l2.l2_len;
 
          e0 = vnet_classify_find_entry_inline (t0, (u8 *) h0, hash0, now);
          if (e0)
@@ -636,8 +638,9 @@ ip_in_out_acl_inline_trace (
            {
              while (1)
                {
-                 if (PREDICT_TRUE (t0->next_table_index != ~0))
-                   t0 = pool_elt_at_index (tables, t0->next_table_index);
+                 table_index0 = t0->next_table_index;
+                 if (PREDICT_TRUE (table_index0 != ~0))
+                   t0 = pool_elt_at_index (tables, table_index0);
                  else
                    {
                      next0 = (t0->miss_next_index < n_next_nodes) ?
@@ -660,7 +663,7 @@ ip_in_out_acl_inline_trace (
 
                  /* advance the match pointer so the matching happens on IP header */
                  if (is_output)
-                   h0 += vnet_buffer (b[0])->l2_classify.pad.l2_len;
+                   h0 += vnet_buffer (b[0])->l2.l2_len;
 
                  hash0 = vnet_classify_hash_packet_inline (t0, (u8 *) h0);
                  e0 = vnet_classify_find_entry_inline