From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f182.google.com (mail-ob0-f182.google.com [209.85.214.182]) by dpdk.org (Postfix) with ESMTP id 21C565FEB for ; Mon, 9 Mar 2015 12:05:14 +0100 (CET) Received: by obcva2 with SMTP id va2so14106915obc.3 for ; Mon, 09 Mar 2015 04:05:13 -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=QkRxD5C4K/doOrx4oR2r/vb3qO8kr8ImLrMzrYRCCQI=; b=br/b/fXxgKBix+kn79sLsif13VfBSjqCTtkLsg8AQWx76GzaDjk267z6bEVB+tST3C +eA1EV6OqClG/VaNDWhb8mmVi9yY6sPj10kvj89hbk5ZBxibCFB0LrLROumAJgr6ykeE Rlh18+oKzN2oN6Wac7A/LbGx9QHsoN7yfUKOsIU2BkAPy+fFYyjFAjVw+99vldH758sI MD2mZYfhRAcxf6JCQPeejXYA9u9ONWczw6xOjCm83yKfdhgCkFwNQWIB+3hudSr/G/9L /+7nfm36EeqBAk6LfyfqJ15gWllOA9vhzJkIMK46095cYblcpaJQZj1yD/8rUReBt4/l O+RA== X-Gm-Message-State: ALoCoQkMPDOrnVqX/Xt0lwT9FpnkRxd32fkJgFKAXKM1DS6HUjCHqHW0XQA9p7usHtFJ7VAXM6Fe MIME-Version: 1.0 X-Received: by 10.182.128.234 with SMTP id nr10mr20643991obb.62.1425899113311; Mon, 09 Mar 2015 04:05:13 -0700 (PDT) Received: by 10.76.34.35 with HTTP; Mon, 9 Mar 2015 04:05:13 -0700 (PDT) In-Reply-To: <20150306082057.5c505f54@urahara> References: <1425602726-26538-1-git-send-email-stephen@networkplumber.org> <1425602726-26538-2-git-send-email-stephen@networkplumber.org> <20150306082057.5c505f54@urahara> Date: Mon, 9 Mar 2015 12:05:13 +0100 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 1/2] virtio: initialize iopl when device is initialized 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: Mon, 09 Mar 2015 11:05:14 -0000 So, a little summary. On Fri, Mar 6, 2015 at 5:20 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > > > The virtio driver needs to use in/out instructions therefore it must > initialize > > > using iopl(2) system call. The problem is that virtio initialization > happens very > > > early, and any application that uses daemon() or calls eal_init later > in another > > > context will fail. > Part of this is wrong. The manual tells that this should be inherited. I added some fork and daemon to test programs of mine which confirmed the manual seems to be right. The real problem is that iopl is not called at "constructor" time for it to be inherited by irq thread. > The issue is that virtio has no place it can do iopl() and have the IRQ > thread > work. It only shows up on real code where application is daemon, not in a > toy > demo or test application. > Contrary to what you asserted, the problem does happen when using testpmd (if this is the toy you are talking about). So, I would say your real world application is no better than testpmd. I will post the right fixes. -- David Marchand