examples/l3fwd-power: fix race on interrupt wakeup log
authorAnatoly Burakov <anatoly.burakov@intel.com>
Fri, 2 Oct 2020 12:07:09 +0000 (13:07 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 2 Nov 2020 10:47:19 +0000 (11:47 +0100)
commit317a1da8d632ebc7141716698cb7018588629ae2
tree10ad5e974f916c1909fc291a5d9bdc360c239680
parent79d69c6dcf0debea38ac258d230e2f8c93e5ad12
examples/l3fwd-power: fix race on interrupt wakeup log

Currently, the interrupt status notification prevents log spam by
remembering whether previous interrupt wakeup was due to traffic or due
to timeout expiring. However, it is a single variable that can
potentially be accessed from multiple threads, so it is not thread-safe.

Fix it by having per-lcore interrupt status.

Fixes: f4d1e19c293d ("examples/l3fwd-power: add Rx interrupt timeout")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Xi Zhang <xix.zhang@intel.com>
examples/l3fwd-power/main.c