From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755153AbbDTN7V (ORCPT ); Mon, 20 Apr 2015 09:59:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54572 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750849AbbDTN7S (ORCPT ); Mon, 20 Apr 2015 09:59:18 -0400 Date: Mon, 20 Apr 2015 15:59:06 +0200 From: "Michael S. Tsirkin" To: Stephen Hemminger Cc: "Hans J. Koch" , Greg Kroah-Hartman , kvm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] uio: add irq control support to uio_pci_generic Message-ID: <20150420135906.GA26492@redhat.com> References: <20150415095934.09966367@urahara> <20150416094105-mutt-send-email-mst@redhat.com> <20150416142110.2fc80b15@urahara> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150416142110.2fc80b15@urahara> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 16, 2015 at 02:21:10PM -0700, Stephen Hemminger wrote: > On Thu, 16 Apr 2015 09:43:24 +0200 > "Michael S. Tsirkin" wrote: > > > On Wed, Apr 15, 2015 at 09:59:34AM -0700, Stephen Hemminger wrote: > > > The driver already supported INTX interrupts but had no in kernel > > > function to enable and disable them. > > > > > > It is possible for userspace to do this by accessing PCI config > > > directly, but this racy > > > > How is it racy? We have userspace using this interface, > > if there's a race I want to fix it. > > There is nothing to prevent two threads in user space doing > read/modify write at the same time. Well that's a userspace bug then - so let's drop that from commit log lest people think this fixes some kernel bugs. read/modify/write to the same register is at least an easy to grasp problem, creating an extra interface for the same function opens up the possibility that some userspace will do read/modify/write from one thread with irqcontrol from another thread, creating more races. > The bigger issue is that DPDK needs to support multiple UIO > interface types. And with current model there is no abstraction. > The way to enable/disable IRQ is different depending on the UIO > drivers. OK compatibility with other devices might be useful, but what are the other UIO drivers DPDK supports? I only found support for igb_uio so far, and that doesn't seem to be upstream. -- MST