From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f174.google.com (mail-ob0-f174.google.com [209.85.214.174]) by dpdk.org (Postfix) with ESMTP id 4480C568F for ; Fri, 6 Mar 2015 17:33:59 +0100 (CET) Received: by obcuz6 with SMTP id uz6so21584235obc.12 for ; Fri, 06 Mar 2015 08:33:58 -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=WcRALc+8RJ3Y1XBJwWuueeWnz/01d1FUQyLnEChO63o=; b=TKCeQPKOTfCCqnRo2ojl53fsD9/Cz/SW3kGkorsZDp0vLvSEOUCk3E6JzE3PT753D8 qY5tXdAvWIuEs9fA/ZHbsRD6vGV9ZaQl49AKEH4y73qobs1QAZ9ALwuZmjqkbPEVE8yc 7gkAKfaLxxxKcR8xU3JpQkt9n5dKMMNwdzCFMXWN2W2/qftEj+LIEpziLTZcnQLr1s1X q5zjMKXe+IJIa8SIS5mw2omEdcdE12UXwCxMECBbNESPdjLQ8f/L3nGFJhq1cYY2Mm9F VXTpTXEjrpdxBxDxvi3sJjmn03EF5ncCyXdTG6YQRdCmyDEGpWSS0dRsV53n0pC+Lysn pM4Q== X-Gm-Message-State: ALoCoQmZ0LD4aUFTAwUXWr8oZtOn44gvGEr5z9Ixm6ZdJTTMGHdbXVmg92DtrnQqBUfpayGw40bl MIME-Version: 1.0 X-Received: by 10.202.108.137 with SMTP id h131mr11008765oic.90.1425659638490; Fri, 06 Mar 2015 08:33:58 -0800 (PST) Received: by 10.76.34.35 with HTTP; Fri, 6 Mar 2015 08:33:58 -0800 (PST) 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: Fri, 6 Mar 2015 17:33:58 +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 16:33:59 -0000 Hello Stephen, On Fri, Mar 6, 2015 at 5:20 PM, Stephen Hemminger < stephen@networkplumber.org> wrote: > 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. > > Right now: > gcc start > rte_virtio_pmd_init > iopl > main > daemon > fork > fork > Process is now child of init not original process > > rte_eal_init > fork (pthread) for irq thread > irq thread > (no iopl permssion) > program start > rte_pmd_virtio_configure > > > So the only place where iopl() can be done in the proper context > so that the IRQ (and other helper threads in future) have the correct > permissions is in eal_init. > Is eth_virtio_dev_init() not a better place rather than eal ? I prefer avoiding #ifdef pmd in eal. -- David Marchand