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 9414EA052B; Wed, 29 Jul 2020 17:35:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D2FDA69; Wed, 29 Jul 2020 17:35:25 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 595983B5; Wed, 29 Jul 2020 17:35:23 +0200 (CEST) IronPort-SDR: UNgITKRUuccdVMmuLHBqnnePfQkerOS2YEkNN3O2UAdLwDm3T8x81uZm6neazTl+VGjWZ5y7wO UnrRu2U8Ks/g== X-IronPort-AV: E=McAfee;i="6000,8403,9697"; a="139450906" X-IronPort-AV: E=Sophos;i="5.75,410,1589266800"; d="scan'208";a="139450906" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2020 08:35:21 -0700 IronPort-SDR: oQHJZ0Sy+HRNwYkKbNTjmxWUl6UQEs1Qipq6U4AVqX6HbGar0VbDVaGamh28oQXLQjEBZICCbg 6YWnqiEaFOZg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,410,1589266800"; d="scan'208";a="490324303" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.196.51]) ([10.213.196.51]) by fmsmga006.fm.intel.com with ESMTP; 29 Jul 2020 08:35:20 -0700 To: Owen Hilyard , dts@dpdk.org, dev@dpdk.org Cc: Lincoln Lavoie References: From: "Burakov, Anatoly" Message-ID: Date: Wed, 29 Jul 2020 16:35:20 +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 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