Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Jul 2006 16:01:39 +0900
From:      Pyun YongHyeon <pyunyh@gmail.com>
To:        freebsd-current@FreeBSD.org
Subject:   em(4) patch for ENOBUFS
Message-ID:  <20060729070139.GB27724@cdnetworks.co.kr>

next in thread | raw e-mail | index | archive | help

Hi,

Whilst reading em(4) code to fix jb's sun4v issue I noticed em(4) is
very vulnerable to ENOBUFS situation on receive path.
If em(4) encounter an ENOBUFS it just breaks receive loop and then
try to process the packet next time. However it didn't update the Rx
descriptor status so it never process receive path again(em_handle_rxtx
task runs but it couldn't complete its job and the task takes up all
your CPU).

I've revised receive path to cope with the ENOBUFS situation more
gracefully. It also contains a fix to handle DMA map loading failure
case on receive path by allocating a spare DMA map.

If you have em(4) and experienced ENOBUFS problem please try the
following patch and let me know the result.
http://people.freebsd.org/~yongari/em.ENOBUFS.patch

You can reproduce current issue by lowering number of mbuf clusters
in /boot/loader.conf. For example, add
kern.ipc.nmbclusters="1000" to limit number of mbuf clusters.

-- 
Regards,
Pyun YongHyeon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060729070139.GB27724>