From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751196AbbJBBVX (ORCPT ); Thu, 1 Oct 2015 21:21:23 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:34028 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750924AbbJBBVW (ORCPT ); Thu, 1 Oct 2015 21:21:22 -0400 Subject: Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X To: Stephen Hemminger References: <1443652138-31782-1-git-send-email-stephen@networkplumber.org> <1443652138-31782-3-git-send-email-stephen@networkplumber.org> <560DC45A.3050507@gmail.com> <20151001170145.4239de9f@urahara> Cc: hjk@hansjkoch.de, gregkh@linux-foundation.org, dev@dpdk.org, linux-kernel@vger.kernel.org From: Alexander Duyck Message-ID: <560DDC0F.80302@gmail.com> Date: Thu, 1 Oct 2015 18:21:19 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20151001170145.4239de9f@urahara> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/01/2015 05:01 PM, Stephen Hemminger wrote: > On Thu, 1 Oct 2015 16:40:10 -0700 > Alexander Duyck wrote: > >> I agree with some other reviewers. Why call pci_enable_msix in open? >> It seems like it would make much more sense to do this on probe, and >> then disable MSI-X on free. I can only assume you are trying to do it >> to save on resources but the fact is this is a driver you have to >> explicitly force onto a device so you would probably be safe to assume >> that they plan to use it in the near future. > Because if interface is not up, the MSI handle doesn't have to be open. > This saves resources and avoids some races. Yes, but it makes things a bit messier for the interrupts. Most drivers take care of interrupts during probe so that if there are any allocation problems they can take care of them then instead of leaving an interface out that will later fail when it is brought up. It ends up being a way to deal with the whole MSI-X fall-back issue. - Alex