From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Marchand Subject: Re: [PATCH RFC 0/3] only call iopl when necessary Date: Wed, 27 Aug 2014 11:34:06 +0200 Message-ID: References: <1409062300-17004-1-git-send-email-david.marchand@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Cc: "dev-VfR2kkLFssw@public.gmane.org" To: "Xie, Huawei" Return-path: In-Reply-To: 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, On Wed, Aug 27, 2014 at 11:22 AM, Xie, Huawei wrote: > Hi David: > The reason iopl is put in rte_eal_init is that we want all later created > DPDK processes/threads inherit the iopl permission. > If you only call iopl in pmd_init, RX/TX and other threads which needs io > permission will segmentation fault. > rte_virtio_pmd_init() is the constructor that registers the virtio pmd in the driver list. It is called from rte_eal_dev_init() in rte_eal_init(). So it means my patch only moved the call to iopl() a little later in rte_eal_init() and this is still before any thread has been created. I can't see why this would cause a problem. -- David Marchand