From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: [PATCH 1/2] virtio: initialize iopl when device is initialized Date: Fri, 6 Mar 2015 17:33:58 +0100 Message-ID: References: <1425602726-26538-1-git-send-email-stephen@networkplumber.org> <1425602726-26538-2-git-send-email-stephen@networkplumber.org> <20150306082057.5c505f54@urahara> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev-VfR2kkLFssw@public.gmane.org" To: Stephen Hemminger Return-path: In-Reply-To: <20150306082057.5c505f54@urahara> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" Hello Stephen, On Fri, Mar 6, 2015 at 5:20 PM, Stephen Hemminger < stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.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