# Intel 82566DM-2 (em0 input errors and RX Overruns)



## SaveTheRbtz (Feb 18, 2009)

ISP Gateway with 2 integrated Intel NICs

LAN ---- em0 GW em1 ---- INTERNET

At peak time has errors on input em0 interface

```
# netstat -bdhI em0 1
            input          (em0)           output
   packets  errs      bytes    packets  errs      bytes colls drops
       40K   150        29M        36K     0        28M     0     0
       41K   208        30M        38K     0        28M     0     0
       42K     0        31M        39K     0        29M     0     0
       42K    19        32M        39K     0        29M     0     0
       44K     0        32M        40K     0        31M     0     0
       44K    19        32M        40K     0        30M     0     0
       42K   363        32M        38K     0        28M     0     0
```
more load - more errors, some times they rises up to 2k


```
em0@pci0:25:0:  class=0x020000 card=0x34d08086 chip=0x10bd8086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = '82566DM-2 Gigabit Network Connection'
    class      = network
    subclass   = ethernet
    cap 01[c8] = powerspec 2  supports D0 D3  current D0
    cap 05[d0] = MSI supports 1 message, 64 bit enabled with 1 message
    cap 13[e0] = unknown
```


```
# uname -a
FreeBSD 6.4-STABLE FreeBSD 6.4-STABLE #6:
```


```
net.inet.ip.forwarding=1
net.inet.ip.fastforwarding=1
net.inet.ip.random_id=1
net.inet.ip.redirect=0
net.inet.ip.sourceroute=0
net.inet.ip.accept_sourceroute=0

net.inet.icmp.log_redirect=0
net.inet.icmp.drop_redirect=1
net.inet.icmp.bmcastecho=0
net.inet.icmp.maskrepl=0

net.inet.tcp.delayed_ack=1
net.inet.tcp.sendspace=65536
net.inet.tcp.recvspace=65536
net.inet.tcp.msl=7500
net.inet.tcp.blackhole=2
net.inet.tcp.mssdflt=1460

net.inet.udp.recvspace=65536
net.inet.udp.maxdgram=57344
net.inet.udp.blackhole=1
kern.ipc.nmbclusters=65535
kern.ipc.maxsockets=204800
kern.ipc.maxsockbuf=262144
net.inet.tcp.rfc1323=1

net.route.netisr_maxqlen=65536
net.inet.ip.fw.verbose_limit=200
#net.isr.direct=1
net.inet.ip.intr_queue_maxlen=768
net.inet.ip.dummynet.io_fast=1
#def 'buckets'
##Maybe set up to 2048?
net.inet.ip.dummynet.hash_size=256
##May be helpful too
#net.inet.ip.dummynet.max_chain_len=1024
net.inet.ip.dummynet.pipe_slot_limit=500
```



> em0: Adapter hardware address = 0xc617821c
> em0: CTRL = 0x48100240 RCTL = 0x8002
> em0: Packet buffer = Tx=14k Rx=10k
> em0: Flow control watermarks high = 8192 low = 6692
> ...



Is there a way to fight Rx overruns and Receive No Buffers?


----------



## SaveTheRbtz (Mar 21, 2009)

adding to loader.conf 

```
hw.em.rxd=1024
hw.em.txd=1024
```
Solved problem


----------

