vppinfra: use clib_mem_alloc

Type: refactor
Change-Id: I26a2a410f8f4070d10696f796d5887842cad3916
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2022-03-21 15:06:57 +01:00
committed by Florin Coras
parent d23c55fa56
commit 8a96c6d0e7
12 changed files with 12 additions and 13 deletions

View File

@ -91,8 +91,7 @@ unformat_srv6_localsid_sample (unformat_input_t * input, va_list * args)
if (unformat (input, "new_srv6_localsid %u", &table_id))
{
/* Allocate a portion of memory */
ls_mem = clib_mem_alloc_aligned_at_offset (
sizeof(srv6_localsid_sample_per_sid_memory_t), 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof (srv6_localsid_sample_per_sid_memory_t));
/* Set to zero the memory */
clib_memset (ls_mem, 0, sizeof(srv6_localsid_sample_per_sid_memory_t));

View File

@ -366,7 +366,7 @@ unformat_srv6_ad_flow_localsid (unformat_input_t *input, va_list *args)
}
/* Allocate and initialize memory block for local SID parameters */
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -362,7 +362,7 @@ unformat_srv6_ad_localsid (unformat_input_t * input, va_list * args)
}
/* Allocate and initialize memory block for local SID parameters */
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -139,7 +139,7 @@ unformat_srv6_am_localsid (unformat_input_t * input, va_list * args)
unformat_vnet_sw_interface, vnm, &sw_if_index_in))
{
/* Allocate a portion of memory */
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
/* Set to zero the memory */
clib_memset (ls_mem, 0, sizeof *ls_mem);

View File

@ -470,7 +470,7 @@ unformat_srv6_as_localsid (unformat_input_t * input, va_list * args)
}
/* Allocate and initialize memory block for local SID parameters */
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -172,7 +172,7 @@ clb_unformat_srv6_t_m_gtp4_d (unformat_input_t * input, va_list * args)
return 0;
}
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -118,7 +118,7 @@ clb_unformat_srv6_t_m_gtp4_dt (unformat_input_t * input, va_list * args)
return 0;
}
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -113,7 +113,7 @@ clb_unformat_srv6_end_m_gtp4_e (unformat_input_t * input, va_list * args)
if (!config)
return 0;
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -150,7 +150,7 @@ clb_unformat_srv6_end_m_gtp6_d (unformat_input_t * input, va_list * args)
return 0;
}
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -125,7 +125,7 @@ clb_unformat_srv6_end_m_gtp6_d_di (unformat_input_t * input, va_list * args)
return 0;
}
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -112,7 +112,7 @@ clb_unformat_srv6_end_m_gtp6_dt (unformat_input_t * input, va_list * args)
return 0;
}
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;

View File

@ -86,7 +86,7 @@ clb_unformat_srv6_end_m_gtp6_e (unformat_input_t * input, va_list * args)
if (!unformat (input, "end.m.gtp6.e fib-table %d", &fib_table))
return 0;
ls_mem = clib_mem_alloc_aligned_at_offset (sizeof *ls_mem, 0, 0, 1);
ls_mem = clib_mem_alloc (sizeof *ls_mem);
clib_memset (ls_mem, 0, sizeof *ls_mem);
*plugin_mem_p = ls_mem;