From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timothy Redaelli Subject: Re: [PATCH v2] net/virtio: avoid annoying IOPL call related errors Date: Fri, 23 Nov 2018 18:15:12 +0100 Message-ID: <20181123181512.72d22982@aldebaran.drizzt.lan> References: <20181123141739.11214-1-i.maximets@samsung.com> <20181123143620.10480-1-i.maximets@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, David Marchand , Maxime Coquelin , Tiwei Bie , Zhihong Wang , Thomas Monjalon , Ferruh Yigit , Ian Stokes , Kevin Traynor To: Ilya Maximets Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id E7F3947CE for ; Fri, 23 Nov 2018 18:15:20 +0100 (CET) In-Reply-To: <20181123143620.10480-1-i.maximets@samsung.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 23 Nov 2018 17:36:20 +0300 Ilya Maximets wrote: > In case of running with not enough capabilities, i.e. running as > non-root user any application linked with DPDK prints the message > about IOPL call failure even if it was just called like > './testpmd --help'. For example, this beaks most of the OVS unit > tests if it built with DPDK support. > > Let's register the virtio driver unconditionally and print error > message while probing the device. Silent iopl() call left in the > constructor to have privileges as early as possible as it was before. > > Signed-off-by: Ilya Maximets > --- > > Version 2: > * Fixed possible fd leak on BSD. > > We can avoid test failures in OVS by filtering the output > like this: > https://patchwork.ozlabs.org/project/openvswitch/list/?series=77706 > > But it still looks very inconvenient for me to have this > message in the output of every command for the DPDK linked app. > > drivers/net/virtio/virtio_ethdev.c | 11 ++++++----- > lib/librte_eal/bsdapp/eal/eal.c | 6 ++++-- > 2 files changed, 10 insertions(+), 7 deletions(-) Without this commit, if you link OVS as shared library (--enable-shared), you'll also have this annoying message every time you open a new (bash) shell, as user, due to OVS bash-completion: [tredaell@aldebaran ~]$ bash rte_virtio_pmd_init(): IOPL call failed - cannot use virtio PMD rte_virtio_pmd_init(): IOPL call failed - cannot use virtio PMD [tredaell@aldebaran ~]$ Acked-By: Timothy Redaelli