examples/l3fwd-power: add Rx interrupt timeout
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 7 May 2020 10:46:28 +0000 (11:46 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 11 May 2020 19:33:42 +0000 (21:33 +0200)
commitf4d1e19c293dc95073614f630ea729cf0bfb57b7
tree3c94e2481ad45eceaa75f9033af6c5d5df6ccb5c
parentea153cc853049c6f935693e48d2866782370a3fe
examples/l3fwd-power: add Rx interrupt timeout

Currently, thread waiting on an interrupt does not have a timeout, so
it will not ever wake up until traffic arrives. This means that, when
time comes to exit the application, it will not quit unless there
happens to be traffic coming in and waking up the thread from sleep.

Fix it so that the interrupt thread sleeps for 10ms before waking up
and attempting to poll again. Additionally, remove the log message
to avoid spamming about entering interrupt mode.

Fixes: 613ce6691c0d ("examples/l3fwd-power: implement proper shutdown")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: David Hunt <david.hunt@intel.com>
Tested-by: Lihong Ma <lihongx.ma@intel.com>
examples/l3fwd-power/main.c