diff options
author | wanghanlin <wanghanlin@corp.netease.com> | 2020-09-11 17:19:32 +0800 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2020-12-11 02:10:55 +0000 |
commit | 492350ee645ee415593b499590757bfa8e0c4410 (patch) | |
tree | a0c0e83f30978f56a0fbe0dae4e23f752fc33603 /src | |
parent | 7184571810d750001583763c11885ce6401e1c28 (diff) |
vcl: fix crash problem for invalidation of vls_table_lock
Type: fix
Signed-off-by: wanghanlin <wanghanlin@corp.netease.com>
Change-Id: I0649f4d5adb5fa5b407431ea23982f2ad87fb657
Diffstat (limited to 'src')
-rw-r--r-- | src/vcl/vcl_locked.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c index 35061e7d86e..d56a209d2cd 100644 --- a/src/vcl/vcl_locked.c +++ b/src/vcl/vcl_locked.c @@ -219,7 +219,10 @@ vls_mt_add (void) * vcl worker with vpp. Otherwise, all threads use the same vcl worker, so * update the vcl worker's thread local worker index variable */ if (vls_mt_wrk_supported ()) - vls_register_vcl_worker (); + { + if (vppcom_worker_register () != VPPCOM_OK) + VERR ("failed to register worker"); + } else vcl_set_worker_index (vlsl->vls_wrk_index); } @@ -1712,11 +1715,7 @@ vls_use_real_epoll (void) void vls_register_vcl_worker (void) { - if (vppcom_worker_register () != VPPCOM_OK) - { - VERR ("failed to register worker"); - return; - } + vls_mt_add (); } /* |