From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic313-14.consmr.mail.bf2.yahoo.com (sonic313-14.consmr.mail.bf2.yahoo.com [74.6.133.124]) by dpdk.org (Postfix) with ESMTP id 720701B5C4 for ; Sat, 4 Aug 2018 00:20:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1533334815; bh=VDTQ2IoD7jSgAzpW6fP5yRrAcdkvpMWjDxxra/xjN/8=; h=Date:From:To:Cc:In-Reply-To:References:Subject:From:Subject; b=Z+QX0ynIgwyOyAQpWisodFeSqfLDtaoY+ExFR9DD2JGq1YhPBjxZF6MZxehNMjhm6l2k5/guq3ajAFeUxhp4qLe5HFnhGDJ6TvRdEJy85oxfvVjaUx4ovX4v46cP/au5CdCbFvrCyBgrP6Z/3kcypHMahtsX4PLNdJFV0sfl1v9KfdfFJ7wxB0emuawCsjqNI7BrCvdBzX9MsCgy48rXw/mJt/Lc4kl7DALE1lO7dCt/My/pabwtXGRYjEfhTbn8nwzNCIrWRZ/HO4rKef7X572UVDicKa2Mo9NR0ANMG6lMbDu0dX7r7oAJ6S3+2R01n0+OccVdoUprkZU2IfT2dA== X-YMail-OSG: wKf3HLwVM1l38aFK6CGAT6uqzfZU8PSejCL9HhJKqsOu2Ig8KLEW31YpflNR0ng .6zhEnx4hwn3XWYovoQjXbx32rg49B_.F6io_duWa6fF32xYPCkm56F4t9cC23Wgxm7F1iHLZxGu zynxNPpkPS3BssWAa8atR_EODoUn0BCtV85XE.jn2ux5Oty3eSptMO__5J3uj0H4tEWOwRHWiC2a nUX4BG0A26IcoJ2ECXNwy1na.zq3VOnvLlKTdBHSNj6Rj2t.TJNEccGIvLg_9NJ.52p_W.DmuVhm 8F1Cbn1T.TzDYbSLMNwLwnoal7Obqso61.blGHkGaExHSX__JamQUkFpp1XUcS0pDvf.IWXJ0qmo Ky1O5KoaoTMi8fSLsX74c_6V1ItsDLdOG_9T54DxEMZMRCRrPhLdQc7EJMJ4ajlEdtNUEftADTZF MPySYHjvgDYqcPdduH7wAVcrcoiqIDD7g6upFfBrIXYgF3oIEPTnfC8fQ1alLlBD7INtppMG2qEt EpHN0HFCBMXLYpDTxZIdV8O2NQifWV9DZpoBD3Nw1L5Su3_rgUAMaDsFzQwbCTzXLJA952i8IOa4 PLQF01W3ROJAteJUafqCpeDLonXcVUogIj2B1O3zmfs9zh0ae65GG1LBFFNj44L1kN1ssFpZGQTp zGmFZBrh9rNxmf2ou9T3sGCmqYL5Qctak5u7Vim9NYrrrFtmoxK9oLg_INe7GPJf4PoHY_NIH.Nl YGDdAWwbS_LdYLGKmtiC1TimKDt3WQS0ZnuyCjA0_zVYGPzz9iYprcQGkI8W1ZHE70y5uwGVMfzu 8s5HRl.CK52tfXp60vJfEbcTV0BT_PPTK0h1o9icr9EyNr9F..CK30H0GYeKc9ZNHenqqFyqf.LA jEBey0xgVAtfhMm47MzMQSSnrs8XZK_kUdax3_n6E5ZppqpuDUzc4iPd0HQuGzI.gbiaFoXXCpqi ONkfV1OBOqSJ3vExoLCCyBpFqePrlRuJcsFN_WR4- Received: from sonic.gate.mail.ne1.yahoo.com by sonic313.consmr.mail.bf2.yahoo.com with HTTP; Fri, 3 Aug 2018 22:20:15 +0000 Date: Fri, 3 Aug 2018 22:20:12 +0000 (UTC) From: amit sehas To: maxime.coquelin@redhat.com, Stephen Hemminger Cc: users@dpdk.org Message-ID: <607910178.1827758.1533334812223@mail.yahoo.com> In-Reply-To: <20180803142420.1198b64b@xeon-e3> References: <1685797689.496737.1533140869394.ref@mail.yahoo.com> <1685797689.496737.1533140869394@mail.yahoo.com> <20180803142420.1198b64b@xeon-e3> MIME-Version: 1.0 X-Mailer: WebService/1.1.12206 YMailNorrin Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] rte_virtio_pmd_init(): IOPL call failed - cannot use virtio PMD X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2018 22:20:16 -0000 I tried my best to make iopl work but couldnt, i wrote a small 'c' program = that does only iopl()=C2=A0 and even that does not work, neither on the hos= t machine nor on the VM in docker ... i am wondering if this has anything t= o do with bios settings ...i tried it on different machines too ... root pe= rmissions, explicity setting capset ... etc .. i tried them all but still d= oes not work ... quite frustrating how many hours i had to spent trying dif= ferent things... thanks =20 On Friday, August 3, 2018, 2:24:28 PM PDT, Stephen Hemminger wrote: =20 =20 On Wed, 1 Aug 2018 16:27:49 +0000 (UTC) amit sehas wrote: > I am trying to run a dpdk application in docker and i get the above error= ... the docker instance was run as below: >=20 > docker run -dit --name -v /hostlibpath:/contlibpath:ro fedora:26 b= ash >=20 > i am new to dpdk, as a result i am quite lost as to where to look ... >=20 > thanks Short answer virtio requires DPDK process to be run as root. In order for the virtio device to signal the underlying host it may need th= e in/out instructions. These CPU instructions are normally privileged (only allowed in kernel) but= on Linux there is is a system call to allow a process with root (really CAP_SYS_RAWIO) to do = these from userspace. See iopl manual page. The actual answer is more complex. Older versions of virtio (legacy) use in= /out but the current version (modern) can use memory read/write.=C2=A0 Ideally, the DPDK= virtio would only ask for IOPL privilege if it needed it. The problem is that may need it dur= ing the negotiation process. Someone should look into fixing this. =20 >From stephen@networkplumber.org Sat Aug 4 00:22:00 2018 Return-Path: Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 90A581B5C4 for ; Sat, 4 Aug 2018 00:22:00 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id r5-v6so3466911pgv.0 for ; Fri, 03 Aug 2018 15:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IzosJVJk8sWwKlKVQsTAYzj2g5D1wSpaDcg1w8wi2tQ=; b=LjmzFkAk4GqRMXcWb/smm3MdsKAaLu0Q9hWj16wTAezFqMYd6UbcuGyqlG4btYMQ48 8saFkqr7M3p2l/H4/kliKuccJuo2a/m8Kfc86qkZPtUfC9LD6XGtNEyy+hzjaWwHCMtJ QWqWPkDAGIsFzsOve7RBilaVPqetu2d6BgHTJrJCOt0n4azdpujKR4Dc/b4rWvYKz6kS XZXOLzm0eOjmCwQrZVcQo5lz6oSqUreTSnZ6GEFfXfhcjr6MsAs6tQlTUm1IHPY+c+TV ld0iUtGpx86qhiloDIZjxCWb5PLX99bSB5sffoyTVBYfg9iSvUihgiMaE11zJW/uu9St xgyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IzosJVJk8sWwKlKVQsTAYzj2g5D1wSpaDcg1w8wi2tQ=; b=gRuTD9mG1cuF0rY4C8DMYbVRSteXn7TjuY+AQoUXA18OXRLI3zHuR7wtt0PPXEqXhy GC9ty/E282rv3CozwdlZ9XH8bW8at64MfTEN0o6PVHy7LTt4dHj0gzwZ6I+ycFjmXEJW /8ZSq+ERE5FiuimPor3r+9MqeR6rFAiqYJTUH7ESYyLOwYrblW0a+sgOafxLCbI2pr+Q HLkwID3g5oQx3rvRcKFwyb/CekZTxgjlyDCc28fZVISDkmhvDRd7Yq0of6Lyd+DlpPE5 mvBE3tNEpHSkSMOBRxepArRsjoeAI9VJBxeoeXXCONNxxxsuUOkexFtw0s2mw37Dr5E3 jyTQ== X-Gm-Message-State: AOUpUlEJf7+kNwzSi+aJ3F36hkswEGm3si5mS2MqItZq8gEB7XPSbgFH 9bMA8zgQLWlRM664gmiF4gQbv4IPQf0= X-Google-Smtp-Source: AAOMgpeAbw26mzUqm7z7rPtSQqFB0iFsfhcbgKqpshQ9zvWv+6ezbz4GUDt1AeR3ciKOfIiIOUeOqQ== X-Received: by 2002:a63:375b:: with SMTP id g27-v6mr5493715pgn.59.1533334919681; Fri, 03 Aug 2018 15:21:59 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id h10-v6sm11118033pfj.78.2018.08.03.15.21.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 15:21:59 -0700 (PDT) Date: Fri, 3 Aug 2018 15:21:50 -0700 From: Stephen Hemminger To: amit sehas Cc: maxime.coquelin@redhat.com, users@dpdk.org Message-ID: <20180803152150.10c1ecc4@xeon-e3> In-Reply-To: <607910178.1827758.1533334812223@mail.yahoo.com> References: <1685797689.496737.1533140869394.ref@mail.yahoo.com> <1685797689.496737.1533140869394@mail.yahoo.com> <20180803142420.1198b64b@xeon-e3> <607910178.1827758.1533334812223@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-users] rte_virtio_pmd_init(): IOPL call failed - cannot use virtio PMD X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2018 22:22:01 -0000 On Fri, 3 Aug 2018 22:20:12 +0000 (UTC) amit sehas wrote: What was the error? Are you running on KVM, what version? Or some other hypervisor like virtual= box? > I tried my best to make iopl work but couldnt, i wrote a small 'c' progra= m that does only iopl()=C2=A0 and even that does not work, neither on the h= ost machine nor on the VM in docker ... i am wondering if this has anything= to do with bios settings ...i tried it on different machines too ... root = permissions, explicity setting capset ... etc .. i tried them all but still= does not work ... quite frustrating how many hours i had to spent trying d= ifferent things... >=20 > thanks > =20 >=20 > On Friday, August 3, 2018, 2:24:28 PM PDT, Stephen Hemminger wrote: =20 > =20 > On Wed, 1 Aug 2018 16:27:49 +0000 (UTC) > amit sehas wrote: >=20 > > I am trying to run a dpdk application in docker and i get the above err= or ... the docker instance was run as below: > >=20 > > docker run -dit --name -v /hostlibpath:/contlibpath:ro fedora:26= bash > >=20 > > i am new to dpdk, as a result i am quite lost as to where to look ... > >=20 > > thanks =20 >=20 > Short answer virtio requires DPDK process to be run as root. >=20 > In order for the virtio device to signal the underlying host it may need = the in/out instructions. > These CPU instructions are normally privileged (only allowed in kernel) b= ut on Linux there is > is a system call to allow a process with root (really CAP_SYS_RAWIO) to d= o these from userspace. > See iopl manual page. >=20 > The actual answer is more complex. Older versions of virtio (legacy) use = in/out but the > current version (modern) can use memory read/write.=C2=A0 Ideally, the DP= DK virtio would only > ask for IOPL privilege if it needed it. The problem is that may need it d= uring the negotiation > process. Someone should look into fixing this. > =20