examples/l3fwd-power: fix stop and close on signal
authorJianfeng Tan <jianfeng.tan@intel.com>
Tue, 17 Jan 2017 07:10:30 +0000 (07:10 +0000)
committerYuanhan Liu <yuanhan.liu@linux.intel.com>
Tue, 17 Jan 2017 08:27:16 +0000 (09:27 +0100)
commite2a6f1246e273fb63a829badf0916029611a98bf
treef71f8cb4b0c5326b74b2caae351596d1e70d26c9
parent82bea46616267730ec5201645123f14a83f251a6
examples/l3fwd-power: fix stop and close on signal

As it gets killed, in SIGINT signal handler, device is not stopped
and closed. In virtio's case, vector assignment in the KVM is not
deassigned.

This patch will invoke dev_stop() and dev_close() in signal handler.

Fixes: d7937e2e3d12 ("power: initial import")

Signed-off-by: Jianfeng Tan <jianfeng.tan@intel.com>
Tested-by: Lei Yao <lei.a.yao@intel.com>
examples/l3fwd-power/main.c