X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=VNFs%2FDPPD-PROX%2Frun.c;h=c05f0a9ff9e2cb9f58063bb824d49cf76a0cb386;hb=ba394f91bd74cd2f0dac04dfbcece5b3cb461f3e;hp=bed0c757395e381ce2477bc69b0f05c7ce926541;hpb=2a7b2ff862fb75e8e3b34b58eb09dd4de8a6a28d;p=samplevnf.git diff --git a/VNFs/DPPD-PROX/run.c b/VNFs/DPPD-PROX/run.c index bed0c757..c05f0a9f 100644 --- a/VNFs/DPPD-PROX/run.c +++ b/VNFs/DPPD-PROX/run.c @@ -237,6 +237,13 @@ void __attribute__((noreturn)) run(uint32_t flags) if (stop_tsc && rte_rdtsc() >= stop_tsc) { stop_prox = 1; } + if ((prox_cfg.heartbeat_tsc) && (prox_cfg.heartbeat_timeout) && (rte_rdtsc() >= prox_cfg.heartbeat_tsc)) { + plog_info("Stopping to handle client as heartbeat timed out\n"); + stop_core_all(-1); + stop_handling_client(); + req_refresh(); + prox_cfg.heartbeat_tsc = 0; + } } } else { while (stop_prox == 0) { @@ -254,6 +261,13 @@ void __attribute__((noreturn)) run(uint32_t flags) if (stop_tsc && rte_rdtsc() >= stop_tsc) { stop_prox = 1; } + if ((prox_cfg.heartbeat_tsc) && (prox_cfg.heartbeat_timeout) && (rte_rdtsc() >= prox_cfg.heartbeat_tsc)) { + plog_info("Stopping to handle client as heartbeat timed out\n"); + stop_core_all(-1); + stop_handling_client(); + req_refresh(); + prox_cfg.heartbeat_tsc = 0; + } } }