diff options
author | Damjan Marion <damarion@cisco.com> | 2023-10-13 09:59:00 +0000 |
---|---|---|
committer | Damjan Marion <damarion@cisco.com> | 2023-10-17 17:44:41 +0000 |
commit | bf236630f518ae94bc2ef76f83b269b98dd109d4 (patch) | |
tree | 91cf566e0eb108e919011c6d912b5b01a7a5c441 /src/vlib/buffer.c | |
parent | 0094fe0190b623dbef0e57b7f4032ba3cf5f36b0 (diff) |
buffers: introduce vlib_buffer_template_t
Type: improvement
Change-Id: Ie86a5edf2ada21355543e9a0382052b16ff86927
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vlib/buffer.c')
-rw-r--r-- | src/vlib/buffer.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c index 00686593c6b..e798743bc98 100644 --- a/src/vlib/buffer.c +++ b/src/vlib/buffer.c @@ -58,9 +58,6 @@ STATIC_ASSERT_FITS_IN (vlib_buffer_t, ref_count, 16); STATIC_ASSERT_FITS_IN (vlib_buffer_t, buffer_pool_index, 16); #endif -/* Make sure that buffer template size is not accidentally changed */ -STATIC_ASSERT_OFFSET_OF (vlib_buffer_t, template_end, 64); - u16 __vlib_buffer_external_hdr_size = 0; uword @@ -577,7 +574,7 @@ vlib_buffer_pool_create (vlib_main_t *vm, u32 data_size, u32 physmem_map_index, continue; b = (vlib_buffer_t *) (p + bm->ext_hdr_size); - vlib_buffer_copy_template (b, &bp->buffer_template); + b->template = bp->buffer_template; bi = vlib_get_buffer_index (vm, b); bp->buffers[bp->n_avail++] = bi; vlib_get_buffer (vm, bi); |