From 8e0af7a7ffb0d6208c91e74eeaa0e46f3ac29026 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 17 Mar 2022 17:27:31 +0000 Subject: vnet: Remove the unused fields from opaque2 Type: refactor Signed-off-by: Neale Ranns Change-Id: Ibb6d19de053c306e9758dbfa827ab7bcab5de856 --- src/plugins/mdata/mdata.c | 13 ++++++------- src/vnet/buffer.h | 14 +++----------- src/vnet/interface_format.c | 3 --- 3 files changed, 9 insertions(+), 21 deletions(-) (limited to 'src') diff --git a/src/plugins/mdata/mdata.c b/src/plugins/mdata/mdata.c index 7e178625b22..d90c20d9e9c 100644 --- a/src/plugins/mdata/mdata.c +++ b/src/plugins/mdata/mdata.c @@ -350,13 +350,12 @@ _(tcp.data_len) \ _(tcp.flags) \ _(snat.flags) -#define foreach_opaque2_metadata_field \ -_(qos.bits) \ -_(qos.source) \ -_(loop_counter) \ -_(gso_size) \ -_(gso_l4_hdr_sz) \ -_(pg_replay_timestamp) +#define foreach_opaque2_metadata_field \ + _ (qos.bits) \ + _ (qos.source) \ + _ (loop_counter) \ + _ (gso_size) \ + _ (gso_l4_hdr_sz) static u8 * format_buffer_metadata_changes (u8 * s, va_list * args) diff --git a/src/vnet/buffer.h b/src/vnet/buffer.h index aa5d12e0754..2f2524590e9 100644 --- a/src/vnet/buffer.h +++ b/src/vnet/buffer.h @@ -495,15 +495,7 @@ typedef struct }; } nat; - union - { - struct - { - u64 pad[1]; - u64 pg_replay_timestamp; - }; - u32 unused[8]; - }; + u32 unused[8]; } vnet_buffer_opaque2_t; #define vnet_buffer2(b) ((vnet_buffer_opaque2_t *) (b)->opaque2) @@ -512,8 +504,8 @@ typedef struct * The opaque2 field of the vlib_buffer_t is interpreted as a * vnet_buffer_opaque2_t. Hence it should be big enough to accommodate one. */ -STATIC_ASSERT (sizeof (vnet_buffer_opaque2_t) <= - STRUCT_SIZE_OF (vlib_buffer_t, opaque2), +STATIC_ASSERT (sizeof (vnet_buffer_opaque2_t) == + STRUCT_SIZE_OF (vlib_buffer_t, opaque2), "VNET buffer opaque2 meta-data too large for vlib_buffer"); #define gso_mtu_sz(b) (vnet_buffer2(b)->gso_size + \ diff --git a/src/vnet/interface_format.c b/src/vnet/interface_format.c index d1fe9b877bb..1ef4704257c 100644 --- a/src/vnet/interface_format.c +++ b/src/vnet/interface_format.c @@ -701,9 +701,6 @@ format_vnet_buffer_opaque2 (u8 * s, va_list * args) (u32) (o->gso_size), (u32) (o->gso_l4_hdr_sz)); vec_add1 (s, '\n'); - s = format (s, "pg_replay_timestamp: %llu", (u32) (o->pg_replay_timestamp)); - vec_add1 (s, '\n'); - for (i = 0; i < vec_len (im->buffer_opaque2_format_helpers); i++) { helper_fp = im->buffer_opaque2_format_helpers[i]; -- cgit 1.2.3-korg