Storage Performance Development Kit (SPDK)
 help / color / mirror / Atom feed
From: Walker, Benjamin <benjamin.walker at intel.com>
To: spdk@lists.01.org
Subject: Re: [SPDK] Running nvmf target as non-root
Date: Wed, 15 May 2019 18:12:56 +0000	[thread overview]
Message-ID: <22eb01877935a036ae15a7ee26da19a5ad1f5f63.camel@intel.com> (raw)
In-Reply-To: CAHUk8cTAwj+1tBwZyDm1Q98PqZhrwmRP48GYzog09GYK5wiGLQ@mail.gmail.com

[-- Attachment #1: Type: text/plain, Size: 2023 bytes --]

On Tue, 2019-05-14 at 13:16 -0600, Michael Haeuptle wrote:
> Hello,
> 
> I was wondering if it is possible to run apps like nvmf target as a
> non-root user.
> 
> I read the sections about pagemap/IOMMU in both DPDK and SPDK and I'm not
> sure if it is possible or not from the text.
> 
> In any case, I enabled IOMMU via the grub command line and loaded vfio-pci
> but I'm still getting an error:
> 
> Starting SPDK v19.04 / DPDK 19.02.0 initialization...
> [ DPDK EAL parameters: nvgrid --no-shconf -c 0x1 --log-level=lib.eal:6
> --base-virtaddr=0x200000000000 --match-allocations
> --file-prefix=spdk_pid6059 ]
> EAL: VFIO support initialized
> EAL: Cannot obtain physical addresses: Success. Only vfio will function.
> error allocating rte services array
> EAL: FATAL: rte_service_init() failed
> EAL: rte_service_init() failed
> Failed to initialize DPDK

In theory, yes it is possible to run the NVMe-oF target as a non-root user.
Historically we've even had it working (we contributed the patches to DPDK to
make it work). But we don't have automated tests for this, and DPDK doesn't
either, so periodically the functionality goes stale. Based on the error message
you are seeing, I think that is what happened here - this new rte_service_init
code in DPDK is doing something that requires root when it shouldn't be.

I think we need to address the testing issue prior to fixing whatever the bug
is. We already have a set of tests running on a physical system with the IOMMU
enabled, so it should be as simple as dropping privileges in the test script
when it goes to run the NVMe-oF target, if the IOMMU is enabled. I'm going to
give this a shot and see how it works out.

> 
> I'm seeing this message in dmesg after enabling iommu in grub (but nothing
> else).
> [    0.000000] DMAR: IOMMU enabled
> 
> Thanks.
> 
> -- Michael
> _______________________________________________
> SPDK mailing list
> SPDK(a)lists.01.org
> https://lists.01.org/mailman/listinfo/spdk


             reply	other threads:[~2019-05-15 18:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-15 18:12 Walker, Benjamin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-05-17 17:58 [SPDK] Running nvmf target as non-root Michael Haeuptle
2019-05-17 17:30 Walker, Benjamin
2019-05-16 16:21 Walker, Benjamin
2019-05-16  3:39 Stojaczyk, Dariusz
2019-05-14 19:16 Michael Haeuptle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22eb01877935a036ae15a7ee26da19a5ad1f5f63.camel@intel.com \
    --to=spdk@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox