From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f169.google.com (mail-ob0-f169.google.com [209.85.214.169]) by dpdk.org (Postfix) with ESMTP id 18E765949 for ; Fri, 6 Mar 2015 23:04:34 +0100 (CET) Received: by obbgq1 with SMTP id gq1so23471322obb.2 for ; Fri, 06 Mar 2015 14:04:33 -0800 (PST) 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=hiojKhR5+aIrghi5/pl3FPeBj4k7n7Uuy6F9jcOGk4Y=; b=H/xdIjwAtEE5f6I4ZmEqoYJ3y2ECA5EuSGnxu1YeW2c8iw0uWqWd9dDybOitm3LzQH IIesQxdvPP8HB+nPcW5Zw3mxggGDsmznPYMvm8K0wJGmlDiYSIUhDPF/7yymrGvqczGH Figj2JkIxGqcZV+uYenvu10zuEVBTx+FRuWpBkO/zJ/eCM88Z7Vo+ndcI3erVk2bg8WH ZfLdM8ubiPhshHQek/1hoEmpsZOa3KglB26eJ+5FpRzGGKtNRN+QnNPiLXhVWwAfMMEx i0hWLqshmkVPZU28I4xtjL/9i+48rChAnUMmUjti+IQjcKzwQ3WVgGtbUlzIuH/UYi+e h6jQ== X-Gm-Message-State: ALoCoQljHpxkwNVc/AI6V20iDIj1csarB0/VuTGXdQa5+6g9JaWGCCZX+ADr0GXslzMANRAk2uuc MIME-Version: 1.0 X-Received: by 10.202.182.7 with SMTP id g7mr11666372oif.13.1425679473394; Fri, 06 Mar 2015 14:04:33 -0800 (PST) Received: by 10.76.34.35 with HTTP; Fri, 6 Mar 2015 14:04:33 -0800 (PST) In-Reply-To: <20150306085514.1b0ecbd2@urahara> References: <1425602726-26538-1-git-send-email-stephen@networkplumber.org> <1425602726-26538-2-git-send-email-stephen@networkplumber.org> <20150306082057.5c505f54@urahara> <20150306085514.1b0ecbd2@urahara> Date: Fri, 6 Mar 2015 23:04:33 +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: Fri, 06 Mar 2015 22:04:34 -0000 On Fri, Mar 6, 2015 at 5:55 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > No virtio_dev_init is called too late, after interrupt handling > threads are spawned. > > /* Launch threads, called at application init(). */ > int > rte_eal_init(int argc, char **argv) > { > int i, fctret, ret; > ... > if (rte_eal_intr_init() < 0) > rte_panic("Cannot init interrupt-handling thread\n"); > ... > > if (rte_eal_dev_init() < 0) > rte_panic("Cannot init pmd devices\n" > There is no "io level" loss when going through fork and/or daemon : this affirmation contradicts the manual and my test programs. Now, looking at the problem from scratch, the constructor in virtio pmd does not call iopl(). It registers a driver with an init function called from rte_eal_dev_init(). So iopl() is not called at "_start" time (in both virtio static or shared object cases), but in rte_eal_dev_init(). In the end, the fix would be to move rte_eal_intr_init() after rte_eal_dev_init(). Can you test this ? Thanks. -- David Marchand