> -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan....@linux.intel.com] > Sent: Friday, December 30, 2016 2:45 PM > To: Tan, Jianfeng > Cc: dev@dpdk.org; step...@networkplumber.org > Subject: Re: [PATCH v2 9/9] examples/l3fwd-power: fix not stop and close > device > > On Thu, Dec 29, 2016 at 07:30:43AM +0000, Jianfeng Tan wrote: > > 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. > > What wrong could happen then?
Actually, no strange things happen so far. My purpose for this patch is to verify that irqfd is deassigned. And as calling dev_stop() and dev_close() is a good practice, so I use the word "fix" here. > > > This patch will invoke dev_stop() and dev_close() in signal handler. > > I will just say, it may workaround the bug you encountered, particulary, > for this example only. There's no bug to work around. > If some people want to use the virtio interrupt > somewhere at another app, he also has to do similar thing. Vfio-pci is the best place to put device into original state, but is it really necessary to do that? If another program takes over that device, it will be re-initialized. > > Is there a more clean way to handle such case in the driver? Let's do with the necessity firstly. Thanks, Jianfeng > > --yliu