From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 915251B679; Fri, 3 Nov 2017 06:48:47 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2017 22:48:46 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,337,1505804400"; d="scan'208";a="917110262" Received: from kmsmsx155.gar.corp.intel.com ([172.21.73.106]) by FMSMGA003.fm.intel.com with ESMTP; 02 Nov 2017 22:48:44 -0700 Received: from pgsmsx111.gar.corp.intel.com ([169.254.2.207]) by KMSMSX155.gar.corp.intel.com ([169.254.15.167]) with mapi id 14.03.0319.002; Fri, 3 Nov 2017 13:48:44 +0800 From: "Dai, Wei" To: "Wu, Jingjing" , "Xing, Beilei" , "Liang, Cunming" CC: "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH 1/2] net/i40e: fix VFIO interrupt mapping in VF Thread-Index: AQHTU94JGP76O66HdkWjnLda4BiSTqMBaEYAgAC6ZUA= Date: Fri, 3 Nov 2017 05:48:43 +0000 Message-ID: <49759EB36A64CF4892C1AFEC9231E8D6515552A0@PGSMSX111.gar.corp.intel.com> References: <1509628256-16300-1-git-send-email-wei.dai@intel.com> <1509628256-16300-2-git-send-email-wei.dai@intel.com> <9BB6961774997848B5B42BEC655768F810EAC7C4@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <9BB6961774997848B5B42BEC655768F810EAC7C4@SHSMSX103.ccr.corp.intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTZiODg1MmEtZTU3MC00NzgzLWEzN2YtODI3MjY2YTJjOWMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImU1OE8rZ1RHYUtnQzlFU202SU9YdGNTQlpyQTU0VktsNkZSMXRENXhXbmM9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [172.30.20.206] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 1/2] net/i40e: fix VFIO interrupt mapping in VF 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, 03 Nov 2017 05:48:48 -0000 Hi, Jingjing Thanks for your feedback. > > Subject: [PATCH 1/2] net/i40e: fix VFIO interrupt mapping in VF > > > > When a VF port is bound to VFIO-PIC, only miscellaneous interrupt is > > mapped to VFIO vector 0 in i40evf_dev_init( ). > > In ixgbevf_dev_interrupt_handler( ), if previous VFIO interrupt > > mapping set in >=20 > Ixgbevf? Should be i40evf? Yes, it is my typo error, it should be i40evf.=20 >=20 > > i40evf_dev_init( ) is not cleard, it will fail when calling > > rte_intr_enable( ) tries to map Rx queue interrupt to other VFIO > > vectors. This patch clears the VFIO interrupt mappings before setting > > both miscellaneous and Rx queue interrupt mappings again to avoid > failure. > > > > Fixes: 4b90a3ff26c5 ("i40evf: support Rx interrupt") > > Cc: stable@dpdk.org > > > > Signed-off-by: Wei Dai > > --- > > drivers/net/i40e/i40e_ethdev_vf.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > > b/drivers/net/i40e/i40e_ethdev_vf.c > > index 3b76c9e..567b7d0 100644 > > --- a/drivers/net/i40e/i40e_ethdev_vf.c > > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > > @@ -1432,8 +1432,9 @@ i40evf_dev_interrupt_handler(void *param) > > " do nothing"); > > > > done: > > - i40evf_enable_irq0(hw); > > + rte_intr_disable(dev->intr_handle); > > rte_intr_enable(dev->intr_handle); > > + i40evf_enable_irq0(hw); >=20 > If that reason, you can move the rte_intr_disable to dev_start when deal > with the rxq setting in intr_conf. Yes, I have followed your suggestion and tested it with my following code c= hange. it works well. The function rte_intr_disable( ) can be moved into i40evf_dev_start( ) and = only be called it if rx queue interrupt is enabled. Meanwhile, the calling of rte_intr_enable( ) in i40evf_dev_interrupt_handle= ( ) and i40evf_dev_rx_queue_intr_enable( ) can also be removed. > > } > > > > static int > > -- > > 2.7.5