Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PCI MSI for re(4)

0 views
Skip to first unread message

Jonathan A. Kollasch

unread,
Nov 12, 2015, 11:42:07 PM11/12/15
to tech...@netbsd.org, curren...@netbsd.org, tech...@netbsd.org
Hi,

Attached is a patch that should enable PCI MSI for pci(4)-attached re(4)
NICs. I would like both review of the code, and additional testing.

I've tested it successfully on amd64 -current with a
8100E/8101E/8102E/8102EL chip.

Jonathan Kollasch
msi-for-if_re_pci.c.patch

Kengo NAKAHARA

unread,
Nov 13, 2015, 12:12:35 AM11/13/15
to jakl...@kollasch.net, tech...@netbsd.org, curren...@netbsd.org, tech...@netbsd.org
Hi,
Great, the patch looks good to me.

I'm sorry that I cannot do additional tests as I don't have re(4) NICs.


Thanks,

--
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
Core Product Development Department,
Product Division,
Technology Unit

Kengo NAKAHARA <k-nak...@iij.ad.jp>

NONAKA Kimihiro

unread,
Nov 13, 2015, 12:39:14 AM11/13/15
to Jonathan A. Kollasch, tech...@netbsd.org, curren...@netbsd.org, tech...@netbsd.org
Hi,

2015-11-13 13:37 GMT+09:00 Jonathan A. Kollasch <jakl...@kollasch.net>:

> Attached is a patch that should enable PCI MSI for pci(4)-attached re(4)
> NICs. I would like both review of the code, and additional testing.

It works fine with 8111G chip on amd64 :-)

Regards,
--
NONAKA Kimihiro

Rin Okuyama

unread,
Nov 13, 2015, 12:49:56 AM11/13/15
to tech...@netbsd.org, curren...@netbsd.org, tech...@netbsd.org
Hi,

it works fine with a 8168/8111 chip on i386:

% uname -a
NetBSD XXX 7.99.21 NetBSD 7.99.21 (GENERIC) #0: Fri Nov 13 14:31:15 JST 2015 root@XXX:XXX i386
% dmesg | grep re0
re0 at pci3 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x11)
re0: interrupting at msi0 vec 0
re0: Ethernet address XX:XX:XX:XX:XX:XX
re0: using 256 tx descriptors
rgephy0 at re0 phy 7: RTL8251 1000BASE-T media interface, rev. 0
% intrctl list
interrupt id CPU#00 CPU#01 CPU#02 CPU#03 CPU#04 CPU#05 CPU#06 CPU#07 device name(s)
ioapic0 pin 9 0* 0 0 0 0 0 0 0 unknown
ioapic0 pin 1 418* 0 0 0 0 0 0 0 unknown
ioapic0 pin 17 0* 0 0 0 0 0 0 0 unknown
ioapic0 pin 20 22* 0 0 0 0 0 0 0 unknown
msi0 vec 0 18119* 0 0 0 0 0 0 0 unknown
ioapic0 pin 23 32* 0 0 0 0 0 0 0 unknown
ioapic0 pin 19 3099* 0 0 0 0 0 0 0 unknown
ioapic0 pin 18 0* 0 0 0 0 0 0 0 unknown
ioapic0 pin 4 0* 0 0 0 0 0 0 0 unknown

Thanks,
Rin

Paul Goyette

unread,
Nov 13, 2015, 6:15:19 AM11/13/15
to Jonathan A. Kollasch, tech...@netbsd.org, curren...@netbsd.org, tech...@netbsd.org
Great - I can give this a quick test-drive tomorrow. Is there anything
specific I should be looking for? Or it is a simple Pass/Fail? :)



+------------------+--------------------------+-------------------------+
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| (Retired) | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd.org |
+------------------+--------------------------+-------------------------+

Paul Goyette

unread,
Nov 13, 2015, 6:45:43 AM11/13/15
to Jonathan A. Kollasch, tech...@netbsd.org, curren...@netbsd.org, tech...@netbsd.org
On Fri, 13 Nov 2015, Paul Goyette wrote:

> On Thu, 12 Nov 2015, Jonathan A. Kollasch wrote:
>
>> Hi,
>>
>> Attached is a patch that should enable PCI MSI for pci(4)-attached re(4)
>> NICs. I would like both review of the code, and additional testing.
>>
>> I've tested it successfully on amd64 -current with a
>> 8100E/8101E/8102E/8102EL chip.
>
> Great - I can give this a quick test-drive tomorrow. Is there anything
> specific I should be looking for? Or it is a simple Pass/Fail? :)

A quick kernel build and a reboot - initial appearances look good. It
attaches successfully, and I'm using the network to send this Email!

Here's the dmesg for comparison:

Before:
re0 at pci3 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x06)
re0: interrupting at ioapic0 pin 17
re0: Ethernet address 30:b5:c2:05:0e:66
re0: using 256 tx descriptors
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 4

After:
re0 at pci3 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x06)
re0: interrupting at msi0 vec 0
re0: Ethernet address 30:b5:c2:05:0e:66
re0: using 256 tx descriptors
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 4

There's not much change, only the "interrupting at" line.


HOWEVER, I'm not sure I really like the fact that the dmesg says that
re0 is "interrupting at msi0" when there is no other reference in the
dmesg to what an msi is, and there is (apparently) no man page for
msi(4) (nor for any other manual section).


Anyway, I'll leave this running for a while (overnight at least) and see
if any problems arise.

Nicolas Joly

unread,
Nov 14, 2015, 8:25:05 AM11/14/15
to Jonathan A. Kollasch, tech...@netbsd.org, curren...@netbsd.org, tech...@netbsd.org
Works fine for me.

njoly@raya [~]> dmesg | grep re0
re0 at pci2 dev 0 function 0: RealTek 8168/8111 PCIe Gigabit Ethernet (rev. 0x07)
re0: interrupting at msi0 vec 0
re0: Ethernet address f0:1f:af:11:b3:ab
re0: using 256 tx descriptors
rgephy0 at re0 phy 7: RTL8169S/8110S/8211 1000BASE-T media interface, rev. 5

Thanks.

--
Nicolas Joly

Cluster & Computing Group
Biology IT Center
Institut Pasteur, Paris.
0 new messages