Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
VPP-1507: Added binary api to dump configured ip_punt_redirect
[vpp.git]
/
src
/
vnet
/
ip
/
ip4_reassembly.c
diff --git
a/src/vnet/ip/ip4_reassembly.c
b/src/vnet/ip/ip4_reassembly.c
index
08b3e54
..
bd33026
100644
(file)
--- a/
src/vnet/ip/ip4_reassembly.c
+++ b/
src/vnet/ip/ip4_reassembly.c
@@
-368,7
+368,7
@@
ip4_reass_find_or_create (vlib_main_t * vm, ip4_reass_main_t * rm,
else
{
pool_get (rt->pool, reass);
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;
reass->id =
((u64) os_get_thread_index () * 1000000000) + rt->id_counter;
++rt->id_counter;
@@
-1109,7
+1109,7
@@
ip4_reass_set (u32 timeout_ms, u32 max_reassemblies,
if (ip4_reass_main.max_reass_n > 0 && new_nbuckets > old_nbuckets)
{
clib_bihash_16_8_t new_hash;
if (ip4_reass_main.max_reass_n > 0 && new_nbuckets > old_nbuckets)
{
clib_bihash_16_8_t new_hash;
- memset (&new_hash, 0, sizeof (new_hash));
+
clib_
memset (&new_hash, 0, sizeof (new_hash));
ip4_rehash_cb_ctx ctx;
ctx.failure = 0;
ctx.new_hash = &new_hash;
ip4_rehash_cb_ctx ctx;
ctx.failure = 0;
ctx.new_hash = &new_hash;
@@
-1125,8
+1125,8
@@
ip4_reass_set (u32 timeout_ms, u32 max_reassemblies,
else
{
clib_bihash_free_16_8 (&ip4_reass_main.hash);
else
{
clib_bihash_free_16_8 (&ip4_reass_main.hash);
- clib_memcpy (&ip4_reass_main.hash, &new_hash,
- sizeof (ip4_reass_main.hash));
+ clib_memcpy
_fast
(&ip4_reass_main.hash, &new_hash,
+
sizeof (ip4_reass_main.hash));
}
}
return 0;
}
}
return 0;
@@
-1153,7
+1153,7
@@
ip4_reass_init_function (vlib_main_t * vm)
rm->vlib_main = vm;
rm->vnet_main = vnet_get_main ();
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 ());
ip4_reass_per_thread_t *rt;
vec_foreach (rt, rm->per_thread_data)
{
ip4_reass_per_thread_t *rt;
vec_foreach (rt, rm->per_thread_data)
{
@@
-1214,7
+1214,7
@@
ip4_reass_walk_expired (vlib_main_t * vm,
uword thread_index = 0;
int index;
uword thread_index = 0;
int index;
- const uword nthreads =
os_get_nthreads ()
;
+ const uword nthreads =
vlib_num_workers () + 1
;
for (thread_index = 0; thread_index < nthreads; ++thread_index)
{
ip4_reass_per_thread_t *rt = &rm->per_thread_data[thread_index];
for (thread_index = 0; thread_index < nthreads; ++thread_index)
{
ip4_reass_per_thread_t *rt = &rm->per_thread_data[thread_index];
@@
-1381,7
+1381,7
@@
show_ip4_reass (vlib_main_t * vm, unformat_input_t * input,
u64 sum_buffers_n = 0;
ip4_reass_t *reass;
uword thread_index;
u64 sum_buffers_n = 0;
ip4_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)
{
ip4_reass_per_thread_t *rt = &rm->per_thread_data[thread_index];
for (thread_index = 0; thread_index < nthreads; ++thread_index)
{
ip4_reass_per_thread_t *rt = &rm->per_thread_data[thread_index];