From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) by dpdk.org (Postfix) with ESMTP id 669448D91 for ; Wed, 30 Sep 2015 10:28:54 +0200 (CEST) Received: by oixx17 with SMTP id x17so18240240oix.0 for ; Wed, 30 Sep 2015 01:28:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=o9FvsVHz8z1ictKZsPqJgaBgoJ9KVuCHCXw4mD4TwaU=; b=YCAOaWa7CAGSorW0reuc6OhlzqFznboedGuTZbYTj5laWMfZkmiIwaRCfmSY1r4aQ9 x9HWIAHWqCRFea3OIUW5kWHEVxLMdFm4Fa+qz5Rv+dT3Hds+ITWKHoOGq5BAOoUv3TVQ OpXZZbxOWrPUQ1B+NU4KqsAnk/gnsCyqCYJzjT//P9I5GPekjV4DvZduPgV8ceJZm5Dq zvTCfWX+E8t727FXX1yIeZhcOWAD2AV9yDZnIwlHL3OVmgl18UVOz0MkvQ9bSBnR1Ey/ pC2Lfze4syJnYxMbN6sXH/l3pTjM58wqxatYZuTyjcsySJTzqvR2K+wD3sx2RZSwGSWP lBCQ== X-Gm-Message-State: ALoCoQm+gNYC43JZGKgmGzw2WcvCtcTGFyhq1iCkivw8a1c0Pk/hLkLH+Ks523spq+tj0KvRonZh MIME-Version: 1.0 X-Received: by 10.202.52.213 with SMTP id b204mr1432434oia.0.1443601733655; Wed, 30 Sep 2015 01:28:53 -0700 (PDT) Received: by 10.76.131.166 with HTTP; Wed, 30 Sep 2015 01:28:53 -0700 (PDT) In-Reply-To: <20150929122542.419781cc@urahara> References: <1425912999-13118-1-git-send-email-david.marchand@6wind.com> <1425912999-13118-3-git-send-email-david.marchand@6wind.com> <20150310131428.GB7873@hmsreliant.think-freely.org> <20150929122542.419781cc@urahara> Date: Wed, 30 Sep 2015 10:28:53 +0200 Message-ID: From: David Marchand To: Stephen Hemminger Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 2/2] virtio: change io privilege level as early as possible X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Sep 2015 08:28:54 -0000 On Tue, Sep 29, 2015 at 9:25 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > On Tue, 10 Mar 2015 09:14:28 -0400 > Neil Horman wrote: > > > > > I don't see how this works for all cases. The constructor is called > once when > > the library is first loaded. What if you have multiple independent > (i.e. not > > forked children) processes that are using the dpdk in parallel? Only the > > process that triggered the library load will have io permissions set > > appropriately. I think what you need is to have every application that > expects > > to call through the transmit path or poll the receive path call iopl, > which I > > think speaks to having this requirement documented, so each application > can call > > iopl prior to calling fork/daemonize/etc. > > > > I am still seeing this problem with DPDK 2.0 and 2.1. > It seems to me that doing the iopl init in eal_init is the only safe way. > Other workaround is to have application calling iopl_init before eal_init > but that kind of violates the current method of all things being > initialized > by eal_init > Putting it in the virtio pmd constructor is my preferred solution and we don't need to pollute the eal for virtio (specific to x86, btw). -- David Marchand