summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/adj')
-rw-r--r--src/vnet/adj/adj.h2
-rw-r--r--src/vnet/adj/rewrite.h14
2 files changed, 9 insertions, 7 deletions
diff --git a/src/vnet/adj/adj.h b/src/vnet/adj/adj.h
index 37389c346a0..9d1577fe911 100644
--- a/src/vnet/adj/adj.h
+++ b/src/vnet/adj/adj.h
@@ -316,7 +316,7 @@ typedef struct ip_adjacency_t_
CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
/* Rewrite in second/third cache lines */
- vnet_declare_rewrite (VLIB_BUFFER_PRE_DATA_SIZE);
+ VNET_DECLARE_REWRITE;
/**
* more control plane members that do not fit on the first cacheline
diff --git a/src/vnet/adj/rewrite.h b/src/vnet/adj/rewrite.h
index 9b83b5ac0db..c2084ea0a4a 100644
--- a/src/vnet/adj/rewrite.h
+++ b/src/vnet/adj/rewrite.h
@@ -105,12 +105,14 @@ STATIC_ASSERT (sizeof (vnet_rewrite_header_t) <= 16,
vnet_rewrite_declare(64 - 2*sizeof(int)) rw;
} my_adjacency_t;
*/
-#define vnet_declare_rewrite(total_bytes) \
-struct { \
- vnet_rewrite_header_t rewrite_header; \
- \
- u8 rewrite_data[(total_bytes) - sizeof (vnet_rewrite_header_t)]; \
-}
+#define VNET_DECLARE_REWRITE \
+ struct \
+ { \
+ vnet_rewrite_header_t rewrite_header; \
+ \
+ u8 rewrite_data[(VNET_REWRITE_TOTAL_BYTES) - \
+ sizeof (vnet_rewrite_header_t)]; \
+ }
always_inline void
vnet_rewrite_clear_data_internal (vnet_rewrite_header_t * rw, int max_size)