re(4) causes memory corruption?

Yonghyeon PYUN pyunyh at gmail.com
Wed Apr 9 05:58:11 UTC 2014


On Tue, Apr 08, 2014 at 11:21:12AM +0300, Andriy Gapon wrote:
> 
> I have this network card (it's actually integrated into a motherboard):
> 
> re0: <RealTek 8168/8111 B/C/CP/D/DP/E/F/G PCIe Gigabit Ethernet> port
> 0xde00-0xdeff mem 0xfdaff000-0xfdafffff,0xfdae0000-0xfdaeffff irq 18 at device
> 0.0 on pci2
> re0: Using 1 MSI-X message
> re0: Chip rev. 0x3c000000
> re0: MAC rev. 0x00400000
> miibus0: <MII bus> on re0
> rgephy0: <RTL8169S/8110S/8211 1000BASE-T media interface> PHY 1 on miibus0
> rgephy0:  none, 10baseT, 10baseT-FDX, 10baseT-FDX-flow, 100baseTX,
> 100baseTX-FDX, 100baseTX-FDX-flow, 1000baseT, 1000baseT-master, 1000baseT-FDX,
> 1000baseT-FDX-master, 1000baseT-FDX-flow, 1000baseT-FDX-flow-master, auto, auto-flow
> 
> When there is little traffic through the interface I do not observe any problems
> with it.
> But within 15 seconds of applying some moderate traffic I would always observe a
> heavy screen corruption often followed by a total freeze or a hardware self-reset.
> An example of the moderate traffic is 6 MBytes/s which results in about 10K
> interrupts per seconds.
> 

PCIe re(4) controllers do not seem to have intelligent interrupt
moderation feature.  At least it's not documented at all.  To
overcome the H/W limitation, re(4) uses one-shot timer interrupt to
mitigate interrupt processing overhead.  However the maximum time
allowed to set for one-shot timer is less than or equal to 65us so
you may still see lots of interrupts under heavy load.

> I am not sure what causes the problem.  Could it be some driver using memoery
> that it should not or hardware writing where it should not or if this something
> completely in the hardware.
> I will appreciate any hints on possible ways to analyze this issue.

It seems your controller is old RTL8168C and I'm not aware of
any memory corruption issues with the RTL8168C.  There were a
couple of re(4) instability reports but they were using relatively
recent re(4) controllers and none of them showed memory corruption.

> 
> Thanks!
> -- 
> Andriy Gapon


More information about the freebsd-net mailing list