From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id D3C4C2BA1 for ; Mon, 13 Feb 2017 02:16:16 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga105.jf.intel.com with ESMTP; 12 Feb 2017 17:16:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,155,1484035200"; d="scan'208";a="1125688404" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga002.fm.intel.com with ESMTP; 12 Feb 2017 17:16:15 -0800 Received: from fmsmsx158.amr.corp.intel.com (10.18.116.75) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 12 Feb 2017 17:16:15 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx158.amr.corp.intel.com (10.18.116.75) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 12 Feb 2017 17:16:15 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.20]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.204]) with mapi id 14.03.0248.002; Mon, 13 Feb 2017 09:16:11 +0800 From: "Zhang, Qi Z" To: Thomas Monjalon CC: "dev@dpdk.org" , "Wu, Jingjing" Thread-Topic: [PATCH] eal: fix max number of interrupt request Thread-Index: AQHSg0phfubNmb4Lkkm+E4CCzxKBc6FhgWuAgASdGpA= Date: Mon, 13 Feb 2017 01:16:11 +0000 Message-ID: <039ED4275CED7440929022BC67E706115305B067@SHSMSX103.ccr.corp.intel.com> References: <1486670383-5286-1-git-send-email-qi.z.zhang@intel.com> <3158466.ioj3dkTVO6@xps13> In-Reply-To: <3158466.ioj3dkTVO6@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiY2Q5MzczNTktNmM4ZC00NjdhLTgzMzYtMGU2NGQ1ODlkMDJjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IlZzblwvZFZtQ2xvVzRKMzFXbUhMSEpxSkNMOXAzWVwvTXgrUEhmVVNvT1JxND0ifQ== x-ctpclassification: CTP_IC 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] eal: fix max number of interrupt request 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: Mon, 13 Feb 2017 01:16:17 -0000 Hi Thomas: > -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Friday, February 10, 2017 6:19 PM > To: Zhang, Qi Z > Cc: dev@dpdk.org; Wu, Jingjing > Subject: Re: [PATCH] eal: fix max number of interrupt request >=20 > 2017-02-09 14:59, Qi Zhang: > > The max number of interrupt request is possible be changed after > > rte_intr_callback_register, so in get_max_intr, we need to check if > > nessesary to update the max_intr. >=20 > So you are using rte_intr_enable() to update the max_intr field in the ca= se of > VFIO_MSIX. > What about MSI, INTX and UIO cases? My thought is, even without my fix, VFIO_MSIX is already the only case that= try to modify max_intr field=20 In get_max_intr, we have: if (!src->intr_handle.max_intr) src->intr_handle.max_intr =3D 1; else if (src->intr_handle.max_intr > RTE_MAX_RXTX_INTR_VEC_= ID) src->intr_handle.max_intr =3D RTE_MAX_RXTX_INTR_VEC_ID + 1; So my patch just follow this and fix some problem. Another option is I can use a local variable that assigned by max_intr with= boundary check, so get_max_intr can be totally removed and max_intr in int= r_source will not be modified. To me both fix are not perfect, I think the problem is in rte_intr_callback= _register we just save a copy of the pci_dev->intr_handle but not the addre= ss point, so we are missing some mechanism to sync them. But since we have tight schedule on the 17.02 release and this issue does c= ause some example code can't work, so we need to a fix it first, we may con= sider improve the mechanism later. Thanks Qi