From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 03E0A88E59; Fri, 23 Nov 2018 17:15:19 +0000 (UTC) Received: from aldebaran.drizzt.lan (dhcp19-189-71.ntdv.lab.eng.bos.redhat.com [10.19.189.71]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEC405D77D; Fri, 23 Nov 2018 17:15:13 +0000 (UTC) Date: Fri, 23 Nov 2018 18:15:12 +0100 From: Timothy Redaelli To: Ilya Maximets Cc: dev@dpdk.org, David Marchand , Maxime Coquelin , Tiwei Bie , Zhihong Wang , Thomas Monjalon , Ferruh Yigit , Ian Stokes , Kevin Traynor Message-ID: <20181123181512.72d22982@aldebaran.drizzt.lan> In-Reply-To: <20181123143620.10480-1-i.maximets@samsung.com> References: <20181123141739.11214-1-i.maximets@samsung.com> <20181123143620.10480-1-i.maximets@samsung.com> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 23 Nov 2018 17:15:20 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v2] net/virtio: avoid annoying IOPL call related errors 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: Fri, 23 Nov 2018 17:15:21 -0000 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