From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 1A9FDA6A for ; Tue, 12 Jul 2016 19:09:27 +0200 (CEST) Received: by mail-wm0-f52.google.com with SMTP id i5so33826371wmg.0 for ; Tue, 12 Jul 2016 10:09:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=jRlOpc6izmL7Mk89XYl8U3A4c3MZtEnl5iAcTTDFGxc=; b=vPQK04DShJgnQ180S1REQC3nUUKjLArjev7AyTrft4DiJ+aFcCv+R1EXKGB0NWrfUZ 6xyX91a60f24YI4GwqAGGmxlnJyGlH9yHiLe2zuvYEr4IjqpNJvAYKi3eHGVs4K8sQ7T HRWeqHf4PYFznvfPSGTsZyIZf+aK6VH+DvDX0uHknZ7kc1wrc2vfkrk8LupsILK0PhUJ tBeA8GBFmiOULgOC4OaKSabb+m7m6EAiztlw01ikZN7cPPsWLNoCdX9XZdr/DPG45dat foimWqvg+PsYmlqP1x4Hg2Zav91F1GIPw/bjn8GE3RvOqqMVK6Q7avKYViaU/vC7SK6/ UtMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=jRlOpc6izmL7Mk89XYl8U3A4c3MZtEnl5iAcTTDFGxc=; b=SL3RAGa0LjPvEBcoB/bYD2RqIYXTB9Qa73TuXA5tICcF3OdMWJIE4oSqkD+S7RCTRH rYRWf08j0Icug4lFWY7y0ayglcdSGlVCa9/NchAdViILe1+1ePzkMWHY2NShQ0GamzHR 8nc2TsYT1VyXkXqkAQtaEExtRfe0u4ht//QHZ9vp+FSXBKzG0AutcPavh8zAufmdmG7R YSDEapWX2OjlXwKxoWDPF2z+3h0E9v69lvh7CTKEbn3IABZLL6XBKFdp6ffBVtz70vGZ 0Ugd1mz3atPOmldGRiOMW84gDmjdv29fhQhwz9HBo4cx04FY8AzKDDfvCf7taioYlRlX DTcA== X-Gm-Message-State: ALyK8tIYPMih6KYdVrnJTQVBl2L+7GkFI7x/zOH1Ogn3uHTWjdPsMiswuMHwgQsOBTQdpgOb X-Received: by 10.28.152.202 with SMTP id a193mr22316427wme.98.1468343366874; Tue, 12 Jul 2016 10:09:26 -0700 (PDT) Received: from 6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id i195sm4451983wmg.1.2016.07.12.10.09.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jul 2016 10:09:21 -0700 (PDT) Date: Tue, 12 Jul 2016 19:09:17 +0200 From: Adrien Mazarguil To: Thomas Monjalon Cc: Jez Higgins , users@dpdk.org, olivier.matz@6wind.com, sergio.gonzalez.monroy@intel.com Message-ID: <20160712170917.GU7621@6wind.com> Mail-Followup-To: Thomas Monjalon , Jez Higgins , users@dpdk.org, olivier.matz@6wind.com, sergio.gonzalez.monroy@intel.com References: <577E798F.9070700@jezuk.co.uk> <4313092.zcSIIfa3F0@xps13> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4313092.zcSIIfa3F0@xps13> Subject: Re: [dpdk-users] Running DPDK as non-root X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jul 2016 17:09:27 -0000 On Thu, Jul 07, 2016 at 06:17:21PM +0200, Thomas Monjalon wrote: > Hi > > 2016-07-07 16:47, Jez Higgins: > > Is it possible to get DPDK up and running as non-root - if so, can > > anyone guide me to what I'm missing? Or should I be giving this up as a > > bad job? > > You can try the --no-huge option. > But most of drivers won't work without hugepage currently. > A rework of the memory allocation is needed to make it work better. A little late but just for the record, mlx4 and mlx5 should run fine with --no-huge since these devices use virtual memory addresses directly (although I must admit this feature is not tested very often). There is still a requirement for root in order to create raw Ethernet TX and RX queues for security reasons, as it would be like setting a network interface in promiscuous mode to sniff traffic (tcpdump) or creating raw sockets (ping) as a mere user, but this may be possibly achieved (not sure, to be verified) by running applications with the CAP_NET_ADMIN capability. Raw Ethernet QP creation can be allowed by default without special user capabilities by installing MLNX_OFED with the --vma flag. A few features will still be missing such as setting interfaces up and down, updating MTU of the physical link and so on, basically all netdevice operations that are not queries. Those can be performed as super-user on the related netdevice directly from a separate process, even before starting the DPDK application. -- Adrien Mazarguil 6WIND