Re: [dpdk-dev] [PATCH 2/2] uio: new driver to support PCI MSI-X

Stephen Hemminger
2015-10-02T00:01:37Z

On Thu, 1 Oct 2015 16:40:10 -0700
Alexander Duyck <alexander.duyck@gmail.com> 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.