else
{
pool_get (rt->pool, reass);
- memset (reass, 0, sizeof (*reass));
+ clib_memset (reass, 0, sizeof (*reass));
reass->id =
((u64) os_get_thread_index () * 1000000000) + rt->id_counter;
++rt->id_counter;
if (ip6_reass_main.max_reass_n > 0 && new_nbuckets > old_nbuckets)
{
clib_bihash_48_8_t new_hash;
- memset (&new_hash, 0, sizeof (new_hash));
+ clib_memset (&new_hash, 0, sizeof (new_hash));
ip6_rehash_cb_ctx ctx;
ctx.failure = 0;
ctx.new_hash = &new_hash;
else
{
clib_bihash_free_48_8 (&ip6_reass_main.hash);
- clib_memcpy (&ip6_reass_main.hash, &new_hash,
- sizeof (ip6_reass_main.hash));
+ clib_memcpy_fast (&ip6_reass_main.hash, &new_hash,
+ sizeof (ip6_reass_main.hash));
}
}
return 0;
rm->vlib_main = vm;
rm->vnet_main = vnet_get_main ();
- vec_validate (rm->per_thread_data, vlib_num_workers () + 1);
+ vec_validate (rm->per_thread_data, vlib_num_workers ());
ip6_reass_per_thread_t *rt;
vec_foreach (rt, rm->per_thread_data)
{
uword thread_index = 0;
int index;
- const uword nthreads = os_get_nthreads ();
+ const uword nthreads = vlib_num_workers () + 1;
u32 *vec_icmp_bi = NULL;
for (thread_index = 0; thread_index < nthreads; ++thread_index)
{
u64 sum_buffers_n = 0;
ip6_reass_t *reass;
uword thread_index;
- const uword nthreads = os_get_nthreads ();
+ const uword nthreads = vlib_num_workers () + 1;
for (thread_index = 0; thread_index < nthreads; ++thread_index)
{
ip6_reass_per_thread_t *rt = &rm->per_thread_data[thread_index];