Fix potential crash with latency accuracy 93/59593/1
authorPatrice Buriez <patrice.buriez@intel.com>
Sat, 7 Jul 2018 12:03:32 +0000 (14:03 +0200)
committerPatrice Buriez <patrice.buriez@intel.com>
Sat, 7 Jul 2018 12:03:32 +0000 (14:03 +0200)
commit2e924e65c5ac509925bc5a28b724db108fe99111
tree021905fcb10fa77918e8bf757f8feeec6fe0bf73
parent247bf8232dacf0108eb46efe8cf2151bbf855b8a
Fix potential crash with latency accuracy

Detect, remember and skip bad/unexpected packets:
- too short to hold the latency-related values
- with bad signature
- with invalid generator_id
using a uint64_t-based bitmap.

Also moved variable declarations closer to usage,
added some likely/unlikely hints,
reworked some return statements, and
fixed 32-bit overflow (every ~4s) of rx_time_err computation.

Change-Id: Ib2aadc1af6b7a68601cc080ba66b10d41ff9a64e
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
VNFs/DPPD-PROX/handle_lat.c