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: Sat, 7 Mar 2015 07:53:40 +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> <20150306085514.1b0ecbd2@urahara> <20150306154344.7057b6d4@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: <20150306154344.7057b6d4@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" On Sat, Mar 7, 2015 at 12:43 AM, Stephen Hemminger < stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org> wrote: > On Fri, 6 Mar 2015 23:04:33 +0100 > David Marchand wrote: > > > In the end, the fix would be to move rte_eal_intr_init() after > rte_eal_dev_init(). > > > That would work, but was worried it would break other devices. > I had checked the pmds before proposing. rte_intr_* api is called only from the pdev (meaning pci) drivers at the moment. rte_eal_dev_init() means we are still in the "pmd init" phase for the pdev drivers which means we are still initialising per-driver things for them since they have no idea of the devices to handle (the devices are discovered later with the pci scan). In this phase, the code tells that they are not registering interrupts (and I don't see how they could register interrupts without knowing devices). The only problem would be for future vdev drivers (current drivers do not use rte_intr_*). But this problem would occur because the driver/device datamodel is not consistent. If we could rework this to have devices instantiated at the same phase, then the problem won't happen. So, we can hope we will have reworked the driver/device datamodel in dpdk, before this problem hits us. I only had checked the pmds, so I may have missed something else that uses interrupts (if any) but I think this is worth trying and fixing for 2.0. Thomas, opinion ? -- David Marchand