From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 6B3E51B878 for ; Tue, 10 Apr 2018 16:12:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Apr 2018 07:06:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,432,1517904000"; d="scan'208";a="219250554" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga006.fm.intel.com with ESMTP; 10 Apr 2018 07:06:31 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.61]) by IRSMSX151.ger.corp.intel.com ([169.254.4.181]) with mapi id 14.03.0319.002; Tue, 10 Apr 2018 15:06:27 +0100 From: "Jankowski, Konrad" To: "Zhang, Qi Z" , "Dai, Wei" , "Xing, Beilei" , "Wu, Jingjing" , "dev@dpdk.org" Thread-Topic: [PATCH] net/i40evf: regression fix - reenable interrupts in handler Thread-Index: AQHTpcGfYbpKkA4gPECyvN0nvxbnvqPlL8KAgAvsiQCACSZvAIAAGkWA Date: Tue, 10 Apr 2018 14:06:27 +0000 Message-ID: <53C7EC427773E548A0839C5ED9B805533D0A244D@IRSMSX103.ger.corp.intel.com> References: <1518633151-29118-1-git-send-email-konrad.jankowski@intel.com> <039ED4275CED7440929022BC67E7061153175394@SHSMSX103.ccr.corp.intel.com> <53C7EC427773E548A0839C5ED9B805533D0A1AA9@IRSMSX103.ger.corp.intel.com> <039ED4275CED7440929022BC67E706115318EDA0@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E706115318EDA0@SHSMSX103.ccr.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGFlNDNjM2ItNGUzZi00ODkzLWE3YjItZDg5NmQzNGMwNTEwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJPTWZYdXpPVzd5aVJqYVRYYWRtbFBcLytvbUNaSWwxeW93Zm9ObzYwZkhRTGxnUWNGd1Rmck1pK3hiT3BoNXhhNCJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Tue, 10 Apr 2018 16:27:54 +0200 Subject: Re: [dpdk-dev] [PATCH] net/i40evf: regression fix - reenable interrupts in handler 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: Tue, 10 Apr 2018 14:12:25 -0000 Hi Qi, > -----Original Message----- > From: Zhang, Qi Z > Sent: Tuesday, April 10, 2018 2:26 PM > To: Jankowski, Konrad ; Dai, Wei > ; Xing, Beilei ; Wu, Jingjing > ; dev@dpdk.org > Subject: RE: [PATCH] net/i40evf: regression fix - reenable interrupts in = handler > = > Hi Konrad: > Sorry for late reply. > = > > -----Original Message----- > > From: Jankowski, Konrad > > Sent: Thursday, April 5, 2018 1:12 AM > > To: Zhang, Qi Z ; Dai, Wei ; > > Xing, Beilei ; Wu, Jingjing > > ; dev@dpdk.org > > Subject: RE: [PATCH] net/i40evf: regression fix - reenable interrupts > > in handler > > > > Hi Zhang, > > > > If you look at the source of interrupt handlers in both the igb_uio > > and uio_pci_generic drivers (look for irqreturn_t type), you will see > > they can disable interrupts immediately after receipt of one. > = > Do you mean > = > if (udev->mode =3D=3D RTE_INTR_MODE_LEGACY && > !pci_check_and_mask_intx(udev->pdev)) > return IRQ_NONE; > = > so you are using legacy interrupt mode? > = > According i40e datasheet (chapter 7.5.1), legacy interrupt mode is only > supported by PF, So that's why we have rte_intr_enable in > i40e_dev_interrupt_handler. > But for VF, it only support msi-x interrupt mode. > = > Regards > Qi OK I see. Still the old version of igb_uio disables interrupts in both case= s, MSI or legacy. That version comes provided with windriver OVP6, and that's the only versio= n that actually works on this system (back from DPDK 1.6 accrording to rte_version= .h). If we're ok with not supporting this system, I'm ok with dropping this patc= h. (I'll just use it locally myself) Cheers, Konrad > > It's up to the user to make sure they're re-enabled. Also please > > compare with code in i40e_ethdev.c, which still does this correctly - > > there's an explicit > > rte_intr_enable(dev->intr_handle) call at the end of > > i40e_dev_interrupt_handler(). > > Probably a cleaner approach would be to leave them disabled as is, but > > only enable them for a once-off receipt when sending an AdminQ > > message, maybe that was the assumption here. However I've added some > > tracing to > > igbuio_pci_irqcontrol() and I'm sure this isn't happening on my system. > > (nothing is enabling those interrupts post device init). Looks like > > code path might be different with the newest igb_uio driver and MSI > > enabled, but the current code will still not work for all cases (like w= ith > uio_pci_generic). > > There can also be cases when you have and older igb_uio driver which > > disables interrupts in all cases and running it with with a new DPDK. > > (vendor provided compiled driver) I think for full compatibility we > > need to keep re-enabling those interrupts. > > > > Regards, > > Konrad > > > > -----Original Message----- > > From: Zhang, Qi Z > > Sent: Wednesday, March 28, 2018 4:37 AM > > To: Jankowski, Konrad ; Dai, Wei > > ; Xing, Beilei ; Wu, > > Jingjing ; dev@dpdk.org > > Subject: RE: [PATCH] net/i40evf: regression fix - reenable interrupts > > in handler > > > > Hi Jankowski: > > > > > -----Original Message----- > > > From: Jankowski, KonradX > > > Sent: Thursday, February 15, 2018 2:33 AM > > > To: Dai, Wei ; Xing, Beilei > > > ; Zhang, Qi Z ; Wu, > > > Jingjing ; dev@dpdk.org > > > Cc: Jankowski, KonradX > > > Subject: [PATCH] net/i40evf: regression fix - reenable interrupts in > > > handler > > > > > > Commit 66b8304f removed the rte_intr_enable() call from > > > i40evf_dev_interrupt_handler() as a "bonus". On one of my systems > > > this causes the AdminQ messages to stop beeing delivered to the VF. > > > This results in unability to initialize and use the port. With this > > > patch it works > > again. > > > > > > System in question: > > > Wind River OVP6 running kernel > > > 3.10.58-ovp-rt58-WR6.0.0.13_preempt-rt > > > > > > Signed-off-by: Konrad Jankowski > > > --- > > > drivers/net/i40e/i40e_ethdev_vf.c | 1 + > > > 1 file changed, 1 insertion(+) > > > > > > diff --git a/drivers/net/i40e/i40e_ethdev_vf.c > > > b/drivers/net/i40e/i40e_ethdev_vf.c > > > index fd003fe..b927a35 100644 > > > --- a/drivers/net/i40e/i40e_ethdev_vf.c > > > +++ b/drivers/net/i40e/i40e_ethdev_vf.c > > > @@ -1404,6 +1404,7 @@ i40evf_dev_interrupt_handler(void *param) > > > > > > done: > > > i40evf_enable_irq0(hw); > > > + rte_intr_enable(dev->intr_handle);' > > > > Would you explain more about why the patch fix the issue? > > Usually we will not accept a fix just because it work but not > > understand the root cause. > > > > Regards > > Qi > > > > > } > > > > > > static int > > > -- > > > 2.5.5 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the s= ole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact = the sender and delete all copies.