From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0146.outbound.protection.outlook.com [65.55.169.146]) by dpdk.org (Postfix) with ESMTP id 97A1395DC for ; Tue, 21 Jun 2016 01:08:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qlgc.onmicrosoft.com; s=selector1-qlogic-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WkIAfNZi7HZeri6oPWAEyfpzz7gxldtVBKvKwcPtdDo=; b=Uckb7O2bChKI8kImB86OH3A6hIDD1suX+dppwOetecvwaG+BpLzHb3h43geDRgZpxIhqIJKKPiLOvJIgmi4AwxpUBN0wXqSJkW7ijdtW3BTr426Ujbvi7Hqe3ggB+BRRbqjC0Lb/gn8NUwhu0NTG+BUmccs3eGZV72Y/RsVKhlY= Received: from BLUPR11MB0370.namprd11.prod.outlook.com (10.162.91.11) by BLUPR11MB0372.namprd11.prod.outlook.com (10.162.91.13) with Microsoft SMTP Server (TLS) id 15.1.523.12; Mon, 20 Jun 2016 23:08:32 +0000 Received: from BLUPR11MB0370.namprd11.prod.outlook.com ([10.162.91.11]) by BLUPR11MB0370.namprd11.prod.outlook.com ([10.162.91.11]) with mapi id 15.01.0517.014; Mon, 20 Jun 2016 23:08:32 +0000 From: Rasesh Mody To: David Marchand , "dev@dpdk.org" CC: Dept-Eng DPDK Dev Thread-Topic: Interrupt management thread created after driver initialization Thread-Index: AdHLSFiDCe+vCJWiRUWhOuNP4fODiQ== Date: Mon, 20 Jun 2016 23:08:32 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasesh.mody@qlogic.com; x-originating-ip: [173.186.134.106] x-ms-office365-filtering-correlation-id: 0e4cca25-d54c-4897-cab8-08d3995fccc2 x-microsoft-exchange-diagnostics: 1; BLUPR11MB0372; 20:jaM56Yutf0Kygb+irMsM3Uf1S9AlX/0ZvBQP4PZEX5WtrA+ihFjDSS/mysINNWTngWUBBvmDhxS1Gz0ZLFSdsQkSpgXrSIgn72yBMRWpuPFjPJdtGVvTaI5yi9S2a9VGp1vk0zZWnuoSbNA5bgbvFLRujs6q+rwgK/LTBsNGGpg= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR11MB0372; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001); SRVR:BLUPR11MB0372; BCL:0; PCL:0; RULEID:; SRVR:BLUPR11MB0372; x-forefront-prvs: 09796A1B83 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(199003)(189002)(8936002)(81166006)(81156014)(9686002)(8676002)(99286002)(6116002)(586003)(2900100001)(102836003)(189998001)(575784001)(4001430100002)(4326007)(74316001)(86362001)(19580395003)(19580405001)(2501003)(107886002)(97736004)(11100500001)(5001770100001)(3846002)(10400500002)(33656002)(101416001)(7696003)(5002640100001)(106356001)(105586002)(122556002)(92566002)(3280700002)(50986999)(54356999)(87936001)(3660700001)(68736007)(77096005)(7846002)(5003600100003)(7736002)(76576001)(2906002)(66066001)(229853001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR11MB0372; H:BLUPR11MB0370.namprd11.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: qlogic.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: qlogic.com X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jun 2016 23:08:32.4070 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0d68a1f9-1490-4d0e-8767-a87dab3ef2ba X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR11MB0372 Subject: [dpdk-dev] Interrupt management thread created after driver initialization X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2016 23:08:35 -0000 Hi David, The patch below is causing performance regression with BNX2X PMD. We are se= eing 1518 packets not getting to line rate after applying the patch. We are= using l2fwd application on the test system. The same issue is not observed= while using testpmd application. We are trying to investigate the root cause. However, wanted to check with = you, if you or someone else while testing for performance ran into a simila= r issue? Thanks, -Rasesh From: David Marchand For virtio-net pmd, the interrupt management thread must be created after t= his driver has initialised so that iopl() has been properly called and its = effects are inherited by all eal children threads. Before this change, changing link status on a virtio-net device would trigg= er a segfault in the interrupt thread : $ mkdir -p /mnt/huge $ echo 256 > /proc/sys/vm/nr_hugepages $ mount -t hugetlbfs none /mnt/huge $ lspci |grep Ethernet 00:03.0 Ethernet controller: Red Hat, Inc Virtio network device $ modprobe = uio $ insmod ./x86_64-native-linuxapp-gcc/kmod/igb_uio.ko $ echo 0000:00:03.0 > /sys/bus/pci/devices/0000\:00\:03.0/driver/unbind $ echo 1af4 1000 > /sys/bus/pci/drivers/igb_uio/new_id $ ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x6 -n 3 -w 0000:00:03.0 -- -= i --txqflags=3D0xf01 --total-num-mbufs 2048 [snip] EAL: PCI device 0000:00:03.0 on NUMA socket -1 EAL: probe driver: 1af4:1000 rte_virtio_pmd Interactive-mode selected Configuring Port 0 (socket 0) Port 0: DE:AD:DE:01:02:03 Checking link statuses... Port 0 Link Up - speed 10000 Mbps - full-duplex Done testpmd> Then, from qemu monitor: (qemu) set_link virtio-net-pci.0 off testpmd> Segmentation fault Fixes: 565b85dcd9f4 ("eal: set iopl only when needed") Reported-by: Stephen Hemminger Suggested-by: Thomas Monjalon Signed-off-by: David Marchand --- doc/guides/rel_notes/release_2_2.rst | 4 ++++ lib/librte_eal/linuxapp/eal/eal.c | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/guides/rel_notes/release_2_2.rst b/doc/guides/rel_notes/re= lease_2_2.rst index 5e11ad0..9a35112 100644 --- a/doc/guides/rel_notes/release_2_2.rst +++ b/doc/guides/rel_notes/release_2_2.rst @@ -44,6 +44,10 @@ Drivers =20 Fixed issue with libvirt ``virsh destroy`` not killing the VM. =20 +* **virtio: Fixed crash after changing link state.** + + Fixed io permission in the interrupt handler. + =20 Libraries ~~~~~~~~~ diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/ea= l/eal.c index 33e1067..e0ad1d7 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -817,9 +817,6 @@ rte_eal_init(int argc, char **argv) if (rte_eal_alarm_init() < 0) rte_panic("Cannot init interrupt-handling thread\n"); =20 - if (rte_eal_intr_init() < 0) - rte_panic("Cannot init interrupt-handling thread\n"); - if (rte_eal_timer_init() < 0) rte_panic("Cannot init HPET or TSC timers\n"); =20 @@ -845,6 +842,9 @@ rte_eal_init(int argc, char **argv) if (rte_eal_dev_init() < 0) rte_panic("Cannot init pmd devices\n"); =20 + if (rte_eal_intr_init() < 0) + rte_panic("Cannot init interrupt-handling thread\n"); + RTE_LCORE_FOREACH_SLAVE(i) { =20 /* -- 1.8.3.1