diff options
authorMichal Mazur <mkm@semihalf.com>2018-02-20 17:48:07 +0100
committerSzymon Sliwa <szs@semihalf.com>2018-02-22 16:55:10 +0100
commit708ae49d7a1ff8341152dc7ee7f3a5abafb2d2c0 (patch)
parent0f4208d9f30bb3bfea814383e8d1a3a254c14580 (diff)
plugins: odp: [WA] Force inline mode of ODP timer
This is a workaround for following VPP error: "Program terminated with signal SIGUSR1, User defined signal 1." It changes mode of timers used by ODP schedule mode. By default inline_timers is false and timer_res_init (odp_timer.c) is called to adjust timer resolution. This function uses SIGUSR1 during the process which collides with VPP as it uses the same signal for communication with clients. This patch causes inline_timers to be set and disables adjustment of timer resolution. Change-Id: Ic2225ba736f506a86832519f9c4154cee9c06056 Signed-off-by: Michal Mazur <mkm@semihalf.com>
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/odp/odp_packet.c b/src/plugins/odp/odp_packet.c
index 45f2f27..76ef979 100755
--- a/src/plugins/odp/odp_packet.c
+++ b/src/plugins/odp/odp_packet.c
@@ -512,8 +512,12 @@ odp_packet_init (vlib_main_t * vm)
odp_pool_capability_t capa;
odp_shm_t shm;
odp_instance_t instance;
+ odp_init_t init_params;
- if (odp_init_global (&instance, NULL, NULL))
+ odp_init_param_init (&init_params);
+ init_params.not_used.feat.timer = 0;
+ init_params.not_used.feat.schedule = 0;
+ if (odp_init_global (&instance, &init_params, NULL))
clib_warning ("Error: ODP global init failed");
if (odp_init_local (instance, ODP_THREAD_CONTROL) != 0)