From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi0-f45.google.com (mail-oi0-f45.google.com [209.85.218.45]) by dpdk.org (Postfix) with ESMTP id 96F1B5A84 for ; Wed, 14 Oct 2015 10:00:08 +0200 (CEST) Received: by oixx6 with SMTP id x6so7662495oix.2 for ; Wed, 14 Oct 2015 01:00:08 -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=GVZziBlvFIiO8Ae22H1z6ps+Qy57rySxxSZTqMPPZHc=; b=gBaCF91BASu5Bt0K264yl/RkDO5lrVmbpXbaaQj6uTXxgSQebDAL1Xet205a4R7ErX 40dVswMU54lVzFGuzxGirECTJ4BgPIGuHBJPp5PRj7H1nQmmCzs/uuFdjbfPus+RI5KM xT8lWd45BNUvYuUYWaNkgZVtlzmXbnXBqKuWmjd/qdWFiwJG6Nulsdnui8IjX4yhWwoS U9vWIwJpUergcAfokn1Srll/GdP64eABt3nw2TUaJNaUKpXLulRHgqAWCAV0OcF9HB/N O8/dKguAj0PveKYGfGrw4bq3ylJJMFDYXtDu3M1kQ1JWTJ1rwvIqsBKEw4yfTIJwmLBe NFXA== X-Gm-Message-State: ALoCoQmmtNh/h/CA7oFEqnMV8Cb8BOrGMEEpZsxAp4WSUODef93f0IVNHFavy3HoAAuh2RByMVcf MIME-Version: 1.0 X-Received: by 10.202.180.10 with SMTP id d10mr907494oif.46.1444809607846; Wed, 14 Oct 2015 01:00:07 -0700 (PDT) Received: by 10.76.131.166 with HTTP; Wed, 14 Oct 2015 01:00:07 -0700 (PDT) In-Reply-To: <20151013170706.376bbdd8@xeon-e3> References: <20150930145202.GE32524@hmsreliant.think-freely.org> <2615920.hxcAs4lYm6@xps13> <20151001112545.GC4537@hmsreliant.think-freely.org> <20151013170706.376bbdd8@xeon-e3> Date: Wed, 14 Oct 2015 10:00:07 +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, 14 Oct 2015 08:00:09 -0000 On Wed, Oct 14, 2015 at 2:07 AM, Stephen Hemminger < stephen@networkplumber.org> wrote: > On Thu, 1 Oct 2015 07:25:45 -0400 > Neil Horman wrote: > > > On Wed, Sep 30, 2015 at 05:37:05PM +0200, Thomas Monjalon wrote: > > > 2015-09-30 10:52, Neil Horman: > > > > I think it may be solved by calling iopl in the constructor. > > > We just need an extra call in rte_virtio_pmd_init() to detect iopl > failures. > > > We can also simply move rte_eal_intr_init() after rte_eal_dev_init(). > > > Please read my previous post on this topic: > > > > http://thread.gmane.org/gmane.comp.networking.dpdk.devel/14761/focus=22341 > > > > > > About the multiprocess case, I don't see the problem as the RX/TX and > interrupt > > > threads are forked in the rte_eal_init() context which should call > iopl even in > > > secondary processes. > > > > > > > I'm not talking about secondary processes here (i.e. processes forked > from a > > parent that was the process which initialized the dpdk). I'm referring > to two > > completely independent processes, both of which link to and use the dpdk. > > > > Though I think we're saying the same thing. When you say 'constructor' > above, > > you don't mean 'constructor' in the strict sense, but rather the pmd init > > routine (the one called from rte_eal_vdev_init and rte_eal_dev_init). > If this > > is the case, then yes, that works fine, since each process linking to > the DPDK > > will enter those routines and call iopl. In fact, if thats the case, > then no > > call is needed in the constructor at all. > > I think this patch should be rebased and resubmitted for 2.2. > > It fixes a real problem (virtio link state). The driver changed directory > and the the patch could be redone to minimize changes. > I am testing Thomas proposal (just moving the intr_init() call), else I will rebase this patch. -- David Marchand