From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 092BCA052B; Fri, 31 Jul 2020 11:12:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99BDE2BB9; Fri, 31 Jul 2020 11:12:44 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 914242BB8; Fri, 31 Jul 2020 11:12:42 +0200 (CEST) IronPort-SDR: 4+J6E9od9jCid9w5dDcwKtQEqRpWCbGU0t9zLY4tLs5nViMUQCfRDsas0BZc7c+3xfYGtfNygZ Nqs1VniQQAcA== X-IronPort-AV: E=McAfee;i="6000,8403,9698"; a="236615406" X-IronPort-AV: E=Sophos;i="5.75,417,1589266800"; d="scan'208";a="236615406" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2020 02:12:41 -0700 IronPort-SDR: XXvR8HBeG1CWFpXoO60IBfN3SfV1t8FMEJn7C8XMoMDtCbSdBOJFo9tWN7ofs3BnbRtHjrk2QS Gk3ff0grSKLg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,417,1589266800"; d="scan'208";a="331012669" Received: from cfircoh-mobl1.ger.corp.intel.com (HELO [10.213.220.248]) ([10.213.220.248]) by orsmga007.jf.intel.com with ESMTP; 31 Jul 2020 02:12:39 -0700 To: Owen Hilyard Cc: dts@dpdk.org, dev@dpdk.org, Lincoln Lavoie References: From: "Burakov, Anatoly" Message-ID: Date: Fri, 31 Jul 2020 10:12:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] Userspace testing 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 30-Jul-20 5:54 PM, Owen Hilyard wrote: > Thanks for the advice. > > I was wondering about the state of the "Setup VFIO permissions" option > in the setup script. It seems to just modify the character device's > permissions and then check their memory limit. Should this option also > handle the hugepages setup? I was under the (mis?)impression that the hugepage setup part of the script did that? > > Thanks > > On Wed, Jul 29, 2020 at 11:35 AM Burakov, Anatoly > > wrote: > > On 29-Jul-20 3:34 PM, Owen Hilyard wrote: > > Hello all, > > > > I was wondering what everyone's thoughts on doing both userspace > testing > > and unprivileged testing of dpdk applications is. DTS currently > runs all > > commands on the tester and the dut as the root user. Please > correct me if > > I'm wrong, but I was under the assumption that most applications > written > > with dpdk would not run as root. This could present a problem > since it is > > possible that permissions errors could arise and we wouldn't > notice it due > > to the way we currently test. Given that, I was wondering what > should and > > should not be possible as a normal (non-root) user, and what > would be the > > best way to go about verifying this. > > > > Thanks > > > > This is useful, but not everything is supposed to work with limited > privileges. Things that definitely *won't* work are KNI and anything > igb_uio-related. Everything VFIO should work fine, and setting up > correct permissions for hugepages and VFIO is one of the trickier > things > that even I don't know how to do correctly off the top of my head :D > > An easy stopgap way of running almost everything as an unprivileged > user > is to use in-memory mode (--in-memory EAL switch); this will cause EAL > to reserve hugepages etc. without touching the filesystem, sacrificing > secondary process support in the process (so e.g. EAL autotest won't > work in --in-memory mode as it relies on secondary process support). > > So, i would say that it would be a valuable thing to test for, but be > aware that not everything is expected to work. > > -- > Thanks, > Anatoly > -- Thanks, Anatoly