From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id DD2712C31 for ; Fri, 30 Dec 2016 07:56:52 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP; 29 Dec 2016 22:56:51 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,428,1477983600"; d="scan'208";a="1105934548" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 29 Dec 2016 22:56:51 -0800 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 29 Dec 2016 22:56:51 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.248.2; Thu, 29 Dec 2016 22:56:51 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by shsmsx102.ccr.corp.intel.com ([169.254.2.88]) with mapi id 14.03.0248.002; Fri, 30 Dec 2016 14:56:48 +0800 From: "Tan, Jianfeng" To: Yuanhan Liu CC: "dev@dpdk.org" , "stephen@networkplumber.org" Thread-Topic: [PATCH v2 9/9] examples/l3fwd-power: fix not stop and close device Thread-Index: AQHSYaVtuYNQg0k22keCyKY/NIkGBKEfhvoAgACHCIA= Date: Fri, 30 Dec 2016 06:56:48 +0000 Message-ID: References: <1482996643-113253-1-git-send-email-jianfeng.tan@intel.com> <1482996643-113253-10-git-send-email-jianfeng.tan@intel.com> <20161230064438.GL21789@yliu-dev.sh.intel.com> In-Reply-To: <20161230064438.GL21789@yliu-dev.sh.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2 9/9] examples/l3fwd-power: fix not stop and close device X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2016 06:56:53 -0000 > -----Original Message----- > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > Sent: Friday, December 30, 2016 2:45 PM > To: Tan, Jianfeng > Cc: dev@dpdk.org; stephen@networkplumber.org > Subject: Re: [PATCH v2 9/9] examples/l3fwd-power: fix not stop and close > device >=20 > 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. >=20 > 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. >=20 > > This patch will invoke dev_stop() and dev_close() in signal handler. >=20 > 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 rea= lly necessary to do that? If another program takes over that device, it wil= l be re-initialized. >=20 > Is there a more clean way to handle such case in the driver? Let's do with the necessity firstly. Thanks, Jianfeng >=20 > --yliu