tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFC: add MSI/MSI-X support to NetBSD



Hi dyoung,

(2014/06/07 5:56), David Young wrote:
On Fri, Jun 06, 2014 at 07:06:00PM +0000, Taylor R Campbell wrote:
    Date: Fri, 6 Jun 2014 12:56:53 -0500
    From: David Young <dyoung%pobox.com@localhost>

    Here is the proposal that I came up with many months (a few years?) ago
    with input from Matt Thomas.  I have tried to account for Matt's
    requirements, but I'm not sure that I have done so.

For those ignoramuses among us who remain perplexed by the apparent
difficulty of using a new interrupt delivery mechanism, could you add
some notes to your proposal about what driver authors would need to
know about it and when & how one would use it in a driver?

Driver authors do not need to know anything about bus_msi(9) unless
they're doing something fancy.  bus_msi(9) will be invisible to the
author of a PCI driver because pci_intr(9) will establish the mailbox
and all of that.

bus_msi(9) hides differences between hardware platforms.

I think that pci_intr(9) already hides differences between hardware
platforms. Of course pci_intr_establish() is defined in MD header,
but the function signature is the same. So pci_intr(9) is good enough
to hide differences between hardware platforms. Could you tell me
what does bus_msi(9) abstract additionally?

Would all architectures with PCI support bus_msi(9), or would PCI
device drivers need to conditionally use it?  Why isn't it just a
matter of modifying pci_intr_map, or calling pci_intr_map_msi like in
OpenBSD?

For a PCI driver, it *is* a matter of calling pci_intr_map(9), or
whatever NetBSD comes up with for MSI/MSI-X.

I cannot find out the matter of calling pci_intr_map(9)...
Do you mean that a PCI dirver should use API abstructing a bus such as
FreeBSD's bus_setup_intr() API?


Still I am studying MSI and PCI. To study these components, I am
prototyping NetBSD MSI/MSI-X support in this repository:
https://github.com/knakahara/netbsd-src/tree/k-nakahara-msi-msix-proto

This repository have some ugly codes, because of keeping current
implementation as I can. And there are several unimplemented features.
Howerver, if_wmx works multi interrupts, one handle rx queue only,
another handle rx queue and the other handle other interrupts.


Thanks,
--
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
Core Product Development Department,
Product Division
mail: k-nakahara%iij.ad.jp@localhost


Home | Main Index | Thread Index | Old Index