Fix potential crash with latency accuracy 43/60943/1 stable/fraser
authorPatrice Buriez <patrice.buriez@intel.com>
Sat, 7 Jul 2018 12:03:32 +0000 (14:03 +0200)
committerDeepak S <deepak.s@linux.intel.com>
Tue, 14 Aug 2018 20:26:21 +0000 (01:56 +0530)
commitfc6a8370e48cdf5fc9a77ab8e428c00c7b3e4093
tree021905fcb10fa77918e8bf757f8feeec6fe0bf73
parent692702c10772e13b533c908ed3f95a430ad476ce
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