From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <james.liu@ssi.samsung.com>
Received: from mx2.ssi.samsung.com (mx2.ssi.samsung.com [207.140.43.206])
 by dpdk.org (Postfix) with ESMTP id D653CC6F6
 for <dev@dpdk.org>; Wed, 29 Apr 2015 01:46:09 +0200 (CEST)
X-ASG-Debug-ID: 1430264768-03754d790b015d0001-TfluYd
Received: from ssiexch-casht1.ssi.samsung.com ([105.128.134.61]) by
 mx2.ssi.samsung.com with ESMTP id FvUahef4gIYl906P for <dev@dpdk.org>;
 Tue, 28 Apr 2015 16:46:08 -0700 (PDT)
X-Barracuda-Envelope-From: james.liu@ssi.samsung.com
X-Barracuda-Apparent-Source-IP: 105.128.134.61
X-ASG-Whitelist: Client
Received: from SSIEXCH-MB3.ssi.samsung.com ([fe80::9dae:55f:7824:a7d1]) by
 ssiexch-casht1.ssi.samsung.com ([fe80::44fd:e72a:215c:8df1%11]) with mapi id
 14.03.0123.003; Tue, 28 Apr 2015 16:46:08 -0700
From: "James (Fei) Liu-SSI" <james.liu@ssi.samsung.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] Issues of MSIx interrupt enable with user space driver
X-ASG-Orig-Subj: RE: [dpdk-dev] Issues of MSIx interrupt enable with user space
 driver
Thread-Index: AQHQgf144QHvEesiRkOMFxvdtP0IsZ1jFsTI
Date: Tue, 28 Apr 2015 23:46:07 +0000
Message-ID: <99767EA2E27DD44DB4E9F9B9ACA458C03B30F13C@SSIEXCH-MB3.ssi.samsung.com>
References: <99767EA2E27DD44DB4E9F9B9ACA458C03B30F07F@SSIEXCH-MB3.ssi.samsung.com>
In-Reply-To: <99767EA2E27DD44DB4E9F9B9ACA458C03B30F07F@SSIEXCH-MB3.ssi.samsung.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [105.128.34.135]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-CFilter-Loop: Reflected
X-Barracuda-Connect: UNKNOWN[105.128.134.61]
X-Barracuda-Start-Time: 1430264768
X-Barracuda-URL: http://mx1.ssi.samsung.com:8000/cgi-mod/mark.cgi
X-Virus-Scanned: by bsmtpd at ssi.samsung.com
X-Barracuda-BRTS-Status: 1
Subject: Re: [dpdk-dev] Issues of MSIx interrupt enable with user space
 driver
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 28 Apr 2015 23:46:10 -0000

Hi ALL,=0A=
   Dump trace was added for more debugging information. thanks for your hel=
p in advance.=0A=
=0A=
[  180.360229] vfio_ecap_init: 0000:02:00.0 hiding ecap 0x19@0x180=0A=
[  180.486813] vfio-pci 0000:02:00.0: irq 27 for MSI/MSI-X=0A=
[  180.489332] dmar: DRHD: handling fault status reg 2=0A=
[  180.489354] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G           OE  3.17.=
2 #4=0A=
[  180.489356] Hardware name: Dell Inc. OptiPlex 7010/0773VG, BIOS A05 07/3=
1/2012=0A=
[  180.489358]  001f000000000000 ffff88011e203e68 ffffffff81ac42d7 00000000=
00000000=0A=
[  180.489362]  ffff88011e203ec8 ffffffff81997161 0000000000000019 ffff8801=
1d807780=0A=
[  180.489365]  0000000000000200 0000000000000022 ffff88011d80692c ffff8801=
17a80800=0A=
[  180.489368] Call Trace:=0A=
[  180.489370]  <IRQ>  [<ffffffff81ac42d7>] dump_stack+0x45/0x56=0A=
[  180.489383]  [<ffffffff81997161>] dmar_fault+0xc1/0x230=0A=
[  180.489388]  [<ffffffff8110469e>] handle_irq_event_percpu+0x3e/0x1a0=0A=
[  180.489391]  [<ffffffff8110483d>] handle_irq_event+0x3d/0x60=0A=
[  180.489394]  [<ffffffff811073e7>] handle_edge_irq+0x77/0x130=0A=
[  180.489399]  [<ffffffff810594ee>] handle_irq+0x1e/0x30=0A=
[  180.489402]  [<ffffffff81ad112f>] do_IRQ+0x4f/0xf0=0A=
[  180.489406]  [<ffffffff81acefad>] common_interrupt+0x6d/0x6d=0A=
[  180.489407]  <EOI>  [<ffffffff819611e0>] ? cpuidle_enter_state+0x70/0x17=
0=0A=
[  180.489415]  [<ffffffff819611cd>] ? cpuidle_enter_state+0x5d/0x170=0A=
[  180.489419]  [<ffffffff81961397>] cpuidle_enter+0x17/0x20=0A=
[  180.489422]  [<ffffffff810eebad>] cpu_startup_entry+0x31d/0x340=0A=
[  180.489425]  [<ffffffff81ab4277>] rest_init+0x77/0x80=0A=
[  180.489430]  [<ffffffff8238d07f>] start_kernel+0x42a/0x435=0A=
[  180.489433]  [<ffffffff8238ca4e>] ? set_init_arg+0x53/0x53=0A=
[  180.489437]  [<ffffffff8238c120>] ? early_idt_handlers+0x120/0x120=0A=
[  180.489440]  [<ffffffff8238c5ee>] x86_64_start_reservations+0x2a/0x2c=0A=
[  180.489443]  [<ffffffff8238c733>] x86_64_start_kernel+0x143/0x152=0A=
[  180.489446] dmar: INTR-REMAP: Request device [[02:00.0] fault index 1f=
=0A=
[  180.489446] INTR-REMAP:[fault reason 34] Present field in the IRTE entry=
 is clear=0A=
=0A=
=0A=
Regards,=0A=
James=0A=
________________________________________=0A=
From: dev [dev-bounces@dpdk.org] on behalf of James (Fei) Liu-SSI [james.li=
u@ssi.samsung.com]=0A=
Sent: Tuesday, April 28, 2015 2:57 PM=0A=
To: dev@dpdk.org=0A=
Subject: [dpdk-dev] Issues of MSIx interrupt enable with user space driver=
=0A=
=0A=
Hi All,=0A=
    We are porting driver from kernel into user space driver with DPDK for =
one of our devices. Polling thread works fine without any issue. However, w=
e want to switch from polling to interrupt based handler. While we enable i=
nterrupt with VFIO MSIx, we always get below errors after issuing one comma=
nd:=0A=
=0A=
[  465.464186] dmar: DRHD: handling fault status reg 2=0A=
[  465.464194] dmar: INTR-REMAP: Request device [[02:00.0] fault index 27=
=0A=
[  465.464194] INTR-REMAP:[fault reason 34] Present field in the IRTE entry=
 is clear=0A=
=0A=
Here are steps we follow to enable interrupt:=0A=
1. --vfio-intr msix   was passed in as parameter for rte_eal_init=0A=
2. rte_intr_enable was called during the drive probe stage.=0A=
3. rte_intr_callback_register was called after interrupt was enabled=0A=
=0A=
=0A=
=0A=
Is there anyone in the forum who worked on the interrupt handler to share w=
ith us about your comments? thanks for your help in advance.=0A=
=0A=
Regards,=0A=
James=0A=