From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id CE5CB1B5C3 for ; Fri, 3 Aug 2018 23:24:28 +0200 (CEST) Received: by mail-pf1-f194.google.com with SMTP id j8-v6so3880902pff.6 for ; Fri, 03 Aug 2018 14:24:28 -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=pLVhfs6I4nJVZsYwy+kVMM6s6vSItq3qR7gaYSSXjE4=; b=vnq96yEcJb3RWkdX5UcXEZauS79h93d4fSmqebgTqj8H4og2AdyqRh32Db4l3t7G8n hM9Bbx/2k+LlMPAdrcAw9s8Sx24IA5QErWrp5fW2fqzaHL9X0NC2qbR+p6HGSgZZBKyM I+uRgVabAQz2srjrLLoBMeVzCoVxkS8oGKWVTpxXYq+i/QaHp2NzKwJGj500bGGkYVav FdWY613d6xIxjEoSiQ8F/anjrH/3pNvnOlWt9yODkm753UmZtStsz7Gq8+WYZeKuMo0p CtAU8KmbohYVN4M51aLCVBAD7PFlsehxxlBiUr9Eq0fieQby22OUPyXZ8uwFDgfNuShK o9Dw== 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=pLVhfs6I4nJVZsYwy+kVMM6s6vSItq3qR7gaYSSXjE4=; b=LJwlEVpec9+TYq3pCZpU+e//rPd5Z1l5qAmW+CK+cxgL0k000uTkA2YT2GpF9k9tgN bqwJPV1x2UlgVMvQ+bVQT5bqdO/sydRnrSbAQ7oLxp8hXLN8H+1RjGUMmB6/y8nKT+UV QVO9qvarocVCut3sxcS7eW2XOpTwizf5jtULfkOpRFYtJR8CqvA77fyiqqlQDvfgWfJN JGHgJ5mwvufi/G8ALpVWMbCcCSb+PA5an2NvNa0bqx3QtWYf2RqIzhu/IIh1Pp8ajmc/ gYpWQ5YoSkR8WG7X3P7PDwMWSuqS/Lr+lpoz1w1Zx2Q/X8IT4Ws2WYByyfohnh8rB+Y2 7ECw== X-Gm-Message-State: AOUpUlFGTPcMjvmN4kMcWjyeSqO1SyPTT9ORywVq83UhLy8p1VtJb7p9 Jrz6bcUPtEWAI0AV25TveQPr2w== X-Google-Smtp-Source: AAOMgpdufaYSJqmfvr/2a3p6YoC8LweOfvmZAFjt5EutzmsH0adBcqjYkVUMPKvwo3LX7Hc9ys0Aew== X-Received: by 2002:aa7:8591:: with SMTP id w17-v6mr6350106pfn.77.1533331467748; Fri, 03 Aug 2018 14:24:27 -0700 (PDT) Received: from xeon-e3 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id d9-v6sm5226957pgp.30.2018.08.03.14.24.27 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 03 Aug 2018 14:24:27 -0700 (PDT) Date: Fri, 3 Aug 2018 14:24:20 -0700 From: Stephen Hemminger To: amit sehas , maxime.coquelin@redhat.com Cc: users@dpdk.org Message-ID: <20180803142420.1198b64b@xeon-e3> In-Reply-To: <1685797689.496737.1533140869394@mail.yahoo.com> References: <1685797689.496737.1533140869394.ref@mail.yahoo.com> <1685797689.496737.1533140869394@mail.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 21:24:29 -0000 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: > > docker run -dit --name -v /hostlibpath:/contlibpath:ro fedora:26 bash > > i am new to dpdk, as a result i am quite lost as to where to look ... > > 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 the 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. Ideally, the DPDK virtio would only ask for IOPL privilege if it needed it. The problem is that may need it during the negotiation process. Someone should look into fixing this.